<?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>TemplateZine &#187; Aleksey</title>
	<atom:link href="http://www.templatezine.com/author/admin/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.templatezine.com</link>
	<description>Reviewing Web Templates</description>
	<lastBuildDate>Mon, 23 Jan 2012 14:27:21 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1.2</generator>
		<item>
		<title>Drupal: Quick Cron Diagnostic</title>
		<link>http://www.templatezine.com/2012/01/drupal-quick-cron-diagnostic/#utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=drupal-quick-cron-diagnostic</link>
		<comments>http://www.templatezine.com/2012/01/drupal-quick-cron-diagnostic/#comments</comments>
		<pubDate>Mon, 23 Jan 2012 14:25:02 +0000</pubDate>
		<dc:creator>Aleksey</dc:creator>
				<category><![CDATA[How-To]]></category>
		<category><![CDATA[drupal cron]]></category>
		<category><![CDATA[drupal cron hangs up]]></category>
		<category><![CDATA[drupal how to]]></category>
		<category><![CDATA[drupal tutorials]]></category>

		<guid isPermaLink="false">http://www.templatezine.com/2012/01/drupal-quick-cron-diagnostic/</guid>
		<description><![CDATA[In this article I would tell you how  to find our the reasons of why cron hangs up and fix them. Read the solution options below.

Indexing
Reduce the number of documents for indexing at a single ...]]></description>
			<content:encoded><![CDATA[<p>In this article I would tell you how  to find our the reasons of why cron hangs up and fix them. Read the solution options below.</p>
<p><span id="more-1186"></span></p>
<h3>Indexing</h3>
<p>Reduce the number of documents for indexing at a single cron start on search settings page. It’s better to run cron once a day.</p>
<h3>Email distribution</h3>
<p>If you have installed simple news, it may be a reason of cron hanging up. Sending a lot of emails doesn’t have a positive effect on cron.</p>
<h3>Not enough time</h3>
<p>try to change cron.php file in the following way:</p>
<blockquote><p>// If not in &#8216;safe mode&#8217;, increase the maximum execution time:<br />
// if (!ini_get(&#8216;safe_mode&#8217;)) {<br />
set_time_limit(1800);<br />
// }</p></blockquote>
<p>I.e. comment these lines.</p>
<p>Who is in fault?</p>
<p>Please do the following to figure out which module is in fault that cron hangs up: in includes/module.inc, in the last function (function module_invoke_all()), replace 404-405 line:</p>
<blockquote><p>foreach (module_implements($hook) as $module) {<br />
$function = $module .&#8217;_&#8217;. $hook;</p></blockquote>
<p>with this one:</p>
<blockquote><p>foreach (module_implements($hook) as $module) {<br />
if ($hook == &#8216;cron&#8217;) {<br />
watchdog(&#8216;cron_runs&#8217;, $module); }<br />
$function = $module .&#8217;_&#8217;. $hook;</p></blockquote>
<p>Thus you will have a new category &#8220;cron_runs&#8221; in a log. The category will contain a list of modules which called cron. The last module is a “guilty” one.</p>
<p>Please do not forget to get all files back after you make diagnostics.</p>
<h3>Message: &#8220;Trying to restart…” when a procedure is performing.</h3>
<p>The reason of why you see this message is that wget can call cron.php up to 20 times at  a stretch if it doesn’t get the acceptable response. Read more info here: http://drupal.org/node/150972</p>
<p>You can also close access to a cron “from outside” in this way:<br />
Add the following code to .htaccess file:</p>
<blockquote><p>&lt;Files &#8220;cron.php&#8221;&gt;<br />
Order deny,allow<br />
Allow from xxx.xxx.xxx.xxx<br />
Deny from all<br />
&lt;/Files&gt;</p></blockquote>
<p>Replace xxx.xxx.xxx.xxx with IP you want to enable cron launch from.</p>
<p>Good luck!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.templatezine.com/2012/01/drupal-quick-cron-diagnostic/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>What has been changed in Book module in Drupal 6</title>
		<link>http://www.templatezine.com/2012/01/what-has-been-changed-in-book-module-in-drupal-6/#utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=what-has-been-changed-in-book-module-in-drupal-6</link>
		<comments>http://www.templatezine.com/2012/01/what-has-been-changed-in-book-module-in-drupal-6/#comments</comments>
		<pubDate>Mon, 16 Jan 2012 16:54:33 +0000</pubDate>
		<dc:creator>Aleksey</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[drupal book changes]]></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/2012/01/what-has-been-changed-in-book-module-in-drupal-6/</guid>
		<description><![CDATA[In this article I will tell you the recent changes for Book module. Knowing about that will help you to adapt snippets and modules which work with Book module for working in Drupal 6.

Solution.
Drupal 5.х
In ...]]></description>
			<content:encoded><![CDATA[<p>In this article I will tell you the recent changes for Book module. Knowing about that will help you to adapt snippets and modules which work with Book module for working in Drupal 6.</p>
<p><span id="more-1183"></span></p>
<h4>Solution.</h4>
<h3>Drupal 5.х</h3>
<p>In Drupal 5.x, once a book page is changed,  a record of &#8216;book&#8217; type (nid) is added to the &#8220;node&#8221; table.  This record defines relation to a parent page: if parent is set to 0, the book is on top. This is so simple!</p>
<p>All module data were stored in one table:</p>
<blockquote><p>CREATE TABLE book (<br />
vid int unsigned NOT NULL default &#8217;0&#8242;,<br />
nid int unsigned NOT NULL default &#8217;0&#8242;,<br />
parent int NOT NULL default &#8217;0&#8242;,<br />
weight tinyint NOT NULL default &#8217;0&#8242;,<br />
PRIMARY KEY (vid),<br />
KEY nid (nid),<br />
KEY parent (parent)<br />
)</p></blockquote>
<h3>Drupal 6.х</h3>
<p>In Drupal 6.x, &#8220;book&#8221; table contains nid, bid and mlid fields only.</p>
<p>As you can see from the Drupal interface, you can’t specify a parent page on node/add/book page. Instead, you should choose the appropriate book and (IMPORTANT!) parent page in this book.</p>
<p>Book module has been changed to use new Drupal 6.x menu system ({menu_links} table) for storing and recovering of  book hierarchy. Any modules which used Book interface have to be modified. All info stored in a node with Book module is now stored in $node-&gt;book property.</p>
<p>Many API functions of Book module have been changed. For example, <strong>book_recurse</strong> function was deleted. For the most cases, it could be replaced with <strong>book_export_traverse</strong>, but it doesn’t have $depth parameter.</p>
<h3>Analysis of database tables</h3>
<p>&#8211; Structure of `book` table</p>
<blockquote><p>CREATE TABLE `book` (<br />
`mlid` int(10) unsigned NOT NULL default &#8217;0&#8242;,<br />
`nid` int(10) unsigned NOT NULL default &#8217;0&#8242;,<br />
`bid` int(10) unsigned NOT NULL default &#8217;0&#8242;,<br />
PRIMARY KEY  (`mlid`),<br />
UNIQUE KEY `nid` (`nid`),<br />
KEY `bid` (`bid`)<br />
) ENGINE=MyISAM DEFAULT CHARSET=utf8;</p></blockquote>
<p>&#8211; Structure of `menu_links` table</p>
<blockquote><p>CREATE TABLE `menu_links` (<br />
`menu_name` varchar(32) NOT NULL default &#8221;,<br />
`mlid` int(10) unsigned NOT NULL auto_increment,<br />
`plid` int(10) unsigned NOT NULL default &#8217;0&#8242;,<br />
`link_path` varchar(255) NOT NULL default &#8221;,<br />
`router_path` varchar(255) NOT NULL default &#8221;,<br />
`link_title` varchar(255) NOT NULL default &#8221;,<br />
`options` text,<br />
`module` varchar(255) NOT NULL default &#8216;system&#8217;,<br />
`hidden` smallint(6) NOT NULL default &#8217;0&#8242;,<br />
`external` smallint(6) NOT NULL default &#8217;0&#8242;,<br />
`has_children` smallint(6) NOT NULL default &#8217;0&#8242;,<br />
`expanded` smallint(6) NOT NULL default &#8217;0&#8242;,<br />
`weight` int(11) NOT NULL default &#8217;0&#8242;,<br />
`depth` smallint(6) NOT NULL default &#8217;0&#8242;,<br />
`customized` smallint(6) NOT NULL default &#8217;0&#8242;,<br />
`p1` int(10) unsigned NOT NULL default &#8217;0&#8242;,<br />
`p2` int(10) unsigned NOT NULL default &#8217;0&#8242;,<br />
`p3` int(10) unsigned NOT NULL default &#8217;0&#8242;,<br />
`p4` int(10) unsigned NOT NULL default &#8217;0&#8242;,<br />
`p5` int(10) unsigned NOT NULL default &#8217;0&#8242;,<br />
`p6` int(10) unsigned NOT NULL default &#8217;0&#8242;,<br />
`p7` int(10) unsigned NOT NULL default &#8217;0&#8242;,<br />
`p8` int(10) unsigned NOT NULL default &#8217;0&#8242;,<br />
`p9` int(10) unsigned NOT NULL default &#8217;0&#8242;,<br />
`updated` smallint(6) NOT NULL default &#8217;0&#8242;,<br />
PRIMARY KEY  (`mlid`),<br />
KEY `path_menu` (`link_path`(128),`menu_name`),<br />
KEY `menu_plid_expand_child` (`menu_name`,`plid`,`expanded`,`has_children`),<br />
KEY `menu_parents` (`menu_name`,`p1`,`p2`,`p3`,`p4`,`p5`,`p6`,`p7`,`p8`,`p9`),<br />
KEY `router_path` (`router_path`(128))<br />
) ENGINE=MyISAM AUTO_INCREMENT=407 DEFAULT CHARSET=utf8 AUTO_INCREMENT=407 ;</p></blockquote>
<h3>Analysis of $node-&gt;book</h3>
<p>Let’s create a simple node of Book type and implement the following code there (input format have to 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 />
["mlid"]=&gt; string(3) &#8220;409&#8243;<br />
["nid"]=&gt; string(2) &#8220;27&#8243;<br />
["bid"]=&gt; string(2) &#8220;56&#8243;<br />
["menu_name"]=&gt; string(11) &#8220;book-toc-56&#8243;<br />
["plid"]=&gt; string(3) &#8220;257&#8243;<br />
["link_path"]=&gt; string(7) &#8220;node/27&#8243;<br />
["router_path"]=&gt; string(6) &#8220;node/%&#8221;<br />
["link_title"]=&gt; string(20) &#8220;Content&#8221;<br />
["options"]=&gt; array(0) {}<br />
["module"]=&gt; string(4) &#8220;book&#8221;<br />
["hidden"]=&gt; string(1) &#8220;0&#8243;<br />
["external"]=&gt; string(1) &#8220;0&#8243;<br />
["has_children"]=&gt; string(1) &#8220;0&#8243;<br />
["expanded"]=&gt; string(1) &#8220;0&#8243;<br />
["weight"]=&gt; string(1) &#8220;0&#8243;<br />
["depth"]=&gt; string(1) &#8220;2&#8243;<br />
["customized"]=&gt; string(1) &#8220;0&#8243;<br />
["p1"]=&gt; string(3) &#8220;257&#8243;<br />
["p2"]=&gt; string(3) &#8220;409&#8243;<br />
["p3"]=&gt; string(1) &#8220;0&#8243;<br />
["p4"]=&gt; string(1) &#8220;0&#8243;<br />
["p5"]=&gt; string(1) &#8220;0&#8243;<br />
["p6"]=&gt; string(1) &#8220;0&#8243;<br />
["p7"]=&gt; string(1) &#8220;0&#8243;<br />
["p8"]=&gt; string(1) &#8220;0&#8243;<br />
["p9"]=&gt; string(1) &#8220;0&#8243;<br />
["updated"]=&gt; string(1) &#8220;0&#8243;<br />
["href"]=&gt; string(7) &#8220;node/27&#8243;<br />
["title"]=&gt; string(20) &#8220;Content&#8221;<br />
}</p></blockquote>
<h3>Summary</h3>
<ul>
<li>book table in Друпал 6.х includes <strong>bid</strong> (Book id) field that stores <strong>nid</strong> of a page which is on top in a book</li>
<li>Every book page also has mlid (Menu links id) field to be connected with menu_links table. This is requried due to page hierarchy is now stored in menu_links table instead of book table.</li>
<li>Maximum inclusion is limited to 9 levels</li>
</ul>
<h3>Elements of $node-&gt;book array</h3>
<ul>
<li><strong>mlid</strong> &#8211; id menu_links, allows Book module connect to menu_links</li>
<li><strong>nid</strong> – node id</li>
<li><strong>bid – </strong>abbreviation of &#8220;book_id&#8221;</li>
<li><strong>menu_name</strong> – for Book nodes, it always starts with &#8220;book-toc-&#8221; + nid of a top node. menu_name is one for all nodes in a book.</li>
<li><strong>plid</strong> – mlid of a parent (0 – top level)</li>
<li><strong>link_path</strong> – address of a node in a 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. 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 nodes (0 – no, 1 – yes)</li>
<li><strong>expanded</strong> – expanded (0- no, 1 – yes)</li>
<li><strong>weight</strong> – weight (for sorting of one-level elements)</li>
<li><strong>depth</strong> – incapsulation depth (1 – top level)</li>
<li><strong>customized </strong></li>
<li><strong>p1</strong> – top level in menu hierarchy. Includes parent mlid</li>
<li><strong>p2 – </strong>hierarchy level. Includes mlid of a current node in our case.</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> – node address</li>
<li><strong>title</strong> – node title</li>
</ul>
<p>Good luck!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.templatezine.com/2012/01/what-has-been-changed-in-book-module-in-drupal-6/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Drupal: How To Show Book Hierarchy</title>
		<link>http://www.templatezine.com/2012/01/drupal-how-to-show-book-hierarchy/#utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=drupal-how-to-show-book-hierarchy</link>
		<comments>http://www.templatezine.com/2012/01/drupal-how-to-show-book-hierarchy/#comments</comments>
		<pubDate>Tue, 10 Jan 2012 12:41:03 +0000</pubDate>
		<dc:creator>Aleksey</dc:creator>
				<category><![CDATA[How-To]]></category>
		<category><![CDATA[drupal book hierarchy]]></category>
		<category><![CDATA[drupal how to]]></category>
		<category><![CDATA[drupal tutorials]]></category>

		<guid isPermaLink="false">http://www.templatezine.com/2012/01/drupal-how-to-show-book-hierarchy/</guid>
		<description><![CDATA[Here, I will tell you how to show full content of all books in hierarchy on your Drupal-based site. The method below has 4 steps with code examples for different Drupal versions.

Solution:
It’s better to show ...]]></description>
			<content:encoded><![CDATA[<p>Here, I will tell you how to show full content of all books in hierarchy on your Drupal-based site. The method below has 4 steps with code examples for different Drupal versions.</p>
<p><span id="more-1181"></span></p>
<p>Solution:</p>
<p>It’s better to show the content as an individual page rather than a block because a block is usually not so big:</p>
<ol>
<li>Create a page,</li>
<li>Insert an appropriate code (different for different Drupal versions),</li>
<li>Insert input parameter: &#8220;PHP&#8221;,</li>
<li>Save changes.</li>
</ol>
<h3>Drupal 5</h3>
<blockquote><p>function book_tree_recurse_all($nid, $depth, $children) {<br />
if ($depth &gt; 0) {<br />
if ($children[$nid]) {<br />
foreach ($children[$nid] as $foo =&gt; $node) {<br />
if ($tree = book_tree_recurse_all($node-&gt;nid, $depth &#8211; 0, $children)) {<br />
$output .= &#8216;&lt;li class=&#8221;expanded&#8221;&gt;&#8217;;<br />
$output .= l($node-&gt;title, &#8216;node/&#8217;. $node-&gt;nid);<br />
$output .= &#8216;&lt;ul&gt;&#8217;. $tree .&#8217;&lt;/ul&gt;&#8217;;<br />
$output .= &#8216;&lt;/li&gt;&#8217;;<br />
} else {<br />
$output .= &#8216;&lt;li class=&#8221;leaf&#8221;&gt;&#8217;. l($node-&gt;title, &#8216;node/&#8217;. $node-&gt;nid) .&#8217;&lt;/li&gt;&#8217;;<br />
}<br />
}<br />
}<br />
}<br />
return $output;<br />
}<br />
function book_tree_expanded($parent = 0, $depth = 3) {<br />
$result = db_query(db_rewrite_sql(&#8216;SELECT n.nid, n.title, b.parent, b.weight FROM {node} n INNER JOIN {book} b ON n.nid = b.nid AND n.vid = b.vid WHERE n.status = 1 AND n.moderate = 0 ORDER BY b.weight, n.title&#8217;));<br />
while ($node = db_fetch_object($result)) {<br />
$list = $children[$node-&gt;parent] ? $children[$node-&gt;parent] : array();<br />
array_push($list, $node);<br />
$children[$node-&gt;parent] = $list;<br />
}<br />
if ($tree = book_tree_recurse_all($parent, $depth, $children)) {<br />
return &#8216;&lt;div class=&#8221;menu&#8221;&gt;&lt;ul&gt;&#8217;. $tree .&#8217;&lt;/ul&gt;&lt;/div&gt;&#8217;;<br />
}<br />
}<br />
print book_tree_expanded(0);</p></blockquote>
<h3>Drupal 6</h3>
<blockquote><p>function book_toc_recursive($bid, $pid) {<br />
$sql = &#8220;SELECT a.mlid, b.link_path, b.link_title FROM {book} a INNER JOIN {menu_links} b ON a.mlid = b.mlid WHERE (a.bid=%d) AND (b.plid=%d) order by a.mlid&#8221;;<br />
$result = db_query(db_rewrite_sql($sql), $bid, $pid);<br />
if ($result) {<br />
print &#8220;&lt;ul&gt;&#8221;;<br />
while ($data = db_fetch_object($result)) {<br />
print &#8220;&lt;li&gt;&#8221; . l($data-&gt;link_title, $data-&gt;link_path) . &#8220;&lt;/li&gt;&#8221;;<br />
book_toc_recursive($bid, $data-&gt;mlid);<br />
}<br />
print &#8220;&lt;/ul&gt;&#8221;;<br />
}<br />
}<br />
$all_books=book_get_books();<br />
foreach ($all_books as $book_id=&gt;$link) {<br />
book_toc_recursive($book_id, 0);<br />
}</p>
<p>&lt;?php<br />
//v.7<br />
unset($output);<br />
function is_book_page_new($changed) {<br />
//time period when articles are considered new.<br />
if ($changed&gt;strtotime(&#8220;-7 day&#8221;)) return &#8216; class=&#8221;changed&#8221;&#8216;;<br />
}<br />
function book_toc_recursive($bid, $pid) {<br />
$sql=&#8221;SELECT b.mlid, ml.link_path, ml.link_title, ml.has_children, n.changed FROM book b INNER JOIN menu_links AS ml ON b.mlid = ml.mlid, {node} AS n WHERE (b.bid=%d) AND (ml.plid=%d) AND b.nid=n.nid AND n.status=1 ORDER BY b.mlid&#8221;;<br />
$result = db_query(db_rewrite_sql($sql), $bid, $pid);<br />
if ($result) {<br />
while ($data = db_fetch_object($result)) {<br />
$output.=&#8217;&lt;li&#8217;.is_book_page_new($data-&gt;changed).&#8217;&gt;&#8217;.l($data-&gt;link_title, $data-&gt;link_path);<br />
if ($data-&gt;has_children) $output.=&#8217;&lt;ul&gt;&#8217;.book_toc_recursive($bid, $data-&gt;mlid).&#8217;&lt;/ul&gt;&#8217;;<br />
$output.=&#8217;&lt;/li&gt;&#8217;;<br />
}<br />
}<br />
return $output;<br />
}<br />
$all_books=book_get_books();<br />
foreach ($all_books as $book_id=&gt;$link) {<br />
print &#8216;&lt;ul class=&#8221;book_toc&#8221;&gt;&#8217;.book_toc_recursive($book_id, 0).&#8217;&lt;/ul&gt;&#8217;;<br />
}<br />
?&gt;</p></blockquote>
<p>Good luck!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.templatezine.com/2012/01/drupal-how-to-show-book-hierarchy/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Drupal: How To Remove Navigation From Book</title>
		<link>http://www.templatezine.com/2012/01/drupal-how-to-remove-navigation-from-book/#utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=drupal-how-to-remove-navigation-from-book</link>
		<comments>http://www.templatezine.com/2012/01/drupal-how-to-remove-navigation-from-book/#comments</comments>
		<pubDate>Tue, 03 Jan 2012 15:41:13 +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 remove book navigation]]></category>
		<category><![CDATA[drupal remove navigation]]></category>
		<category><![CDATA[drupal tutorials]]></category>

		<guid isPermaLink="false">http://www.templatezine.com/2012/01/drupal-how-to-remove-navigation-from-book/</guid>
		<description><![CDATA[When you view a node of ‘book’ type, you see a book navigation at the bottom: child nodes, previous and next nodes, and one level up node.  We need to get rid of this navigation.

Solutions:
Drupal ...]]></description>
			<content:encoded><![CDATA[<p>When you view a node of ‘book’ type, you see a book navigation at the bottom: child nodes, previous and next nodes, and one level up node.  We need to get rid of this navigation.</p>
<p><span id="more-1179"></span></p>
<h3>Solutions:</h3>
<h3>Drupal 6</h3>
<h6></h6>
<ul>
<li>Исправление шаблона навигации модуля book</li>
<li>Вариант, который будет работать после обновления версии Друпал.</li>
</ul>
<h3>Modify navigation template of book module</h3>
<p>You could modify a template in system module folder. The disadvantage of this method is that you should make the same changes every time after Drupal has been upgraded.</p>
<ul>
<li>Move to  …<em>/drupal/modules/book</em></li>
<li>Find <em>book-navigation.tpl.php</em> and create a backup copy in the same folder (<em>book-navigation.tpl.php-backup</em>)</li>
<li>Open a file and remove all code there:&lt;?php if ($tree || $has_links): ?&gt;<br />
&lt;div id=&#8221;book-navigation-&lt;?php print $book_id; ?&gt;&#8221; class=&#8221;book-navigation&#8221;&gt;<br />
&lt;?php print $tree; ?&gt;<br />
&lt;?php if ($has_links): ?&gt;<br />
&lt;div class=&#8221;page-links clear-block&#8221;&gt;<br />
&lt;?php if ($prev_url) : ?&gt;<br />
&lt;a href=&#8221;&lt;?php print $prev_url; ?&gt;&#8221; class=&#8221;page-previous&#8221; title=&#8221;&lt;?php print t(&#8216;Go to previous page&#8217;); ?&gt;&#8221;&gt;&lt;?php print t(&#8216;‹ &#8216;) . $prev_title; ?&gt;&lt;/a&gt;<br />
&lt;?php endif; ?&gt;<br />
&lt;?php if ($parent_url) : ?&gt;<br />
&lt;a href=&#8221;&lt;?php print $parent_url; ?&gt;&#8221; class=&#8221;page-up&#8221; title=&#8221;&lt;?php print t(&#8216;Go to parent page&#8217;); ?&gt;&#8221;&gt;&lt;?php print t(&#8216;up&#8217;); ?&gt;&lt;/a&gt;<br />
&lt;?php endif; ?&gt;<br />
&lt;?php if ($next_url) : ?&gt;<br />
&lt;a href=&#8221;&lt;?php print $next_url; ?&gt;&#8221; class=&#8221;page-next&#8221; title=&#8221;&lt;?php print t(&#8216;Go to next page&#8217;); ?&gt;&#8221;&gt;&lt;?php print $next_title . t(&#8216; ›&#8217;); ?&gt;&lt;/a&gt;<br />
&lt;?php endif; ?&gt;<br />
&lt;/div&gt;<br />
&lt;?php endif; ?&gt;<br />
&lt;/div&gt;<br />
&lt;?php endif; ?&gt;</li>
<li>Check if you get the required result. Restore a file from the backup copy if you don’t. Enjoy if you do <img class="wlEmoticon wlEmoticon-smile" style="border-style: none;" src="http://www.templatezine.com/wp-content/uploads/2012/01/wlEmoticon-smile.png" alt="Smile" /></li>
</ul>
<h3>Method that will work even after upgrading Drupal</h3>
<p>You can use redefining to apply this method. This way, it would work even after you upgrade Drupal.</p>
<ul>
<li>Open <em>drupal/modules/book</em></li>
<li>Copy book-navigation.tpl.php to a folder with your current theme (e.g.: <em>sites/all/themes/theme_name/)</em></li>
<li>Modify new <em>book-navigation.tpl.php</em> and remove the following code:  <code>&lt;?php print $tree; ?&gt;</code></li>
<li>You won’t see these changes because of a new theme registry – you should open <em>example.com/admin/settings/performance</em> and click &#8220;Clear cached data&#8221; below the page.</li>
<li>Ready <img class="wlEmoticon wlEmoticon-smile" style="border-style: none;" src="http://www.templatezine.com/wp-content/uploads/2012/01/wlEmoticon-smile.png" alt="Smile" /></li>
</ul>
<h3>Drupal 5</h3>
<p>You should redefine “theme_book_navigation” in your <em>template.php </em>for Drupal 5.<br />
Copy this function from “book.module” file and replace “theme” to your theme name.</p>
<p>To remove a  tree, comment this line:</p>
<blockquote><p>$tree = book_tree($node-&gt;nid);</p></blockquote>
<p>Drupal’s link function strips out the text of the navigation links because it doesn’t like the arrow symbols this uses. Simply change them to “&lt;” and “&gt;” and it should work without a problem.</p>
<p>Enjoy!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.templatezine.com/2012/01/drupal-how-to-remove-navigation-from-book/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Drupal: How To Create A Rotating Banner</title>
		<link>http://www.templatezine.com/2011/12/drupal-how-to-create-a-rotating-banner/#utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=drupal-how-to-create-a-rotating-banner</link>
		<comments>http://www.templatezine.com/2011/12/drupal-how-to-create-a-rotating-banner/#comments</comments>
		<pubDate>Tue, 13 Dec 2011 15:54:25 +0000</pubDate>
		<dc:creator>Aleksey</dc:creator>
				<category><![CDATA[How-To]]></category>
		<category><![CDATA[drupal advertising module]]></category>
		<category><![CDATA[drupal how to]]></category>
		<category><![CDATA[drupal modules]]></category>
		<category><![CDATA[drupal rotating banner]]></category>
		<category><![CDATA[drupal tutorials]]></category>

		<guid isPermaLink="false">http://www.templatezine.com/2011/12/drupal-how-to-create-a-rotating-banner/</guid>
		<description><![CDATA[In this article, I would tell you how to create and add a rotating banner to your site. You can use a special module or use blocks for that.

Solutions:

Use Advertising module&#160;
The ad module is a ...]]></description>
			<content:encoded><![CDATA[<p>In this article, I would tell you how to create and add a rotating banner to your site. You can use a special module or use blocks for that.</p>
<p><span id="more-1174"></span></p>
<p>Solutions:</p>
<ol>
<li>Use Advertising module&nbsp;
<p>The ad module is a powerful advertising system for Drupal-powered websites. It supports the random display and tracking of graphical (banner) and text ads. Ads can easily be displayed in themes, blocks, or embedded in site content. The module records comprehensive statistics about when and how often ads are viewed and clicked, including a plug-in module for generating graphical time-based reports. Ads can be assigned to multiple owners, each of which can be assigned their own set of permissions. Installation is simple by design. An API is provided allowing the development of additional functionality and integration with other Drupal modules.</li>
<li>Create a block and show your banner there.</li>
</ol>
<p>Every solution of the proposed has its advantages and disadvantages. For example, many people don’t like Advertising module but still use it because there is no better option. You decide!</p>
<p>Good luck!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.templatezine.com/2011/12/drupal-how-to-create-a-rotating-banner/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Drupal: How To Restore Database</title>
		<link>http://www.templatezine.com/2011/12/drupal-how-to-restore-database/#utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=drupal-how-to-restore-database</link>
		<comments>http://www.templatezine.com/2011/12/drupal-how-to-restore-database/#comments</comments>
		<pubDate>Tue, 06 Dec 2011 14:25:20 +0000</pubDate>
		<dc:creator>Aleksey</dc:creator>
				<category><![CDATA[How-To]]></category>
		<category><![CDATA[drupal how to]]></category>
		<category><![CDATA[drupal restore database]]></category>
		<category><![CDATA[drupal restore db]]></category>
		<category><![CDATA[drupal tutorials]]></category>

		<guid isPermaLink="false">http://www.templatezine.com/2011/12/drupal-how-to-restore-database/</guid>
		<description><![CDATA[If you have a backup copy of your database, you can easy use this copy to restore your site workability. In this article I would tell you a few solutions of how to do that.

Using ...]]></description>
			<content:encoded><![CDATA[<h4>If you have a backup copy of your database, you can easy use this copy to restore your site workability. In this article I would tell you a few solutions of how to do that.</h4>
<p><span id="more-1172"></span></p>
<h3>Using MySQL program (via SSH)</h3>
<p>MySQL program is included to the MySQL kit as well as <em>mysqldump</em>. Here are a few steps that will allow you to restore the database:</p>
<ul>
<li>Upload backup file (dump.sql) to the server;</li>
<li>Unpack the uploaded file if it was packed;</li>
<li>Connect to the server via SSH;</li>
<li>Open to a folder with backup file;</li>
<li>Run the following command:&gt; mysql -uLOGIN -PPORT -hHOST -pPASS DBNAME &lt; dump.sql</li>
</ul>
<h3>Using Staggered MySQL Dump Importer script</h3>
<p>The script does step-by-step import of large and huge MySQL dumps (like phpMyAdmin 2.x Dumps) even through servers with runtime limit and servers which work in safe mode. The script runs a small part of a huge dump and restart itself. The next session begins at a point the previous session ends.</p>
<p>You can find more details about the script here: http://www.ozerov.de/bigdump.php</p>
<h3>Summary</h3>
<p>You can use MySQL to restore your database if you have SSH-access to the database server. If you have no SSH access, you should use script.</p>
<p>Good luck!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.templatezine.com/2011/12/drupal-how-to-restore-database/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Drupal: How To Automate Creating Database Backups</title>
		<link>http://www.templatezine.com/2011/11/drupal-how-to-automate-database-backups/#utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=drupal-how-to-automate-database-backups</link>
		<comments>http://www.templatezine.com/2011/11/drupal-how-to-automate-database-backups/#comments</comments>
		<pubDate>Wed, 30 Nov 2011 17:30:13 +0000</pubDate>
		<dc:creator>Aleksey</dc:creator>
				<category><![CDATA[How-To]]></category>
		<category><![CDATA[drupal automate db backup]]></category>
		<category><![CDATA[drupal database backup copy]]></category>
		<category><![CDATA[drupal db backup]]></category>
		<category><![CDATA[drupal how to]]></category>
		<category><![CDATA[drupal tutorials]]></category>

		<guid isPermaLink="false">http://www.templatezine.com/2011/11/drupal-how-to-automate-database-backups/</guid>
		<description><![CDATA[In this article I would tell you how to automate the process of making database backup copies.

Solution
There is a cron that allows to run some process at the required time or with the defined frequency. ...]]></description>
			<content:encoded><![CDATA[<h4>In this article I would tell you how to automate the process of making database backup copies.</h4>
<p><span id="more-1169"></span></p>
<p>Solution</p>
<p>There is a cron that allows to run some process at the required time or with the defined frequency. Cron is Unix-based so if you use Windows OS for your hosting, please contact your hosting provider to get know how the process could be run at the required time.  Actually, this article is for Unix-users.</p>
<p>Run crontab in unix shell and create a rule to start copying of database:</p>
<blockquote><p>0 0 * * * mysqldump -uLOGIN -PPORT -hHOST -pPASS DBNAME | gzip -c &gt; `date &#8220;+%Y-%m-%d&#8221;`.gz</p></blockquote>
<p>Cron will run this command every day at 00:00 AM. It will create a dump of your database (DBNAME), gzip it (name of an archive will corresponds to the current date). For example, if you create a dump on Jan, 3, 2002, the command will create the following file: 2002-01-03.gz.</p>
<p>We use standard ‘date’ command to name files with a current date. This command allows to set a format for date output &#8211; date &#8220;+%Y-%m-%d&#8221;. We placed this command into backticks; for unix shell this means that the command will include other command work result.</p>
<p>Save the new rule for cron and wait for the results.  So, every day you will get a new archived copy of your database. You can quickly find the archive file by the date and restore the corrupted data. If you want to automate deleting of aold archives, try to use ‘find’ cron command. It is a standard unix commans.</p>
<p>Running <code>find ~/folder-with-archives -name "*.gz" -mtime +7 <span style="font-family: Calibri;">from time to time</span></code>, you will delete archives which were create more than 7 days ago. View the documentation about ‘find’ – it is available by <code>man find</code> command in unix shell.</p>
<p>If you have a PC that is constantly connected to the Internet, you can copy the created backup there by cron. Of course, provider’s hosting PC is a very reliable thing. But God helps those who help themselves <img class="wlEmoticon wlEmoticon-winkingsmile" style="border-style: none;" src="http://www.templatezine.com/wp-content/uploads/2011/11/wlEmoticon-winkingsmile.png" alt="Winking smile" /></p>
<p>Use ‘ftp’ and ‘scp’ commands to copy files to another PC. Add these commands to the cron. If your PC maintains SSH protocol use secure copy client to copy files &#8211; scp. You can read more about this command on the man-page: man scp.</p>
<p>Example:  <code>scp 2002-01-03.gz login@your.host.ru</code>: – download 2002-01-03.gz file to your.host.ru (being authorizing there as login).</p>
<h4>Good luck!</h4>
]]></content:encoded>
			<wfw:commentRss>http://www.templatezine.com/2011/11/drupal-how-to-automate-database-backups/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Drupal: How To Create A Backup Copy Of Your Site Files</title>
		<link>http://www.templatezine.com/2011/11/drupal-how-to-create-a-backup-copy-of-your-site-files/#utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=drupal-how-to-create-a-backup-copy-of-your-site-files</link>
		<comments>http://www.templatezine.com/2011/11/drupal-how-to-create-a-backup-copy-of-your-site-files/#comments</comments>
		<pubDate>Mon, 21 Nov 2011 12:31:52 +0000</pubDate>
		<dc:creator>Aleksey</dc:creator>
				<category><![CDATA[How-To]]></category>
		<category><![CDATA[drupal backup copy]]></category>
		<category><![CDATA[drupal create backup copy]]></category>
		<category><![CDATA[drupal how to]]></category>
		<category><![CDATA[drupal tutorials]]></category>

		<guid isPermaLink="false">http://www.templatezine.com/2011/11/drupal-how-to-create-a-backup-copy-of-your-site-files/</guid>
		<description><![CDATA[As it follows from the title of this article, I would tell you how to create a backup copy of files of your Drupal-based site. I will tell three different methods to do that.

Making backup ...]]></description>
			<content:encoded><![CDATA[<h4>As it follows from the title of this article, I would tell you how to create a backup copy of files of your Drupal-based site. I will tell three different methods to do that.</h4>
<p><span id="more-1165"></span></p>
<h3>Making backup copy using Linux (SSH-access required)</h3>
<ul>
<li>Connect to your server</li>
<li>Create a compressed file: <code>$ tar -zcvf project.tar.gz project</code> (A compressed file `project.tar.gz&#8217; with content of the `project&#8217; folder will be created)</li>
<p><!--EndFragment--></ul>
<h3>Making backup copy via site control panel</h3>
<p>A hoster of your site could provided tools for creating site backup copies. Ask them.</p>
<h3>Downloading files from your server via FTP</h3>
<p>If you couldn’t compress the files on the server for some reason, you should to download the files as they are. This is a long story, please have patience to do that.</p>
<p>You will need an FTP client. Open it and choose what exactly folders and files you do want to copy to your PC.</p>
<p><strong> </strong></p>
<p><strong>Tip</strong>: Files on a site almost aren’t changed comparing to the database. Therefore you can use <a href="http://drupalcookbook.ru/recept/node/18">synchronization method</a> for creating backup copies.</p>
<h4>Good Luck!</h4>
]]></content:encoded>
			<wfw:commentRss>http://www.templatezine.com/2011/11/drupal-how-to-create-a-backup-copy-of-your-site-files/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How To Compress Traffic</title>
		<link>http://www.templatezine.com/2011/11/how-to-compress-traffic/#utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=how-to-compress-traffic</link>
		<comments>http://www.templatezine.com/2011/11/how-to-compress-traffic/#comments</comments>
		<pubDate>Mon, 14 Nov 2011 17:11:33 +0000</pubDate>
		<dc:creator>Aleksey</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.templatezine.com/2011/11/how-to-compress-traffic/</guid>
		<description><![CDATA[This article is devoted to traffic compression. Here I will tell how to proceed speed-up uploading CSS and JS files by compressing data on a server and passing the compressed copy yo a browser.

Solutions
Automated compression ...]]></description>
			<content:encoded><![CDATA[<h4>This article is devoted to traffic compression. Here I will tell how to proceed speed-up uploading CSS and JS files by compressing data on a server and passing the compressed copy yo a browser.</h4>
<p><span id="more-1161"></span></p>
<h3>Solutions</h3>
<h3>Automated compression by server</h3>
<p>Insert the following code to .htaccess file:</p>
<blockquote><p>&lt;IfModule mod_gzip.c&gt;<br />
mod_gzip_on                   Yes<br />
mod_gzip_item_include         file       \.js$<br />
mod_gzip_item_include         file       \.css$<br />
&lt;/IfModule&gt;</p></blockquote>
<h3>Create compressed copy of every JS/CSS file manually and send the compressed files instead of uncompressed files</h3>
<p>You should archive these files manually and upload them to your server. This is manual work but – good news &#8211; number of files shouldn’t be too large. An advantage is that your server won’t be overloaded.</p>
<p>Send *.js files to *.js.gz and upload them to the same folder where original JS file is located on your server.</p>
<p>Add the following code to .htaccess (site root) after <code>RewriteEngine on</code>:</p>
<blockquote><p>RewriteRule ^(.*\.js\.gz)$ &#8211; [L]<br />
RewriteCond %{HTTP:Accept-Encoding} gzip<br />
RewriteCond %{REQUEST_FILENAME}.gz -f<br />
RewriteRule ^(.*)$ $1.gz</p></blockquote>
<p>Check if the work was correctly done. Load the page in a web-browser and view the request headers:</p>
<ul>
<li>Response Headers</li>
<li>Date Wed, 19 Mar 2008 12:32:09 GMT</li>
<li>Server Apache</li>
<li>Cache-Control max-age=1209600</li>
<li>Expires Wed, 02 Apr 2008 12:32:09 GMT</li>
<li>Last-Modified Wed, 19 Mar 2008 12:31:38 GMT</li>
<li>Etag &#8220;bdcf97-87d-47e107aa&#8221;</li>
<li>Accept-Ranges bytes</li>
<li>Content-Length 2173</li>
<li>Connection close</li>
<li><strong>Content-Type application/x-gzip</strong></li>
<li>Content-Encoding gzip</li>
</ul>
<p>Size of the received file should be less than the original one&#8230;</p>
<p>How it works : mod_rewrite decides which file is to be sent to a client (compressed or not). If there is a compressed copy near the original javascript.js file, and request contains info that client supports gzip-encoding, then client receives the compressed copy. If gzip-encoding isn’t supported or there is no compressed file, client gets original file.</p>
<p>As a result, server loading is decreased. You can do the same thing for CSS.</p>
<p>Good luck!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.templatezine.com/2011/11/how-to-compress-traffic/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Drupal: How To Create PDF Pages On A Site</title>
		<link>http://www.templatezine.com/2011/11/drupal-how-to-create-pdf-pages-on-a-site/#utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=drupal-how-to-create-pdf-pages-on-a-site</link>
		<comments>http://www.templatezine.com/2011/11/drupal-how-to-create-pdf-pages-on-a-site/#comments</comments>
		<pubDate>Tue, 08 Nov 2011 16:07:45 +0000</pubDate>
		<dc:creator>Aleksey</dc:creator>
				<category><![CDATA[How-To]]></category>
		<category><![CDATA[drupal create pdf page]]></category>
		<category><![CDATA[drupal how to]]></category>
		<category><![CDATA[drupal pdf page]]></category>
		<category><![CDATA[drupal tutorials]]></category>

		<guid isPermaLink="false">http://www.templatezine.com/2011/11/drupal-how-to-create-pdf-pages-on-a-site/</guid>
		<description><![CDATA[In this article I would tell you how to create PDF-file of a page on your Drupal-based site. I propose you two solutions to do that below.

Generate PDF with the help of libHaru library
daylessday.org notifies ...]]></description>
			<content:encoded><![CDATA[<h4>In this article I would tell you how to create PDF-file of a page on your Drupal-based site. I propose you two solutions to do that below.</h4>
<p><span id="more-1159"></span></p>
<h3>Generate PDF with the help of libHaru library</h3>
<p>daylessday.org notifies that <a href="http://libharu.org/wiki/Main_Page">libHaru</a> is available for download now.</p>
<p>the library abilities include:</p>
<p>* Generating of PDF with lines, text and pictures.<br />
* Using of different character encodings: ISO8859-1~16, MSCP1250~8, KOI8-R.<br />
* Deflate-decode documents compression.<br />
* Embedding of fonts of Type1 and TrueType formats.<br />
* An many others&#8230;</p>
<p>The library is free, open source and cross-platform.</p>
<p>Note: libHaru is installed on the server. This is not a PHP-library. If you can’t install anything to your server, this is not an option for you.</p>
<h3>Use Printer-friendly Pages module</h3>
<p>This module allows you to generate printer friendly versions of any node by navigating to www.example.com/print/nid, where nid is the node id of content to render.</p>
<p>A link is inserted in the each node (configurable in the content type settings), that opens a version of the page with no sidebars, search boxes, navigation pages, etc.</p>
<p>The 6.x version for Drupal 6 includes support for generating a PDF version also via the print_pdf module. Please follow the instructions in the INSTALL.txt carefully. PDF support is not usable out of the box. You must install a third-party tool!</p>
<p>By editing the default print.css (or specifying you own CSS file) or the print.tpl.php files, it is possible to change the look of the output page to suit your taste. For a more fine-grained customization, it is possible to use a print.node-type.tpl.php file located in either the current theme or the module directory.</p>
<p>The print_pdf module requires the use of an external PDF generation tool.<br />
The currently supported tools are dompdf and TCPDF.Авторы решений:</p>
<p>Good Luck!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.templatezine.com/2011/11/drupal-how-to-create-pdf-pages-on-a-site/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

