<?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>TransformationPowerTools &#187; php</title>
	<atom:link href="http://www.transformationpowertools.com/wordpress/tag/php/feed" rel="self" type="application/rss+xml" />
	<link>http://www.transformationpowertools.com/wordpress</link>
	<description>for personal growth and transformation</description>
	<lastBuildDate>Fri, 10 Sep 2010 07:16:22 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>Image Rotator for the Header of Twentyten</title>
		<link>http://www.transformationpowertools.com/wordpress/image-rotator-for-header-twentyten</link>
		<comments>http://www.transformationpowertools.com/wordpress/image-rotator-for-header-twentyten#comments</comments>
		<pubDate>Sat, 24 Jul 2010 11:39:03 +0000</pubDate>
		<dc:creator>alchymyth</dc:creator>
				<category><![CDATA[Tips & Tricks]]></category>
		<category><![CDATA[Wordpress]]></category>
		<category><![CDATA[blog]]></category>
		<category><![CDATA[function]]></category>
		<category><![CDATA[header]]></category>
		<category><![CDATA[image rotator]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[TwentyTen]]></category>
		<category><![CDATA[wp3]]></category>
		<category><![CDATA[wp3 default theme]]></category>

		<guid isPermaLink="false">http://www.transformationpowertools.com/wordpress/?p=924</guid>
		<description><![CDATA[The wp3 default theme TwentyTen comes with a choice of header images, which can be selected from the dashboard.
To rotate these images to show randomly in the header, we can make use of the global array variable which stores all the default header image information: $_wp_default_headers. 
The rest is easy: we build a function, which we later save in functions.php of TwentyTen, to pick a random image out of the available images: 
function rotate_default_headers() {
	global  ... &#187; <small><a href="http://www.transformationpowertools.com/wordpress/image-rotator-for-header-twentyten">read more</a></small> &#187;]]></description>
			<content:encoded><![CDATA[<p>The wp3 default theme TwentyTen comes with a choice of header images, which can be selected from the dashboard.<br />
To rotate these images to show randomly in the header, we can make use of the global array variable which stores all the default header image information: $_wp_default_headers. </p>
<p>The rest is easy: we build a function, which we later save in functions.php of TwentyTen, to pick a random image out of the available images: </p>
<p><code>function rotate_default_headers() {<br />
	global $_wp_default_headers;<br />
	$rnd_header = rand( 1,count($_wp_default_headers));<br />
	$header_nr = 1;<br />
	foreach( $_wp_default_headers as $heady ) :<br />
		if ( $header_nr == $rnd_header ) {<br />
		echo get_bloginfo(&#039;template_url&#039;) . substr( $heady[&#039;url&#039;], 2 );<br />
		break;<br />
		}<br />
	$header_nr++;<br />
	endforeach;<br />
}</code></p>
<p>to show the randomly rotated images in the header, add the function call in header.php &#8211;<br />
simply edit header.php, and find this line:</p>
<p><code>&lt;img src=&quot;&lt;?php header_image(); ?&gt;&quot; width=&quot;&lt;?php echo HEADER_IMAGE_WIDTH; ?&gt;&quot; height=&quot;&lt;?php echo HEADER_IMAGE_HEIGHT; ?&gt;&quot; alt=&quot;&quot; /&gt;<br />
<!--formatted--></code><br />
expand it to accomodate the function call:</p>
<p><code>&lt;img src=&quot;&lt;?php if (function_exists(&#039;rotate_default_headers&#039;)) rotate_default_header(); else header_image(); ?&gt;&quot; width=&quot;&lt;?php echo HEADER_IMAGE_WIDTH; ?&gt;&quot; height=&quot;&lt;?php echo HEADER_IMAGE_HEIGHT; ?&gt;&quot; alt=&quot;&quot; /&gt;<br />
<!--formatted--></code></p>
<p>done &#8211; now you will have a different header image each time you switch to a new page (within the limitions of statistics, of course).</p>
]]></content:encoded>
			<wfw:commentRss>http://www.transformationpowertools.com/wordpress/image-rotator-for-header-twentyten/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Multi-Column Grid-Style Posts in WordPress</title>
		<link>http://www.transformationpowertools.com/wordpress/multi-column-wordpress-template</link>
		<comments>http://www.transformationpowertools.com/wordpress/multi-column-wordpress-template#comments</comments>
		<pubDate>Fri, 29 Jan 2010 11:33:36 +0000</pubDate>
		<dc:creator>alchymyth</dc:creator>
				<category><![CDATA[Wordpress]]></category>
		<category><![CDATA[3 column post]]></category>
		<category><![CDATA[blog]]></category>
		<category><![CDATA[columns]]></category>
		<category><![CDATA[grid]]></category>
		<category><![CDATA[grid layout]]></category>
		<category><![CDATA[grid style]]></category>
		<category><![CDATA[magazine style]]></category>
		<category><![CDATA[multi-column]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[portofolio]]></category>
		<category><![CDATA[theme]]></category>
		<category><![CDATA[thumbnail grid]]></category>
		<category><![CDATA[wordpress forum]]></category>
		<category><![CDATA[wordpress loop]]></category>
		<category><![CDATA[wordpress theme]]></category>

		<guid isPermaLink="false">http://www.transformationpowertools.com/wordpress/?p=517</guid>
		<description><![CDATA[following question comes up regularly in the wordpress support forum: &#8216;i want to show my posts in three (four, five) columns, how can i do it?&#8217;
see the effect here in action: under pages &#8216;grid of posts&#8217;.
EDIT:
as this code can have its challenges, and is not always easy to apply, i would like to point to another approach with the same results:
Playing with columns – stacking posts in a grid.
END of EDIT
here, i am going  to  ... &#187; <small><a href="http://www.transformationpowertools.com/wordpress/multi-column-wordpress-template">read more</a></small> &#187;]]></description>
			<content:encoded><![CDATA[<p>following question comes up regularly in the wordpress support forum: &#8216;i want to show my posts in three (four, five) columns, how can i do it?&#8217;</p>
<p>see the effect here in action: under <strong>pages </strong><a href="http://www.transformationpowertools.com/wordpress/grid-posts">&#8216;grid of posts&#8217;</a>.</p>
<p>EDIT:<br />
as this code can have its challenges, and is not always easy to apply, i would like to point to another approach with the same results:<br />
<a href="http://www.transformationpowertools.com/wordpress/playing-with-columns-stacking-posts-grid-style">Playing with columns – stacking posts in a grid</a>.<br />
END of EDIT</p>
<p>here, i am going  to present yet another solution: a flexible core structure to allow <strong>any</strong> number of columns with <strong>any </strong>number of rows, limited only by screen space, readability and fantasy&#8230;</p>
<div id="attachment_683" class="wp-caption aligncenter" style="width: 522px"><img class="size-large wp-image-683" title="grid-style-template" src="http://www.transformationpowertools.com/wordpress/wp-content/uploads/2010/01/grid-style-template-512x375.jpg" alt="a three column grid category template" width="512" height="375" /><p class="wp-caption-text">a three column grid category template</p></div>
<p>the structure (for instance 3 columns, 4 rows, 12 or more posts):<br />
<code> 1  5   9<br />
2  6  10<br />
3  7  11<br />
4  8  12</code></p>
<p>the structure (for instance 3 columns, 4 rows, less than 12 posts, i.e. 7):<br />
<code> 1  4  6<br />
2  5  7<br />
3 </code></p>
<p>i&#8217;ll begin with a step by step introduction into the concept:</p>
<ol>
<li>setting of variables</li>
<li>query_posts</li>
<li>calculate rows</li>
<li>loop 1 &#8211; the columns</li>
<li>the wordpress loop &#8211; the rows</li>
<li>page navigation</li>
</ol>
<p>1. setting the variables:<br />
<code>$set_number_of_columns = 3; // enter numbers of columns here;<br />
$set_number_of_rows = 3; // enter numbers of rows here<br />
$set_showpost = $set_number_of_columns * $set_number_of_rows ;<br />
</code></p>
<p>2. query_posts:<br />
<code>global $query_string;<br />
$paged = (get_query_var('paged')) ? get_query_var('paged') : 1;<br />
query_posts($query_string.'&amp;showposts='.$set_showpost.'&amp;paged='.$paged);<br />
<!--formatted--></code></p>
<p>3. calculate rows:<br />
<code>// make adjustment to get three equaly long columns even on last paged page<br />
// get number of posts for this,<br />
$num_of_posts = $wp_query-&gt;post_count;<br />
// divide by $set_number_of_columns to get number per column,<br />
// round up to next integer to make $ppc posts per column variable, or $set_number_of_rows whatever is smaller<br />
$ppc = min(ceil($num_of_posts/$set_number_of_columns),$set_number_of_rows);<br />
// calculates number of rows, i.e. showposts for the following query_posts and get_posts<br />
<!--formatted--></code></p>
<p>4. loop 1 &#8211; the columns:<br />
<code>&lt;?php for ( $col = 1; $col &lt;= $set_number_of_columns; $col += 1) { ?&gt;<br />
&lt;div class="col&lt;?php echo $col; ?&gt;"&gt;<br />
&lt;?php $row = 1;<br />
$noffset = ($col -1) * $ppc + ($paged - 1) * $set_showpost ; //calculate offset parameter if paged ?&gt;<br />
<!--formatted--></code></p>
<p>5. wordpress loop &#8211; the rows and posts:<br />
<code>&lt;?php $posts = get_posts($query_string.'&amp;numberposts='.$ppc.'&amp;offset='.$noffset); foreach ($posts as $post) : start_wp(); ?&gt;<br />
&lt;div id="post-&lt;?php the_ID(); ?&gt; class="post row&lt;?php echo $row; ?&gt;"&gt;<br />
&lt;?php //output all post related data, i.e. date, title, content/excerpt, postmetadata, tags, etc. // ?&gt;<br />
&lt;/div&gt; &lt;!--closing .post div --&gt;<br />
<!--formatted--></code></p>
<p>6. page navigation:<br />
<code>&lt;div class="navigation"&gt;<br />
&lt;div class="alignleft"&gt;&lt;?php next_posts_link('&amp;laquo; Older Entries') ?&gt;&lt;/div&gt;<br />
&lt;div class="alignright"&gt;&lt;?php previous_posts_link('Newer Entries &amp;raquo;') ?&gt;&lt;/div&gt;<br />
&lt;/div&gt;<br />
<!--formatted--></code></p>
<p>here is the full code:</p>
<div style="border: 2px solid #ffffff; height: 300px; overflow-y: auto;"><code>&lt;?php get_header(); ?&gt;<br />
&lt;?php<br />
// code to display a number of posts in multi columns top-to-bottom left-to-right<br />
?&gt;<br />
&lt;?php global $query_string; ?&gt;<br />
&lt;?php<br />
$set_number_of_columns = 2; // enter numbers of columns here;<br />
$set_number_of_rows = 4; // enter numbers of rows here<br />
$set_showpost = $set_number_of_columns * $set_number_of_rows ;<br />
//setup query with parameter for paged<br />
$paged = (get_query_var('paged')) ? get_query_var('paged') : 1;<br />
query_posts($query_string.'&amp;showposts='.$set_showpost.'&amp;paged='.$paged);<br />
// get number of posts for this,<br />
$num_of_posts = $wp_query-&gt;post_count;<br />
// make adjustment for paged to get three equaly long columns even on last paged page<br />
// divide by $set_number_of_columns to get number per column,<br />
// round up to next integer to make $ppc posts per column variable, or $set_number_of_rows whatever is smaller<br />
$ppc = min(ceil($num_of_posts/$set_number_of_columns),$set_number_of_rows);<br />
// calculates number of rows, i.e. showposts for the following query_posts and get_posts<br />
?&gt;<br />
&lt;?php for ( $col = 1; $col &lt;= $set_number_of_columns; $col += 1) { ?&gt;<br />
&lt;div class="col&lt;?php echo $col;?&gt;"&gt;<br />
&lt;?php<br />
$row = 1;<br />
$noffset = ($col -1) * $ppc + ($paged - 1) * $set_showpost ; //calculate offset parameter if paged<br />
$posts = get_posts($query_string.'&amp;numberposts='.$ppc.'&amp;offset='.$noffset);<br />
foreach ($posts as $post) : start_wp(); ?&gt;<br />
&lt;div id="post-&lt;?php the_ID(); ?&gt;" class="post row-&lt;?php echo ($row%2); ?&gt;"&gt;<br />
&lt;!-- start of anything to do with post --&gt;<br />
&lt;h2&gt;<br />
&lt;a href="&lt;?php the_permalink() ?&gt;" rel="bookmark"&gt;&lt;?php the_title(); ?&gt;&lt;/a&gt;&lt;/h2&gt;<br />
&lt;div class="storycontent"&gt;<br />
&lt;?php the_excerpt(__('(more...)')); ?&gt;<br />
&lt;/div&gt;<br />
&lt;!-- end of anything to do with post --&gt;<br />
&lt;/div&gt; &lt;!-- end #post --&gt;<br />
&lt;?php<br />
$row++;<br />
endforeach; ?&gt;<br />
&lt;/div&gt;<br />
&lt;?php } ?&gt;<br />
&lt;?php // close the for-loop // ?&gt;<br />
&lt;div class="navigation"&gt;<br />
&lt;div class="alignleft"&gt;&lt;?php next_posts_link('&amp;laquo; Older Entries') ?&gt;&lt;/div&gt;<br />
&lt;div class="alignright"&gt;&lt;?php previous_posts_link('Newer Entries &amp;raquo;') ?&gt;&lt;/div&gt;<br />
&lt;/div&gt;<br />
&lt;?php get_footer(); ?&gt;<br />
<!--formatted--></code></div>
<p>the naming of the css classes is:<br />
class .col1 for the first column; class .col2 for the second column; and so forth.<br />
same thing for the rows: class .row1 for the posts in first row, on so on.<br />
going with this code is the css:<br />
<code>.col1, .col2 {float:left; width:49%; }</code></p>
<p>you can see the code in action: under <strong>pages </strong><a href="http://www.transformationpowertools.com/wordpress/grid-posts">&#8216;grid of posts&#8217;</a>.<br />
the effect ia achieved by giving each post a fixed height; and using a bit of javascript trickery.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.transformationpowertools.com/wordpress/multi-column-wordpress-template/feed</wfw:commentRss>
		<slash:comments>13</slash:comments>
		</item>
		<item>
		<title>WordPress as a Model of Human Consciousness</title>
		<link>http://www.transformationpowertools.com/wordpress/wordpress-as-a-model-of-human-consciousness</link>
		<comments>http://www.transformationpowertools.com/wordpress/wordpress-as-a-model-of-human-consciousness#comments</comments>
		<pubDate>Wed, 29 Jul 2009 12:40:36 +0000</pubDate>
		<dc:creator>dr michael</dc:creator>
				<category><![CDATA[Personal Development]]></category>
		<category><![CDATA[consciousness]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[human]]></category>
		<category><![CDATA[human mind]]></category>
		<category><![CDATA[mind and ego]]></category>
		<category><![CDATA[model]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[subconsciousness]]></category>
		<category><![CDATA[Wordpress]]></category>

		<guid isPermaLink="false">http://www.transformationpowertools.com/wordpress/?p=50</guid>
		<description><![CDATA[Many researchers of the human mind have already tried to explain some aspects of the workings of the mind and ego by analogy of a computer.
This holds true also for an open source program such as wordpress.
I will put it this way: the wordpress software, ie. the core program, is the subconsciousness. We know it is there, but generally we are not aware of it and don&#8217;t understand how it works. And, unless something goes  ... &#187; <small><a href="http://www.transformationpowertools.com/wordpress/wordpress-as-a-model-of-human-consciousness">read more</a></small> &#187;]]></description>
			<content:encoded><![CDATA[<p><img class="alignright size-full wp-image-55" title="matrix" src="http://www.transformationpowertools.com/wordpress/wp-content/uploads/2009/07/matrix.jpg" alt="matrix" width="75" height="502" />Many researchers of the human mind have already tried to explain some aspects of the workings of the mind and ego by analogy of a computer.</p>
<p>This holds true also for an open source program such as wordpress.</p>
<p>I will put it this way: the wordpress software, ie. the core program, is the subconsciousness. We know it is there, but generally we are not aware of it and don&#8217;t understand how it works. And, unless something goes wrong, we don&#8217;t really want to know.</p>
<p>And in a way, you could see that all the programmers and organizers of wordpress.org  as an open source software  are a kind of  &#8217;creator&#8217; who is well above all and who has put all this out for us to work with. This is not unlike some interpretation of G.O.D. (greater organized design) who made us but also gave us the freedom and intelligence to change the program.</p>
<p>Now, there a many many thousands of blogs out there, using wordpress.org software to program there own way of expression.</p>
<p>What every blog software does, is to take a lot of input in (the posts, pages, articles, pictures and so) and arrange and present them in a way that is personal and special for the individual (programmer).<br />
<span id="more-50"></span><br />
In wordpress, these are the php-files, such as index.php, single.php, functions.php, comments.php, and so on.</p>
<p>This is analogue to the conscious mind which does exactly the same &#8211; gathering input (through our senses), storing it (memory),  sorting it, and creating specific output, based on a hidden program.</p>
<p>The &#8216;sorting program&#8217; is build upon past experiences, ways we accepted from our parents, teachers, the society, religion, and so forth.</p>
<p>Think of the primary output as the HTML code that is generated by the wordpress php files. If you look at that on a screen, it seems pretty &#8216;bland&#8217;, uniform, not very interesting.</p>
<p>This is where the themes of wordpress come in: they individualize the output in a way that is again personal to the individual designing them. They add the CSS styles, and make the output colorful, creative, enjoyable (or not, if you don&#8217;t like the theme).</p>
<p>(Look up <a href="http://www.csszengarden.com/" target="_blank">CSS Zen Garden </a>if you are not familiar with css.)</p>
<p>Again, i like to compare this to the human mind. The ego will use its &#8216;css style sheet&#8217; and &#8216;color&#8217; any message it receives from the mind, and will give it an individual meaning.</p>
<p>Just present a piece of information to a group of people and watch how they react &#8211; you can be sure to get a whole range of different reactions.</p>
<p>The good thing with this model is, that we have the power and opportunity to change the programs, the php files, the themes, the css at any time.</p>
<p>As a programmer &#8211; and we all are our own programmers ! (even if we don&#8217;t like the programming results) &#8211; you can adapt the wordpress files, change your theme, and tweak the style sheets at any time.</p>
<p>This is the fantastic opportunity when you host your own wordpress blog (ie. when you are an individual in control of your life), it gives you control over &#8216;consciousness, mind, and ego&#8217;, to stay within the model.</p>
<p>Those who run the free blogs on wordpress.com, on the contrary, have not this level of control. They have to use what they get offered by somebody else (ie. the makers of wordpress.com, the filter programs that filter all the html input in the posts, the providers of the free themes you can choose from, and so on). They have a limited choice of  &#8216;conscious decisions&#8217;, &#8216;ways of expression&#8217;, &#8216;influence&#8217;.</p>
<p>Sounds very familiar with real life, where the expression of the &#8216;masses&#8217; are pre-programmed and limited by a small elite (tv and media, politicians, church, tradition, teachers, &#8230;).</p>
<p>Coming back to the beginning of this post, where I compared the wordpress software with the subconsciousness, I hold the vision that when enough conscious people (programmers) join and work together, they can change the very core programming of the consciousness, the subconsciousness of mankind &#8211; also known as &#8216;common consciousness&#8217;.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.transformationpowertools.com/wordpress/wordpress-as-a-model-of-human-consciousness/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
