<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss 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/" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0">

<channel>
	<title>TemplateZine</title>
	
	<link>http://www.templatezine.com</link>
	<description>Reviewing Web Templates</description>
	<lastBuildDate>Mon, 06 Sep 2010 14:55:34 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://feeds.feedburner.com/Templatezine" /><feedburner:info uri="templatezine" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><item>
		<title>Drupal: Disappearing Text In Search Form</title>
		<link>http://feedproxy.google.com/~r/Templatezine/~3/8uRb7ZUOvXk/</link>
		<comments>http://www.templatezine.com/2010/09/drupal-disappearing-text-in-search-form/#comments</comments>
		<pubDate>Mon, 06 Sep 2010 14:52:48 +0000</pubDate>
		<dc:creator>Aleksey</dc:creator>
				<category><![CDATA[How-To]]></category>
		<category><![CDATA[drupal disappearing text]]></category>
		<category><![CDATA[drupal how to]]></category>
		<category><![CDATA[drupal search box]]></category>
		<category><![CDATA[drupal tutorials]]></category>

		<guid isPermaLink="false">http://www.templatezine.com/2010/09/drupal-disappearing-text-in-search-form/</guid>
		<description><![CDATA[Problem:
You need to show “Search” text to the respective field in search form. When user clicks on this field, the text should disappear.

Solution:
Disappearing hint in search field using JavaScript
Add (or change) the following function in ...]]></description>
			<content:encoded><![CDATA[<p><strong>Problem</strong>:</p>
<p>You need to show “Search” text to the respective field in search form. When user clicks on this field, the text should disappear.</p>
<p><span id="more-907"></span></p>
<p><strong>Solution:</strong></p>
<h3>Disappearing hint in search field using JavaScript</h3>
<p>Add (or change) the following function in template.php file of fa current theme:</p>
<blockquote><p>function phptemplate_preprocess_search_theme_form(&amp;$vars, $hook) {<br />
$form_default = t(&#8216;Search&#8217;);<br />
$vars['form']['search_theme_form']['#value'] = $form_default;<br />
$vars['form']['search_theme_form']['#attributes'] = array(<br />
&#8216;onblur&#8217; =&gt; &#8220;if (this.value == &#8221;) {this.value = &#8216;{$form_default}&#8217;;}&#8221;,<br />
&#8216;onfocus&#8217; =&gt; &#8220;if (this.value == &#8216;{$form_default}&#8217;) {this.value = &#8221;;}&#8221;<br />
);<br />
}</p></blockquote>
<h3>Using jQuery for hiding the hint in search field</h3>
<ul>
<li>In the settings of a current theme, enable showing of a search string &#8211; see <em>admin/build/themes/settings</em></li>
<li>Add (or change) the following function in template.php file of a current theme:<br />
<blockquote><p>function phptemplate_preprocess_search_theme_form(&amp;$vars, $hook) {<br />
$theme_path = drupal_get_path(&#8216;theme&#8217;, &#8216;arthemia&#8217;);<br />
$vars['form']['search_theme_form']['#value'] = t(&#8216;Search&#8217;);<br />
drupal_add_js($theme_path. &#8216;/search_box.js&#8217;);<br />
}</p></blockquote>
</li>
<li>Create <strong>search_box.js</strong> file in a folder of a current theme with the following code:<br />
<blockquote><p>var active_color = &#8216;#000&#8242;; // Colour of user provided text<br />
var inactive_color = &#8216;#ссс&#8217;; // Colour of default text<br />
$(document).ready(function() {<br />
$(&#8220;input.form-text&#8221;).css(&#8220;color&#8221;, inactive_color);<br />
var default_values = new Array();<br />
$(&#8220;input.form-text&#8221;).focus(function() {<br />
if (!default_values[this.id]) {<br />
default_values[this.id] = this.value;<br />
}<br />
if (this.value == default_values[this.id]) {<br />
this.value = &#8221;;<br />
this.style.color = active_color;<br />
}<br />
$(this).blur(function() {<br />
if (this.value == &#8221;) {<br />
this.style.color = inactive_color;<br />
this.value = default_values[this.id];<br />
}<br />
});<br />
});<br />
});</p></blockquote>
</li>
</ul>
<p><strong>Useful links:</strong></p>
<ul>
<li><a href="http://drupal.org/node/224183">Theme Drupal 6 Search Box</a></li>
<li><a href="http://thedrupalblog.com/customizing-search-form-using-jquery">Customizing the search form using jQuery</a></li>
</ul>
<img src="http://feeds.feedburner.com/~r/Templatezine/~4/8uRb7ZUOvXk" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.templatezine.com/2010/09/drupal-disappearing-text-in-search-form/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.templatezine.com/2010/09/drupal-disappearing-text-in-search-form/#utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=drupal-disappearing-text-in-search-form</feedburner:origLink></item>
		<item>
		<title>Drupal: Multilanguage Home Page</title>
		<link>http://feedproxy.google.com/~r/Templatezine/~3/b0E1N0YyQ4s/</link>
		<comments>http://www.templatezine.com/2010/09/drupal-multilanguage-home-page/#comments</comments>
		<pubDate>Fri, 03 Sep 2010 17:50:21 +0000</pubDate>
		<dc:creator>Aleksey</dc:creator>
				<category><![CDATA[How-To]]></category>
		<category><![CDATA[drupal how to]]></category>
		<category><![CDATA[drupal multilanguage site]]></category>
		<category><![CDATA[drupal tutorials]]></category>

		<guid isPermaLink="false">http://www.templatezine.com/2010/09/drupal-multilanguage-home-page/</guid>
		<description><![CDATA[This article would tell you how show article on the home page of your Drupal-based site on different languages. One of the possible ways is to output a node on the main page that will ...]]></description>
			<content:encoded><![CDATA[<p>This article would tell you how show article on the home page of your Drupal-based site on different languages. One of the possible ways is to output a node on the main page that will be changed to the respective language when the language was changed for a whole site.</p>
<p><span id="more-902"></span></p>
<p>First make sure that multilanguage is set for your site and an ability to translate nodes is enabled.</p>
<p>Then you should:</p>
<ol>
<li>Open the required node for editing and set a path: &#8220;home&#8221;.</li>
<li>Make the same for all translations using the same value of a path (&#8220;home&#8221;)</li>
<li>Open &#8220;Site information&#8221; page <em>admin/settings/site-information</em> and specify a path to main page (&#8220;home&#8221;)</li>
<li>Save settings and check languages switching on the main page.</li>
</ol>
<p>Possible problems:</p>
<p>If you receive this message:</p>
<blockquote><p>user warning: Duplicate entry &#8216;home-en&#8217; for key 2 query: UPDATE url_alias SET src = &#8216;node/126&#8242;, dst = &#8216;home&#8217;, language = &#8216;en&#8217; WHERE dst = &#8216;home&#8217; in /home/ &#8230; /modules/path/path.module on line 108.</p></blockquote>
<p>Then you already used such path synonym but for a page that is neutral to language.</p>
<p>You can try to change path synonyms here:<em> admin/build/path</em>. Find your path synonym and delete it, if language column shows “All”.</p>
<h3>How to show node on the home page in one language</h3>
<p>If you wish to shoe a node in home page of multilanguage site always in one language, you should open <em>admin/settings/site-information</em> and specify system path to the node instead of path synonym there:</p>
<blockquote><p>node/10</p></blockquote>
<img src="http://feeds.feedburner.com/~r/Templatezine/~4/b0E1N0YyQ4s" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.templatezine.com/2010/09/drupal-multilanguage-home-page/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.templatezine.com/2010/09/drupal-multilanguage-home-page/#utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=drupal-multilanguage-home-page</feedburner:origLink></item>
		<item>
		<title>Drupal: Logo And Site Name Refer To Home Page On The Selected Language</title>
		<link>http://feedproxy.google.com/~r/Templatezine/~3/F5NfvuUQbF8/</link>
		<comments>http://www.templatezine.com/2010/09/drupal-logo-and-site-name-refer-to-home-page-on-the-selected-language/#comments</comments>
		<pubDate>Wed, 01 Sep 2010 17:03:24 +0000</pubDate>
		<dc:creator>Aleksey</dc:creator>
				<category><![CDATA[How-To]]></category>
		<category><![CDATA[drupal how to]]></category>
		<category><![CDATA[drupal multilanguage site]]></category>
		<category><![CDATA[drupal tutorials]]></category>

		<guid isPermaLink="false">http://www.templatezine.com/2010/09/drupal-logo-and-site-name-refer-to-home-page-on-the-selected-language/</guid>
		<description><![CDATA[If there are a few languages on your Drupal-based site (the site is multilanguage) then logo and/or site name should refer to home page on the selected language rather than on the main site language.

Solution

Open ...]]></description>
			<content:encoded><![CDATA[<p>If there are a few languages on your Drupal-based site (the site is multilanguage) then logo and/or site name should refer to home page on the selected language rather than on the main site language.</p>
<p><span id="more-897"></span></p>
<h5>Solution</h5>
<ul>
<li>Open page.tpl.php file in current theme folder</li>
<li>Find &#8220;$logo&#8221; line in this file – this is logo output. Site name output is usually about somewhere.</li>
<li>Find how the link is formed. Usually it is<br />
<blockquote><p>echo check_url($base_path);</p></blockquote>
<p>or</p>
<blockquote><p>print $base_path;</p></blockquote>
</li>
<li>Replace it with:<br />
<blockquote><p>echo url(&#8216;&lt;front&gt;&#8217;, array(&#8216;absolute&#8217; =&gt; TRUE));</p></blockquote>
</li>
</ul>
<p>That is all!</p>
<img src="http://feeds.feedburner.com/~r/Templatezine/~4/F5NfvuUQbF8" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.templatezine.com/2010/09/drupal-logo-and-site-name-refer-to-home-page-on-the-selected-language/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.templatezine.com/2010/09/drupal-logo-and-site-name-refer-to-home-page-on-the-selected-language/#utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=drupal-logo-and-site-name-refer-to-home-page-on-the-selected-language</feedburner:origLink></item>
		<item>
		<title>Drupal: How To Save URLs Moving To Drupal</title>
		<link>http://feedproxy.google.com/~r/Templatezine/~3/QWsjPSk_khs/</link>
		<comments>http://www.templatezine.com/2010/08/drupal-how-to-save-urls-moving-to-drupal-from-other-engine/#comments</comments>
		<pubDate>Mon, 30 Aug 2010 15:11:25 +0000</pubDate>
		<dc:creator>Aleksey</dc:creator>
				<category><![CDATA[How-To]]></category>
		<category><![CDATA[drupal how to]]></category>
		<category><![CDATA[drupal redirecting]]></category>
		<category><![CDATA[drupal tutorials]]></category>

		<guid isPermaLink="false">http://www.templatezine.com/2010/08/drupal-how-to-save-urls-moving-to-drupal-from-other-engine/</guid>
		<description><![CDATA[When moving your site from one engine to another one, pages’ URLs are changed and you ma need to save oold URLs. First, there are links to these URLs from other sites, and search engines ...]]></description>
			<content:encoded><![CDATA[<p>When moving your site from one engine to another one, pages’ URLs are changed and you ma need to save oold URLs. First, there are links to these URLs from other sites, and search engines stores old URLs in index some time. This article will tell you how to save old URLs.</p>
<p><span id="more-893"></span></p>
<p><strong>Solution</strong><br />
There are no old URLs anymore, but the can be used. We should create 301 redirect from old URL to a new one.</p>
<h5>Alternatives</h5>
<ul>
<li>Redirect from old URL to new one in .htaccess file</li>
<li>Redirect from old URL to new one with the help of Pathauto and Global Redirect modules</li>
</ul>
<h3>Redirect from old URL to new one in .htaccess file</h3>
<p>The simplest method:</p>
<p>add</p>
<blockquote><p>RewriteCond %{REQUEST_URI} ^/old_url_1.html<br />
RewriteCond %{REQUEST_URI} ^/old_url_2.html<br />
RewriteCond %{REQUEST_URI} ^/old_url_3.html<br />
RewriteCond %{REQUEST_URI} ^/old_url_N.html<br />
RewriteRule ^(.*)$ http://site.ru$1 [R=301,L]</p></blockquote>
<p>in .htaccess file (in the site root) after:</p>
<blockquote><p>&lt;IfModule mod_rewrite.c&gt;<br />
RewriteEngine on</p></blockquote>
<h3>Redirect from old URL to new one with the help of Pathauto and Global Redirect modules</h3>
<p>The other method is to use Pathauto module with Global Redirect. Create one more synonym for a node in admin area. When calling this snonym, Global Redirect will redirect to main node alias.</p>
<p>In this case data is stored in database and Drupal would be loaded for redirect. So performance will go down. And if you wish to disable such redirect, it will take you more time.</p>
<img src="http://feeds.feedburner.com/~r/Templatezine/~4/QWsjPSk_khs" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.templatezine.com/2010/08/drupal-how-to-save-urls-moving-to-drupal-from-other-engine/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.templatezine.com/2010/08/drupal-how-to-save-urls-moving-to-drupal-from-other-engine/#utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=drupal-how-to-save-urls-moving-to-drupal-from-other-engine</feedburner:origLink></item>
		<item>
		<title>Drupal: Hide Body Field</title>
		<link>http://feedproxy.google.com/~r/Templatezine/~3/5b99qOPXGsU/</link>
		<comments>http://www.templatezine.com/2010/08/drupal-hide-body-field/#comments</comments>
		<pubDate>Wed, 25 Aug 2010 09:53:48 +0000</pubDate>
		<dc:creator>Aleksey</dc:creator>
				<category><![CDATA[How-To]]></category>
		<category><![CDATA[drupal hide body field]]></category>
		<category><![CDATA[drupal how to]]></category>
		<category><![CDATA[drupal tutorials]]></category>

		<guid isPermaLink="false">http://www.templatezine.com/2010/08/drupal-hide-body-field/</guid>
		<description><![CDATA[This article is actually a tip of how hide Body field. When hidden, Body will not be shown neither on a form nor when node viewing.

Solution

Open Content Types
Select the desired content type and open it
Find ...]]></description>
			<content:encoded><![CDATA[<p>This article is actually a tip of how hide Body field. When hidden, Body will not be shown neither on a form nor when node viewing.</p>
<p><span id="more-874"></span></p>
<p><strong>Solution</strong></p>
<ul>
<li>Open Content Types</li>
<li>Select the desired content type and open it</li>
<li>Find Submission Form field set or just clear &#8220;Body Field Label&#8221; field</li>
<li>Save</li>
</ul>
<p>You will not see the main text (Body) on a form and when viewing node anymore.</p>
<img src="http://feeds.feedburner.com/~r/Templatezine/~4/5b99qOPXGsU" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.templatezine.com/2010/08/drupal-hide-body-field/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.templatezine.com/2010/08/drupal-hide-body-field/#utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=drupal-hide-body-field</feedburner:origLink></item>
		<item>
		<title>Drupal: How to Create CCK-Field</title>
		<link>http://feedproxy.google.com/~r/Templatezine/~3/6TOcYCzy0dI/</link>
		<comments>http://www.templatezine.com/2010/08/drupal-how-to-create-cck-field/#comments</comments>
		<pubDate>Thu, 05 Aug 2010 13:39:28 +0000</pubDate>
		<dc:creator>Aleksey</dc:creator>
				<category><![CDATA[How-To]]></category>
		<category><![CDATA[drupal ckk field]]></category>
		<category><![CDATA[drupal how to]]></category>
		<category><![CDATA[drupal tutorials]]></category>

		<guid isPermaLink="false">http://www.templatezine.com/2010/08/drupal-how-to-create-cck-field/</guid>
		<description><![CDATA[You need to create CCK-field. For example you may need to create CCK-field from hook_update_N.
 
Solution:
Unlike other CCK versions, fields manipulating becomes easier in CCK version for Drupal 6.

You need to create a field with ...]]></description>
			<content:encoded><![CDATA[<p>You need to create CCK-field. For example you may need to create CCK-field from hook_update_N.</p>
<p> <span id="more-862"></span>
<p>Solution:</p>
<p>Unlike other CCK versions, fields manipulating becomes easier in CCK version for Drupal 6.</p>
<ul>
<li>You need to create a field with the help of CCK user interface first.</li>
<li>Then you should use <em>var_export() </em>PHP-function, to get a dump of node field in the form of array.<br />
<blockquote>
<p>var_export(content_fields(&#8216;field_ИМЯ_ПОЛЯ&#8217;, &#8216;ТИП_КОНТЕНТА&#8217;));</p>
</blockquote>
<p>See API: <a href="http://drupalcontrib.org/api/function/content_fields ">http://drupalcontrib.org/api/function/content_fields</a> </p>
</li>
</ul>
<p>Yyou will get a large array. You can copy your code there and use it in the following way:</p>
<blockquote><p>$field = array (     <br />&#8216;field_name&#8217; =&gt; &#8216;field_translator_note&#8217;,      <br />&#8216;type_name&#8217; =&gt; &#8216;feature&#8217;,      <br />&#8216;display_settings&#8217; =&gt;      <br />array (      <br />4 =&gt;      <br />array (      <br />&#8216;format&#8217; =&gt; &#8216;hidden&#8217;,      <br />),      <br />2 =&gt;      <br />array (      <br />&#8216;format&#8217; =&gt; &#8216;hidden&#8217;,      <br />),      <br />3 =&gt;      <br />array (      <br />&#8216;format&#8217; =&gt; &#8216;hidden&#8217;,      <br />),      <br />&#8216;label&#8217; =&gt;      <br />array (      <br />&#8216;format&#8217; =&gt; &#8216;hidden&#8217;,      <br />),      <br />&#8216;teaser&#8217; =&gt;      <br />array (      <br />&#8216;format&#8217; =&gt; &#8216;hidden&#8217;,      <br />),      <br />&#8216;full&#8217; =&gt;      <br />array (      <br />&#8216;format&#8217; =&gt; &#8216;hidden&#8217;,      <br />),      <br />),      <br />&#8216;widget_active&#8217; =&gt; &#8217;1&#8242;,      <br />&#8216;type&#8217; =&gt; &#8216;text&#8217;,      <br />&#8216;required&#8217; =&gt; &#8217;0&#8242;,      <br />&#8216;multiple&#8217; =&gt; &#8217;0&#8242;,      <br />&#8216;db_storage&#8217; =&gt; &#8217;0&#8242;,      <br />&#8216;module&#8217; =&gt; &#8216;text&#8217;,      <br />&#8216;active&#8217; =&gt; &#8217;1&#8242;,      <br />&#8216;columns&#8217; =&gt;      <br />array (      <br />&#8216;value&#8217; =&gt;      <br />array (      <br />&#8216;type&#8217; =&gt; &#8216;text&#8217;,      <br />&#8216;size&#8217; =&gt; &#8216;big&#8217;,      <br />&#8216;not null&#8217; =&gt; false,      <br />&#8216;sortable&#8217; =&gt; true,      <br />),      <br />),      <br />&#8216;text_processing&#8217; =&gt; &#8217;0&#8242;,      <br />&#8216;max_length&#8217; =&gt; &#8221;,      <br />&#8216;allowed_values&#8217; =&gt; &#8221;,      <br />&#8216;allowed_values_php&#8217; =&gt; &#8221;,      <br />&#8216;widget&#8217; =&gt;      <br />array (      <br />&#8216;rows&#8217; =&gt; &#8221;,      <br />&#8216;default_value&#8217; =&gt;      <br />array (      <br />0 =&gt;      <br />array (      <br />&#8216;value&#8217; =&gt; &#8221;,      <br />),      <br />),      <br />&#8216;default_value_php&#8217; =&gt; NULL,      <br />&#8216;label&#8217; =&gt; &#8216;Translator\&#8217;s note&#8217;,      <br />&#8216;weight&#8217; =&gt; NULL,      <br />&#8216;description&#8217; =&gt; &#8221;,      <br />&#8216;type&#8217; =&gt; &#8216;text_textarea&#8217;,      <br />&#8216;module&#8217; =&gt; &#8216;text&#8217;,      <br />),      <br />);      <br /><em>// Load CCK –file where content_field_instance_create() function is defined       <br /></em>module_load_include(&#8216;inc&#8217;, &#8216;content&#8217;, &#8216;includes/content.crud&#8217;);      <br /><em>// Add a few content types to the field and use this loop:       <br /></em>foreach (array(&#8216;TYPE1&#8242;, &#8216;TYPE2&#8242;, &#8216;TYPE3&#8242;, &#8216;TYPE4&#8242;) as $type) {      <br /><em>// &#8230; and change content type in the proper field.       <br /></em>$field['type_name'] = $type;      <br />&#160; content_field_instance_create($field);      <br />}</p>
</blockquote>
<img src="http://feeds.feedburner.com/~r/Templatezine/~4/6TOcYCzy0dI" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.templatezine.com/2010/08/drupal-how-to-create-cck-field/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.templatezine.com/2010/08/drupal-how-to-create-cck-field/#utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=drupal-how-to-create-cck-field</feedburner:origLink></item>
		<item>
		<title>Drupal: How to Replace PHP 5.3 with PHP 5.2 in Ubuntu 10.4</title>
		<link>http://feedproxy.google.com/~r/Templatezine/~3/--VxbI2MF58/</link>
		<comments>http://www.templatezine.com/2010/08/drupal-how-to-replace-php-5-3-with-php-5-2-in-ubuntu-10-4/#comments</comments>
		<pubDate>Mon, 02 Aug 2010 13:51:15 +0000</pubDate>
		<dc:creator>Aleksey</dc:creator>
				<category><![CDATA[How-To]]></category>
		<category><![CDATA[drupal how to]]></category>
		<category><![CDATA[drupal tutorials]]></category>
		<category><![CDATA[drupal ubuntu]]></category>

		<guid isPermaLink="false">http://www.templatezine.com/2010/08/drupal-how-to-replace-php-5-3-with-php-5-2-in-ubuntu-10-4/</guid>
		<description><![CDATA[Some modules work incorrectly with PHP 5.3. Many hosters have PHP 5.2 and you should have environment similar to server’s one for developing. Therefore it is necessary to downgrade php packet updates.
 
Create backup copy ...]]></description>
			<content:encoded><![CDATA[<p>Some modules work incorrectly with PHP 5.3. Many hosters have PHP 5.2 and you should have environment similar to server’s one for developing. Therefore it is necessary to downgrade php packet updates.</p>
<p> <span id="more-854"></span>
<p>Create backup copy of php.ini file (in /etc/php5).</p>
<p>Create executable file:</p>
<blockquote><p># remove all php packge     <br />sudo aptitude purge `dpkg -l | grep php| awk &#8216;{print $2}&#8217; |tr &quot;\n&quot; &quot; &quot;`      <br /># use karmiс for php pakage      <br /># pin-params:&#160; a (archive), c (components), v (version), o (origin) and l (label).      <br />echo -e &quot;Package: php5\nPin: release a=karmic\nPin-Priority: 991\n&quot; | sudo tee /etc/apt/preferences.d/php &gt; /dev/null      <br />apt-cache search php5-|grep php5-|awk &#8216;{print &quot;Package:&quot;, $1,&quot;\nPin: release a=karmic\nPin-Priority: 991\n&quot;}&#8217;|sudo tee -a /etc/apt/preferences.d/php &gt; /dev/null      <br />apt-cache search -n libapache2-mod-php5 |awk &#8216;{print &quot;Package:&quot;, $1,&quot;\nPin: release a=karmic\nPin-Priority: 991\n&quot;}&#8217;| sudo tee -a /etc/apt/preferences.d/php &gt; /dev/null      <br />echo -e &quot;Package: php-pear\nPin: release a=karmic\nPin-Priority: 991\n&quot; | sudo tee -a /etc/apt/preferences.d/php &gt; /dev/null      <br /># add karmic to source list      <br />grep &#8216;main restricted&#8217; /etc/apt/sources.list|grep -v &quot;#&quot;| sed s/lucid/karmic/g | sudo tee /etc/apt/sources.list.d/karmic.list &gt; /dev/null      <br /># update package database (use apt-get if aptitude crash)      <br />sudo apt-get update      <br /># install php      <br />sudo aptitude install -t karmic php5-cli php5-cgi      <br /># or (and) sudo apt-get install -t karmic&#160; libapache2-mod-php5      <br />sudo aptitude hold `dpkg -l | grep php5| awk &#8216;{print $2}&#8217; |tr &quot;\n&quot; &quot; &quot;`      <br />#done</p>
</blockquote>
<p>Execute:</p>
<blockquote><p>php_installed=`dpkg -l | grep&#160; php| awk&#160; &#8216;{print $2}&#8217; |tr &quot;\n&quot; &quot; &quot;`</p>
</blockquote>
<p>This will save list of additional packets and libraries which are to be re-installed after downgrade. You can easy view them:</p>
<blockquote><p>echo $php_installed</p>
</blockquote>
<p>Run the script created earlier.   <br />Execute:</p>
<blockquote><p>sudo apt-get install $php_installed</p>
</blockquote>
<p>This works for many packets but not for phpmyadmin which requires php5-mcrypt. They both are in &quot;universe&quot; repository&#160; instead of &quot;main restricted&quot;. Threfore you should add this to /etc/apt/sources.list.d/karmic.list:</p>
<blockquote><p>sudo gedit /etc/apt/sources.list.d/karmic.list</p>
</blockquote>
<blockquote><p>deb http://archive.ubuntu.com/ubuntu/ karmic universe     <br />deb http://archive.ubuntu.com/ubuntu/ karmic-updates universe      <br />deb http://archive.ubuntu.com/ubuntu/ karmic multiverse      <br />deb http://archive.ubuntu.com/ubuntu/ karmic-updates multiverse</p>
</blockquote>
<p>Execute:</p>
<blockquote><p>sudo apt-get update</p>
</blockquote>
<p>All packets should be updated. </p>
<p>You can automate this process replacing line 10 (above) with this one:</p>
<blockquote><p>egrep &#8216;(main restricted|universe|multiverse)&#8217; /etc/apt/sources.list|grep -v &quot;#&quot;| \     <br />sed s/lucid/karmic/g | sudo tee /etc/apt/sources.list.d/karmic.list &gt; /dev/null</p>
</blockquote>
<h5>Enjoy!</h5>
<img src="http://feeds.feedburner.com/~r/Templatezine/~4/--VxbI2MF58" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.templatezine.com/2010/08/drupal-how-to-replace-php-5-3-with-php-5-2-in-ubuntu-10-4/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.templatezine.com/2010/08/drupal-how-to-replace-php-5-3-with-php-5-2-in-ubuntu-10-4/#utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=drupal-how-to-replace-php-5-3-with-php-5-2-in-ubuntu-10-4</feedburner:origLink></item>
		<item>
		<title>Drupal: Changes in Book Module in Drupal 6</title>
		<link>http://feedproxy.google.com/~r/Templatezine/~3/_A1S1G7Hw-g/</link>
		<comments>http://www.templatezine.com/2010/07/drupal-changes-in-book-module-in-drupal-6/#comments</comments>
		<pubDate>Fri, 30 Jul 2010 08:59:52 +0000</pubDate>
		<dc:creator>Aleksey</dc:creator>
				<category><![CDATA[How-To]]></category>
		<category><![CDATA[drupal book module]]></category>
		<category><![CDATA[drupal how to]]></category>
		<category><![CDATA[drupal modules]]></category>
		<category><![CDATA[drupal tutorials]]></category>

		<guid isPermaLink="false">http://www.templatezine.com/2010/07/drupal-changes-in-book-module-in-drupal-6/</guid>
		<description><![CDATA[This article describes how to find and understand changes in Book module. This will make you able to adapt snippets and modules which interact with Books module in Drupal 6.
 
Solution
Drupal 5.х
IN Drupal&#160; 5.x, when ...]]></description>
			<content:encoded><![CDATA[<p>This article describes how to find and understand changes in Book module. This will make you able to adapt snippets and modules which interact with Books module in Drupal 6.</p>
<p> <span id="more-852"></span><br />
<h4>Solution</h4>
<h5>Drupal 5.х</h5>
<p>IN Drupal&#160; 5.x, when storing book page, a record is created in “node” table of “book” type and the respective record is created in “book” table (nid) to define relation to a parent page. If parent is set to 0, this book is from top level. So simple!</p>
<p>All module info is stored in one table: </p>
<blockquote><p>CREATE TABLE book (      <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; vid int unsigned NOT NULL default &#8217;0&#8242;,       <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; nid int unsigned NOT NULL default &#8217;0&#8242;,       <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; parent int NOT NULL default &#8217;0&#8242;,       <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; weight tinyint NOT NULL default &#8217;0&#8242;,       <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; PRIMARY KEY (vid),       <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; KEY nid (nid),       <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; KEY parent (parent)       <br />)</p>
</blockquote>
<h5>Drupal 6.х</h5>
<p>IN 6.x &quot;book&quot; table contains only nid, bid and mlid fields now.</p>
<p>As you can see in Drupal interface, it is impossible to specify parent page on node/add/book page. You should select the existing book and NECESSARY parent page in this book.</p>
<h6>Book module was changed to use new menu system</h6>
<p>Book uses new menu system Drupal 6.x now ({menu_links} table) for storing and recovering book hierarchy. Any modules which worked through Book interface earlier have to be rewritten. All information stored&#160; in a node by Book module is in $node-&gt;book property now.</p>
<p>Many API functions of Book module were changed. For example, <strong>book_recurse</strong> function was deleted. For the most cases it can be replaced with <strong>book_export_traverse</strong> but it has no $depth parameter.</p>
<h6>Taтабle analysis in database</h6>
<p>&#8211; `book` table structure</p>
<blockquote><p>CREATE TABLE `book` (      <br />&#160; `mlid` int(10) unsigned NOT NULL default &#8217;0&#8242;,       <br />&#160; `nid` int(10) unsigned NOT NULL default &#8217;0&#8242;,       <br />&#160; `bid` int(10) unsigned NOT NULL default &#8217;0&#8242;,       <br />&#160; PRIMARY KEY&#160; (`mlid`),       <br />&#160; UNIQUE KEY `nid` (`nid`),       <br />&#160; KEY `bid` (`bid`)       <br />) ENGINE=MyISAM DEFAULT CHARSET=utf8; </p>
</blockquote>
<p>&#8211; `menu_links` table structure </p>
<blockquote><p>CREATE TABLE `menu_links` (      <br />&#160; `menu_name` varchar(32) NOT NULL default &#8221;,       <br />&#160; `mlid` int(10) unsigned NOT NULL auto_increment,       <br />&#160; `plid` int(10) unsigned NOT NULL default &#8217;0&#8242;,       <br />&#160; `link_path` varchar(255) NOT NULL default &#8221;,       <br />&#160; `router_path` varchar(255) NOT NULL default &#8221;,       <br />&#160; `link_title` varchar(255) NOT NULL default &#8221;,       <br />&#160; `options` text,       <br />&#160; `module` varchar(255) NOT NULL default &#8216;system&#8217;,       <br />&#160; `hidden` smallint(6) NOT NULL default &#8217;0&#8242;,       <br />&#160; `external` smallint(6) NOT NULL default &#8217;0&#8242;,       <br />&#160; `has_children` smallint(6) NOT NULL default &#8217;0&#8242;,       <br />&#160; `expanded` smallint(6) NOT NULL default &#8217;0&#8242;,       <br />&#160; `weight` int(11) NOT NULL default &#8217;0&#8242;,       <br />&#160; `depth` smallint(6) NOT NULL default &#8217;0&#8242;,       <br />&#160; `customized` smallint(6) NOT NULL default &#8217;0&#8242;,       <br />&#160; `p1` int(10) unsigned NOT NULL default &#8217;0&#8242;,       <br />&#160; `p2` int(10) unsigned NOT NULL default &#8217;0&#8242;,       <br />&#160; `p3` int(10) unsigned NOT NULL default &#8217;0&#8242;,       <br />&#160; `p4` int(10) unsigned NOT NULL default &#8217;0&#8242;,       <br />&#160; `p5` int(10) unsigned NOT NULL default &#8217;0&#8242;,       <br />&#160; `p6` int(10) unsigned NOT NULL default &#8217;0&#8242;,       <br />&#160; `p7` int(10) unsigned NOT NULL default &#8217;0&#8242;,       <br />&#160; `p8` int(10) unsigned NOT NULL default &#8217;0&#8242;,       <br />&#160; `p9` int(10) unsigned NOT NULL default &#8217;0&#8242;,       <br />&#160; `updated` smallint(6) NOT NULL default &#8217;0&#8242;,       <br />&#160; PRIMARY KEY&#160; (`mlid`),       <br />&#160; KEY `path_menu` (`link_path`(128),`menu_name`),       <br />&#160; KEY `menu_plid_expand_child` (`menu_name`,`plid`,`expanded`,`has_children`),       <br />&#160; KEY `menu_parents` (`menu_name`,`p1`,`p2`,`p3`,`p4`,`p5`,`p6`,`p7`,`p8`,`p9`),       <br />&#160; KEY `router_path` (`router_path`(128))       <br />) ENGINE=MyISAM AUTO_INCREMENT=407 DEFAULT CHARSET=utf8 AUTO_INCREMENT=407 ;</p>
</blockquote>
<h6>$node-&gt;book analysis</h6>
<p>Let’s create a document of Book type and execute a code there (input format should be PHP):</p>
<blockquote><p>if ((arg(0) == &#8216;node&#8217;) &amp;&amp; is_numeric(arg(1))) {      <br />$node = node_load(arg(1));       <br />var_dump($node-&gt;book);       <br />}</p>
</blockquote>
<p>Here is the result:</p>
<blockquote><p>array(29) {      <br />&#160; [&quot;mlid&quot;]=&gt; string(3) &quot;409&quot;       <br />&#160; [&quot;nid&quot;]=&gt; string(2) &quot;27&quot;       <br />&#160; [&quot;bid&quot;]=&gt; string(2) &quot;56&quot;       <br />&#160; [&quot;menu_name&quot;]=&gt; string(11) &quot;book-toc-56&quot;       <br />&#160; [&quot;plid&quot;]=&gt; string(3) &quot;257&quot;       <br />&#160; [&quot;link_path&quot;]=&gt; string(7) &quot;node/27&quot;       <br />&#160; [&quot;router_path&quot;]=&gt; string(6) &quot;node/%&quot;       <br />&#160; [&quot;link_title&quot;]=&gt; string(20) &quot;Содержание&quot;       <br />&#160; [&quot;options&quot;]=&gt; array(0) {}       <br />&#160; [&quot;module&quot;]=&gt; string(4) &quot;book&quot;       <br />&#160; [&quot;hidden&quot;]=&gt; string(1) &quot;0&quot;       <br />&#160; [&quot;external&quot;]=&gt; string(1) &quot;0&quot;       <br />&#160; [&quot;has_children&quot;]=&gt; string(1) &quot;0&quot;       <br />&#160; [&quot;expanded&quot;]=&gt; string(1) &quot;0&quot;       <br />&#160; [&quot;weight&quot;]=&gt; string(1) &quot;0&quot;       <br />&#160; [&quot;depth&quot;]=&gt; string(1) &quot;2&quot;       <br />&#160; [&quot;customized&quot;]=&gt; string(1) &quot;0&quot;       <br />&#160; [&quot;p1&quot;]=&gt; string(3) &quot;257&quot;       <br />&#160; [&quot;p2&quot;]=&gt; string(3) &quot;409&quot;       <br />&#160; [&quot;p3&quot;]=&gt; string(1) &quot;0&quot;       <br />&#160; [&quot;p4&quot;]=&gt; string(1) &quot;0&quot;       <br />&#160; [&quot;p5&quot;]=&gt; string(1) &quot;0&quot;       <br />&#160; [&quot;p6&quot;]=&gt; string(1) &quot;0&quot;       <br />&#160; [&quot;p7&quot;]=&gt; string(1) &quot;0&quot;       <br />&#160; [&quot;p8&quot;]=&gt; string(1) &quot;0&quot;       <br />&#160; [&quot;p9&quot;]=&gt; string(1) &quot;0&quot;       <br />&#160; [&quot;updated&quot;]=&gt; string(1) &quot;0&quot;       <br />&#160; [&quot;href&quot;]=&gt; string(7) &quot;node/27&quot;       <br />&#160; [&quot;title&quot;]=&gt; string(20) &quot;Содержание&quot;       <br />}</p>
</blockquote>
<h6>Summary</h6>
<ul>
<li>book table in Drupal 6.х contains <strong>bid</strong> field (Book id) which stores&#160; <strong>nid</strong> of a page of the top book level. </li>
<li>Every book page has mlid field (Menu links id) for connection with menu_links table.      <br />It is necessary because page hierarchy is now realized in menu_links rather than in booktable. </li>
<li>Maximum inclusion is limited by 9 levels. </li>
</ul>
<h5>$node-&gt;book array elements</h5>
<ul>
<li><strong>mlid</strong> &#8211; id menu_links, allows Book module to connect to menu_links </li>
<li><strong>nid</strong> – node id </li>
<li><strong>bid – </strong>abbreviation of &quot;book_id&quot; </li>
<li><strong>menu_name</strong> – for all Book documents, always begins from &quot;book-toc-&quot; + nid of top-level document. menu_name is similar for all documents for one book. </li>
<li><strong>plid</strong> &#8211; mlid of parent (0 – top level) </li>
<li><strong>link_path</strong> – document address in menu </li>
<li><strong>router_path </strong></li>
<li><strong>link_title</strong> – link text in menu </li>
<li><strong>options</strong> array(0) {} </li>
<li><strong>module</strong> – system module name. It is stored in menu_links.module </li>
<li><strong>hidden</strong> – hidden menu element </li>
<li><strong>external </strong></li>
<li><strong>has_children</strong> – if there are child documents (0 &#8211; no, 1 &#8211; yes) </li>
<li><strong>expanded</strong> – if it is expanded (0- no, 1 &#8211; yes) </li>
<li><strong>weight</strong> – weight (it is used for sorting of one-level elements) </li>
<li><strong>depth</strong> – depth of inclusion (1 – top level) </li>
<li><strong>customized </strong></li>
<li><strong>p1</strong> – top level in menu hierarchy. Contains parent mlid </li>
<li><strong>p2 – </strong>hierarchy level. IN our case it contains mlid of current node </li>
<li><strong>p3</strong> &#8211; 0 – if there are no child nodes. </li>
<li><strong>p4</strong> </li>
<li><strong>p5</strong> </li>
<li><strong>p6</strong> </li>
<li><strong>p7</strong> </li>
<li><strong>p8</strong> </li>
<li><strong>p9</strong> </li>
<li><strong>updated </strong></li>
<li><strong>href</strong> – document address </li>
<li><strong>title</strong> &#8211; document header </li>
</ul>
<img src="http://feeds.feedburner.com/~r/Templatezine/~4/_A1S1G7Hw-g" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.templatezine.com/2010/07/drupal-changes-in-book-module-in-drupal-6/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.templatezine.com/2010/07/drupal-changes-in-book-module-in-drupal-6/#utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=drupal-changes-in-book-module-in-drupal-6</feedburner:origLink></item>
		<item>
		<title>Drupal Modules: Nofollow List</title>
		<link>http://feedproxy.google.com/~r/Templatezine/~3/HetE0arw6Hc/</link>
		<comments>http://www.templatezine.com/2010/07/drupal-modules-nofollow-list/#comments</comments>
		<pubDate>Wed, 28 Jul 2010 14:12:06 +0000</pubDate>
		<dc:creator>Aleksey</dc:creator>
				<category><![CDATA[How-To]]></category>
		<category><![CDATA[drupal how to]]></category>
		<category><![CDATA[drupal modules]]></category>
		<category><![CDATA[drupal nofollow list]]></category>
		<category><![CDATA[drupal tutorials]]></category>

		<guid isPermaLink="false">http://www.templatezine.com/2010/07/drupal-modules-nofollow-list/</guid>
		<description><![CDATA[Allows a blacklist of sites that will have a rel=&#34;nofollow&#34; attribute added to their link tags whenever used on your site. Originally the only page in the blacklist was Wikipedia, though it now allows an ...]]></description>
			<content:encoded><![CDATA[<p>Allows a blacklist of sites that will have a rel=&quot;nofollow&quot; attribute added to their link tags whenever used on your site. Originally the only page in the blacklist was Wikipedia, though it now allows an admin controlled blacklist and whitelist.\</p>
<p> <span id="more-849"></span>
<p><strong>Attention: </strong>You need configure input formats and add this to a format for this module to work. </p>
<p>Since this is a filter module, it only works on text that is passed through Drupal&#8217;s filter system. The biggest example of content passed through the filters are the body of content, blocks, and cck text fields where the user specifies an input format. It will not work on several areas including menus, site footers, mission statements, and profile fields.</p>
<p>If you wish to add nofollow to all external links you simply add your site to the &quot;whitelist&quot;.</p>
<p>For more information on the motivation for this module see <a href="http://knaddison.com/drupal/just-say-no-follow-wikipedia-links">Just say NO(follow) Wikipedia links!</a> </p>
<h3>Installation </h3>
<ul>
<li>The module is installed as usual </li>
<li>You need activate &quot;<strong>Nofollow list filter </strong>&quot; in the required input formats. </li>
</ul>
<h3>Configuration</h3>
<p>I found that there can be either whitelist or black list.</p>
<p><strong>Thus you can</strong>:</p>
<ul>
<li>Forbid indexing ALL exterior links to exterior sites (select &quot;whitelist&quot; and don’t specify sites) </li>
<li>Forbid indexing ALL links EXCEPT the defined ones (select &quot;whitelist&quot; and specify these sites) </li>
<li>Forbid indexing links ONLY to specified sites (select &quot;blacklist&quot; and specify these sites) </li>
<li>Allow indexing ALL links to exterior sites (select &quot;blacklist&quot; and do not specify the sites) </li>
</ul>
<p>So much wisdom!</p>
<img src="http://feeds.feedburner.com/~r/Templatezine/~4/HetE0arw6Hc" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.templatezine.com/2010/07/drupal-modules-nofollow-list/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.templatezine.com/2010/07/drupal-modules-nofollow-list/#utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=drupal-modules-nofollow-list</feedburner:origLink></item>
		<item>
		<title>Drupal: How to Disable Indexing Links on Your Site</title>
		<link>http://feedproxy.google.com/~r/Templatezine/~3/RdXHBsK4Fks/</link>
		<comments>http://www.templatezine.com/2010/07/drupal-how-to-disable-indexing-links-on-your-site/#comments</comments>
		<pubDate>Mon, 26 Jul 2010 12:56:31 +0000</pubDate>
		<dc:creator>Aleksey</dc:creator>
				<category><![CDATA[How-To]]></category>
		<category><![CDATA[drupal disable links indexing]]></category>
		<category><![CDATA[drupal how to]]></category>
		<category><![CDATA[drupal SEO]]></category>
		<category><![CDATA[drupal tutorials]]></category>

		<guid isPermaLink="false">http://www.templatezine.com/2010/07/drupal-how-to-disable-indexing-links-on-your-site/</guid>
		<description><![CDATA[From this article you will know how to forbid search engine bots indexing and following certain links.
Solution
 
Tools:

microformat rel=&#34;external nofollow&#34;, which is added to link body (for Google) 
embrace link with tag (for Yandex) 

Modules ...]]></description>
			<content:encoded><![CDATA[<p>From this article you will know how to forbid search engine bots indexing and following certain links.</p>
<p>Solution</p>
<p> <span id="more-847"></span>
<p>Tools:</p>
<ul>
<li>microformat rel=&quot;external nofollow&quot;, which is added to link body (for Google) </li>
<li>embrace link with tag (for Yandex) </li>
</ul>
<h5>Modules for managing site links indexing:</h5>
<ul>
<li>Links managing in taxonomy and menu </li>
<li>Inserting rel=&quot;nofollow&quot; white or black site list to external links </li>
<li>Using of the standard feature of Filter module </li>
</ul>
<h3>Using of the standard feature of Filter module</h3>
<p>Open the required input format (for example, /admin/settings/filters/1/configure)    <br />Check &quot;Protection against spam links&quot;     <br />Set &quot;Sorting&quot; for correct displaying of document body</p>
<p>Effect of this method applies to Filter module operational area. Especially these are fields where user can select input format…</p>
<h3>Links managing in taxonomy and menu</h3>
<p>Using nofollow module</p>
<h3>White and black site lists to manage indexing</h3>
<p>nofollowlist module allows creating white and black site lists. Links are indexed and NOT indexed respectivelly for sites from one of the list.    </p>
<img src="http://feeds.feedburner.com/~r/Templatezine/~4/RdXHBsK4Fks" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.templatezine.com/2010/07/drupal-how-to-disable-indexing-links-on-your-site/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.templatezine.com/2010/07/drupal-how-to-disable-indexing-links-on-your-site/#utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=drupal-how-to-disable-indexing-links-on-your-site</feedburner:origLink></item>
	</channel>
</rss>
