<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>WebHive Blog</title>
	<atom:link href="http://webhive.com.ua/blog/feed/" rel="self" type="application/rss+xml" />
	<link>http://webhive.com.ua/blog</link>
	<description>Just another WordPress weblog</description>
	<lastBuildDate>Fri, 04 Jun 2010 14:12:04 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>SocialEngine Speed-Up Tips</title>
		<link>http://webhive.com.ua/blog/socialengine-speed-up-tips/</link>
		<comments>http://webhive.com.ua/blog/socialengine-speed-up-tips/#comments</comments>
		<pubDate>Fri, 04 Jun 2010 12:49:04 +0000</pubDate>
		<dc:creator>Eugene Sutula</dc:creator>
				<category><![CDATA[Other]]></category>

		<guid isPermaLink="false">http://webhive.com.ua/blog/?p=23</guid>
		<description><![CDATA[After numerous projects targeted at the optimization of SocialEngine we have gathered some generic methods that might be interesting if you are looking to speed up your community.
Although the following tips were tested on SocialEngine version 3, they are valuable for all versions.
In this article I want to put emphasis on html/css optimization rather than [...]]]></description>
			<content:encoded><![CDATA[<p>After numerous projects targeted at the optimization of SocialEngine we have gathered some generic methods that might be interesting if you are looking to speed up your community.</p>
<p>Although the following tips were tested on SocialEngine version 3, they are valuable for all versions.</p>
<p>In this article I want to put emphasis on html/css optimization rather than on php/mysql. But some of these tips will reduce server load as well.</p>
<ol>
<li><strong>Choose plugins carefully.</strong> Less plugins you have -&gt; faster your  website works.</li>
<li><strong>Unite all css files</strong> in one. That will reduce total number of  separate requests to server. I&#8217;ve seen more than 25 separate css files  for a single page. Minimization of css is a good idea as well.</li>
<li><strong>Unite javascript files</strong> and move them to the bottom where it&#8217;s  possible. Pages will load up faster because all html/css will load at  first.</li>
<li><strong>Unite small images</strong>, for example icons, in bigger images and  output them using <strong>css sprites</strong>, the way it is done in a lot in WordPress themes. Again this will reduce number of  separate http requests to server.</li>
<li> Try to use a <strong>static page for home</strong>. Since it will be the most  popular page of your website it should load up as fast as possible.<br />
A good workaround for dynamic home pages is to make a page that will be  updated once every 20 minutes.</li>
<li><strong>Minimize</strong> what you <strong>load from outside servers</strong>. Place widgets and gadgets from outside sources (eg twitter widgets) lower in the page or in the right-hand column, so that most of the page can load before the widget. Use images from your own server for ads where possible.</li>
</ol>
<p>If you are seriously working on speed-up <a href="http://developer.yahoo.com/performance/rules.html">best practices from Yahoo</a> is a good starting point.</p>
<p>Thanks to Clare for proof-reading.</p>
]]></content:encoded>
			<wfw:commentRss>http://webhive.com.ua/blog/socialengine-speed-up-tips/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Niche communities</title>
		<link>http://webhive.com.ua/blog/niche-communities/</link>
		<comments>http://webhive.com.ua/blog/niche-communities/#comments</comments>
		<pubDate>Mon, 01 Feb 2010 10:40:53 +0000</pubDate>
		<dc:creator>Eugene Sutula</dc:creator>
				<category><![CDATA[Other]]></category>
		<category><![CDATA[communities]]></category>
		<category><![CDATA[SocialEngine]]></category>

		<guid isPermaLink="false">http://webhive.com.ua/blog/?p=17</guid>
		<description><![CDATA[Pretty often I see people making the same mistake again and again when start a community website. Eventually a lot of people install all plugins they found to be &#8220;cool&#8221;: blog, chat, groups, forum, video, music, gallery and so on. With addition of a bunch of modifications to expend the functionality. The main problem here [...]]]></description>
			<content:encoded><![CDATA[<p>Pretty often I see people making the same mistake again and again when start a community website. Eventually a lot of people install all plugins they found to be &#8220;cool&#8221;: blog, chat, groups, forum, video, music, gallery and so on. With addition of a bunch of modifications to expend the functionality. The main problem here is that in this case you will require good hosting from the very beginning.<br />
There is another serious issue here &#8211; attention of your users will be spread around the features. People won’t know what to start from and most likely some of community functionality won’t be used at all (but will eat server resources).</p>
<p>Here is an example. You are starting an “art house movies&#8221; community. In this case you can install SocialEngine, add plugins like groups (for discussions) and blogs (for movie reviews). Also few mods to improve usability. As an option you can add video plugin to keep movie trailers, but only in case your budget allows good hosting. In addition you can order to build a custom plugin &#8220;movies&#8221; that will allow admin to add movies and users to rate them.</p>
<p>More than enough for a start. All listed functionality won’t cost much. And you can actually start to work on getting community members (and trying to keep them involved), instead of adding any extra functionality. Your hosting payments won’t be high.</p>
<p>You need to pay attention to what makes your social network different and listen to your users. It’s much better to enhance your specific functionality instead of general. For example, it will make more sense to order a custom recommendation system based on users votes instead of chat.</p>
<p>If you will try to be a second facebook or myspace you will loose. But you can always beat any large network if you will concentrate on a smaller niche.</p>
]]></content:encoded>
			<wfw:commentRss>http://webhive.com.ua/blog/niche-communities/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>SocialEngine correct image resizing</title>
		<link>http://webhive.com.ua/blog/socialengine-correct-image-resizing-part-1/</link>
		<comments>http://webhive.com.ua/blog/socialengine-correct-image-resizing-part-1/#comments</comments>
		<pubDate>Mon, 21 Jul 2008 16:14:21 +0000</pubDate>
		<dc:creator>Eugene Sutula</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[free]]></category>
		<category><![CDATA[mod]]></category>
		<category><![CDATA[SocialEngine]]></category>

		<guid isPermaLink="false">http://webhive.com.ua/blog/?p=16</guid>
		<description><![CDATA[This was the first thing I&#8217;ve found in SocialEngine that should be enhanced.
As you may have noticed SocialEngine in most of cases resizes images using html width and height options.
While this is the easiest technique it&#8217;s not the best one. If you want to keep the high quality of images uploaded by users you need [...]]]></description>
			<content:encoded><![CDATA[<p>This was the first thing I&#8217;ve found in SocialEngine that should be enhanced.<br />
As you may have noticed SocialEngine in most of cases resizes images using html width and height options.<br />
While this is the easiest technique it&#8217;s not the best one. If you want to keep the high quality of images uploaded by users you need to find another solution here.</p>
<p>I&#8217;ve created a mod that can help you to solve this problem. It uses caching, so it will increase the page loading speed of your website.<br />
Let me demonstrate how you can resize images using phpthumb library.</p>
<p>To install this mod you need to follow the next steps</p>
<p>1. Download the mod from <a href="http://webhive.com.ua/products/se_thumb.html">http://webhive.com.ua/products/se_thumb.html</a><br />
and copy all files from archive to your SocialEngine folder.<br />
2. Set permissions &#8216;777&#8242; to folders thumbs/cache and thumbs/tmp after upload.</p>
<p>3. Download phpThumb library from<br />
<a href="http://phpthumb.sourceforge.net/#download">http://phpthumb.sourceforge.net/#download</a><br />
Take the latest stable version you see there (1.7.8 at the moment of writing this doc)<br />
Unzip it and upload to folder include/phpThumb/ in your SocialEngine directory.</p>
<p>4. Now we will need to edit some files (I advise you to make backup copies of all files you will edit).</p>
<p>Let&#8217;s create a function that will output thumbnails of the image instead of original images<br />
<strong>include/class_user.php</strong><br />
Go to the end of file and add before last brace (&#8220;}&#8221;) next code:</p>
<div class="geshi no php">
<div class="head">function user_thumb($nophoto_image = &#8220;&#8221;, $w=90, $h=90) {</div>
<ol>
<li class="li1">
<div class="de1">&nbsp;</div>
</li>
<li class="li1">
<div class="de1"><span class="re1">$user_id</span> <span class="sy0">=</span> <span class="re1">$this</span><span class="sy0">-&amp;</span>gt<span class="sy0">;</span>user_info<span class="br0">&#91;</span>user_id<span class="br0">&#93;</span><span class="sy0">;</span></div>
</li>
<li class="li1">
<div class="de1"><span class="re1">$subdir</span> <span class="sy0">=</span> <span class="re1">$user_id</span><span class="nu0">+999</span><span class="sy0">-</span><span class="br0">&#40;</span><span class="br0">&#40;</span><span class="re1">$user_id</span><span class="nu0">-1</span><span class="br0">&#41;</span><span class="sy0">%</span><span class="nu0">1000</span><span class="br0">&#41;</span><span class="sy0">;</span></div>
</li>
<li class="li1">
<div class="de1"><span class="re1">$userdir</span> <span class="sy0">=</span> <span class="st0">&quot;uploads_user/$subdir/$user_id/&quot;</span><span class="sy0">;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp;</div>
</li>
<li class="li1">
<div class="de1"><span class="re1">$user_photo</span> <span class="sy0">=</span> <span class="re1">$userdir</span><span class="sy0">.</span><span class="re1">$this</span><span class="sy0">-&amp;</span>gt<span class="sy0">;</span>user_info<span class="br0">&#91;</span>user_photo<span class="br0">&#93;</span><span class="sy0">;</span></div>
</li>
<li class="li1">
<div class="de1"><span class="kw1">if</span><span class="br0">&#40;</span><span class="sy0">!</span><span class="kw3">file_exists</span><span class="br0">&#40;</span><span class="re1">$user_photo</span><span class="br0">&#41;</span> <span class="sy0">|</span> <span class="re1">$this</span><span class="sy0">-&amp;</span>gt<span class="sy0">;</span>user_info<span class="br0">&#91;</span>user_photo<span class="br0">&#93;</span> <span class="sy0">==</span> <span class="st0">&quot;&quot;</span><span class="br0">&#41;</span> <span class="br0">&#123;</span> <span class="re1">$user_photo</span> <span class="sy0">=</span> <span class="re1">$nophoto_image</span><span class="sy0">;</span> <span class="br0">&#125;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp;</div>
</li>
<li class="li1">
<div class="de1"><span class="re1">$user_photo</span> <span class="sy0">=</span> <span class="st0">&#39;./show_thumb.php?src=&#39;</span><span class="sy0">.</span><span class="re1">$user_photo</span><span class="sy0">.</span><span class="st0">&quot;&amp;amp;w=&quot;</span><span class="sy0">.</span><span class="re1">$w</span><span class="sy0">.</span><span class="st0">&quot;&amp;amp;h=&quot;</span><span class="sy0">.</span><span class="re1">$h</span><span class="sy0">;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp;</div>
</li>
<li class="li1">
<div class="de1"><span class="kw1">return</span> <span class="re1">$user_photo</span><span class="sy0">;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp;</div>
</li>
<li class="li1">
<div class="de1"><span class="br0">&#125;</span> <span class="co1">// END user_thumb() METHOD</span></div>
</li>
</ol>
</div>
<p>Now we will need to increase the quality of newly uploaded images from 75%(default) to 100%</p>
<p><strong>include/class_upload.php</strong><br />
Search for next code (you will find 4 occurrences):</p>
<div class="geshi no php">
<div class="head">imagejpeg($file, $photo_dest);</div>
<ol>
<li class="li1">
<div class="de1"><span class="sy0">&lt;/</span>pre<span class="sy0">&gt;</span></div>
</li>
<li class="li1">
<div class="de1">and change all <span class="nu0">4</span> occurrences of this code to</div>
</li>
<li class="li1">
<div class="de1"><span class="sy0">&lt;</span>pre lang<span class="sy0">=</span><span class="st0">&quot;php&quot;</span><span class="sy0">&gt;</span>imagejpeg<span class="br0">&#40;</span><span class="re1">$file</span><span class="sy0">,</span> <span class="re1">$photo_dest</span><span class="sy0">,</span> <span class="nu0">100</span><span class="br0">&#41;</span><span class="sy0">;</span></div>
</li>
</ol>
</div>
<p>Now when our mod is installed we need is to replace the links from big images resized with html with links to our thumbnail generator</p>
<p><strong>templates/home.tpl</strong></p>
<p>Search for next code (line ~152):</p>
<div class="geshi no html4strict">
<div class="head"><img class="photo" src="{$signups[signups_loop]-&gt;user_photo(" border="0" alt="" width="{$misc-&gt;photo_size($signups[signups_loop]-&gt;user_photo(" /></div>
<ol>
<li class="li1">
<div class="de1"><span class="sc2"><span class="kw2">&lt;/pre&gt;</span></span></div>
</li>
<li class="li1">
<div class="de1">Change to</div>
</li>
<li class="li1">
<div class="de1"><span class="sc2"><span class="kw2">&lt;pre</span> <span class="kw3">lang</span><span class="sy0">=</span><span class="st0">&quot;html4strict&quot;</span><span class="kw2">&gt;</span></span><span class="sc2"><span class="kw2">&lt;img</span> <span class="kw3">class</span><span class="sy0">=</span><span class="st0">&quot;photo&quot;</span> <span class="kw3">src</span><span class="sy0">=</span><span class="st0">&quot;{$signups[signups_loop]-&amp;gt;user_thumb(&quot;</span> <span class="kw3">border</span><span class="sy0">=</span><span class="st0">&quot;0&quot;</span> <span class="kw3">alt</span><span class="sy0">=</span><span class="st0">&quot;&quot;</span> <span class="kw3">width</span><span class="sy0">=</span><span class="st0">&quot;{$misc-&amp;gt;photo_size($signups[signups_loop]-&amp;gt;user_photo(&quot;</span> <span class="sy0">/</span><span class="kw2">&gt;</span></span></div>
</li>
</ol>
</div>
<p>Search for code (line ~178):</p>
<div class="geshi no html4strict">
<div class="head"><img class="photo" src="{$friends[friends_loop].friend-&gt;user_photo(" border="0" alt="" width="{$misc-&gt;photo_size($friends[friends_loop].friend-&gt;user_photo(" /></div>
<ol>
<li class="li1">
<div class="de1"><span class="sc2"><span class="kw2">&lt;/pre&gt;</span></span></div>
</li>
<li class="li1">
<div class="de1">Change to</div>
</li>
<li class="li1">
<div class="de1"><span class="sc2"><span class="kw2">&lt;pre</span> <span class="kw3">lang</span><span class="sy0">=</span><span class="st0">&quot;html4strict&quot;</span><span class="kw2">&gt;</span></span><span class="sc2"><span class="kw2">&lt;img</span> <span class="kw3">class</span><span class="sy0">=</span><span class="st0">&quot;photo&quot;</span> <span class="kw3">src</span><span class="sy0">=</span><span class="st0">&quot;{$friends[friends_loop].friend-&amp;gt;user_thumb(&quot;</span> <span class="kw3">border</span><span class="sy0">=</span><span class="st0">&quot;0&quot;</span> <span class="kw3">alt</span><span class="sy0">=</span><span class="st0">&quot;&quot;</span> <span class="kw3">width</span><span class="sy0">=</span><span class="st0">&quot;{$misc-&amp;gt;photo_size($friends[friends_loop].friend-&amp;gt;user_photo(&quot;</span> <span class="sy0">/</span><span class="kw2">&gt;</span></span></div>
</li>
</ol>
</div>
<p>Search for code:</p>
<div class="geshi no html4strict">
<div class="head"><img class="photo" src="{$logins[login_loop]-&gt;user_photo(" border="0" alt="" width="{$misc-&gt;photo_size($logins[login_loop]-&gt;user_photo(" /></div>
<ol>
<li class="li1">
<div class="de1"><span class="sc2"><span class="kw2">&lt;/pre&gt;</span></span></div>
</li>
<li class="li1">
<div class="de1">Change to</div>
</li>
<li class="li1">
<div class="de1"><span class="sc2"><span class="kw2">&lt;pre</span> <span class="kw3">lang</span><span class="sy0">=</span><span class="st0">&quot;html4strict&quot;</span><span class="kw2">&gt;</span></span><span class="sc2"><span class="kw2">&lt;img</span> <span class="kw3">class</span><span class="sy0">=</span><span class="st0">&quot;photo&quot;</span> <span class="kw3">src</span><span class="sy0">=</span><span class="st0">&quot;{$logins[login_loop]-&amp;gt;user_thumb(&quot;</span> <span class="kw3">border</span><span class="sy0">=</span><span class="st0">&quot;0&quot;</span> <span class="kw3">alt</span><span class="sy0">=</span><span class="st0">&quot;&quot;</span> <span class="kw3">width</span><span class="sy0">=</span><span class="st0">&quot;{$misc-&amp;gt;photo_size($logins[login_loop]-&amp;gt;user_photo(&quot;</span> <span class="sy0">/</span><span class="kw2">&gt;</span></span></div>
</li>
</ol>
</div>
<p>Now when all images on your home page are beautifully resized, let&#8217;s proceed and make all images on profile page look great too</p>
<p><strong>templates/profile.tpl</strong></p>
<p>Search for code(line ~395)</p>
<div class="geshi no html4strict">
<div class="head"><a href="{$url-&gt;url_create(">user_info.user_username)}&#39;&gt;<img class="photo" src="{$comments[comment_loop].comment_author-&gt;user_photo(" border="0" alt="" width="{$misc-&gt;photo_size($comments[comment_loop].comment_author-&gt;user_photo(" /></a></div>
<ol>
<li class="li1">
<div class="de1"><span class="sc2"><span class="kw2">&lt;/pre&gt;</span></span></div>
</li>
<li class="li1">
<div class="de1">Change to</div>
</li>
<li class="li1">
<div class="de1"><span class="sc2"><span class="kw2">&lt;pre</span> <span class="kw3">lang</span><span class="sy0">=</span><span class="st0">&quot;html4strict&quot;</span><span class="kw2">&gt;</span></span><span class="sc2"><span class="kw2">&lt;a</span> <span class="kw3">href</span><span class="sy0">=</span><span class="st0">&quot;{$url-&amp;gt;url_create(&quot;</span><span class="kw2">&gt;</span></span>user_info.user_username)}&#39;<span class="sc1">&amp;gt;</span><span class="sc2"><span class="kw2">&lt;img</span> <span class="kw3">class</span><span class="sy0">=</span><span class="st0">&quot;photo&quot;</span> <span class="kw3">src</span><span class="sy0">=</span><span class="st0">&quot;{$comments[comment_loop].comment_author-&amp;gt;user_photo(&quot;</span> <span class="kw3">border</span><span class="sy0">=</span><span class="st0">&quot;0&quot;</span> <span class="kw3">alt</span><span class="sy0">=</span><span class="st0">&quot;&quot;</span> <span class="kw3">width</span><span class="sy0">=</span><span class="st0">&quot;{$misc-&amp;gt;photo_size($comments[comment_loop].comment_author-&amp;gt;user_thumb(&quot;</span> <span class="sy0">/</span><span class="kw2">&gt;</span></span><span class="sc2"><span class="kw2">&lt;/a&gt;</span></span></div>
</li>
</ol>
</div>
<p>I will try to cover the rest of the SocialEngine pages in future posts, but if you have understood what we have done you can try to do it yourself.</p>
]]></content:encoded>
			<wfw:commentRss>http://webhive.com.ua/blog/socialengine-correct-image-resizing-part-1/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>First Post</title>
		<link>http://webhive.com.ua/blog/first-post/</link>
		<comments>http://webhive.com.ua/blog/first-post/#comments</comments>
		<pubDate>Thu, 10 Jul 2008 16:57:24 +0000</pubDate>
		<dc:creator>Eugene Sutula</dc:creator>
				<category><![CDATA[Other]]></category>

		<guid isPermaLink="false">http://webhive.com.ua/blog/?p=14</guid>
		<description><![CDATA[A long voyage is started with a small step. Today we are starting the WebHive blog at last!
Unlike most developers’ blogs around, we will do our best to keep the signal/noise ratio as high as we can. From now on everyone will be able to see the approaches we use and know the things that [...]]]></description>
			<content:encoded><![CDATA[<p>A long voyage is started with a small step. Today we are starting the WebHive blog at last!</p>
<p>Unlike most developers’ blogs around, we will do our best to keep the signal/noise ratio as high as we can. From now on everyone will be able to see the approaches we use and know the things that keep us motivated.</p>
<p>We promise to find time to make regular updates about web development, and share useful tools, tricks and ideas.</p>
<p>Also I want to make an announcement &#8211; we are going to open a store to sell the scripts and products we have developed. Some of them will be offered free of charge.</p>
<p>So please stay tuned <img src='http://webhive.com.ua/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://webhive.com.ua/blog/first-post/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
