<?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>AjaxMasters Blog &#187; wordpress</title> <atom:link href="http://blog.ajaxmasters.com/tag/wordpress/feed/" rel="self" type="application/rss+xml" /><link>http://blog.ajaxmasters.com</link> <description>Just another WordPress weblog</description> <lastBuildDate>Mon, 23 Aug 2010 08:55:46 +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>The new WordPress 2.9</title><link>http://blog.ajaxmasters.com/the-new-wordpress/</link> <comments>http://blog.ajaxmasters.com/the-new-wordpress/#comments</comments> <pubDate>Mon, 21 Dec 2009 00:38:17 +0000</pubDate> <dc:creator>Chocksy</dc:creator> <category><![CDATA[General]]></category> <category><![CDATA[new]]></category> <category><![CDATA[version]]></category> <category><![CDATA[wordpress]]></category><guid
isPermaLink="false">http://blog.ajaxmasters.com/?p=250</guid> <description><![CDATA[<a
href="http://blog.ajaxmasters.com/the-new-wordpress/"><img
align="left" hspace="5" width="150" height="150" src="http://blog.ajaxmasters.com/wp-content/uploads/2009/12/wordpress-logo-shine-170x170.jpg" class="alignleft tfe wp-post-image" alt="Carmen Wordpress 2.9" title="Carmen Wordpress 2.9" /></a>This video tells it all. Well as you can see we have a lot of stuff on our blog and i just wanted to say we made the upgrade and everything works the same maybe better. Just click the update button!]]></description> <content:encoded><![CDATA[<p>This video tells it all. Well as you can see we have a lot of stuff on our blog and i just wanted to say we made the upgrade and everything works the same maybe better. Just click the update button! <img
src='http://blog.ajaxmasters.com/wp-content/plugins/smilies-themer/pidgin/smile.png' alt=':)' class='wp-smiley' /></p><p><object
classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="600" height="360" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param
name="flashvars" value="guid=NBZ853Xn&amp;width=600&amp;height=360" /><param
name="src" value="http://v.wordpress.com/wp-content/plugins/video/flvplayer.swf?ver=1.11" /><param
name="allowfullscreen" value="true" /><embed
type="application/x-shockwave-flash" width="600" height="360" src="http://v.wordpress.com/wp-content/plugins/video/flvplayer.swf?ver=1.11" allowfullscreen="true" flashvars="guid=NBZ853Xn&amp;width=600&amp;height=360"></embed></object></p> ]]></content:encoded> <wfw:commentRss>http://blog.ajaxmasters.com/the-new-wordpress/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>Use ajax to create a cacheing system</title><link>http://blog.ajaxmasters.com/use-ajax-to-create-a-cacheing-system/</link> <comments>http://blog.ajaxmasters.com/use-ajax-to-create-a-cacheing-system/#comments</comments> <pubDate>Tue, 29 Sep 2009 10:49:52 +0000</pubDate> <dc:creator>Chocksy</dc:creator> <category><![CDATA[Tutorial]]></category> <category><![CDATA[cache]]></category> <category><![CDATA[html]]></category> <category><![CDATA[imageroll]]></category> <category><![CDATA[images]]></category> <category><![CDATA[javascript]]></category> <category><![CDATA[php]]></category> <category><![CDATA[plugin]]></category> <category><![CDATA[system]]></category> <category><![CDATA[vi.sualize.us]]></category> <category><![CDATA[wordpress]]></category><guid
isPermaLink="false">http://blog.ajaxmasters.com/?p=163</guid> <description><![CDATA[<a
href="http://blog.ajaxmasters.com/use-ajax-to-create-a-cacheing-system/"><img
align="left" hspace="5" width="150" height="150" src="http://blog.ajaxmasters.com/wp-content/uploads/2009/09/cache-170x170.png" class="alignleft wp-post-image tfe" alt="Cache Pic" title="cache" /></a><p>As I said in my last post, I wanted from the first time to make a cacheing system for my imageroll page. Because i take the images from vi.sualize.us servers and we don't want to make to much trafic and make stuff worse for them.</p><p>So what i did is simple, i made a class that extracts the rss data from theirs servers and get the images to display them. I do this every time someone visits the page.</p>]]></description> <content:encoded><![CDATA[<p><div
id="attachment_164" class="wp-caption alignleft" style="width: 287px"><a
href="http://blog.ajaxmasters.com/wp-content/uploads/2009/09/cache.png"><img
src="http://blog.ajaxmasters.com/wp-content/uploads/2009/09/cache.png" alt="Cache Pic" title="cache" width="277" height="277" class="size-full wp-image-164" /></a><p
class="wp-caption-text">Cache Pic</p></div><p>As I said in my last post, I wanted from the first time to make a cacheing system for my imageroll page. Because i take the images from vi.sualize.us servers and we don&#8217;t want to make to much trafic and make stuff worse for them.</p><p>So what i did is simple, i made a class that extracts the rss data from theirs servers and get the images to display them. I do this every time someone visits the page. If any image is new for the first time we display the image from vi.sualize.us and run a functions in javascript to check for new images. If any new images exist then we cache them in a folder on our server and the next time a user visits the page that image will be shown from our server. Pretty simple.</p><p>For now i&#8217;ll just show you the stuff that makes this thing run and if you want i can share the whole script so that you can make one for your blog or website.</p><p>I&#8217;ll also try to make a WordPress plugin so you can integrate it easily in your blog.</p><p>So here we go. We start with the function that checks for new images:</p><pre class="brush: php;">
functio checkCache($image_url){
            $path=pathinfo($image_url);
            $img_cached = 'cache/'.$path['filename'].'.'.$path['extension'];
            if(!file_exists($img_cached)) {
                createCacheImg($image_url);
            }
}
</pre><p>This function just checks if the image exists in the &#8220;<b>cache</b>&#8221; folder. If it&#8217;s not there then we run the &#8220;<b>createCacheImg</b>&#8221; function.</p><p>We now need a function to get the image so we check if the image is in the cache folder or not so we know what to display.</p><pre class="brush: php;">
    function getImage($or_img) {
        $path=pathinfo($or_img);
        $filename=$path['filename'];
        $img_cached = 'cache/'.$filename.'.'.$path['extension'];
        if(file_exists($img_cached)) {
            $url=$img_cached;
        }else {
            $url=$or_img;
        }

        return $url;
    }
</pre><p>Very simple function that just returns the right url of the image.</p><p>Now we cache the image.</p><pre class="brush: php;">
function createCacheImg($image){
        $srcsize = getimagesize($image);
        $w = $srcsize[0];
        $h = $srcsize[1];

        $path=pathinfo($image);
        $dest='cache/'.$path['filename'].'.'.$path['extension'];
        if($path['extension']=='jpg' || $path['extension']=='jpeg' || $path['extension']=='JPG') {
            $src_img = imagecreatefromjpeg($image);
        }else if($path['extension']=='gif') {
                $src_img = imagecreatefromgif($image);
            }else if($path['extension']=='png') {
                    $src_img = imagecreatefrompng($image);
                }
        $img_cpy=imagecreatetruecolor($w,$h);
        imagecopy($img_cpy, $src_img, 0, 0, 0, 0, $w, $h);
        if($path['extension']=='jpg' || $path['extension']=='jpeg' || $path['extension']=='JPG') {
            imagejpeg($img_cpy,$dest);
        }else if($path['extension']=='gif') {
                imagegif($img_cpy,$dest);
            }else if($path['extension']=='png') {
                    imagepng($img_cpy,$dest);
                }
        imagedestroy($src_img);
}
</pre><p>This function will save the image into the cache folder. Now we need a new file &#8220;<b>checkcache.php</b>&#8221; where we put this code:</p><pre class="brush: php;">
include('functions.php');
$image=$_GET['image'];
checkCache($image);
</pre><p> Right now we should have this kind of structure in our imageroll folder: A folder &#8220;<b>cache</b>&#8221; a file &#8220;<b>functions.php</b>&#8221; where we place all these functions we just did and a file &#8220;<b>index.php</b>&#8221; where we run the javascript function and display the images.</p><p>The &#8220;<b>index.php</b>&#8221; file requires this code:</p><pre class="brush: xml;">
&lt;!DOCTYPE html PUBLIC &quot;-//W3C//DTD XHTML 1.0 Transitional//EN&quot; &quot;http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd&quot;&gt;
&lt;html xmlns=&quot;http://www.w3.org/1999/xhtml&quot;&gt;
    &lt;head&gt;

        &lt;title&gt;
            Image ROLL
        &lt;/title&gt;

        &lt;meta http-equiv=&quot;Content-Type&quot; content=&quot;text/html; charset=utf-8&quot; /&gt;
        &lt;script src=&quot;http://www.google.com/jsapi&quot;&gt;&lt;/script&gt;
        &lt;script type=&quot;text/javascript&quot;&gt;  google.load(&quot;jquery&quot;, &quot;1.3.2&quot;); &lt;/script&gt;
    &lt;/head&gt;
    &lt;body&gt;
&lt;input type=&quot;hidden&quot; id=&quot;image&quot; value=&quot;http://test.com/image.jpg&quot;&gt;
&lt;img src=&quot;&lt;?=getImage($image)?&gt;&quot; alt=&quot;test image&quot;/&gt;
&lt;/body&gt;
&lt;/html&gt;
</pre><p>We have here a simple index.php file that imports the google api and jquery so we can run a simple ajax function. This is the javascript code that you should insert in this file or a separate one if you want:</p><pre class="brush: jscript;">

            $(document).ready(function() {
                checkCache();
            });

            function checkCache(){
                var page=$('#image');
                var url='checkcache.php';
                var pars='page='+page.val();
                $.get(url,pars);
            }
</pre><p>This will run this function after the page loads and it will check for new images. So this is just a simple script that will make you pages load faster expecialy if you load the images from outside of your server.</p><p>If you liked this i&#8217;ll go and make a more complex one and even share the imageroll script i did. That until i find the time and make a Wordpress Plugin.</p> ]]></content:encoded> <wfw:commentRss>http://blog.ajaxmasters.com/use-ajax-to-create-a-cacheing-system/feed/</wfw:commentRss> <slash:comments>1</slash:comments> </item> <item><title>New WordPress blog for us</title><link>http://blog.ajaxmasters.com/new-wp-blog-for-us/</link> <comments>http://blog.ajaxmasters.com/new-wp-blog-for-us/#comments</comments> <pubDate>Thu, 24 Sep 2009 11:24:15 +0000</pubDate> <dc:creator>Chocksy</dc:creator> <category><![CDATA[General]]></category> <category><![CDATA[404]]></category> <category><![CDATA[great]]></category> <category><![CDATA[halo]]></category> <category><![CDATA[list]]></category> <category><![CDATA[plugins]]></category> <category><![CDATA[super]]></category> <category><![CDATA[wordpress]]></category><guid
isPermaLink="false">http://blog.ajaxmasters.com/?p=119</guid> <description><![CDATA[<a
href="http://blog.ajaxmasters.com/new-wp-blog-for-us/"><img
align="left" hspace="5" width="150" height="150" src="http://blog.ajaxmasters.com/wp-content/uploads/2009/09/halo_wordpress-170x170.jpg" class="alignleft wp-post-image tfe" alt="Super WordPress" title="halo_wordpress" /></a>Hello guys since we were working on a lot of WordPress based websites we decided is time to convert our blog into one since is such a great CMS.
So why am i writing this post to let you know? Because I think it would be a nice thing to share with you the problems we run into and the plugins we are using right now for our blog.Our list of [...]]]></description> <content:encoded><![CDATA[<div
id="attachment_120" class="wp-caption aligncenter" style="width: 440px"><a
href="http://blog.ajaxmasters.com/wp-content/uploads/2009/09/halo_wordpress.jpg"><img
src="http://blog.ajaxmasters.com/wp-content/uploads/2009/09/halo_wordpress.jpg" alt="Super WordPress" title="halo_wordpress" width="430" height="334" class="size-full wp-image-120" /></a><p
class="wp-caption-text">Super WordPress</p></div><p>Hello guys since we were working on a lot of WordPress based websites we decided is time to convert our blog into one since is such a great CMS.</p><p>So why am i writing this post to let you know? Because I think it would be a nice thing to share with you the problems we run into and the plugins we are using right now for our blog.</p><p><br/></p><div
class="in_title">Our list of plugins</div><p>We use the following plugins for our blog and I think you might think about using them too.</p><ul><li><a
href="http://wordpress.org/extend/plugins/smart-404/" target="_blank" class="in_title">Smart 404</a><p>I modified this plugin so that it can fit our needs. The idea of it is that will search for the term you enter in the url and find the post or page that you might be looking for. But we had a very crazy url at our old blog so i had to do something about it. So here is the code i added to the plugin:</p><pre class="brush: php;">
        if($search=='post.htm'){
            $search = preg_match('/year\/(.*)\/month\/(.*)\/title\/(.*)\/post.htm/', $_SERVER[&quot;REQUEST_URI&quot;], $matches);
            $search = $matches[3];
        }
</pre><p>This will just check and see if the string that the plugin came up with is &#8216;post.hm&#8217; because that was the case in our url format. So what i just use is a regex and get the title and correct the great plugin by giving him a hand in that particular case. So you can try that out by clicking this <a
href="http://blog.ajaxmasters.com/twitter%20followers%20tutorial" target="_blank">link</a> and see. Pretty cool right?</p></li><li><a
href="http://wordpress.org/extend/plugins/google-analyticator/" target="_blank" class="in_title">Google Analyticator</a><p>This one is a fancy thing. I like it because it shows stats of google analytics in your blog dashboard and it will place your analytics code in the footer without you modifying any file.</p></li><li><a
href="http://wordpress.org/extend/plugins/all-in-one-seo-pack/" target="_blank" class="in_title">All in One SEO Pack</a><p>One of the most famous plugins of wordpress. It helps you blog by making it more SEO friendly and get up in the search engines.</p></li><li><a
href="http://wordpress.org/extend/plugins/antivirus/" target="_blank" class="in_title">AntiVirus</a><p>Antivirus is a plugin that checks posts and comments for spam injections or attacks from hackers. A very nice plugin that i think you should try. As you know if you are reading this blog for some time we had some problems with our blog.</p></li><li><a
href="http://wordpress.org/extend/plugins/db-cache/" target="_blank" class="in_title">DB Cache</a><p>I find this plugin better than super cache or WP cache because instead of making html files or your blog and load those up this one saves your queries and when you load a page it will load them from tose files. It&#8217;s the same idea &#8220;<b>memcache</b>&#8221; used by YouTube.com, Wikipedia.com etc.</p></li><li><a
href="http://wordpress.org/extend/plugins/google-sitemap-generator/" target="_blank" class="in_title">Google XML Sitemaps</a><p>This plugin is a must in my opinion since it creates sitemaps for YAHOO, GOOGLE and BING so that your blog is indexed the right way.</p></li><li><a
href="http://wordpress.org/extend/plugins/underconstruction/" target="_blank" class="in_title">underConstruction</a><p>If you visited our blog while we were making the transition to WP then you saw our &#8220;Coming soon&#8221; page. That was created with this plugin. Well the page was made by me but the plugin just gives you the option to make your visitors see that page and you see the blog. So if you are loged in then you see the blog. Very useful in my opinion especially when you make major changes to your blog.</p></li><li><a
href="http://wordpress.org/extend/plugins/wordpress-popular-posts/" target="_blank" class="in_title">Wordpress Popular Posts</a><p>Ion found this plugin when i told him we should place some featured posts at the top for users to see some of the most important posts. This one is better since it will let you chose the criteria of sorting the posts. You have by most viewed post, most commented or average daily views. Very nice plugin i think you should try it. PS: don&#8217;t do like me! I installed the plugin and tried to see if it works, well it didn&#8217;t since i was logged in and it only records data when you are not logged in.</p></li><li></li></ul><p>Ok let&#8217;s wrap it up this is a list of the plugins we used for our blog. I will create a new post with some of the functions we created for our blog. And maybe come up with a plugin too for &#8220;imageROLL&#8221;, by the way we have that on our blog right now but is not a plugin yet. The image roll is based on vi.sualize.us.</p> ]]></content:encoded> <wfw:commentRss>http://blog.ajaxmasters.com/new-wp-blog-for-us/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> </channel> </rss>
<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Minified using disk
Page Caching using disk (enhanced) (user agent is rejected)
Database Caching 15/32 queries in 0.054 seconds using disk

Served from: blog.ajaxmasters.com @ 2010-09-07 00:50:31 -->