<?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>Thesis Hacker &#187; rotating images or text</title>
	<atom:link href="http://www.thesishacker.com/category/rotating-images-or-text/feed" rel="self" type="application/rss+xml" />
	<link>http://www.thesishacker.com</link>
	<description>Customize Thesis</description>
	<lastBuildDate>Thu, 21 May 2009 16:22:45 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.6</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Really easy way to have random rotating images</title>
		<link>http://www.thesishacker.com/really-easy-way-to-have-random-rotating-images</link>
		<comments>http://www.thesishacker.com/really-easy-way-to-have-random-rotating-images#comments</comments>
		<pubDate>Mon, 27 Apr 2009 14:20:38 +0000</pubDate>
		<dc:creator>Nasty</dc:creator>
				<category><![CDATA[images]]></category>
		<category><![CDATA[rotating images or text]]></category>
		<category><![CDATA[image]]></category>
		<category><![CDATA[rotate]]></category>
		<category><![CDATA[rotating images]]></category>

		<guid isPermaLink="false">http://www.thesishacker.com/?p=1741</guid>
		<description><![CDATA[You can have random rotating images in your multimedia box, feature box, widgets, or if you really want to have freedom, you can  learn how to make your own custom multimedia box and place them in it.
We&#8217;re going to rotate the images with a little php code. In order to do this we need [...]]]></description>
			<content:encoded><![CDATA[<p>You can have random rotating images in your multimedia box, feature box, widgets, or if you really want to have freedom, you can <a href="http://www.thesishacker.com/make-your-own-multimedia-box"> learn how to make your own custom multimedia box</a> and place them in it.</p>
<p>We&#8217;re going to rotate the images with a little php code. In order to do this we need to first prepare the images to be rotated by renaming them. Get all the images to be rotated and rename them with numbers. This works with png, jpg, gif, tiff, etc. For example&#8230;</p>
<p>image1.png<br />
image2.png<br />
image3.png</p>
<p>OR</p>
<p>image-1.png<br />
image-2.png<br />
image-3.png</p>
<p>OR</p>
<p>1.png<br />
2.png<br />
3.png</p>
<p>You get the idea? Get all the images you want rotated in a group, rename them with numbers starting with 1, increment by 1, and proceed in order to the total number of images in the group</p>
<p>Upload all the images to the proper directory</p>
<p>Let&#8217;s say, for example, you uploaded the images to a folder named &#8220;random&#8221;. You are using the image-n.png format where n equals the number of the image. Here&#8217;s the path that we&#8217;ll use for this example&#8230;</p>
<p class="alert">&lt;img src=&quot;http://www.yoursite.com/folder/random/image-n.png&quot; /&gt;</p>
<p>Now here is the php code that is going to replace n with a random number from 1 to the total number of images there is, in this case, 3</p>
<p class="alert">&lt;?php echo rand(1,n); ?&gt;</p>
<p>The whole code comes together like this&#8230;</p>
<p class="alert">&lt;img src=&quot;http://www.yoursite.com/folder/random/image-&lt;?php echo rand(1,n); ?&gt;.png&quot; /&gt;</p>
<p>That&#8217;s about the simplest way to get random rotating images</p>
]]></content:encoded>
			<wfw:commentRss>http://www.thesishacker.com/really-easy-way-to-have-random-rotating-images/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Rotating random text on every post or page</title>
		<link>http://www.thesishacker.com/rotating-random-text-on-every-post-or-page</link>
		<comments>http://www.thesishacker.com/rotating-random-text-on-every-post-or-page#comments</comments>
		<pubDate>Thu, 15 Jan 2009 23:15:42 +0000</pubDate>
		<dc:creator>Nasty</dc:creator>
				<category><![CDATA[header]]></category>
		<category><![CDATA[rotating images or text]]></category>
		<category><![CDATA[text]]></category>
		<category><![CDATA[absolute postitioning]]></category>
		<category><![CDATA[random]]></category>
		<category><![CDATA[rotating random text]]></category>
		<category><![CDATA[thesis]]></category>
		<category><![CDATA[wordpress]]></category>
		<category><![CDATA[wp]]></category>
		<category><![CDATA[z-index]]></category>

		<guid isPermaLink="false">http://www.thesishacker.com/?p=315</guid>
		<description><![CDATA[If you look at the header in this site you'll notice that every time you go to a new post or page, the quotes at the top left keep changing.  You can do this with any type of text.]]></description>
			<content:encoded><![CDATA[<p>If you look at the header in this site you&#8217;ll notice that every time you go to a new post or page, the quotes in the header at the top left keep changing.  You can do this with any type of text.  To put it in the header you can follow this tutorial&#8230;</p>
<p>First, download the <a href="http://www.zombierobot.com/wp-quotes">Random Quote plugin here</a> and follow the directions from their website to install it</p>
<p>If you have the Thesis OpenHook plugin installed go the &#8220;header&#8221; box and drop this code in&#8230;</p>
<p class="alert">&lt;?php<br />
wp_quotes_random();<br />
?&gt;</p>
<p>Make sure to check the box to run PHP</p>
<p>You can drop that code in any box in the Thesis OpenHook plugin</p>
<p>Next go to WP Admin area&#8212;&gt;Posts&#8212;&gt; Qutoes and follow the directions to add your own custom text</p>
<p>If you not using the OpenHook plugin, in your custom_functions.php file add this code. You can put it anywhere you want but I recommend putting it at the top after the &lt;?php tag. Always describe the function and put it between the comment tags /*  */ at the beginning shown below in green. The comments aren’t shown on your rendered page and it just makes things easier for you to remember…</p>
<p class="alert"><span style="color: #339966;">/*random text on every post or page*/</span><br />
function name-your-function () {<br />
wp_quotes_random();<br />
}<br />
add_action: (&#8217;thesis_hook_header&#8217;, &#8216;name-your-function&#8217;);</p>
<p>You can add this any place else, <a href="http://www.thesishacker.com/?page_id=298">use the hook map </a>to see your options</p>
<p>An important note about the header in Thesis Hacker.  It contains clickable image maps and to give you a theory of how I built it go <a href="http://www.thesishacker.com/?p=194">here</a>.  This is important for <em>this particular way</em> of placing this plugin.  You can place this plugin anywhere you want on your site but to put it in a header that has clickable image maps this is a great way of doing it&#8230;</p>
<h3>Here&#8217;s the code I put in my <em>custom_functions.php </em>file</h3>
<p class="alert">function my_function() { ?&gt;<br />
&lt;div id =&#8221;imagemap_header&#8221; &gt;&lt;img src=&#8221;&lt;?php bloginfo(&#8217;template_directory&#8217;) ?&gt;/custom/images/thesisheader2.png&#8221;  alt=&#8221;clickable header&#8221; /&gt;<br />
&lt;ul&gt;<br />
&lt;li class=&#8221;title&#8221;&gt;<br />
&lt;a href=&#8221;http://www.thesishacker.com/&#8221; title=&#8221;take me back to the home page&#8221;&gt;&lt;/a&gt;<br />
&lt;/li&gt;<br />
&lt;li class=&#8221;rssfeed&#8221;&gt;<br />
&lt;a href=&#8221;http://www.thesishacker.com/?feed=rss2&#8243; title=&#8221;Join and learn&#8221;&gt;&lt;/a&gt;<br />
&lt;/li&gt;<br />
&lt;li id=&#8221;<span style="color: #ff0000;">wp_quotes</span>&#8220;&gt;&lt;/li&gt;<br />
&lt;/ul&gt;<br />
&lt;/div&gt;<br />
&lt;?php }<br />
remove_action ( &#8216;thesis_hook_header&#8217;,'thesis_default_header&#8217;);<br />
add_action (&#8217;thesis_hook_header&#8217;, &#8216;my_function&#8217;);</p>
<p>All i did was add another <em>list item</em> or <em>li</em> to my old header function, and gave it an id of <em>wp_quotes</em></p>
<h3>Here&#8217;s what I put in my <em>custom.css</em> file&#8230;</h3>
<p class="alert">.custom #imagemap_header {<br />
width: 950px;<br />
height: 190px;<br />
position: relative;<br />
}<br />
.custom #imagemap_header ul {<br />
margin: 0;<br />
padding: 0px;<br />
list-style: none;<br />
}<br />
.custom #imagemap_header .title a {<br />
position: absolute;<br />
width: 493px;<br />
height: 140px;<br />
top: 47px;<br />
left: 235px;<br />
}<br />
.custom #imagemap_header .rssfeed a {<br />
position: absolute;<br />
width: 120px;<br />
height: 33px;<br />
top: 136px;<br />
right: 50px;<br />
}<br />
.custom #wp_quotes {<br />
position: <span style="color: #ff0000;">absolute</span>;<br />
width: 10em;<br />
<span style="color: #ff0000;"> z-index: 1;</span><br />
font-size: 155%;<br />
font-style: italic;<br />
}</p>
<p>Again, all I did here was to add the last chunk of code to my existing styles for my header.  I gave <em>#wp_quotes</em> a position of <em>absolute </em>so that I could move it around freely within the <em>#imagemap_header.</em> I gave it a <em>z-index</em> of 1 so that it would lay on top of everything else and not be cut off  if I moved it close to the <em>thesis hacker</em> image field or the <em>subscribe </em>image field.</p>
<p>For more on the z-index <a href="http://www.w3schools.com/Css/pr_pos_z-index.asp">go here</a></p>
<p>For more on absolute positioning <a href="http://www.w3schools.com/Css/pr_class_position.asp">go here</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.thesishacker.com/rotating-random-text-on-every-post-or-page/feed</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
	</channel>
</rss>

