<?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>Magento Design and Development &#187; Wordpress</title>
	<atom:link href="http://inchoo.net/category/wordpress/feed/" rel="self" type="application/rss+xml" />
	<link>http://inchoo.net</link>
	<description>Magento Design and Magento Development Professionals - Inchoo</description>
	<lastBuildDate>Mon, 21 May 2012 11:00:55 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>New Croatian version of our website</title>
		<link>http://inchoo.net/wordpress/new-croatian-version-of-our-website/</link>
		<comments>http://inchoo.net/wordpress/new-croatian-version-of-our-website/#comments</comments>
		<pubDate>Fri, 30 Sep 2011 10:11:10 +0000</pubDate>
		<dc:creator>Toni Anicic</dc:creator>
				<category><![CDATA[Wordpress]]></category>
		<category><![CDATA[inchoo]]></category>

		<guid isPermaLink="false">http://inchoo.net/?p=10843</guid>
		<description><![CDATA[Yesterday we launched a new, redesigned version of our Croatian website &#8211; inchoo.hr. The new design follows the inchoo.net&#8217;s look and feel with a little twist in the header to &#8230;]]></description>
			<content:encoded><![CDATA[<p>Yesterday we launched a new, redesigned version of our Croatian website &#8211; <a href="http://inchoo.hr">inchoo.hr</a>. The new design follows the inchoo.net&#8217;s look and feel with a little twist in the header to improve the differentiation of the two websites. The difference is obvious in the color scheme and contour of our hometown Osijek that can be seen in the header. <span id="more-10843"></span></p>
<p>The purpose and goal of the new inchoo.hr website is simple: <strong>To attract potential employees, educate them and give them a good idea of what working at Inchoo is all about.</strong> We intentionally put emphasis on career section, making it the most prominent part of the homepage. Homepage also features a rich multimedia section with videos and pictures. We created detailed explanations of the types of employees we&#8217;re looking for and outlined all of the benefits and opportunities that working at Inchoo gives you. </p>
<p>Since the goal of the project is to attract potential employees, and job applications started arriving immediately after the launch, I&#8217;d say we achieved exactly what we wanted and project is a success. </p>
<p>Website&#8217;s beautiful design is a work of Lyssandro. Slicing and coding was done by <a href="http://inchoo.net/author/stanislav-mihic/">Stanislav</a>. This was Stanislav&#8217;s first project at Inchoo and I&#8217;m proud that he did such a good job. Project management and copy-writing was done by yours truly.  </p>
]]></content:encoded>
			<wfw:commentRss>http://inchoo.net/wordpress/new-croatian-version-of-our-website/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>TWIG with wordpress part2</title>
		<link>http://inchoo.net/wordpress/twig-wordpress-part2/</link>
		<comments>http://inchoo.net/wordpress/twig-wordpress-part2/#comments</comments>
		<pubDate>Wed, 29 Jun 2011 11:06:52 +0000</pubDate>
		<dc:creator>Darko Goles</dc:creator>
				<category><![CDATA[Wordpress]]></category>
		<category><![CDATA[extension]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[project]]></category>
		<category><![CDATA[theme]]></category>
		<category><![CDATA[Tools & Frameworks]]></category>
		<category><![CDATA[twig]]></category>

		<guid isPermaLink="false">http://inchoo.net/?p=9957</guid>
		<description><![CDATA[Using TWIG plug in we made in part1 of this article It&#8217;s highly advised to read part1 first to understand what&#8217;s going on. When our TWIG engine autoloader is ready, &#8230;]]></description>
			<content:encoded><![CDATA[<p><strong>Using TWIG plug in we made in <a title="TWIG wit wordpress part1" href="http://inchoo.net/wordpress/twig-with-wordpress-part1/">part1</a> of this article</strong></p>
<p><em>It&#8217;s highly advised to read <a title="Twig with wordpress part1" href="http://inchoo.net/wordpress/twig-with-wordpress-part1/" target="_blank">part1 </a>first to understand what&#8217;s going on.</em></p>
<p>When our TWIG engine autoloader is ready, and our plugin is activated from wp-admin side,  we can go to wordpress themes  folder and make new theme folder. Inside our theme folder, let&#8217;s make starter file: &#8216;index.php&#8217; slightly modified to fit our needs:<span id="more-9957"></span></p>
<pre class="brush: php; title: ; notranslate">
&lt;?php
wp-content/themes/Our theme folder/index.php
/**
 * The main template file.
 *
 * This is the most generic template file in a WordPress theme
 * and one of the two required files for a theme (the other being style.css).
 * It is used to display a page when nothing more specific matches a query.
 * E.g., it puts together the home page when no home.php file exists.
 * Learn more: http://codex.wordpress.org/Template_Hierarchy
 *
 * @package Our theme
 * @subpackage Our theme
 */

$loader = new Twig_Loader_Filesystem(dirname(__FILE__));
$twig = new Twig_Environment($loader, array(
            'cache' =&gt; false
        ));
$template = $twig-&gt;loadTemplate('index.html.twig');

$template-&gt;display(array('variable1'=&gt;$variable1,'variable2'=&gt;$variable2 ...));
</pre>
<p>After we made that, we should make starter file for out twig theme: index.html.twig and all the other necessary files for our theme with twig templating possibilities.</p>
<p>But, there is one more problem with wordpress: <em>How can we reach easy way wordpress environment functions defined from our TWIG template?</em></p>
<p>We should pass that variables somehow to TWIG  so they can be used.</p>
<p>After some brainstorming, I made to this solution:<br />
let&#8217;s make a some kind of proxy class in our twig engine plugin folder so we could pass instance of that class to our twig engine and make all necessary calls to wordpress functions from inside that class. <em>Is that many work to do? Must we define all the wordpress functions inside our class to reach them?</em><br />
No. Let&#8217;s add this to our custom file that we autoloaded in part1, so our file looks like this:</p>
<pre class="brush: php; title: ; notranslate">
&lt;?php

&lt;?php
/*
…. /wp-content/plugins/wp_twig_engine/Wp_TwigEngine.php
  Author: Darko Goleš
  Author URI: http://inchoo.net/author/darko.goles/
*/
*

class Wp_TwigEngine_Autoloader {

    static public function register() {
        ini_set('unserialize_callback_func', 'spl_autoload_call');
        spl_autoload_register(array(new self, 'autoload'));
    }

    static public function autoload($class) {
        if (0 !== strpos($class, 'Wp_TwigEngine')) {
            return;
        }

        if (file_exists($file = dirname(__FILE__) . '/../' . str_replace(array('_', &quot;&#92;&#48;&quot;), array('/', ''), $class) . '.php')) {
            echo($file);
            exit;
            require $file;
        }
    }

}

class OurTwigProxy {

    public function __call($function, $arguments) {

        if (!function_exists($function)) {
            trigger_error('call to unexisting function ' . $function, E_USER_ERROR);
            return NULL;
        }
        return call_user_func_array($function, $arguments);
    }
}
</pre>
<p>You see, I used php __call function to make this class somekind proxy for our wp functions.</p>
<p>Let&#8217;s see our index.php inside our theme folder now:</p>
<pre class="brush: php; title: ; notranslate">
$site = new OurTwigProxy();
$loader = new Twig_Loader_Filesystem(dirname(__FILE__));
$twig = new Twig_Environment($loader, array(
            'cache' =&gt; false
        ));
$template = $twig-&gt;loadTemplate('index.html.twig');

$template-&gt;display(array('site' =&gt; $site));
</pre>
<p>you see, now we made instance of our autoloaded &#8216;proxy&#8217; class an passed it into template.<br />
From inside template we can now call any WP functions that we need:</p>
<pre class="brush: php; title: ; notranslate">
#{file: index.html.twig}#

{% if site.is_category %}
...
Hello from here
...
{% endif %}
</pre>
<p>Those two articles about twig was just idea, and I didn&#8217;t finish this project yet. I will try to finish this code and also implement &#8216;yaml&#8217; config file possibilities to be used for wordpress theming, but that will be content of next part. Thanks for now, and I would like you to leave some comments what you thing about this idea.</p>
<p>Cheers</p>
]]></content:encoded>
			<wfw:commentRss>http://inchoo.net/wordpress/twig-wordpress-part2/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>TWIG with WordPress part1</title>
		<link>http://inchoo.net/wordpress/twig-with-wordpress-part1/</link>
		<comments>http://inchoo.net/wordpress/twig-with-wordpress-part1/#comments</comments>
		<pubDate>Tue, 28 Jun 2011 08:33:22 +0000</pubDate>
		<dc:creator>Darko Goles</dc:creator>
				<category><![CDATA[Tools]]></category>
		<category><![CDATA[Wordpress]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[extension]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[template]]></category>
		<category><![CDATA[theme]]></category>
		<category><![CDATA[Tools & Frameworks]]></category>
		<category><![CDATA[twig]]></category>

		<guid isPermaLink="false">http://inchoo.net/?p=9949</guid>
		<description><![CDATA[Making TWIG autoload from WP plugin Maybe someone will say: this is a crazy idea. Why would someone want to do that? Maybe it really is crazy, but I would &#8230;]]></description>
			<content:encoded><![CDATA[<p><strong>Making TWIG autoload from WP plugin</strong></p>
<p><em>Maybe someone will say: this is a crazy idea. Why would someone want to do that?<br />
Maybe it really is crazy, but I would say: why not?<span id="more-9949"></span></em></p>
<p>What is TWIG? TWIG is new generation php templating engine made by Sensio Labs. It is used in their new project Symfony2 as main templating engine provided with framework.<br />
As <a title="TWIG project" href="http://www.twig-project.org/" target="_blank">official page </a> says:</p>
<p><em><strong>Fast:</strong> Twig compiles templates down to plain optimized PHP code. The overhead compared to regular PHP code was reduced to the very minimum.</em><br />
<em> <strong>Secure:</strong> Twig has a sandbox mode to evaluate untrusted template code. This allows Twig to be used as a template language for applications where users may modify the template design.</em><br />
<em> <strong>Flexible:</strong> Twig is powered by a flexible lexer and parser. This allows the developer to define its own custom tags and filters, and create its own DSL.</em><br />
It is not necessary to explain in detail why will someone (me) want to use that as wordpress templating engine, but one of the main reasons is that I want to rewrite some messed up php template for WP to better code organized one, and at the and I want it to be with cleaner code as possible.<br />
I don&#8217;t like very much when is necessary to mix up php tags and functions inside HTML code to make it work.<br />
After some thinking about TWIG and how to implement it in my WP installation I got idea:<br />
I will make plug in for WP that will provide all necessary stuff to start using TWIG with WP.</p>
<p>First I created the plugin folder named wp_twig_engine.I put folder named &#8216;<em>lib</em>&#8216; downloaded from<a title="TWIG project site" href="http://www.twig-project.org/" target="_blank"> twig-project site </a> in there. So I had the twig library almost prepared for using.<br />
Now I had to find some appropriate wordpress hook to inject my code into wordpress application logic. After some investigating and testing, I found that it will be possible to use the &#8216;<em>init</em>&#8216; hook and register autoloaders for TWIG library and my custom class in the same function, so I can reach my code from inside template folder later.</p>
<p>Main plugin file: wp-twig.php</p>
<pre class="brush: php; title: ; notranslate">
&lt;?php

/*
  Plugin Name: WordPress Twig templating engine
  Version: 1.0
  Plugin URI: http://inchoo.net
  Description: Engine for creating twig templates for wordpress
  Author: Darko Goleš
  Author URI: http://inchoo.net/author/darko.goles/
 */
//Main twig library autoloader file
require_once dirname(__FILE__) . '/lib/Twig/Autoloader.php';
//My custom class made, I also want it to be autoloaded
require_once dirname(__FILE__) . '/Wp_TwigEngine.php';

function twigAutoLoad() {

    Twig_Autoloader::register();
    Wp_TwigEngine_Autoloader::register();
}

add_action('init', 'twigAutoLoad');
?&gt;
</pre>
<p>Just to show you how to autoload my custom class with that (of course I got idea from original twig autoloader and just changed the code to fit my needs:</p>
<pre class="brush: php; title: ; notranslate">

&lt;?php
/*
Wp_TwigEngine.php
  Author: Darko Goleš
  Author URI: http://inchoo.net/author/darko.goles/
*/
class Wp_TwigEngine_Autoloader {

    static public function register() {
        ini_set('unserialize_callback_func', 'spl_autoload_call');
        spl_autoload_register(array(new self, 'autoload'));
    }

    static public function autoload($class) {
        if (0 !== strpos($class, 'Wp_TwigEngine')) {
            return;
        }

        if (file_exists($file = dirname(__FILE__) . '/../' . str_replace(array('_', &quot;&#92;&#48;&quot;), array('/', ''), $class) . '.php')) {
            echo($file);
            exit;
            require $file;
        }
    }

}
</pre>
<p>And that&#8217;s it from the plugin side for now. Just have to implement it in the template folder. That is additional theme for another article. <img src='http://inchoo.net/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://inchoo.net/wordpress/twig-with-wordpress-part1/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Parsing Amazon affiliate links in WordPress</title>
		<link>http://inchoo.net/wordpress/amazon-asin-wordpress/</link>
		<comments>http://inchoo.net/wordpress/amazon-asin-wordpress/#comments</comments>
		<pubDate>Tue, 28 Jun 2011 08:16:22 +0000</pubDate>
		<dc:creator>Darko Goles</dc:creator>
				<category><![CDATA[Tools]]></category>
		<category><![CDATA[Wordpress]]></category>
		<category><![CDATA[extension]]></category>
		<category><![CDATA[php]]></category>

		<guid isPermaLink="false">http://inchoo.net/?p=9942</guid>
		<description><![CDATA[Recently my team had problem with Amazon affiliate links on our web site. On the web, we have wordpress installation and inside main content of web page we have some &#8230;]]></description>
			<content:encoded><![CDATA[<p>Recently my team had problem with Amazon affiliate links on our web site.<br />
On the web, we have wordpress installation and inside main content of web page we have some Amazon affiliate links that entered in the content few years ago and not working any more because Amazon changed API somehow. I searched the web for some new version of wordpress plug-in for new API version, because our old plug-in for displaying that links properly was turned off.</p>
<p>FYI that links inside content look like this:<span id="more-9942"></span></p>
<pre class="brush: php; title: ; notranslate">
&lt;a type=&quot;amzn&quot;&gt; “Jerusalem the Golden” performed by Rupert Gough–Malcolm Archer–Wells Cathedral Choir&lt;/a&gt;
</pre>
<p>When links was formed like that, our site could never pass HTML validation, and also we had some click-able non-functional links in our content. It would be very hard work to parse every article inside database and remove that links from our content, because we have much content that would need checking and fixing.</p>
<p>I found the good plug-in that parses that links into proper formed links and making our links work, but there was  one more problem to solve with that:</p>
<p>With regular Amazon API, like this new plug-in does, links are parsed with some included Javascript files that are linked directly from Amazon.com and small chunk of calling Javascript are included inside page to make it work.</p>
<p>But, what is happening when my colleagues  develop  iPhone application that reads content from web site&#8217;s rss feed are trying to make this links functional? They have to manually include all of this Javascript inside iPhone application and run that script locally from device.</p>
<p>I don&#8217;t think that is the best solution for us. So decided to make some own wordpress plug-in that will build that links with php and show them already parsed on web page and also inside feed to avoid Javascript parsing.</p>
<p>Here is the code:</p>
<pre class="brush: php; title: ; notranslate">

&lt;!--?php /*   Plugin Name: Amazon ASIN links parser   Plugin URI: http://www.surgeworks.com   Description: Plugin that parses Amazon links with ASIN code and converts them to full Amazon affiliate url without javascript   Version: 1.0   Author: Darko Goleš   Author URI: http://inchoo.net/author/darko.goles/   License: Surgeworks - all rights reserved.  */ define('DVO_LOCATIONS_PLUGIN_PATH', dirname(__FILE__)); define('DVO_LOCATIONS_PLUGIN_URL', get_option('siteurl') . '/wp-content/plugins/' . basename(DVO_LOCATIONS_PLUGIN_PATH)); include(dirname(__FILE__) . '/simple_html_dom.php'); //Adding filter into content add_filter('the_content', 'parseLinks'); function parseLinks($content) { 	/*if(is_feed()) 	{*/ 		$html = new simple_html_dom(); 		$html---&gt;load($content);

		$ret = $html-&gt;find('a[type=&quot;amzn&quot;]');

		foreach($ret as $val)
		{
			if(isset($val-&gt;asin))
			{
				$asin = $val-&gt;asin;
				$linktext = $val-&gt;plaintext;

				$newLinkStr = buildURL($asin,$linktext,'divine-office-20');

				$val-&gt;outertext = $newLinkStr;
			}

		}

		$content = $html-&gt;save();

	/*}*/
    return $content;
}

function buildURL($asin, $linktext, $affiliate)
{
	return '&lt;a href=&quot;http://www.amazon.com/dp/' . $asin . '/?tag=' . $affiliate . '&quot;&gt;' . $linktext . '&lt;/a&gt;';
}
</pre>
<p>For parsing I used the <a title="simplehtmldom" href="http://simplehtmldom.sourceforge.net" target="_blank">SimpleHtmlDOM library</a> that can be found on web for free download.</p>
<p>Now when displayed, Amazon links looks like this:</p>
<pre class="brush: php; title: ; notranslate">

http://www.amazon.com/dp/B0000542GQ/?tag=divine-office-20
</pre>
<p>Feel free to use this code to make own plugin for AMZN links with ASIN code.</p>
<p>Cheers <img src='http://inchoo.net/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://inchoo.net/wordpress/amazon-asin-wordpress/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Using dynamically created Javascript from WordPress plugin</title>
		<link>http://inchoo.net/wordpress/creating-wordpress-plug-in-that-shows-locations-of-current-users-based-on-xml-data-using-dynamically-created-javascript-in-header-of-the-page-and-google-api/</link>
		<comments>http://inchoo.net/wordpress/creating-wordpress-plug-in-that-shows-locations-of-current-users-based-on-xml-data-using-dynamically-created-javascript-in-header-of-the-page-and-google-api/#comments</comments>
		<pubDate>Tue, 29 Mar 2011 11:05:18 +0000</pubDate>
		<dc:creator>Darko Goles</dc:creator>
				<category><![CDATA[Wordpress]]></category>
		<category><![CDATA[plugin]]></category>
		<category><![CDATA[plugins]]></category>

		<guid isPermaLink="false">http://inchoo.net/?p=8913</guid>
		<description><![CDATA[There are many different plug-ins available for wordpress. But what when you come in situation that need to develop plugin that have to use dynamically created Javascript in header that &#8230;]]></description>
			<content:encoded><![CDATA[<p>There are many different plug-ins available for wordpress. But what when you come in situation that need to develop plugin that have to use dynamically created Javascript in header that is recreated every time page opens?<span id="more-8913"></span>That option could, for example, be implemented in some Google maps plug-in that shows current visitor locations on map and reads data about locations from web service generated XML.</p>
<p>I this particular case, we want to add our map to wordpress page of our choice inserting &#8216;{dof_google_map}&#8217; text on the place we want to show our map.</p>
<p>So, for this case, we will use:  add_filter(&#8216;the_content&#8217;, &#8216;renderMap&#8217;);<br />
in our plug-in to insert our map and function renderMap will replace &#8216;{dof_google_map}&#8217; with our map container div and also, we could add some HTML if needed on that page. For example purposes, we added a button to trigger Javascript that generates map inside container div named: &#8216;map_canvas&#8217;.</p>
<pre class="brush: php; title: ; notranslate">
&lt;?php

/*
  Plugin Name: Test site Locations Google Map
  Plugin URI: http://www.surgeworks.com
  Description: Plugin that shows live data map of visitors currently on site testsite.com
  Version: 1.0
  Author: Darko Goleš
  Author URI: http://inchoo.net/author/darko.goles/
  License: All rights reserved.
 */
define('DVO_LOCATIONS_PLUGIN_PATH', dirname(__FILE__));
define('DVO_LOCATIONS_PLUGIN_URL', get_option('siteurl') . '/wp-content/plugins/' . basename(DVO_LOCATIONS_PLUGIN_PATH));
//Adding filter into content
add_filter('the_content', 'renderMap');

//Function that replaces '{dof_google_map}' string with container div for our map
function renderMap($content) {
    $strtoreplace = &quot;{dof_google_map}&quot;;
    $outputtext = '';
    //TODO: remove this button later and implement that call in 'body onLoad()'
    $outputtext .='&lt;button type=&quot;button&quot; onclick=&quot;init_map()&quot;&gt; This is test button. Click me to see the map!&lt;/button&gt;';
    //TODO: Make dimensions to enter from wp-admin and not from here
    $outputtext .='&lt;div id=&quot;map_canvas&quot; style=&quot;width: 570px; height: 500px; z-index:100;&quot;&gt;&lt;/div&gt;';
    $content = str_ireplace($strtoreplace, $outputtext, $content);
    return $content;
}
</pre>
<p>The Javascript function init_map() is located in separate file that is included in header of the page.</p>
<p>How it is included? It is necessary to include it only on Map page and not in other pages of the site, so Javascript will not be added unnecessarily on each but just where needed.</p>
<pre class="brush: php; title: ; notranslate">
//Filter that help putting Javascript in header
add_filter('the_posts', 'add_script_in_header'); // the_posts gets triggered before wp_head

//Function that decides to put our Javascript in header only on page with map
//not to insert in other pages
function add_script_in_header($posts) {
    if (empty($posts))
        return $posts;
    $shortcode_found = false; // use this flag to see if styles and scripts need to be enqueued
    foreach ($posts as $post) {
        if (stripos($post-&gt;post_content, 'dof_google_map') &gt; 0) {
            $shortcode_found = true;
            break;
        }
    }
    if ($shortcode_found) {
        //TODO: Need to put google api key on wp-admin side
        $google_maps_url = 'http://maps.google.com/maps?file=api&amp;amp;v=2&amp;amp;key=' . get_option('dvolocgmap_gapikey') . '&amp;sensor=false';
        wp_enqueue_script('google_maps_script',$google_maps_url );
        wp_enqueue_script('script-to-generate-map', DVO_LOCATIONS_PLUGIN_URL . '/lib/script.php');
    }
    return $posts;
}
</pre>
<p>You may ask: where is our Javascript included in header that generates google map?</p>
<p>Because that Javascript needs to be dynamically generated depends of locations of visitors every time, I put it in php file and named it script.php, but in beginning of the file put:</p>
<p>“Header(&#8220;content-type: application/x-javascript&#8221;);”</p>
<p>script.php</p>
<pre class="brush: php; title: ; notranslate">
&lt;?php
Header(&quot;content-type: application/x-javascript&quot;);
/*
 * Autor: Darko Goleš
 * Script that connects to Google API and preparing Javascript to be included in header of wordpress page
 */
require_once dirname(__FILE__) . '/MapRenderer.php';
//New instance of map renderer
$map_renderer = new MapRenderer();
//Load functional javascript with locations data inside
//Map renderer class reads from XML and generate Javascript for each visitor location like this:
//$generatedJavascript .= 'var latlng = new GLatLng(' . $item-&gt;lat . ',' . $item-&gt;lon . ');' . &quot;\n&quot;;
//$generatedJavascript .= 'map.addOverlay(createMarker(latlng,' . $item-&gt;id . ',null));' . &quot;\n&quot;;
$locations_generating_script = $map_renderer-&gt;getMapJavascript();

$script = &lt;&lt;&lt;EOD
/* &lt;![CDATA[ */
    function init_map() {
      if (GBrowserIsCompatible()) {
        var map = new GMap2(document.getElementById(&quot;map_canvas&quot;));
       map.setCenter(new GLatLng(0, 0), 2);

        map.setUIToDefault();

        // Create a base icon for all of our markers that specifies the
        // shadow, icon dimensions, etc.
        var baseIcon = new GIcon(G_DEFAULT_ICON);
        baseIcon.shadow = &quot;http://www.google.com/mapfiles/shadow50.png&quot;;
        baseIcon.iconSize = new GSize(20, 34);
        baseIcon.shadowSize = new GSize(37, 34);
        baseIcon.iconAnchor = new GPoint(9, 34);
        baseIcon.infoWindowAnchor = new GPoint(9, 2);

        // Creates a marker whose info window displays the letter corresponding
        // to the given index.
        function createMarker(point, index, dto) {
          var letter = String.fromCharCode(&quot;A&quot;.charCodeAt(0) + index);
          var letteredIcon = new GIcon(baseIcon);
          letteredIcon.image = &quot;http://www.google.com/mapfiles/marker&quot; + letter + &quot;.png&quot;;
          markerOptions = { icon:letteredIcon };
          var marker = new GMarker(point, markerOptions);

          GEvent.addListener(marker, &quot;click&quot;, function() {
            marker.openInfoWindowHtml(&quot;&lt;b&gt; (&quot; + letter + &quot;)&lt;/b&gt;&lt;br/&gt;&quot;
                    +&quot;Address: &quot;+dto.address+&quot;&lt;br/&gt;&quot;
                    +&quot;Name: &quot;+dto.firstname+&quot; &quot;+dto.lastname+&quot;&lt;br/&gt;&quot;
                    +&quot;email: &quot; + dto.email+&quot;&lt;br/&gt;&quot;
                    );
          });
          return marker;
        }
        $locations_generating_script // here is our dynamically generated javascript from locations.xml file
      }
    }

/* ]]&gt; */
EOD;
//Finally echo our dynamic javascript
echo $script;
</pre>
<p>I hope that this tutorial will be helpful with idea of using Javascript from wordpress plug ins.</p>
]]></content:encoded>
			<wfw:commentRss>http://inchoo.net/wordpress/creating-wordpress-plug-in-that-shows-locations-of-current-users-based-on-xml-data-using-dynamically-created-javascript-in-header-of-the-page-and-google-api/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to move existing WordPress site to another server</title>
		<link>http://inchoo.net/wordpress/how-to-move-existing-wordpress-site-to-another-server/</link>
		<comments>http://inchoo.net/wordpress/how-to-move-existing-wordpress-site-to-another-server/#comments</comments>
		<pubDate>Tue, 22 Mar 2011 10:21:53 +0000</pubDate>
		<dc:creator>Darko Goles</dc:creator>
				<category><![CDATA[Wordpress]]></category>
		<category><![CDATA[administration]]></category>
		<category><![CDATA[cms]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[Google]]></category>
		<category><![CDATA[Tools & Frameworks]]></category>
		<category><![CDATA[tutorials]]></category>

		<guid isPermaLink="false">http://inchoo.net/?p=8773</guid>
		<description><![CDATA[Some experienced developers would say: &#8220;Piece of cake , I can do it for about 15 minutes!&#8221; But, is it really so easy and trivial task? It&#8217;s not so heavy, &#8230;]]></description>
			<content:encoded><![CDATA[<p>Some experienced developers would say: &#8220;Piece of cake , I can do it for about 15 minutes!&#8221;<br />
But, is it really so easy and trivial task?</p>
<p>It&#8217;s not so heavy, but you have to pay attention on some really important things and because of that,  I would like to say that it is not heavy but more sensitive task to do.</p>
<p>So, let&#8217;s start with article.</p>
<p><span id="more-8773"></span></p>
<p>Imagine this situation:<br />
We have one live site on <em>http://somedomainold.com</em> with fully functional WordPress installation, many articles, plugins installed on the site. Let&#8217;s say that current database is bigger than 500 Mb. We have access to control panel, ftp and also ssh on live server.<br />
Now we want now to copy same WordPress installation to<em> http://portal.somedomain.com</em> (into sub-domain of new domain on new server).</p>
<p>Why did I mentioned SSH?</p>
<p>Because I don&#8217;t want to download database file and then upload it again on new test server but I want to transfer whole data without downloading it.<br />
(Of course, in this case we must have ftp and ssh access to new server also).</p>
<p><em>TIP: For those that never used SSH before, I would advice that use Google for basic UNIX terminal commands, because they would need them. <img src='http://inchoo.net/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </em></p>
<p>First of all, we have to back up live site (just in case something goes wrong) and also we can use backup to transfer both database backup and files backup to new server without problems.<br />
Often it could be done through control panel of live site. If not, there are alternatives, but I will talk just about  first mentioned case for now.</p>
<p>When backup of whole site is finished, copy that &#8216;somefile.tgz&#8217; backup file into public folder either from control panel or from some root ftp access so we could download that file via URL (for example: www.somedomainold.com/somefile.tgz.  (Do not forget to delete it after transferring!)<br />
Next, we have to connect by SSH to new server with our credentials (I often use Putty for SSH access because it is relatively simple, but there are more tools available for free).<br />
Fire up Putty and enter basic connection information in sessions category: Host-name / IP address of server we will connect to and press &#8216;Open&#8217; button to start the session.</p>
<p><img class="alignleft size-full wp-image-8777" title="moving_wp1" src="http://inchoo.net/wp-content/uploads/2011/03/moving_wp1.jpg" alt="" width="600" height="183" /></p>
<p><img class="alignleft size-full wp-image-8778" title="moving_wp2" src="http://inchoo.net/wp-content/uploads/2011/03/moving_wp2.jpg" alt="" width="600" height="87" /></p>
<p>If all went right you should see console like this:</p>
<p><img class="alignleft size-full wp-image-8779" title="moving_wp3" src="http://inchoo.net/wp-content/uploads/2011/03/moving_wp3.jpg" alt="" width="600" height="89" /></p>
<p>Now it&#8217;s time to do some UNIX stuff.<br />
First we want to choose our folder on server where we will host out new wordpress installation. (Using comands “cd”, “ls” will give us that possibility).<br />
Next, we need to is &#8216;download&#8217; that backup file from old server to new. We can do it with “wget” command in terminal.</p>
<p><img class="alignleft size-full wp-image-8780" title="moving_wp4" src="http://inchoo.net/wp-content/uploads/2011/03/moving_wp4.jpg" alt="" width="600" height="40" /></p>
<p>After that we want to decompress our downloaded backup package and move site files from inside unpacked folder to our sub-domain directory and also extract our sqldump file so we could restore it on our mysql database on new server. (I didn&#8217;t mention that we should first create mysql database and assign a database user with root credentials to it and one of the easiest possibilities is to do that through control panel of new site).<br />
For file decompressing you can use &#8216;tar -zxvf yourfile.tar.gz &#8216;.</p>
<p>Because I went too deep in details, let&#8217;s back to main theme.</p>
<p>After these &#8216;few&#8217; steps, we should ensure that all is on it&#8217;s place, so finally we should finish with folder structure like this:</p>
<p>/html/portal/<br />
here should be out wordpress installation (index.php, .htaccess, folders wp-content etc.)</p>
<p>(By the way, folder &#8216;html&#8217; is in our case root domain public directory and folder name portal is our sub-domain folder where http://portal.somedomain.com points to). Why is this important? Because of .htaccess setup later in this article.</p>
<p>Next we should replace all occurrences of &#8216;http://somedomainold.com&#8217; with &#8216;http://portal.somedomain.com&#8217; in our sqldump file.<br />
First time I tried to do that with &#8216;nano&#8217; text editor in SSH terminal, but database was too big for that editor, so Putty and SSH connection crashed every time and I decided to take advantage of another tool in terminal, so I used &#8216;vi&#8217; editor for that purpose because it won&#8217;t load whole file in memory, just visible part so terminal wouldn&#8217;t crash.<br />
(Use Google to search for &#8216;find and replace with vi&#8217; tutorial).</p>
<p>After replacing domain names in sql dump file save it and exit vi editor.</p>
<p>So, now we have files of site on right place and also sql dump file ready to restore to new database.<br />
(of course while &#8216;vi&#8217; editor is open we should probably add line on top of existing sql statements: USE new_database_name; )</p>
<p>Let&#8217;s Google again for instructions how to restore sql dump file to mysql using console. There are plenty of tutorials doing that.</p>
<p>When restoring database is completed we are almost ready to start our transferred wordpress site.</p>
<p>Open up your browser and try to enter to wp-admin:  http://portal.somedomain.com/wp-admin,<br />
log in with old site credentials and check general settings for updating URLs of the site. Also check permalinks settings and save it again.<br />
If new wordpress site is not working or displays only frontpage and not other pages in menu, probably is some problem with rewrite and / or permissions in .htaccess file. So in that case – delete .htaccess file or rename it via ftp and go to wp-admin &#8211; &gt; settings &#8211; &gt; permalinks again and save it again and new .htaccess file will be created  with some wordpress lines.<br />
From my experience because our installation was in root domain before and now is on subdomain,<br />
we need to add subdomain folder name before /index.php in .htaccess file (like on image) and all should be OK.</p>
<p><img class="alignleft size-full wp-image-8781" title="moving_wp5" src="http://inchoo.net/wp-content/uploads/2011/03/moving_wp5.jpg" alt="" width="600" height="354" /></p>
<p>Maybe there are easier ways to move site, maybe there are better ways, but I felt that I have to write about that from my experience before, so thank you for reading <img src='http://inchoo.net/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> .</p>
]]></content:encoded>
			<wfw:commentRss>http://inchoo.net/wordpress/how-to-move-existing-wordpress-site-to-another-server/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>WordPress for Android</title>
		<link>http://inchoo.net/wordpress/wordpress-for-android/</link>
		<comments>http://inchoo.net/wordpress/wordpress-for-android/#comments</comments>
		<pubDate>Sun, 30 Jan 2011 22:40:33 +0000</pubDate>
		<dc:creator>Tomislav Bilic</dc:creator>
				<category><![CDATA[Android development]]></category>
		<category><![CDATA[Wordpress]]></category>
		<category><![CDATA[Android]]></category>
		<category><![CDATA[comments]]></category>

		<guid isPermaLink="false">http://inchoo.net/?p=8264</guid>
		<description><![CDATA[There I was yesterday, sitting at the caffe bar, waiting for friends to arrive. Newspaper news were boring since the topics were all about standard politics. During these times I &#8230;]]></description>
			<content:encoded><![CDATA[<p>There I was yesterday, sitting at the caffe bar, waiting for friends to arrive. Newspaper news were boring since the topics were all about standard politics. During these times I often check latest comments on this blog and moderate (approve or spam) them. Logging to the administration via my HTC desire was a pain and clicking on that tiny &#8220;Approve&#8221; link is even more painful. I was thinking that native Android App would be of great help.<br />
<span id="more-8264"></span><br />
It exists and it is official as you can see on the official site of the project: <a href="http://android.wordpress.org/">http://android.wordpress.org/</a></p>
<p><embed src="http://s0.videopress.com/player.swf?v=1.02" type="application/x-shockwave-flash" width="620" height="348" wmode="transparent" seamlesstabbing="true" allowfullscreen="true" allowscriptaccess="always" overstretch="true" flashvars="guid=73jyWIka" title="Introducing WordPress for Android"></embed></p>
<p>This is also an Open Source project, which means we can play a part in its development. WordPress for Android is released under the GNU General Public License. Both app and source code are free to download and use however we’d like. Sweet!</p>
<h2>Download WordPress for Android</h2>
<p><img src="http://s2.wp.com/wp-content/themes/vip/wpforandroid/images/wordpress_qrcode.png?m=1286133052g" alt="Android for WordPress Barcode" class="alignright"/>If you have a barcode scanner installed on your device, scan the code here to be taken directly to the download page for WordPress for Android. </p>
<p>Other way is top open Android Market application and search for “wordpress”. Select and install the application that is published by Automattic, Inc</p>
<h2>Summary</h2>
<p>Although the app itself lets you easily write blog posts, edit and create pages aswel as view traffic stats, I don&#8217;t believe I will use anything else than comment management.<br />
<div class="wp-caption aligncenter" style="width: 490px"><img alt="" src="http://wpandroid.files.wordpress.com/2010/07/comments1.png?w=180&#038;h=300" title="Wordpress for Android Comments" width="180" height="300" /><p class="wp-caption-text">Wordpress for Android Comments</p></div></p>
]]></content:encoded>
			<wfw:commentRss>http://inchoo.net/wordpress/wordpress-for-android/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Our New Design is Nominated for CSS Design Awards</title>
		<link>http://inchoo.net/wordpress/our-new-design-is-nominated-for-css-design-award/</link>
		<comments>http://inchoo.net/wordpress/our-new-design-is-nominated-for-css-design-award/#comments</comments>
		<pubDate>Fri, 21 Jan 2011 13:18:01 +0000</pubDate>
		<dc:creator>Lyssandro Reis</dc:creator>
				<category><![CDATA[Wordpress]]></category>
		<category><![CDATA[Design]]></category>
		<category><![CDATA[Online Marketing]]></category>
		<category><![CDATA[theme]]></category>

		<guid isPermaLink="false">http://inchoo.net/?p=8136</guid>
		<description><![CDATA[Hi Everyone, After all the work we have done to get our new website up and running, we are now trying to get the attention of the design community and &#8230;]]></description>
			<content:encoded><![CDATA[<p>Hi Everyone,</p>
<p>After all the work we have done to get our new website up and running, we are now trying to get the attention of the design community and show that we do design in the same way we do development; with distinctive passion and quality. If you want to help us to win this award, all you have to do is to go to <a href="http://www.cssdesignawards.com/css-web-design-award-nominees.php">cssdesignawards.com</a> hover the image and vote for us!</p>
<p><span id="more-8136"></span></p>
<p>&nbsp;</p>
<p><a href="http://www.cssdesignawards.com/css-web-design-award-nominees.php"><img src="http://inchoo.net/wp-content/uploads/2011/01/inchoo-is-a-css-awards-nominee-vote-for-us.jpg" alt="Our New Design is Nominated for a CSS Award - Vote for us" /></a></p>
<p>&nbsp;</p>
<p>Thank you all!</p>
<p>Lyssandro Reis</p>
]]></content:encoded>
			<wfw:commentRss>http://inchoo.net/wordpress/our-new-design-is-nominated-for-css-design-award/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>New Inchoo.net Design</title>
		<link>http://inchoo.net/wordpress/new-inchoo-net-design/</link>
		<comments>http://inchoo.net/wordpress/new-inchoo-net-design/#comments</comments>
		<pubDate>Mon, 10 Jan 2011 12:02:16 +0000</pubDate>
		<dc:creator>Lyssandro Reis</dc:creator>
				<category><![CDATA[Wordpress]]></category>
		<category><![CDATA[Design]]></category>
		<category><![CDATA[project]]></category>
		<category><![CDATA[theme]]></category>

		<guid isPermaLink="false">http://inchoo.net/?p=7941</guid>
		<description><![CDATA[Hi Everyone. Since I started working at Inchoo &#8211; in fact since my interview, Tomislav (our CEO) has been talking about the revamping of Inchoo.net. In Brazil we have a &#8230;]]></description>
			<content:encoded><![CDATA[<p>Hi Everyone. Since I started working at Inchoo &#8211; in fact since my interview, <a href="http://inchoo.net/author/tomislav-bilic/">Tomislav</a> (our CEO) has been talking about the revamping of Inchoo.net. In Brazil we have a popular saying: &#8220;In a blacksmith&#8217;s house, the skewer is made of wood&#8221;, which can be applied to almost all types of businesses. You know the drill, unless something is really hurting, we keep our non-billable projects on the back-burner and keep the focus on our clients and opportunities for new projects. Thankfully, we found a gap in between projects and I was the designer responsible.</p>
<p><span id="more-7941"></span></p>
<h3>Project Definition</h3>
<p>We can say we are already recognized as <a href="http://inchoo.net/services/magento-development/" title="Magento Development at Inchoo">Magento developers</a>, so the main objective was to let the world know that <a href="http://inchoo.net/services/magento-ui-design/" title="Magento Design at Inchoo">we do design</a> on the same level of excellence. We all agreed that we needed a fresh design, something to achieve that &#8220;Wow&#8221; effect. For started we brainstormed whether we were talking about re-designing the website keeping its structure or we will take totally different direction.</p>
<p><a href="http://inchoo.net/author/tomislav-bilic/" title="Tomislav Bilic">Tomislav</a> and <a href="http://inchoo.net/author/toni/" title="Toni Anicic, the celebrity at Inchoo">Toni</a> pointed out some important competitors to provide a bigger picture. We discussed competitors strategies, checked our Google Analytics data and decided that I was free to suggest something completely different. Two of them already had an idea, so the differences in our thoughts could improve everybody&#8217;s predictions about the project.</p>
<h3>Wire-framing</h3>
<p>The wire-framing phase was always a very collaborative step at Inchoo. Ideas and suggestions generated by the team gave me a valuable opportunity to challenge myself and enhance the outcomes. After researching and being eager to show something out-of-this-word, I reached the following approach:</p>
<p><img class="alignnone size-full wp-image-7945" title="First wireframe draft" src="http://inchoo.net/wp-content/uploads/2011/01/inchoo-new-design-wireframe1.jpg" alt="First wireframe draft" width="620" height="958" /></p>
<p>As you can see, the homepage had suffered some major structural changes and the blog wasn&#8217;t the star anymore. It was an interesting exercise but it brought a lot of questions.</p>
<p>The research and thought involved has added to the project and opened another window for discussion. After throwing some ideas back and forth we all agreed that along with stating that &#8220;We have top-notch designers and we can provide awesomeness in design as well as in Magento Development&#8221;, we needed to be considerate to our fellow reader, to the Community of Magento developers and business owners that compose our regular audience. We should not assume an institutional image or give priority to a design spectacle over the valuable content we provide and our visitor&#8217;s interaction.</p>
<p>It did not take a lot to get everybody on the same page. We then decided to <strong>identify the blog as the core of our web presence</strong>. Therefore, we put the homepage planning aside for a moment and jumped straight into the blog wire-framing.</p>
<p>See our single post wireframe below.</p>
<p><img class="alignnone size-full wp-image-7948" title="Extract of our second wireframe draft" src="http://inchoo.net/wp-content/uploads/2011/01/inchoo-new-design-wireframe2.jpg" alt="Extract of our second wireframe draft" width="620" height="1036" /></p>
<p>We concentrated our efforts in the improvement of our blog features and structure. Everything now should fall in place as we proceed. With everybody in agreement, we decided to start the blog design.</p>
<h3>The Design Challenge</h3>
<p>We didn&#8217;t want to be compared to our competitors. The idea was simple: as we spend most of our lives working and having a lot of fun doing it, we wanted to have a website that reflects this. We were looking for an original approach, a concept aligned to our culture and personality.</p>
<p>The light atmosphere and funky mood that is present all over the site, posts, tweets and so on, drew my attention.</p>
<p>As some of you know, <a href="http://inchoo.net/author/hrvoje/" title="Hrvoje Jurisic from Cerna near Vinkovci, Croatia">Hrvoje</a> &#8211; one of our developers is the illustrator of <a href="http://inchoo.net/tag/inchooers/">The Inchooers</a>, the bunch of funny characters, inspired by the Inchoo developers themselves. He is bringing the jokes, the funny episodes and even <a href="http://inchoo.net/fun-zone/chuck-almighty/">Chuck Norris</a> into our web presence for a long time. Everything with good humor, a dash of irony and sarcasm at times. It was definitely a good idea to emphasise it on our new visual.  Hrvoje was very enthusiastic about it.</p>
<p><img class="alignnone size-full wp-image-7950" title="Preliminar Design Proposal" src="http://inchoo.net/wp-content/uploads/2011/01/preliminar-design.jpg" alt="Preliminar Design Proposal" width="620" height="1095" /></p>
<p>Everybody was quite happy with this approach and it has generated a series of inputs and feedback. The major concern was whether it has gone too playful or too &#8220;childish&#8221;. However, we were all confident that we were on the right track, it would be just a matter of improving this language and finding the right tone.</p>
<p>It was time to look into details and present a more polished design proposal that would solve those issues.</p>
<p><img class="alignnone size-full wp-image-7954" title="Approved Design" src="http://inchoo.net/wp-content/uploads/2011/01/approved-design2.jpg" alt="Approved Design" width="620" height="2099" /></p>
<p>This time we created the <strong>Wow-effect</strong> we were looking for.</p>
<h3>Front-end WordPress Development</h3>
<p>As well as <a href="http://inchoo.net/services/magento-ui-design/">design</a>, I was also responsible for the front-end <a href="http://inchoo.net/services/magento-development/">development</a> on this project.</p>
<p>The design created some challenges that made it necessary to use of some new css3 capabilities, for which we are providing fallbacks for ie7 using <a href="http://modernizr.com">modernizr.com</a>. We opted for using web-fonts for the headers instead of relying on web-safe fonts or images.</p>
<p>It&#8217;s been a great opportunity to experiment these new resources and has made the front-end development more enjoyable. In fact, we are still testing, adding some bits and pieces and improving the theme as we go. We decided to go live and finish with the little details in middle-air fly.</p>
<p><a href="http://inchoo.net/author/vanja-devcic">Vanja Devcic</a> was the front-end developer responsible for the CMS implementation. We have been working in close contact in this phase and the nature of this project gave us the opportunity to try different solutions for different challenges and processes. Although we&#8217;ve been working from different sides of the world ( I, from Sydney, Australia and Vanja from Osijek, Croatia), I always had a feeling like we were in the same office. </p>
<p>Besides <a href="http://inchoo.net/services/wordpress-development/" title="Seeking WordPress expert?">WordPress development</a>, he has provided an impressive amount of support which contributed to the high-quality output you can see now.</p>
<h3>Teamwork</h3>
<p>I definitely should mention <a href="http://inchoo.net/author/renato.carvalho/">Renato Carvalho</a>, <a href="http://inchoo.net/author/rafael.torales/">Rafael Torales</a> and <a href="http://inchoo.net/author/ney.ricardo/">Ney Ricardo</a> form our Design Lab for their positive re-marks during the whole process.</p>
]]></content:encoded>
			<wfw:commentRss>http://inchoo.net/wordpress/new-inchoo-net-design/feed/</wfw:commentRss>
		<slash:comments>13</slash:comments>
		</item>
		<item>
		<title>WordPress 3.1 new features rundown</title>
		<link>http://inchoo.net/wordpress/wordpress-3-1-new-features-rundown/</link>
		<comments>http://inchoo.net/wordpress/wordpress-3-1-new-features-rundown/#comments</comments>
		<pubDate>Thu, 30 Sep 2010 13:05:34 +0000</pubDate>
		<dc:creator>Zeljko Prsa</dc:creator>
				<category><![CDATA[Wordpress]]></category>
		<category><![CDATA[blogs]]></category>
		<category><![CDATA[cms]]></category>

		<guid isPermaLink="false">http://inchoo.net/?p=5959</guid>
		<description><![CDATA[Writers, developers rejoice for some new features like Internal linking, Front-end Admin Bar and some pretty good advancements on taxonomy queries and post templates. Hit the button, read the rundown. Features expected &#8230;]]></description>
			<content:encoded><![CDATA[<p>Writers, developers rejoice for some new features like <strong><a href="http://inchoo.net/wordpress/wordpress-3-1-new-features-rundown">Internal linking</a></strong>, <strong>Front-end Admin Bar</strong> and some pretty good advancements on taxonomy queries and post templates. <a href="http://inchoo.net/wordpress/wordpress-3-1-new-features-rundown/">Hit the button</a>, read the rundown.<br />
<span id="more-5959"></span><br />
Features expected in WordPress 3.1:</p>
<p><strong>Internal linking</strong> &#8211; After years of expectations WordPress will gain more on CMS functionality then ever and make wordpress even more SEO efficient.</p>
<p> Writers will now have the ability to browse thru posts and pages from the admin and add the internal links directly while writing the post. Guess I&#8217;ll stop using dedicated desktop apps that don&#8217;t support that.</p>
<p><strong>Front-End Admin Bar</strong> &#8211; Having the back-end on the front-end in terms of a on-top placed administration bar will provide easy access to the dashboard, post writing etc. </p>
<p>This would come in handy for multisite wordpress sites and for those who like having some bar sitting on top <img src='http://inchoo.net/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  Judging by the community feedback it&#8217;s a very welcomed feature. </p>
<p><strong>Admin Screens on AJAX</strong> &#8211; This one will allow reordering/sorting columns  for the admin interface. One great application of this is with the sorting, pagination and most importantly searching. Hope this one gets applied to comments also but as they state on their dev blog &#8220;it&#8217;s still being reviewed for inclusion&#8221;.</p>
<p>Next presented features are more interesting to developers and advanced users since they bring WordPress even closer to that CMS flavor:</p>
<p><strong>Advanced taxonomy queries</strong> &#8211; The taxonomy queries, as announced, should be easier to create and enable sorting posts and pages a lot easier. I guess that recreating multiple taxonomies through categories should be a thing of the past.</p>
<p>Something like: &#8220;I&#8217;d like a list of all your cars without the stereo please&#8221;. &#8220;Yes sir, here you are.&#8221; but without wordpress actually talking with the user <img src='http://inchoo.net/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<p><strong>Post templates / Post styles</strong> &#8211; This feature brings WordPress a few steps closer to an actual CMS with the ability for the user to select a pre-defined post template or post style, carefully prepared by a developer and accessible via drop-down. </p>
<p>All of these improvements are also accompanied with bug fixes and of course, some UI changes and enhancements. This will also be the last version to support PHP 4.</p>
<p>The release is scheduled for December 15, a month after the Beta release.</p>
<p>You can read their full process and scope at <a href="http://wpdevel.wordpress.com/2010/09/03/process-and-scope-for-3-1-part-i/">their dev blog</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://inchoo.net/wordpress/wordpress-3-1-new-features-rundown/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>OK Auto – More than OK</title>
		<link>http://inchoo.net/wordpress/ok-auto-offroad/</link>
		<comments>http://inchoo.net/wordpress/ok-auto-offroad/#comments</comments>
		<pubDate>Fri, 13 Aug 2010 14:21:19 +0000</pubDate>
		<dc:creator>Tomislav Bilic</dc:creator>
				<category><![CDATA[Magento]]></category>
		<category><![CDATA[Wordpress]]></category>
		<category><![CDATA[Portfolio]]></category>
		<category><![CDATA[teraflex]]></category>

		<guid isPermaLink="false">http://inchoo.net/?p=5231</guid>
		<description><![CDATA[Looks like we are becoming specialist for creation of off-road online stores. OK Auto had s strong online presence for years presenting themselves as a source for all of your &#8230;]]></description>
			<content:encoded><![CDATA[<p>Looks like we are becoming specialist for creation of off-road online stores. <a href="http://ok4wd.com/" target="_blank">OK Auto</a> had s strong online presence for years presenting themselves as a source for all of your automotive and off-road needs. It is always a challenge to decide to abandon existing website backend and move to a new platform, especially when you have a lot of content. OK Auto had this courage and moved to Magento &amp; WordPress integration using advantages of both platforms to the maximum.</p>
<p><span id="more-5231"></span>A little bit of OK Auto: Today, over 30 years later, OK Auto can be your main source for all of your automotive and off-road needs. With 22 employees who have worked here an average of 13 years, they have cumulative 267 years worth of industry experience! You can find them at the lovely place called <a href="13452585393600517&amp;q=2621+State+Route+57,+Stewartsville,+NJ+08886&amp;hl=en&amp;cd=1&amp;cad=src:ppiwlink&amp;ei=n-svS5DFNp-SNeHSuf4I">Stewartsville in New Jersey, USA</a>.</p>
<p>With standard features of an online store that fit into Magentos&#8217; in-the-box feature list, they wanted <a href="http://ok4wd.com/auto/category/news">News Article Manager</a>, <a href="http://ok4wd.com/auto/category/online-garage">Image Gallery</a>, <a href="http://ok4wd.com/auto/event-calendar">Event Calendar</a>, <a href="http://ok4wd.com/shop-by-wheels-and-tires/">Shop by Vehicle Fit</a> extension, and many more. After some consideration whether it is better to have everything in Magento or go worth WordPress integration, we decided to take the second route. Magento is getting better CMS features with every version, but it is still long way from WordPress. Check the website out at: <a title="OK Auto" href="http://ok4wd.com/" target="_blank">http://ok4wd.com/</a></p>
<p><a href="http://inchoo.net/wp-content/uploads/2010/08/ok-auto-full.jpg"><img class="alignnone size-full wp-image-5238" title="Full Screenshot of OK Auto" src="http://inchoo.net/wp-content/uploads/2010/08/ok-auto-full.jpg" alt="Full Screenshot of OK Auto" width="620" height="715" /></a></p>
<blockquote><p><a href="http://inchoo.net/wp-content/uploads/2010/08/james-henry.jpg"><img class="alignright size-full wp-image-5235" title="James Henry" src="http://inchoo.net/wp-content/uploads/2010/08/james-henry.jpg" alt="James Henry" width="120" height="150" /></a>Let me be blunt: Magento development isn’t for the faint of heart. Magento development is extremely involved as its file structure and the way it functions is complex. Not to mention its extremely picky about the way things must be done. It’s very easy to be over your head in problems and confusion. The guys at Surgeworks/Inchoo not only knew what they were doing, but also helped keep the project moving when we dragged our feet. Everyone was professional, knowledgeable, and took great care in not only the website, but also our company as a whole. When we had crazy idea’s, they let us know if it were possible or if were about to build a sand castle in quick sand.</p>
<p>I cannot explain how grateful I am that we had such a group of knowledgeable developers working on our website. Over the past two years (I said we dragged our feet!), it seems like I can now fly out to Croatia, call my friends at Inchoo and grab a bite to eat. They are just that great as developers and as people. To be honest, I couldn’t see anyone else doing what they did. Looking back, we had some crazy request and features we wanted. They went beyond the call of duty as developers and as long as I’m in charge, no matter the company I work for at the time – these guys will be the first that I email.<br />
<strong>James Henry, Website Project Leader, OK Auto</strong></p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://inchoo.net/wordpress/ok-auto-offroad/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>WordPress 3.0 &#8211; At first glance</title>
		<link>http://inchoo.net/wordpress/wordpress-3-0-at-first-glance/</link>
		<comments>http://inchoo.net/wordpress/wordpress-3-0-at-first-glance/#comments</comments>
		<pubDate>Fri, 18 Jun 2010 11:01:30 +0000</pubDate>
		<dc:creator>Zeljko Prsa</dc:creator>
				<category><![CDATA[Wordpress]]></category>

		<guid isPermaLink="false">http://inchoo.net/?p=4929</guid>
		<description><![CDATA[Just installed it on a local machine and went through the Admin panel to see what is and what isn&#8217;t available directly from there and what changes/improvements have been made. &#8230;]]></description>
			<content:encoded><![CDATA[<p>Just installed it on a local machine and went through the Admin panel to see what is and what isn&#8217;t available directly from there and what changes/improvements have been made.<br />
<span id="more-4929"></span></p>
<p>This major editions bares the code name Thelonious named after <a href="http://en.wikipedia.org/wiki/Thelonious_Monk">Thelonious Monk</a> of course following the tradition of naming versions inspired by famous Jazz musicians. </p>
<p><strong>1. Dashboard</strong></p>
<p>WordPress dashboard remains the same in terms of layout and functionality except the new item in the Dashboard menu (moved from the tools menu) where the &#8220;Updates&#8221; section is now present as a separate page with info about the version of WordPress,  plugins and themes you are currently running. There is also an option for reinstalling your wordpress automatically or download the latest version and reinstalling it manually.</p>
<p><img class="alignnone size-full wp-image-4930" title="wordpress-3-dashboard-updates" src="http://inchoo.net/wp-content/uploads/2010/06/wordpress-3-dashboard-updates.png" alt="" width="591" height="397" /></p>
<p><strong>2. Post thumbnail is now Featured Image</strong></p>
<p>Since WordPress 2.9 you had the option of adding the post thumbnail to a specific post. It&#8217;s media label is now changed from &#8220;Post thumbnails&#8221; to &#8220;Featured image&#8221;.</p>
<p>There is a slight drawback to this functionality since it doesn&#8217;t work out of the box with the new wordpress default theme called &#8220;twentyten&#8221; so you have to add this line of code to the loop.php file in order to make it work:</p>
<p><em>How to:</em></p>
<p>1. Open up the loop.php from the theme folder and locate line number 136 where the &#8220;entry-content&#8221; div is.<br />
2. Insert the code below on the new line and save the file.</p>
<pre class="brush: php; title: ; notranslate">&amp;lt; ?php if ( function_exists(&amp;quot;has_post_thumbnail&amp;quot;) &amp;amp;amp;&amp;amp;amp; has_post_thumbnail() ) { the_post_thumbnail(array(250,210), array(&amp;quot;class&amp;quot; =&amp;gt; &amp;quot;alignleft post_thumbnail&amp;quot;)); } ?&amp;gt;</pre>
<p><em>Note</em>: The loop.php file now holds pretty much everything from the index.php functionality while the index.php is  reduced to 32 lines holding mostly comments and loading the &#8216;loop&#8217; and &#8216;index&#8217;. This is a step forward in my  opinion since now you can leave that index.php intact and override it with loop-index.php in the child theme if child themes are your thing <img src='http://inchoo.net/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p><strong>3. Menu(s) administratio</strong>n &#8211; About time!</p>
<p>Since ever WP users had to install a plugin in order to handle the menus. No more. Following the &#8220;The less plugins the better&#8221; code, you now have the native support for the menu&#8217;s content and placement.</p>
<p><a href="http://inchoo.net/wp-content/uploads/2010/06/wordpress-menu-mngmnt.png"><img class="alignnone size-medium wp-image-4932" title="wordpress-menu-mngmnt" src="http://inchoo.net/wp-content/uploads/2010/06/wordpress-menu-mngmnt-637x580.png" alt="" width="637" height="580" /></a></p>
<p>Custom links, Pages and categories can be added and then additionally edited. You can change the Navigation label and even the title attribute and order them with simple drag and drop. Neat <img src='http://inchoo.net/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p><strong>4. Tools &#8211;  Import/Export</strong></p>
<p>If you ever used the import functionality in WordPress you&#8217;ll be surprised now that you&#8217;ll have to install the plugin in order to do that although some importers are listed you&#8217;ll get this modal window asking you to install it first:</p>
<p><a href="http://inchoo.net/wp-content/uploads/2010/06/install-importer.png"><img class="alignnone size-medium wp-image-4933" title="install-importer" src="http://inchoo.net/wp-content/uploads/2010/06/install-importer-637x603.png" alt="" width="637" height="603" /></a></p>
<p>The export functionality now has numerous options: Start date, End Date, Authors, Categories, Post tags, content types and statuses.</p>
<p><strong>5. The Custom Post Types and Multi-site feature</strong></p>
<p>These highly anticipated WordPress features have to be enabled first in order to be used <img src='http://inchoo.net/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  The custom post type requires some code writing in the functions.php:</p>
<pre class="brush: php; title: ; notranslate">function post_type_tshirt() {
register_post_type( 'tshirt', array( 'label' =&gt; __('T-Shirts'), 'public' =&gt; true, 'show_ui' =&gt; true ) );
register_taxonomy_for_object_type('post_tag', 'tshirt');
}
add_action('init', 'post_type_tshirt');</pre>
<p>Enabling Multi-site feature requires temporarily disabling all of the plugins and adding this code to the wp-config.php:</p>
<pre class="brush: php; title: ; notranslate"> define('WP_ALLOW_MULTISITE', true);</pre>
<p>Finally, for the full list of features go to <a href="http://codex.wordpress.org/Version_3.0">codex</a>.</p>
<p>Cheers and thanks for reading!</p>
]]></content:encoded>
			<wfw:commentRss>http://inchoo.net/wordpress/wordpress-3-0-at-first-glance/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>WordPress User Roles Explained With Table</title>
		<link>http://inchoo.net/wordpress/wordpress-user-roles-explained-with-table/</link>
		<comments>http://inchoo.net/wordpress/wordpress-user-roles-explained-with-table/#comments</comments>
		<pubDate>Wed, 31 Mar 2010 10:58:08 +0000</pubDate>
		<dc:creator>Toni Anicic</dc:creator>
				<category><![CDATA[Wordpress]]></category>
		<category><![CDATA[user]]></category>

		<guid isPermaLink="false">http://inchoo.net/?p=4285</guid>
		<description><![CDATA[I hope I&#8217;m not the only one who got a little bit confused when WordPress created a user role &#8220;Contributor&#8221;. My first question was, what&#8217;s the difference in privileges between &#8230;]]></description>
			<content:encoded><![CDATA[<p>I hope I&#8217;m not the only one who got a little bit confused when WordPress created a user role &#8220;Contributor&#8221;. My first question was, what&#8217;s the difference in privileges between a contributor and an author?<span id="more-4285"></span></p>
<p>I made this table that compares privileges of different WordPress user roles (Administrator, Editor, Author and Contributor), I hope it helps you!</p>
<p><img class="alignnone size-full wp-image-4286" title="wpuserroles" src="http://inchoo.net/wp-content/uploads/2010/03/wpuserroles.jpg" alt="" width="620" height="289" /></p>
]]></content:encoded>
			<wfw:commentRss>http://inchoo.net/wordpress/wordpress-user-roles-explained-with-table/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>A new WordPress Members Plugin blows away its predecessors</title>
		<link>http://inchoo.net/wordpress/a-new-wordpress-members-plug-in-blows-away-its-predecessors/</link>
		<comments>http://inchoo.net/wordpress/a-new-wordpress-members-plug-in-blows-away-its-predecessors/#comments</comments>
		<pubDate>Sun, 13 Dec 2009 10:20:16 +0000</pubDate>
		<dc:creator>Mauro Dalu</dc:creator>
				<category><![CDATA[Wordpress]]></category>
		<category><![CDATA[Members]]></category>
		<category><![CDATA[plugin]]></category>

		<guid isPermaLink="false">http://inchoo.net/?p=3667</guid>
		<description><![CDATA[The Members plug-in by Justin Tadlock is a very young plug-in (0.1) and is compatible with WordPress 2.8. This new Membership Plug-in adds a series of components that you can &#8230;]]></description>
			<content:encoded><![CDATA[<p>The Members plug-in by Justin Tadlock is a very young plug-in (0.1) and is compatible with WordPress 2.8. This new Membership Plug-in adds a series of components that you can activate based on your needs. The Members plugin is meant to be a complete user, role, and content management plugin for WordPress. Its purpose is to give you fine-grained control over who has access to what. Right now, it&#8217;s in the early stages of development.<br />
<span id="more-3667"></span><br />
I&#8217;ll be testing it on a new personal project <a href="http://salmicantati.org" target="_blank">here</a>. The basic modules are WordPress Roles Manager (Edit Roles and New Roles) that allow to create and assign WordPress capabilities to existing Roles and to create new Roles.</p>
<p>The Content Permissions module adds a meta box for the post/page editor that allows you to grant permissions for who can read the content based on the the user&#8217;s capabilities or role.</p>
<p>The Shortcodes modules rovides a set of shortcodes that may be used to restrict or provide access to certain areas of your site from within the post editor (or other areas where shortcodes are allowed).</p>
<p>Two more modules compelte the plug-in arsenal: Template Tags adds new functions for use within your WordPress theme for various things and Private Blog will create a blog that can only be accessed by users that are logged in (redirects them to the login page).</p>
<p>At a glance, the plug-in is very well documented so be sure to check /wp-content/plugins/members/readme.html after you install the plug-in (the documentation is not easily accessible from the plug-in&#8217;s website).</p>
<p>The plug-in was released on September 17, 2009 and the great news is it&#8217;s open source: it&#8217;s not a commercial product like most of its competitors&#8230; Check it out <a href="http://justintadlock.com/archives/2009/09/17/members-wordpress-plugin" target="_blank">on Justin Tadlock website</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://inchoo.net/wordpress/a-new-wordpress-members-plug-in-blows-away-its-predecessors/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>3 WordPress plugins for rapid development</title>
		<link>http://inchoo.net/wordpress/3-wordpress-plugins-for-rapid-development/</link>
		<comments>http://inchoo.net/wordpress/3-wordpress-plugins-for-rapid-development/#comments</comments>
		<pubDate>Wed, 09 Dec 2009 14:39:37 +0000</pubDate>
		<dc:creator>Zeljko Prsa</dc:creator>
				<category><![CDATA[Wordpress]]></category>
		<category><![CDATA[plugins]]></category>
		<category><![CDATA[prototype]]></category>

		<guid isPermaLink="false">http://inchoo.net/?p=3612</guid>
		<description><![CDATA[These 3 plugins for wordpress impressed me enough to write a blog post about them &#8217;cause they were all well programmed with &#8220;Good enough&#8221; and &#8220;Don&#8217;t over do it&#8221; approach. &#8230;]]></description>
			<content:encoded><![CDATA[<p>These 3 plugins  for wordpress impressed me enough to write a blog post about them &#8217;cause they were all well programmed with &#8220;Good enough&#8221; and &#8220;Don&#8217;t over do it&#8221; approach.<br />
<span id="more-3612"></span></p>
<h3>WordPress Popular Posts</h3>
<p>The first one on the list is a plugin that comes with it&#8217;s own administrative interface which offers just enough options you would need out of it. Here&#8217;s the screenshot from the admin interface.</p>
<p><cite> Displays popular posts, supports images, comments and customizable through WP admin.</cite></p>
<p>Description: Retrieves the most active entries of your blog and displays them with your own formatting (optional). Use it as a widget or place it in your templates using < ?php get_mostpopular(); ?></p>
<p>Plugin URI: <a href="http://wordpress.org/extend/plugins/wordpress-popular-posts/"></p>
<p>http://wordpress.org/extend/plugins/wordpress-popular-posts/</a></p>
<p>Author URI: http://wordpress.org/extend/plugins/wordpress-popular-posts/</p>
<div style="text-align:center;"><img src="http://inchoo.net/wp-content/uploads/2009/12/Picture-6.png" alt="Picture 6.png" border="0" width="449" height="796" /></div>
<h3>Recent posts</h3>
<p>Recent posts plugin is pretty self explanatory with options in displaying the number of posts, skipping posts and a few other &#8220;might come in handy&#8221; tweaks for your needs. </p>
<p>Description: Retrieves a list of the most recent posts, you may pass parameters when calling the function to configure some of the options.</p>
<p>Plugin URI: <a href="http://wordpress.org/extend/plugins/recent-posts/">http://wordpress.org/extend/plugins/recent-posts/</a></p>
<p>Author URI: <a href="http://nickmomrik.com/">http://nickmomrik.com/</a></p>
<h3>Recent Comments</h3>
<p>Description: This plugin displays excerpts of the most recent comments and/or trackbacks that have been posted to the articles in your blog.</p>
<p>Plugin URI:<a href="http://blog.jodies.de/2004/11/recent-comments/" title="">http://blog.jodies.de/2004/11/recent-comments/</a></p>
<p>Author URI: <a href="http://blog.jodies.de" title="">http://blog.jodies.de</a></p>
<p><img src="http://inchoo.net/wp-content/uploads/2009/12/Picture-7.png" alt="Picture 7.png" border="0" width="634" height="458" align="left" /></p>
<p>On top of retrieving a list of the most recent comments it has it&#8217;s own pretty well programmed backend where you can choose from the number of options like: </p>
<ul>
<li>Number of comments displayed</li>
<li>&#8220;Chopping&#8221; of the comments text</li>
<li>Word wrapping</li>
<li>Excluding by author</li>
</ul>
<p>&#8230; and a few other handy options.</p>
<p>Hope you find these 3 plugins useful enough to put them in your toolbox and save time <img src='http://inchoo.net/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://inchoo.net/wordpress/3-wordpress-plugins-for-rapid-development/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Latest News with automatic thumbnails in Magento</title>
		<link>http://inchoo.net/wordpress/latest-news-with-automatic-thumbnails-in-magento/</link>
		<comments>http://inchoo.net/wordpress/latest-news-with-automatic-thumbnails-in-magento/#comments</comments>
		<pubDate>Mon, 07 Dec 2009 10:55:58 +0000</pubDate>
		<dc:creator>Hrvoje Jurisic</dc:creator>
				<category><![CDATA[Extensions]]></category>
		<category><![CDATA[Frontend]]></category>
		<category><![CDATA[Magento]]></category>
		<category><![CDATA[Wordpress]]></category>
		<category><![CDATA[images]]></category>
		<category><![CDATA[news]]></category>
		<category><![CDATA[rss]]></category>

		<guid isPermaLink="false">http://inchoo.net/?p=3526</guid>
		<description><![CDATA[We already wrote about this subject, but now we give you a new, improved version of it. Let&#8217;s say you want to have a sidebar box with the latest news &#8230;]]></description>
			<content:encoded><![CDATA[<p>We already <a href="http://inchoo.net/ecommerce/magento/latest-news-rss-box-block/">wrote</a> about this subject, but now we give you a new, improved version of it.</p>
<p>Let&#8217;s say you want to have a sidebar box with the latest news from your wordpress blog on your magento powered store, and you want to show the thumbnails with it. We&#8217;re going to do it by displaying articles from our RSS feed. <span id="more-3526"></span></p>
<p>First, we have to make sure to generate thumbnails in our Wordpres RSS feed. Just paste this class into your<strong> wordpress</strong> theme&#8217;s functions.php file. This function grabs the first image in your article and attaches it to RSS feed article.</p>
<pre class="brush: php; title: ; notranslate">

class RssImage {
var $nextgen_shortcode_backup = array();
var $thumbs = array();

function RssImage() {
// 'wp' hook couse is_feed is too early for 'init'
add_action('wp', array($this,'init'));
}

function init(){
global $shortcode_tags;
if(!is_feed()) return;
add_action('rss2_item', array($this,'rss2_item'));
add_action('rss_item', array($this,'rss2_item'));
}

function rss2_ns(){
echo 'xmlns:media=&quot;http://search.yahoo.com/mrss/&quot;';
}

function rss2_item(){
global $post;
$thumb = $this-&gt;get_thumb();
if(!$thumb) return;
echo &quot;&lt;enclosure url='&quot;.$thumb.&quot;' type='image/jpg' /&gt;&quot;;
}
function get_thumb() {
global $post, $posts;
$thumb = '';
ob_start();
ob_end_clean();
$output = preg_match_all('/&lt;img .+src=[\'&quot;]([^\'&quot;]+)[\'&quot;].*/&gt;/i', $post-&gt;post_content, $matches);
$thumb = $matches [1] [0];

if(empty($thumb)){ //Defines a default image
$blogurl = get_bloginfo('stylesheet_directory');
$thumb = $blogurl.&quot;/images/default.jpg&quot;;
}
return $thumb;

// NextGEN gallery?
if (class_exists('nggdb')) {
$tagregexp = 'nggallery|imagebrowser|slideshow';
$pattern = '\[('.$tagregexp.')\b(.*?)(?:(\/))?\](?:(.+?)\[\/\1\])?';
$m = array();
if(preg_match('/'.$pattern.'/s', $post-&gt;post_content, $m)) {
$attr = shortcode_parse_atts($m[2]);
if(isset($attr['id'])){
if( ($gallery = nggdb::find_gallery($attr['id'])) and $gallery-&gt;previewpic){
if( ($image = nggdb::find_image($gallery-&gt;previewpic)) ) return $image-&gt;thumbURL;
}
}
}
}
return false;
}
}

$rssimage = new RssImage();
</pre>
<p>In order to create automatic thumbnails, we&#8217;re going to use <a href="http://shiftingpixel.com/2008/03/03/smart-image-resizer/">smart image resizer</a>. Download it and place image.php file in your <strong>magento</strong> theme&#8217;s skin folder.</p>
<p>After that,  create a file called <strong>latest_news.phtml</strong> in app/design/frontend/default/[your_theme]/template/callouts/latest_news.phtml. Here, we are going to grab image, title and summary from articles in feed and display it in magento.</p>
<pre class="brush: php; title: ; notranslate">

&lt; ?php $channel = new Zend_Feed_Rss($this-&gt;getUrl('press/feed/'));
function text_limit($string, $length, $replacer = '...') {
$string = strip_tags($string);
if(strlen($string) &gt; $length)
return (preg_match('/^(.*)\W.*$/', substr($string, 0, $length+1), $matches) ? $matches[1] : substr($string, 0, $length)) . $replacer;
return $string;
}?&gt;
&lt;div id=&quot;news-box&quot;&gt;
&lt;div id=&quot;news-header&quot;&gt;&lt;a href=&quot;&lt;?php echo $this-&gt;getUrl('');?&gt;press/&quot;&gt;view all&lt;/a&gt;&lt;/div&gt;
&lt;ul&gt;
&lt; ?php $newscount = 0; ?&gt;
&lt; ?php foreach ($channel as $item): ?&gt;
&lt; ?php $newscount ++; ?&gt;
&lt; ?php if ($newscount &gt; 2) break; ?&gt;
&lt; ?php $image=''; ?&gt;
&lt; ?php $limit=150; ?&gt;
&lt;li&gt;
&lt; ?php $image= $this-&gt;getSkinUrl('').&quot;image.php/&quot;.$item-&gt;enclosure['url'].&quot;?width=101&amp;amp;height=67&amp;amp;cropratio=3:2&amp;amp;image=&quot;.$item-&gt;enclosure['url'];?&gt;
&lt;a href=&quot;&lt;?php echo $item-&gt;link; ?&gt;&quot;&gt;&lt;img src=&quot;&lt;?php echo $image;?/&gt;&quot;  title=&quot;&lt; ?php echo $item-&gt;title; ?&gt;&quot; width=&quot;101&quot; height=&quot;67&quot; /&gt; &lt;/a&gt;
&lt;div&gt;
&lt;h2&gt;&lt;a href=&quot;&lt;?php echo $item-&gt;link; ?&gt;&quot;&gt;&lt; ?php echo $item-&gt;title; ?&gt;&lt;/a&gt;&lt;/h2&gt;
&lt; ?php $excerpt = $item-&gt;description; ?&gt;
&lt; ?php if (strlen($excerpt) &gt; $limit) :
$excerpt = substr($excerpt, 0, strrpos(substr($excerpt, 0, $limit), ' ')) . '...'; ?&gt;
&lt;p&gt;&lt; ?php echo $excerpt; ?&gt;
&lt;a href=&quot;&lt;?php echo $item-&gt;link; ?&gt;&quot;&gt;Read more &gt;&gt;&lt;/a&gt;
&lt;/p&gt;
&lt; ?php endif;?&gt;
&lt;/div&gt;
&lt;/li&gt;
&lt; ?php endforeach; ?&gt;
&lt;/ul&gt;
&lt;/div&gt;
</pre>
<p>You can change the limit of characters in the article excerpt by editing this line of code:</p>
<pre class="brush: php; title: ; notranslate">

&lt; ?php $limit=150; ?&gt;
</pre>
<p>And you can change the size of your thumbnail by editing image width and height in this line of code:</p>
<pre class="brush: php; title: ; notranslate">

&lt; ?php $image= $this-&gt;getSkinUrl('').&quot;image.php/&quot;.$item-&gt;enclosure['url'].&quot;?width=101&amp;amp;height=67&amp;amp;cropratio=3:2&amp;amp;image=&quot;.$item-&gt;enclosure['url'];?&gt;
</pre>
<p>Now, all you have to do is decide where you want to show it. If you want to show it , for example, in your right sidebar,  open your app/design/frontend/default/[your_theme]/layout/catalog.xml file and under <strong>“default”</strong> tag update “right” reference with this:</p>
<pre class="brush: php; title: ; notranslate">
&lt;reference name=&quot;right&quot;&gt;
&lt;block type=&quot;core/template&quot; name=&quot;top.search&quot; as=&quot;topSearch&quot; template=&quot;catalogsearch/form.mini.phtml&quot;/&gt;
&lt;block type=&quot;core/template&quot; name=&quot;right.permanent.callout&quot; template=&quot;callouts/right_col.phtml&quot;/&gt;
&lt;block type=&quot;core/template&quot; name=&quot;right.latest.news&quot; template=&quot;callouts/latest_news.phtml&quot;/&gt;
&lt;/reference&gt;
</pre>
<p>And that&#8217;s it.</p>
<p>Hope you find this useful.</p>
<p>Cheers.</p>
]]></content:encoded>
			<wfw:commentRss>http://inchoo.net/wordpress/latest-news-with-automatic-thumbnails-in-magento/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>Where are my geocoins? Landsharkz is launched!</title>
		<link>http://inchoo.net/wordpress/where-are-my-geocoins-landsharkz-is-launched/</link>
		<comments>http://inchoo.net/wordpress/where-are-my-geocoins-landsharkz-is-launched/#comments</comments>
		<pubDate>Thu, 03 Dec 2009 10:38:37 +0000</pubDate>
		<dc:creator>Tomislav Bilic</dc:creator>
				<category><![CDATA[Magento]]></category>
		<category><![CDATA[News]]></category>
		<category><![CDATA[Wordpress]]></category>
		<category><![CDATA[Portfolio]]></category>

		<guid isPermaLink="false">http://inchoo.net/?p=3391</guid>
		<description><![CDATA[Do you know what is geocaching? It is an outdoor activity where the members use navigational techniques (ex. GPS) to hide and seek containers (called &#8220;geocaches&#8221; or &#8220;caches&#8221;) anywhere in &#8230;]]></description>
			<content:encoded><![CDATA[<p>Do you know what is geocaching? It is an outdoor activity where the members use navigational techniques (ex. GPS) to hide and seek containers (called &#8220;geocaches&#8221; or &#8220;caches&#8221;) anywhere in the world. Geocaching is most often described as a &#8220;game of high-tech hide and seek&#8221;, sharing many aspects with orienteering, treasure-hunting, and waymarking. A geocoin, on the other hand, is a metal or wooden coin minted in similar fashion to a medallion, token coin, military challenge coin or wooden nickel. They are usually trackable on the relevant website using a serial number and website address engraved on the coin. It is a little hard to describe the whole process in two sentences, so we&#8217;ll get to the point of this article. We present you <a href="http://landsharkz.ca/">Landsharkz</a>, online store where you can purchase Geocaching Supplies and Geocoins.<br />
<span id="more-3391"></span><br />
We worked with a great couple on this project. Helen and Chris Edley from Edley Imagineering Inc. *They provided the design* and our scope of work was to develop an WordPress and Magento integration where the goal was to move their online business to another level. The two portion of the site blend seamlessly giving unique experience to the visitor. Combination of <a href="http://landsharkz.ca/enter-the-store">online store</a>, <a href="http://landsharkz.ca/sharkz/off-site-sales">content pages</a>, <a href="http://landsharkz.ca/sharkz/category/landsharkz-blog">blog</a>, and <a href="http://landsharkz.ca/sharkz/landsharkz-on-facebook">social media</a> round the whole story into community driven business.</p>
<blockquote><p><a href="/wp-content/uploads/2009/12/chris-edley.jpg"><img class="alignright size-full wp-image-3407" title="Chris Edley" src="http://inchoo.net/wp-content/uploads/2009/12/chris-edley.jpg" alt="Chris Edley" width="75" height="99" /></a>Our project involved developing a completely new site to replace our outdated one. Magento and WordPress were both new to us, and the learning curve was made so much easier with the help of <a href="/author/branko/">Branko</a>, who was one of the most professional and capable people I’ve ever worked with in web development. Thank you to the Surgeworks/Inchoo team for bringing this together for us.<br />
<strong>Chris Edley, Owner, Edley Imagineering</strong></p></blockquote>
<p><a href="http://inchoo.net/wp-content/uploads/2009/12/landsharkz-forrest.jpg"><img class="alignnone size-full wp-image-3423" title="Forrest Photo by Chris Edley" src="http://inchoo.net/wp-content/uploads/2009/12/landsharkz-forrest.jpg" alt="Forrest Photo by Chris Edley" width="620" height="350" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://inchoo.net/wordpress/where-are-my-geocoins-landsharkz-is-launched/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Cu3er &#8211; Flash Image slider from the future &#8211; NOW!</title>
		<link>http://inchoo.net/wordpress/cu3er-flash-image-slider-from-the-future-now/</link>
		<comments>http://inchoo.net/wordpress/cu3er-flash-image-slider-from-the-future-now/#comments</comments>
		<pubDate>Sat, 31 Oct 2009 15:22:46 +0000</pubDate>
		<dc:creator>Zeljko Prsa</dc:creator>
				<category><![CDATA[Wordpress]]></category>

		<guid isPermaLink="false">http://inchoo.net/?p=3188</guid>
		<description><![CDATA[EDIT: Read Magento custom designed gallery with cu3er Like my colleague Ivan Kalaica wrote in his post, &#8220;It&#8217;s been a while since I&#8217;ve written anything here&#8221;, but I didn&#8217;t get &#8230;]]></description>
			<content:encoded><![CDATA[<p><strong>EDIT:</strong> Read <a href="http://inchoo.net/ecommerce/magento/magento-custom-designed-gallery-with-cu3er/">Magento custom designed gallery with cu3er</a></p>
<p>Like my colleague Ivan Kalaica wrote in his <a href="http://inchoo.net/iphone-development/memory-leak-by-cfnetwork/">post</a>, &#8220;It&#8217;s been a while since I&#8217;ve written anything here&#8221;, but I didn&#8217;t get married, finish college or had my birthday, yet &#8230;. I&#8217;ve found CU3ER \kju:ber\. Yes, this single piece of  image slider from Stefan Kovac (progressivered.com) made my day. Here&#8217;s why&#8230;<br />
<span id="more-3188"></span><br />
As you can see in the video I&#8217;ve made with our Kodak Zi8, this is visually a stunning piece of work.</p>
<p><object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="580" height="360" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="allowFullScreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="src" value="http://www.youtube-nocookie.com/v/bssu5EgsLrs&amp;hl=en&amp;fs=1&amp;rel=0&amp;hd=1&amp;border=1" /><param name="allowfullscreen" value="true" /><embed type="application/x-shockwave-flash" width="580" height="360" src="http://www.youtube-nocookie.com/v/bssu5EgsLrs&amp;hl=en&amp;fs=1&amp;rel=0&amp;hd=1&amp;border=1" allowscriptaccess="always" allowfullscreen="true"></embed></object></p>
<p>The slider offers some great features like:<br />
it&#8217;s FREE, very EASY to set up, ridiculously easy CUSTOMIZABLE via XML,TAILORED to provide a UNIQUE look &amp; feel, INSPIRING,FUN-to-USE.</p>
<p>Seriously, the <a href="http://www.progressivered.com/cu3er/">slider</a> looks awesome the first you see it and the feeling doesn&#8217;t wear off as time passes by.<br />
The ease of configuration via XML,  provided abundant  documentaiton makes the implementation of the slider a breeze and especially if you use it with an iFrame just to fit it on your web-page for a quick look makes this an instant success.</p>
<p>The best visual features are the 3D Image Transitions:</p>
<ul>
<li>real 3D Transitions</li>
<li>flat &amp; phong shading</li>
<li>horizontal or vertical cubing</li>
<li>transition direction &#8211; left, right, up, down</li>
<li>duration &amp; delay</li>
<li>z-multiplier</li>
<li>cube color</li>
<li>automatic forward-backward transition direction manager</li>
<li>to override global settings for each transition &#8230;</li>
</ul>
<p>Without going on with this Cu3erfilia I invite you to see it for yourself:</p>
<p>Cu3er demo: <a href="http://www.progressivered.com/cu3er/" target="_blank">http://www.progressivered.com/cu3er/</a></p>
<p>Stefan kovac&#8217;s info: <a href="http://www.progressivered.com/info.htm" target="_blank">http://www.progressivered.com/info.htm</a></p>
<p>Cheers and let&#8217;s use the best of the web we can <img src='http://inchoo.net/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://inchoo.net/wordpress/cu3er-flash-image-slider-from-the-future-now/feed/</wfw:commentRss>
		<slash:comments>14</slash:comments>
		</item>
		<item>
		<title>Mountain Made Launched</title>
		<link>http://inchoo.net/wordpress/mountain-made-launched/</link>
		<comments>http://inchoo.net/wordpress/mountain-made-launched/#comments</comments>
		<pubDate>Fri, 30 Oct 2009 15:25:55 +0000</pubDate>
		<dc:creator>Tomislav Bilic</dc:creator>
				<category><![CDATA[Integration]]></category>
		<category><![CDATA[Magento]]></category>
		<category><![CDATA[News]]></category>
		<category><![CDATA[Wordpress]]></category>
		<category><![CDATA[Portfolio]]></category>

		<guid isPermaLink="false">http://inchoo.net/?p=3170</guid>
		<description><![CDATA[We are very proud to announce that we were working on one great online store in the last couple of weeks. We wish you welcome to the web marketplace of &#8230;]]></description>
			<content:encoded><![CDATA[<p>We are very proud to announce that we were working on one great online store in the last couple of weeks. We wish you welcome to the web marketplace of West Virginia’s finest handmade art: Mountain Made. Its online gallery and storefront brings you the highest quality crafts and creations made in the Applachian tradition. You’ll find artists working in just about every medium imaginable, as well as musicians. Be sure to check out our courses and studios, too.<br />
<span id="more-3170"></span></p>
<p>The site is developed with the <a title="The WELDer Company" href="http://www.weldtheweb.com/">Weld team</a> who has direct contact with the actual client.  First (Magento) phase of the project is completed where the goal was to launch an online store with unique design and standard online store functionality. However, the project is not yet complete. We are working on boosting the community goals of the site, especially the interaction between visitors and artists.</p>
<p>So, it the next few weeks you will notice how this website grows from classic online store to the interactive web portal that connects craftsmen from West Virginia mountains with the world.</p>
<p><a href="http://inchoo.net/wp-content/uploads/2009/10/mountain-made-blog-large.jpg"><img class="alignnone size-full wp-image-3174" title="Mountain Made Product Image" src="http://inchoo.net/wp-content/uploads/2009/10/mountain-made-blog-large.jpg" alt="Mountain Made Product Image" width="620" height="754" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://inchoo.net/wordpress/mountain-made-launched/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>How to make charts in WordPress</title>
		<link>http://inchoo.net/wordpress/how-to-make-charts-in-wordpress/</link>
		<comments>http://inchoo.net/wordpress/how-to-make-charts-in-wordpress/#comments</comments>
		<pubDate>Mon, 19 Oct 2009 09:37:52 +0000</pubDate>
		<dc:creator>Toni Anicic</dc:creator>
				<category><![CDATA[Wordpress]]></category>

		<guid isPermaLink="false">http://inchoo.net/?p=3050</guid>
		<description><![CDATA[There is a cool new WordPress plugin that allows you to easily create different charts while writing your blog post. The charts then remains in code form inside your post &#8230;]]></description>
			<content:encoded><![CDATA[<p>There is a cool new WordPress plugin that allows you to easily create different charts while writing your blog post. The charts then remains in code form inside your post (so that you can easily edit it&#8217;s values) while your blog visitors see it as an image.<span id="more-3050"></span></p>
<p><a title="Easy Chart Builder for WordPress" href="http://wordpress.org/extend/plugins/easy-chart-builder/">Easy Chart Builder for WordPress</a> supports 3 different chart types: horizontal, vertical and a pie chart. You can choose any color you want to represent any group compared in the chart.</p>
<p>This should be extremely cool and useful tool for all of the marketers using wordpress out there as we do use lots of data that could be showed in form of a chart.</p>
<p><strong>This is what you can edit in your WordPress charts:</strong></p>
<ul>
<li>Chart type (horizontal, vertical or pie)</li>
<li>Chart&#8217;s height and width (in pixels)</li>
<li>Title of your chart</li>
<li>Names of groups compared in chart</li>
<li>Color of groups compared in chart (FF00FF, 482293, 444822 for example)</li>
<li>Names of values assigned to comparing groups</li>
<li>You can assign values to the group</li>
</ul>
<p>This is just a first release, it is expected that in future updates we will have an editor so there will be no need for entering any code manually.</p>
<p>Here is a sample chart made with Easy Chart Builder for WordPress:</p>
<p>[easychart type="pie" height="300" width="620" title="Sample pie chart" groupnames="Group 1, Second group, Group 3" groupcolors="FF00FF, 005599, 229944" valuenames="Value 1, Value 2, Value 3, Value 4" group4values="22, 41, 15, 133"]</p>
]]></content:encoded>
			<wfw:commentRss>http://inchoo.net/wordpress/how-to-make-charts-in-wordpress/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

<!-- Dynamic page generated in 0.512 seconds. -->
<!-- Cached page generated by WP-Super-Cache on 2012-05-21 12:04:14 -->

