<?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; How-To</title>
	<atom:link href="http://www.templatezine.com/category/how-to/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>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>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>
		<item>
		<title>Drupal: How To Manage Links to Images On Your Site</title>
		<link>http://www.templatezine.com/2011/10/drupal-how-to-manage-links-to-images-on-your-site/#utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=drupal-how-to-manage-links-to-images-on-your-site</link>
		<comments>http://www.templatezine.com/2011/10/drupal-how-to-manage-links-to-images-on-your-site/#comments</comments>
		<pubDate>Mon, 17 Oct 2011 17:11:22 +0000</pubDate>
		<dc:creator>Aleksey</dc:creator>
				<category><![CDATA[How-To]]></category>
		<category><![CDATA[drupal how to]]></category>
		<category><![CDATA[drupal image path]]></category>
		<category><![CDATA[drupal src]]></category>
		<category><![CDATA[drupal tutorials]]></category>

		<guid isPermaLink="false">http://www.templatezine.com/2011/10/drupal-how-to-manage-links-to-images-on-your-site/</guid>
		<description><![CDATA[You may need to show pictures like this one 23458934z5689.jpeg as mountain.jpeg in src attribute. But pathauto module does nothing with picture synonyms. In this article, I would tell you how to fix this shortly.

Solution:
Please ...]]></description>
			<content:encoded><![CDATA[<h4>You may need to show pictures like this one <em>23458934z5689.jpeg </em>as <em>mountain.jpeg</em> in src attribute. But pathauto module does nothing with picture synonyms. In this article, I would tell you how to fix this shortly.</h4>
<p><span id="more-1151"></span></p>
<h4>Solution:</h4>
<p>Please use one of the modules below to create synonyms for your site pictures:</p>
<p>Pathologic (<a href="http://drupal.org/project/pathologic">http://drupal.org/project/pathologic</a>) – manage src attribute (see 3th parameter)<br />
Imagepath (<a href="http://drupal.org/project/imagepath">http://drupal.org/project/imagepath</a>) – even better for our purpose<br />
Uploadpath (<a href="http://drupal.org/project/uploadpath">http://drupal.org/project/uploadpath</a>) – renames a picture based  on a template for all uploaded files and use standard Upload module.</p>
<h4>Good luck!</h4>
]]></content:encoded>
			<wfw:commentRss>http://www.templatezine.com/2011/10/drupal-how-to-manage-links-to-images-on-your-site/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Drupal: Variables of page.tpl.php</title>
		<link>http://www.templatezine.com/2011/10/drupal-variables-of-page-tpl-php/#utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=drupal-variables-of-page-tpl-php</link>
		<comments>http://www.templatezine.com/2011/10/drupal-variables-of-page-tpl-php/#comments</comments>
		<pubDate>Wed, 12 Oct 2011 15:51:24 +0000</pubDate>
		<dc:creator>Aleksey</dc:creator>
				<category><![CDATA[How-To]]></category>
		<category><![CDATA[drupal how to]]></category>
		<category><![CDATA[drupal page.tpl.php]]></category>
		<category><![CDATA[drupal page.tpl.php variables]]></category>
		<category><![CDATA[drupal tutorials]]></category>
		<category><![CDATA[page.tpl.php variables]]></category>

		<guid isPermaLink="false">http://www.templatezine.com/2011/10/drupal-variables-of-page-tpl-php/</guid>
		<description><![CDATA[In this article, we will make clear of page template variables (page.tpl.php) to properly adjust design of your Drupal-based site.

Solution:
page.tpl.php is a template that forms a page. Please read the list &#38; description of variables ...]]></description>
			<content:encoded><![CDATA[<h4>In this article, we will make clear of page template variables (page.tpl.php) to properly adjust design of your Drupal-based site.</h4>
<p><span id="more-1149"></span></p>
<p>Solution:</p>
<p>page.tpl.php is a template that forms a page. Please read the list &amp; description of variables below. You could use these variables adjusting design of your site.</p>
<ul>
<li><strong>$base_path</strong> — path to Drupal folder.</li>
<li><strong>$css </strong>— CSS-files.</li>
<li><strong>$breadcrumb</strong> — breadcrump.</li>
<li><strong>$closure</strong> — informs about closing a page.</li>
<li><strong>$content</strong> — node content.</li>
<li><strong>$directory</strong> — folder with a theme (e.g. sites/all/themes/MyTheme).</li>
<li><strong>$feed_icons</strong> — RSS icon.</li>
<li><strong>$footer_message</strong> — information shown in the lower column. It is taken from settings at Administer &gt; Site configuration &gt; Site information. It is empty is these is no info specified in Footer message field.</li>
<li><strong>$head</strong> — HTML as generated by drupal_get_html_head().</li>
<li><strong>$head_title</strong> — variable shows: «node title| site title». It is usually inserted to the HTML-tag and is shown in a title in browser window .</li>
<li><strong>$help</strong> — help. Shows messages for administrator’s pages mostly. For example, if you click Administer link, you  will see a message: «Welcome to the administration section. Here you may control how your site functions». If you have no this variable in your template, you won’t see the help message.</li>
<li><strong>$is_front </strong>— returns 1 (true) if the first site page is loaded and 0 (false) if any other page is loaded.</li>
<li><strong>$language</strong> — shows language of a site to help browser determine encoding. Is taken from Administer &gt; Site configuration &gt; Localization.</li>
<li><strong>$layout</strong> — this setting allows you to style different types of layout (&#8216;none&#8217;, &#8216;left&#8217;, &#8216;right&#8217; or &#8216;both&#8217;) differently, depending on how many sidebars are enabled.</li>
<li><strong>$logo</strong> — logo address. The data is taken from theme settings. If settings disable showing of a logo, it won’t be shown.</li>
<li><strong>$messages</strong> — context messages about status and errors. Is shown at the top of a page. For example, if alias doesn’t correspond with password, you will see this message: «Sorry, unrecognized username or password. Have you forgotten your password?» If there is no this variable in a template, a page will be reloaded without an error message.</li>
<li><strong>$mission</strong> — mission indo. Is taken from Administer &gt; Site configuration &gt; Site information. If Mission is specified, but disabled in a theme settings, the info won’t appear.</li>
<li><strong>$node </strong>— verification variable: to show in open documents only.</li>
<li><strong>$onload_attributes </strong>— onload tags to be added to the head tag, to allow for auto execution of attached scripts.</li>
<li><strong>$primary_links </strong>(array) — Primary links output.</li>
<li><strong>$scripts</strong> — loads JS script files. Before v 5.0 JS code was recorder to page.tpl.php.</li>
<li><strong>$search_box </strong>— search format. If Search module isn’t activated or is disabled in a theme settings, it won’t appear for your site.</li>
<li><strong>$search_button_text </strong>— translated text on the search button.</li>
<li><strong>$search_description</strong> — translated description for the search button.</li>
<li><strong>$search_url</strong> — URL the search form is submitted to.</li>
<li><strong>$secondary_links</strong> (array) — Secondary links output.</li>
<li><strong>$sidebar_left</strong> — left column.</li>
<li><strong>$sidebar_right</strong> — right column.</li>
<li><strong>$site</strong> — the name of the site, always filled in.</li>
<li><strong>$site_name</strong> — name of a site. If showing of site name is disabled in a theme settings, it won’t appear.</li>
<li><strong>$site_slogan</strong> — site slogan. Won’t appear if it is disabled in a theme settings.</li>
<li><strong>$styles</strong> — styles loading. By default this is style.css file from theme folder and .css-files in modules folders.</li>
<li><strong>$tabs</strong> — tabs. If youo go to Administer link there would be By task and By module tabs. If you have read and write permission for nodes, these would be View, Edit tabs etc.</li>
<li><strong>$title</strong> — node title.</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.templatezine.com/2011/10/drupal-variables-of-page-tpl-php/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

