<?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/"
	xmlns:creativeCommons="http://backend.userland.com/creativeCommonsRssModule"
>

<channel>
	<title>Softinquiry &#187; scripts</title>
	<atom:link href="http://softinquiry.com/category/scripts/feed" rel="self" type="application/rss+xml" />
	<link>http://softinquiry.com</link>
	<description>A blog where I share my knowledge about software</description>
	<lastBuildDate>Wed, 11 Aug 2010 11:51:45 +0000</lastBuildDate>
	
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<creativeCommons:license>http://creativecommons.org/licenses/by-nc-nd/3.0/us/</creativeCommons:license>
		<item>
		<title>Save your code snippets with Snippely</title>
		<link>http://softinquiry.com/save-your-code-snippets-with-snippely.html</link>
		<comments>http://softinquiry.com/save-your-code-snippets-with-snippely.html#comments</comments>
		<pubDate>Fri, 24 Jul 2009 12:16:36 +0000</pubDate>
		<dc:creator>Dan</dc:creator>
				<category><![CDATA[css]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[programs]]></category>
		<category><![CDATA[scripts]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[html]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[snippet]]></category>

		<guid isPermaLink="false">http://softinquiry.com/save-your-code-snippets-with-snippely.html</guid>
		<description><![CDATA[I am currently waiting for FeedReader to finish downloading some enclosures from a feed I am subscribed to. In the meanwhile I though it would be nice letting you know what a great tool Snippely is. Though it is in its developing stage it comes handy for all developers, designers, etc. out there that have [...]]]></description>
			<content:encoded><![CDATA[<p>I am currently waiting for FeedReader to finish downloading some enclosures from a feed I am subscribed to. In the meanwhile I though it would be nice letting you know what a great tool Snippely is. Though it is in its developing stage it comes handy for all developers, designers, etc. out there that have a piece of code and want to store it somewhere so that it will be accessible later when needed. It is incredibly simple and straight forward: it lets you create some groups and in those groups you can add snippets. A snippet will have two main parts: the actual code and the note. It has a built in feature for applying different syntax highlighting for PHP, CSS, Ruby and JavaScript. So, as I said it is pretty straight forward and due to its minimalistic interface looks quite nice.</p>
<p>However, it misses a search function, as well as a import/export option. Of course it would have been awesome for it to be able to store the snippets on the web so that they would be accessible for you by using an account or such. Unfortunately it lacks the HTML syntax coloring. Of course there is a lot of work on it still but thankfully it is out there for us to enjoy so let’s be patient with the developers.</p>
<p>Oh, and by the way, to make up for that import/export thing you could do it manually by following the path to the SQLite database file:
<p><em>&#8220;C:\Users\Username\AppData\Roaming\com.snippely.xxx\Local Store\application.db&#8221;</em>. And there you have it; you can now be assured that your precious snippets won’t be lost if you decide to work on another computer or any other scenario.</p><p style="float: left;"><script type="text/javascript"><!--
google_ad_client = "pub-1748898260032517";
/* posts bottom */
google_ad_slot = "5672038516";
google_ad_width = 468;
google_ad_height = 60;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script></p></p>
<p>Here are some screenshots to help you make an impression:</p>
<p><a href="http://softinquiry.com/wp-content/uploads/2009/07/fullscreencapture724200932800pmbmp.jpg" target="_blank"><img style="border-top-width: 0px; display: inline; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" title="Fullscreen capture 7242009 32800 PM.bmp" src="http://softinquiry.com/wp-content/uploads/2009/07/fullscreencapture724200932800pmbmp-thumb.jpg" border="0" alt="Fullscreen capture 7242009 32800 PM.bmp" width="244" height="187" /></a> <a href="http://softinquiry.com/wp-content/uploads/2009/07/fullscreencapture724200932817pmbmp.jpg" target="_blank"><img style="border-top-width: 0px; display: inline; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" title="Fullscreen capture 7242009 32817 PM.bmp" src="http://softinquiry.com/wp-content/uploads/2009/07/fullscreencapture724200932817pmbmp-thumb.jpg" border="0" alt="Fullscreen capture 7242009 32817 PM.bmp" width="244" height="187" /></a> <a href="http://softinquiry.com/wp-content/uploads/2009/07/fullscreencapture724200932828pmbmp.jpg" target="_blank"><img style="border-top-width: 0px; display: inline; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" title="Fullscreen capture 7242009 32828 PM.bmp" src="http://softinquiry.com/wp-content/uploads/2009/07/fullscreencapture724200932828pmbmp-thumb.jpg" border="0" alt="Fullscreen capture 7242009 32828 PM.bmp" width="244" height="186" /></a> <a href="http://softinquiry.com/wp-content/uploads/2009/07/fullscreencapture724200932839pmbmp.jpg" target="_blank"><img style="border-top-width: 0px; display: inline; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" title="Fullscreen capture 7242009 32839 PM.bmp" src="http://softinquiry.com/wp-content/uploads/2009/07/fullscreencapture724200932839pmbmp-thumb.jpg" border="0" alt="Fullscreen capture 7242009 32839 PM.bmp" width="244" height="185" /></a> <a href="http://softinquiry.com/wp-content/uploads/2009/07/fullscreencapture724200932916pmbmp.jpg" target="_blank"><img style="border-top-width: 0px; display: inline; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" title="Fullscreen capture 7242009 32916 PM.bmp" src="http://softinquiry.com/wp-content/uploads/2009/07/fullscreencapture724200932916pmbmp-thumb.jpg" border="0" alt="Fullscreen capture 7242009 32916 PM.bmp" width="244" height="190" /></a></p>
<p>Download: <a title="http://code.google.com/p/snippely/downloads/list" href="http://code.google.com/p/snippely/downloads/list">http://code.google.com/p/snippely/downloads/list</a></p>
<img src="http://softinquiry.com/?ak_action=api_record_view&id=302&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://softinquiry.com/save-your-code-snippets-with-snippely.html/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
	<creativeCommons:license>http://creativecommons.org/licenses/by-nc-nd/3.0/us/</creativeCommons:license>
	</item>
		<item>
		<title>Best way to inspect dead links using your 404 page</title>
		<link>http://softinquiry.com/best-way-to-inspect-dead-links-using-your-404-page.html</link>
		<comments>http://softinquiry.com/best-way-to-inspect-dead-links-using-your-404-page.html#comments</comments>
		<pubDate>Sat, 18 Apr 2009 07:43:08 +0000</pubDate>
		<dc:creator>Dan</dc:creator>
				<category><![CDATA[php]]></category>
		<category><![CDATA[scripts]]></category>
		<category><![CDATA[tips and tricks]]></category>
		<category><![CDATA[wordpress]]></category>
		<category><![CDATA[404]]></category>
		<category><![CDATA[dead links]]></category>
		<category><![CDATA[error]]></category>

		<guid isPermaLink="false">http://softinquiry.com/?p=271</guid>
		<description><![CDATA[I searched for some instructions on how to easily find dead links on my blog. I found some plugins that do just that but instead of using a plugin to do it why not use this cool method that can also provide you with a custom 404 page ?
The WordPress Codex directory is way cool [...]]]></description>
			<content:encoded><![CDATA[<p style="text-align: center;"><script type="text/javascript"><!--
google_ad_client = "pub-1748898260032517";
/* posts bottom */
google_ad_slot = "5672038516";
google_ad_width = 468;
google_ad_height = 60;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script></p><p><center><img class="aligncenter size-medium wp-image-272" title="404" src="http://softinquiry.com/wp-content/uploads/2009/04/404-300x123.jpg" alt="404" width="300" height="123" /></center><br />I searched for some instructions on how to easily find dead links on my blog. I found some plugins that do just that but instead of using a plugin to do it why not use this cool method that can also provide you with a custom 404 page ?</p>
<p>The WordPress Codex directory is way cool and it is maybe one of the best wordpress resources out there. Here&#8217;s the link that interests us in particular: <a title="Creating an error 404 page" href="http://codex.wordpress.org/Creating_an_Error_404_Page" target="_blank">Creating an Error 404 Page</a>. You just need to create a 404.php file in your theme directory (in case you don&#8217;t already have one). Put the following code in it and customize aiding yourself with the comments:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
</pre></td><td class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?php</span> get_header<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>
   &lt;div id=&quot;post-entry&quot;&gt;
     &lt;h1&gt;Whoops !&lt;/h1&gt;
	     &lt;div class=&quot;post-content&quot;&gt;
	     	&lt;p&gt;You 
				<span style="color: #000000; font-weight: bold;">&lt;?php</span>
				<span style="color: #666666; font-style: italic;">#some variables for the script to use
</span>				<span style="color: #666666; font-style: italic;">#if you have some reason to change these, do.  but wordpress can handle it
</span>				<span style="color: #000088;">$adminemail</span> <span style="color: #339933;">=</span> get_bloginfo<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'admin_email'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #666666; font-style: italic;">#the administrator email address, according to wordpress
</span>				<span style="color: #000088;">$website</span> <span style="color: #339933;">=</span> get_bloginfo<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'url'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #666666; font-style: italic;">#gets your blog's url from wordpress
</span>				<span style="color: #000088;">$websitename</span> <span style="color: #339933;">=</span> get_bloginfo<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'name'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #666666; font-style: italic;">#sets the blog's name, according to wordpress
</span>				
				  <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #339933;">!</span><span style="color: #990000;">isset</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$_SERVER</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'HTTP_REFERER'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
				    <span style="color: #666666; font-style: italic;">#politely blames the user for all the problems they caused
</span>				        <span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">&quot;tried going to &quot;</span><span style="color: #339933;">;</span> <span style="color: #666666; font-style: italic;">#starts assembling an output paragraph
</span>					<span style="color: #000088;">$casemessage</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;All is not lost!&quot;</span><span style="color: #339933;">;</span>
				  <span style="color: #009900;">&#125;</span> <span style="color: #b1b100;">elseif</span> <span style="color: #009900;">&#40;</span><span style="color: #990000;">isset</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$_SERVER</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'HTTP_REFERER'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
				    <span style="color: #666666; font-style: italic;">#this will help the user find what they want, and email me of a bad link
</span>					<span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">&quot;clicked a link to&quot;</span><span style="color: #339933;">;</span> <span style="color: #666666; font-style: italic;">#now the message says You clicked a link to...
</span>				        <span style="color: #666666; font-style: italic;">#setup a message to be sent to me
</span>					<span style="color: #000088;">$failuremess</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;A user tried to go to <span style="color: #006699; font-weight: bold;">$website</span>&quot;</span>
				        <span style="color: #339933;">.</span><span style="color: #000088;">$_SERVER</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'REQUEST_URI'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">.</span><span style="color: #0000ff;">&quot; and received a 404 (page not found) error. &quot;</span><span style="color: #339933;">;</span>
					<span style="color: #000088;">$failuremess</span> <span style="color: #339933;">.=</span> <span style="color: #0000ff;">&quot;It wasn't their fault, so try fixing it.  
				        They came from &quot;</span><span style="color: #339933;">.</span><span style="color: #000088;">$_SERVER</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'HTTP_REFERER'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
					<span style="color: #990000;">mail</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$adminemail</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">&quot;Bad Link To &quot;</span><span style="color: #339933;">.</span><span style="color: #000088;">$_SERVER</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'REQUEST_URI'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">,</span>
				        <span style="color: #000088;">$failuremess</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">&quot;From: <span style="color: #006699; font-weight: bold;">$websitename</span> &lt;noreply@<span style="color: #006699; font-weight: bold;">$website</span>&gt;&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #666666; font-style: italic;">#email you about problem
</span>					<span style="color: #000088;">$casemessage</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;An administrator has been emailed 
				        about this problem, too.&quot;</span><span style="color: #339933;">;</span><span style="color: #666666; font-style: italic;">#set a friendly message
</span>				  <span style="color: #009900;">&#125;</span>
				  <span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">&quot; &quot;</span><span style="color: #339933;">.</span><span style="color: #000088;">$website</span><span style="color: #339933;">.</span><span style="color: #000088;">$_SERVER</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'REQUEST_URI'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span> 
				and it doesn't exist. <span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">echo</span> <span style="color: #000088;">$casemessage</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>  You can click back 
				and try again or try using the search box in the sidebar.
			&lt;/p&gt;
	     &lt;/div&gt;
	&lt;/div&gt;
&nbsp;
&nbsp;
<span style="color: #000000; font-weight: bold;">&lt;?php</span> get_sidebar<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>
<span style="color: #000000; font-weight: bold;">&lt;?php</span> get_footer<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span></pre></td></tr></table></div>

<p>Easy enough ? I think it is an awesome method. At least for testing if not for permanent use. Hope this helps. Oh, and by the way, if you have a large blog be ready to be bombarded with emails generated from this 404 page.</p>
<img src="http://softinquiry.com/?ak_action=api_record_view&id=271&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://softinquiry.com/best-way-to-inspect-dead-links-using-your-404-page.html/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
	<creativeCommons:license>http://creativecommons.org/licenses/by-nc-nd/3.0/us/</creativeCommons:license>
	</item>
		<item>
		<title>WordPress SEO &#8211; optimize your META Keywords &amp; Description manually</title>
		<link>http://softinquiry.com/wordpress-seo-optimize-your-meta-keywords-description-manually.html</link>
		<comments>http://softinquiry.com/wordpress-seo-optimize-your-meta-keywords-description-manually.html#comments</comments>
		<pubDate>Wed, 17 Dec 2008 14:59:45 +0000</pubDate>
		<dc:creator>Dan</dc:creator>
				<category><![CDATA[scripts]]></category>
		<category><![CDATA[wordpress]]></category>
		<category><![CDATA[description]]></category>
		<category><![CDATA[keywords]]></category>
		<category><![CDATA[optimization]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[script]]></category>
		<category><![CDATA[SEO]]></category>

		<guid isPermaLink="false">http://softinquiry.com/?p=198</guid>
		<description><![CDATA[I am a big fan of the &#8220;All In One SEO Pack&#8221; plugin for WordPress. It really helps you make sure your blog is as robot-friendly as it gets. I&#8217;m not going to give any details because this post is not about the AIOSP plugin. I&#8217;m loving the idea of having such great plugins helping [...]]]></description>
			<content:encoded><![CDATA[<p>I am a big fan of the &#8220;<a title="All In One SEO Pack" href="http://semperfiwebdesign.com/portfolio/wordpress/wordpress-plugins/all-in-one-seo-pack/" target="_blank">All In One SEO Pack</a>&#8221; plugin for WordPress. It really helps you make sure your blog is as robot-friendly as it gets. I&#8217;m not going to give any details because this post is not about the AIOSP plugin. I&#8217;m loving the idea of having such great plugins helping you with what could easily get a really messy task. On the other hand I like to help out myself and write small pieces of code that give me exactly the results I want without having all sort of third-party plugins doing it for me.</p>
<p>What I will try to do is to have 100% dynamical META keywords and descriptions for every page of the blog without using any plugins.</p>
<p>Let&#8217;s take a look inside the header.php file of your theme for instance. You should see the lines below somewhere in your file however bare in mind that depending on your theme the following lines might be slightly different:</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #339933;">&lt;</span>meta name<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;keywords&quot;</span> content<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;bla,bla,bla&quot;</span> <span style="color: #339933;">/&gt;</span>
<span style="color: #339933;">&lt;</span>meta name<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;description&quot;</span> content<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;bla,bla,bla&quot;</span> <span style="color: #339933;">/&gt;</span></pre></div></div>

<p>Before going any further I should make something clear: the <em>keywords</em> attribute should be relevant to the content of the page. That&#8217;s a must and everyone knows why. So before defining some static keywords blog-wide (I suggest that 8 should be the maximum number of keywords used) in the header.php file that basically define the area covered by your blog (sports, traveling, etc.) you might want to consider the fact that these keywords will be used for all your posts and pages.</p>
<p>A common form for the <em>description</em> attribute is the following:</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;">&lt;meta name=&quot;description&quot; content=&quot;<span style="color: #000000; font-weight: bold;">&lt;?php</span> bloginfo<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'description'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>&quot; /&gt;</pre></div></div>

<p>description which you can easily define in the admin interface. Well, that again doesn&#8217;t serve you any good as the description of your blog might not accurately summarize a certain post (probably none of them).<br />
OK so now we have some static keywords and a general description. Both of them are carried around on your entire blog without actually having something to do with a random particular page. Keywords and description that don&#8217;t match the content of the page ? I don&#8217;t think anyone wants that. That&#8217;s about it with the static keywords and description; problem which I&#8217;ve seen on many blogs.</p>
<p>As we move further I will concentrate more on the <em>keywords</em> attribute and leave the <em>description</em> at the end. I for example have three methods for defining the tags for an article:</p>
<ul>
<li>Using the <em>All In One SEO Pack</em> form that shows up whenever you create/edit an article</li>
<li>Using the built-in <em>Custom Fields</em> form that like <em>AIOSP</em> form shows up right under the WYSIWYG editor</li>
<li>Using the good old <em>Tags</em> form that I&#8217;m sure everyone is familiar with.</li>
</ul>
<p>Of course depending on which plugins you have installed you might have other possibilities of defining tags for a post.</p>
<p>Instead of using some complicated methods to achieve this simple task why not use the already built-in form. You can then call the <em>the_tags()</em> function and have the post&#8217;s tags shown right under its content. Of course that&#8217;s nothing new, everyone is doing it since like forever. OK so why not using those tags as keywords ? Yesterday it sounded like a good idea for me so I said to myself why not try to put those tags as keywords in the header.php file of my theme. What will we accomplish with this ? Well&#8230; nothing much actually except for the fact that all the META keywords will perfectly match the content of any page of my blog.</p>
<p>Enough with this already, let me give you the code that does all the magic.</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
</pre></td><td class="code"><pre class="html" style="font-family:monospace;">&lt;meta name=&quot;keywords&quot; content=&quot;</pre></td></tr></table></div>


<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
</pre></td><td class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?php</span>
<span style="color: #666666; font-style: italic;">//here we make sure that what's to come will affect only the pages that show the article content</span>
 <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span>is_single<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span> 
&nbsp;
<span style="color: #666666; font-style: italic;">//here we call the function that is responsible with passing numerous post attributes (tags, content, etc.)</span>
the_post<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> 
&nbsp;
<span style="color: #666666; font-style: italic;">//here we get the array returned by the function</span>
<span style="color: #000088;">$posttags</span> <span style="color: #339933;">=</span> get_the_tags<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> 
<span style="color: #666666; font-style: italic;">//we make sure that our post has tags</span>
<span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$posttags</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>  
	<span style="color: #666666; font-style: italic;">//we will use this variable to count how many tags we have</span>
        <span style="color: #000088;">$i</span><span style="color: #339933;">=</span><span style="color: #cc66cc;">0</span><span style="color: #339933;">;</span> 
	<span style="color: #666666; font-style: italic;">//with every loop we will assign each element to the $tag variable </span>
        <span style="color: #b1b100;">foreach</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$posttags</span> <span style="color: #b1b100;">as</span> <span style="color: #000088;">$tag</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span> 
		 <span style="color: #666666; font-style: italic;">//now we will store each keyword into a more friendly array placing a comma after each one</span>
                 <span style="color: #000088;">$str</span><span style="color: #009900;">&#91;</span><span style="color: #000088;">$i</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">=</span><span style="color: #000088;">$tag</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">name</span> <span style="color: #339933;">.</span> <span style="color: #0000ff;">','</span><span style="color: #339933;">;</span> 
		 <span style="color: #666666; font-style: italic;">//here we make sure the first keyword won't be overwritten with the next keyword</span>
                <span style="color: #000088;">$i</span><span style="color: #339933;">++;</span>
	<span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#125;</span>
<span style="color: #666666; font-style: italic;">//here we will store the length of the last word</span>
<span style="color: #000088;">$len</span><span style="color: #339933;">=</span><span style="color: #990000;">strlen</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$str</span><span style="color: #009900;">&#91;</span><span style="color: #000088;">$i</span><span style="color: #339933;">-</span><span style="color: #cc66cc;">1</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #666666; font-style: italic;">//here we will make sure that the comma after the last keyword is removed so that we have a tidy keyword list</span>
<span style="color: #000088;">$str</span><span style="color: #009900;">&#91;</span><span style="color: #000088;">$i</span><span style="color: #339933;">-</span><span style="color: #cc66cc;">1</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">=</span><span style="color: #990000;">substr</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$str</span><span style="color: #009900;">&#91;</span><span style="color: #000088;">$i</span><span style="color: #339933;">-</span><span style="color: #cc66cc;">1</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">,</span><span style="color: #cc66cc;">0</span><span style="color: #339933;">,</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$len</span><span style="color: #339933;">-</span><span style="color: #cc66cc;">1</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> 
&nbsp;
 <span style="color: #666666; font-style: italic;">//here we will simply output the list of keywords in its final state</span>
<span style="color: #b1b100;">for</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$k</span><span style="color: #339933;">=</span><span style="color: #cc66cc;">0</span><span style="color: #339933;">;</span> <span style="color: #000088;">$k</span> <span style="color: #339933;">&lt;</span> <span style="color: #000088;">$i</span><span style="color: #339933;">;</span> <span style="color: #000088;">$k</span><span style="color: #339933;">++</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span> 
	<span style="color: #b1b100;">echo</span> <span style="color: #000088;">$str</span><span style="color: #009900;">&#91;</span><span style="color: #000088;">$k</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#125;</span>
<span style="color: #666666; font-style: italic;">//if this is not an article page then use those predefined home keywords</span>
<span style="color: #b1b100;">else</span> 
<span style="color: #009900;">&#123;</span>
<span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">&quot;here will go the keywords matching your home page&quot;</span><span style="color: #339933;">;</span><span style="color: #009900;">&#125;</span> 
<span style="color: #000000; font-weight: bold;">?&gt;</span></pre></td></tr></table></div>


<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>39
</pre></td><td class="code"><pre class="php" style="font-family:monospace;"><span style="color: #0000ff;">&quot; /&gt;</span></pre></td></tr></table></div>

<p>Due to a tricky set of instructions in <a title="GeSHi - Generic Syntax Highlighter" href="http://qbnz.com/highlighter/" target="_blank">GeSHi</a> I had to split the code into those three blocks above. The line numbering however is correct so you should assemble the code easily.</p>
<p>Now that you copied the code above into your header.php file you will see that your articles aren&#8217;t showing up on their pages. Why is that ? Because you didn&#8217;t call <em>the_post()</em> function in a proper loop. Actually there&#8217;s no loop at all there. The actual loop used for displaying the post&#8217;s content is in your single.php file. Now we have to undo all the &#8220;damage&#8221; we caused. Don&#8217;t worry, nothing bad happened. All you need to do is to place the following code before your loop (if you don&#8217;t know what <em>the loop</em> is, <a title="The Loop" href="http://codex.wordpress.org/The_Loop" target="_blank">here&#8217;s</a> an explanation):</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?php</span> rewind_posts<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span></pre></div></div>

<p>There you go ! Now everything should be working again. </p>
<p>This might not be a viable solution for some of you out there but for me it definitely does the trick. I&#8217;m sure that some of you who are advanced PHP programmers will find or already know a simpler method for what I&#8217;ve accomplished here. Hopefully the commented lines will help you understand the code and not get in your way while trying to understand it.</p>
<p>As I promised I will now offer a variant of generating the <em>description</em> attribute entirely dynamic, again strictly based on the post page. I thought that a good <em>description</em> would be an actual excerpt of the article. It&#8217;s more like a preview after all. The default excerpt (if you don&#8217;t write a specific one in the <em>Excerpt</em> box under the WYSIWYG editor) contains the first 55 words of your article. No HTML tags, no nothing, just plain text (well, not actually). So what I&#8217;ve accomplished is to have a specific, unique description, again for each and every page of my blog. Here is the code:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
</pre></td><td class="code"><pre class="html" style="font-family:monospace;">&lt;meta name=&quot;description&quot; content=&quot;</pre></td></tr></table></div>


<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>2
3
4
5
6
7
8
9
10
11
12
13
</pre></td><td class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?php</span>
<span style="color: #666666; font-style: italic;">//we make sure that what's to come will affect only pages that show the article content</span>
<span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span>is_single<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
<span style="color: #666666; font-style: italic;">//here we will store the real &quot;tagless&quot; output of the excerpt</span>
<span style="color: #000088;">$excerpt</span> <span style="color: #339933;">=</span> <span style="color: #990000;">strip_tags</span><span style="color: #009900;">&#40;</span>get_the_excerpt<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        <span style="color: #666666; font-style: italic;">//and of course here we will output the final excerpt </span>
        <span style="color: #b1b100;">echo</span> <span style="color: #000088;">$excerpt</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
<span style="color: #666666; font-style: italic;">//in case we are on the home page for instance we will display the default description</span>
<span style="color: #b1b100;">else</span><span style="color: #009900;">&#123;</span>
bloginfo<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'description'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span><span style="color: #000000; font-weight: bold;">?&gt;</span></pre></td></tr></table></div>


<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>14
</pre></td><td class="code"><pre class="html" style="font-family:monospace;">&quot; /&gt;</pre></td></tr></table></div>

<p>Again, be advised of the code splitting I had to do. Because we called <em>the_post()</em> function in the <em>keywords</em> attribute (which in this case has to be before the <em>description</em> attribute) we don&#8217;t need to apply &#8220;the fix&#8221; again in the single.php file. However if you want to try only the code that affects the <em>description</em> then you will need to call <em>the_post()</em> function right after <em>is_single()</em> function, exactly as shown in the code related to <em>keywords</em> attribute.</p>
<p>Some would say that this whole thing isn&#8217;t such a big deal but actually it&#8217;s just one idea I had yesterday which I am blogging today. The possibilities are endless. We are limited only by our knowledge and imagination. Please feel free to comment on this idea of mine. You might have something to say that really matters. And as a wrap up, I really hope you enjoyed reading this article and hopefully it will help you in a way or another.</p>
<img src="http://softinquiry.com/?ak_action=api_record_view&id=198&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://softinquiry.com/wordpress-seo-optimize-your-meta-keywords-description-manually.html/feed</wfw:commentRss>
		<slash:comments>9</slash:comments>
	<creativeCommons:license>http://creativecommons.org/licenses/by-nc-nd/3.0/us/</creativeCommons:license>
	</item>
		<item>
		<title>Monetize your search with PredictAd</title>
		<link>http://softinquiry.com/monetize-your-search-with-predictad.html</link>
		<comments>http://softinquiry.com/monetize-your-search-with-predictad.html#comments</comments>
		<pubDate>Sat, 05 Apr 2008 19:34:44 +0000</pubDate>
		<dc:creator>Dan</dc:creator>
				<category><![CDATA[scripts]]></category>
		<category><![CDATA[wordpress]]></category>
		<category><![CDATA[ads]]></category>
		<category><![CDATA[search script]]></category>

		<guid isPermaLink="false">http://softinquiry.com/?p=90</guid>
		<description><![CDATA[Shawn Collins posted an article in which he highlighted the general aspects of PredictAd&#8217;s search solution. With a PredictAd powered search you can basically achieve an interesting goal: provide a well structured, auto-complete search field and earn revenue from some relevant yet non-intrusive pay per click ads which are to be found among the auto-complete [...]]]></description>
			<content:encoded><![CDATA[<p><a title="shawn collins" href="http://blog.affiliatetip.com/" target="_blank">Shawn Collins</a> posted an <a title="shawn collins article" href="http://blog.affiliatetip.com/archives/enhance-and-monetize-your-search/" target="_blank">article</a> in which he highlighted the general aspects of <a title="predictad" href="http://www.predictad.com/sites/signupsteps.aspx?rsid=4446&amp;cs=966" target="_blank">PredictAd</a>&#8217;s search solution. With a PredictAd powered search you can basically achieve an interesting goal: provide a well structured, auto-complete search field and earn revenue from some relevant yet non-intrusive pay per click ads which are to be found among the auto-complete results.</p>
<p>Don&#8217;t think even for a moment that it&#8217;s a big deal to implement PredictAd on your blog. This neat search script can be integrated within your blog in a matter of seconds as it natively supports TypePad, Blogger and  of course WordPress. For example i downloaded the plugin for WordPress (yes, it&#8217;s compatible with WP 2.5), filled in my unique ID and i was ready to go.</p>
<p>PredictAd also generates decent reports regarding search queries and so on. As far as the payment methods, currently they are sending out only checks.</p>
<p>There are numerous customization options available just to provide a seamless integration with the rest of your blog/site. For example, check out my custom search box :)</p>
<p>Feel free to start monetizing your search and <a title="join predictad" href="http://www.predictad.com/sites/signupsteps.aspx?rsid=4446&amp;cs=966" target="_blank">join PredictAd</a>, or if you are an advertiser you can <a title="publish ads" href="http://www.predictad.com/advertisers/signup.aspx?rsid=4446&amp;cs=966" target="_blank">publish ads</a> via their program.</p>
<img src="http://softinquiry.com/?ak_action=api_record_view&id=90&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://softinquiry.com/monetize-your-search-with-predictad.html/feed</wfw:commentRss>
		<slash:comments>4</slash:comments>
	<creativeCommons:license>http://creativecommons.org/licenses/by-nc-nd/3.0/us/</creativeCommons:license>
	</item>
		<item>
		<title>Speed up your WordPress blog with PHP Speedy !</title>
		<link>http://softinquiry.com/speed-up-your-wordpress-blog-with-php-speedy.html</link>
		<comments>http://softinquiry.com/speed-up-your-wordpress-blog-with-php-speedy.html#comments</comments>
		<pubDate>Fri, 21 Mar 2008 13:59:26 +0000</pubDate>
		<dc:creator>Dan</dc:creator>
				<category><![CDATA[php]]></category>
		<category><![CDATA[scripts]]></category>
		<category><![CDATA[wordpress]]></category>
		<category><![CDATA[load time]]></category>
		<category><![CDATA[minify css and js]]></category>
		<category><![CDATA[seed up]]></category>

		<guid isPermaLink="false">http://softinquiry.com/speed-up-you-wordpress-blog-with-php-speedy.html</guid>
		<description><![CDATA[PHP Speedy is a script that minimizes your js and css files in order to reduce your blog&#8217;s load time. If you don&#8217;t believe it check out the links below:

Test page without compression
Test page with compression

As you can see (you might want to check your Net Firebug stats) the page on which PHP Speeedy is [...]]]></description>
			<content:encoded><![CDATA[<p>PHP Speedy is a script that minimizes your js and css files in order to reduce your blog&#8217;s load time. If you don&#8217;t believe it check out the links below:</p>
<ul>
<li><a href="http://aciddrop.com/aciddrop/php_speedy/test_page/compress_me.php?no_images=true&amp;compress=no" title="test page without compression" target="_blank">Test page without compression</a></li>
<li><a href="http://aciddrop.com/aciddrop/php_speedy/test_page/compress_me.php?no_images=true" title="test page with compression" target="_blank">Test page with compression</a></li>
</ul>
<p>As you can see (you might want to check your Net Firebug stats) the page on which PHP Speeedy is activated is displayed a lot more faster ! The same thing applies for a WordPress installation. However if you encounter different problems be sure to refer to the <a href="http://aciddrop.com/2008/03/22/php-speedy-wordpress-plugin-version-04/" title="author's page" target="_blank">author&#8217;s page</a> and have a quick look-up on what&#8217;s to be done if something goes wrong. Leon (the author) seems to be a nice guy and quickly replies to the ones who ask for help or guidance. Keep up the good work Leon !</p>
<p>I recommend setting up a filter and excluding the external javascripts (such as ads, etc) because of the risk that they won&#8217;t show and/or behave normally. A part of feel free to minify your internal css and js files and see how thing work out.</p>
<p class="greybox"><a href="http://aciddrop.com/aciddrop/download/" title="download" target="_blank">Download PHP Speedy for Wordpress or download PHP Speedy standalone version</a><a href="http://aciddrop.com/php-speedy/" title="download standalone php speedy" target="_blank"> </a></p>
<img src="http://softinquiry.com/?ak_action=api_record_view&id=65&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://softinquiry.com/speed-up-your-wordpress-blog-with-php-speedy.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
	<creativeCommons:license>http://creativecommons.org/licenses/by-nc-nd/3.0/us/</creativeCommons:license>
	</item>
		<item>
		<title>Standalone PHP script for displaying random images</title>
		<link>http://softinquiry.com/standalone-php-script-for-displaying-random-images.html</link>
		<comments>http://softinquiry.com/standalone-php-script-for-displaying-random-images.html#comments</comments>
		<pubDate>Wed, 19 Mar 2008 18:37:16 +0000</pubDate>
		<dc:creator>Dan</dc:creator>
				<category><![CDATA[php]]></category>
		<category><![CDATA[scripts]]></category>
		<category><![CDATA[ads rotator]]></category>
		<category><![CDATA[banner rotator]]></category>
		<category><![CDATA[random images]]></category>

		<guid isPermaLink="false">http://softinquiry.com/standalone-php-script-for-displaying-random-images.html</guid>
		<description><![CDATA[What this script basically does is to display random images from a given folder. You can use this script to display some rotating affiliates banners, ads, sponsors banners, or even display a random header for your WordPress blog. Here you have three examples of scripts. The first one displays random pictures, without links, just for [...]]]></description>
			<content:encoded><![CDATA[<p>What this script basically does is to display random images from a given folder. You can use this script to display some rotating affiliates banners, ads, sponsors banners, or even display a random header for your WordPress blog. Here you have three examples of scripts. The first one displays random pictures, without links, just for a given image extension, the second one displays random images with links, also just for a given image extension and the third one displays images with links with all kinds of image extensions.</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
</pre></td><td class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?php</span>
<span style="color: #000088;">$images</span> <span style="color: #339933;">=</span> <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">1</span><span style="color: #339933;">=&gt;</span><span style="color: #cc66cc;">1</span><span style="color: #339933;">,</span> <span style="color: #cc66cc;">2</span><span style="color: #339933;">,</span> <span style="color: #cc66cc;">3</span><span style="color: #339933;">,</span> <span style="color: #cc66cc;">4</span><span style="color: #339933;">,</span> <span style="color: #cc66cc;">5</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #b1b100;">for</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$i</span><span style="color: #339933;">=</span> <span style="color: #cc66cc;">0</span><span style="color: #339933;">;</span> <span style="color: #000088;">$i</span> <span style="color: #339933;">&lt;</span> <span style="color: #cc66cc;">3</span><span style="color: #339933;">;</span> <span style="color: #000088;">$i</span><span style="color: #339933;">++</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
<span style="color: #000088;">$nr</span><span style="color: #009900;">&#91;</span><span style="color: #000088;">$i</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #990000;">array_rand</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$images</span><span style="color: #339933;">,</span><span style="color: #cc66cc;">1</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #990000;">unset</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$images</span><span style="color: #009900;">&#91;</span><span style="color: #000088;">$nr</span><span style="color: #009900;">&#91;</span><span style="color: #000088;">$i</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000000; font-weight: bold;">?&gt;</span>
&lt;img src=&quot;http://images_path/imagename_<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">echo</span> <span style="color: #000088;">$nr</span><span style="color: #009900;">&#91;</span><span style="color: #000088;">$i</span><span style="color: #009900;">&#93;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>.png&quot; width='image_width' height='image_height' alt='image_alt_text' /&gt;
<span style="color: #000000; font-weight: bold;">&lt;?php</span>
<span style="color: #009900;">&#125;</span>
<span style="color: #000000; font-weight: bold;">?&gt;</span></pre></td></tr></table></div>

<p>The above code displays 3 (out of 5) non-duplicate, randomly selected pictures. Unfortunately a disadvantage of this script is that it can only display images of a given extension; in the above case png. Also the images must be named like in the following example: imagename_1, imagename_2, imagename_3 and so on. And of course, you don&#8217;t have the possibility of adding some links to your images.</p>
<p>The next code is pretty much like the above one but this one let&#8217;s you specify some links to your images. &#8220;link1&#8243; is associated to imagename_1.png, &#8220;link2&#8243; to imagename_2.png, etc.</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
</pre></td><td class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?php</span>
<span style="color: #000088;">$images</span> <span style="color: #339933;">=</span> <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">1</span><span style="color: #339933;">=&gt;</span><span style="color: #0000ff;">&quot;link1&quot;</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">&quot;link2&quot;</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">&quot;link3&quot;</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">&quot;link4&quot;</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">&quot;link5&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #b1b100;">for</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$i</span><span style="color: #339933;">=</span> <span style="color: #cc66cc;">0</span><span style="color: #339933;">;</span> <span style="color: #000088;">$i</span> <span style="color: #339933;">&lt;</span> <span style="color: #cc66cc;">3</span><span style="color: #339933;">;</span> <span style="color: #000088;">$i</span><span style="color: #339933;">++</span><span style="color: #009900;">&#41;</span>
<span style="color: #009900;">&#123;</span>
<span style="color: #000088;">$nr</span><span style="color: #009900;">&#91;</span><span style="color: #000088;">$i</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #990000;">array_rand</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$images</span><span style="color: #339933;">,</span><span style="color: #cc66cc;">1</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$link</span><span style="color: #009900;">&#91;</span><span style="color: #000088;">$i</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$images</span><span style="color: #009900;">&#91;</span><span style="color: #000088;">$nr</span><span style="color: #009900;">&#91;</span><span style="color: #000088;">$i</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
<span style="color: #990000;">unset</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$images</span><span style="color: #009900;">&#91;</span><span style="color: #000088;">$nr</span><span style="color: #009900;">&#91;</span><span style="color: #000088;">$i</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000000; font-weight: bold;">?&gt;</span>
&lt;a href=&quot;<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">echo</span> <span style="color: #000088;">$link</span><span style="color: #009900;">&#91;</span><span style="color: #000088;">$i</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>&quot;&gt;
&lt;img src=&quot;http://images_path/imagename_<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">echo</span> <span style="color: #000088;">$nr</span><span style="color: #009900;">&#91;</span><span style="color: #000088;">$i</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>.png&quot; width='image_width' height='image_height' alt='image_alt_text' /&gt;
&lt;/a&gt;
<span style="color: #000000; font-weight: bold;">&lt;?php</span>
<span style="color: #009900;">&#125;</span>
<span style="color: #000000; font-weight: bold;">?&gt;</span></pre></td></tr></table></div>

<p>The following script however is more practical. It allows you to display images with different extensions (png, gif, jpg, bmp, etc.) You will need one file to define your images names and their corresponding links.<br />
For example let&#8217;s say we have 7 images, each image having its link.</p>
<pre lang="">
imagename_1.gif:http://linkforimage1.com/
imagename_2.bmp:http://linkforimage2.com/
imagename_3.png:http://linkforimage3.com/
imagename_4.jpg:http://linkforimage4.com/
imagename_5.jpg:http://linkforimage5.com/
</pre>
<p>Name the file somethink like 19832asdfasfd.qu132u1; purely random.<br />
Here comes the actual script.</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
</pre></td><td class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?php</span>
<span style="color: #000088;">$file</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">'19832asdfasfd.qu132u1'</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$fp</span> <span style="color: #339933;">=</span> <span style="color: #990000;">fopen</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$file</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'r+'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$counter</span> <span style="color: #339933;">=</span> <span style="color: #990000;">fread</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$fp</span><span style="color: #339933;">,</span> <span style="color: #990000;">filesize</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$file</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$images</span> <span style="color: #339933;">=</span> <span style="color: #990000;">explode</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #339933;">,</span> <span style="color: #000088;">$counter</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">function</span> get_name<span style="color: #009900;">&#40;</span><span style="color: #000088;">$object</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
	<span style="color: #000088;">$x</span> <span style="color: #339933;">=</span> <span style="color: #990000;">explode</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;:&quot;</span><span style="color: #339933;">,</span><span style="color: #000088;">$object</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #000088;">$name</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$x</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'0'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
	<span style="color: #b1b100;">return</span> <span style="color: #000088;">$name</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
<span style="color: #000000; font-weight: bold;">function</span> get_url<span style="color: #009900;">&#40;</span><span style="color: #000088;">$object</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
	<span style="color: #000088;">$x</span> <span style="color: #339933;">=</span> <span style="color: #990000;">explode</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;:&quot;</span><span style="color: #339933;">,</span><span style="color: #000088;">$object</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #000088;">$total</span> <span style="color: #339933;">=</span> <span style="color: #990000;">count</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$x</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">-</span><span style="color: #cc66cc;">1</span><span style="color: #339933;">;</span>
	<span style="color: #000088;">$url</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$x</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'1'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
	<span style="color: #b1b100;">for</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$i</span><span style="color: #339933;">=</span><span style="color: #cc66cc;">2</span><span style="color: #339933;">;</span><span style="color: #000088;">$i</span><span style="color: #339933;">&lt;=</span><span style="color: #000088;">$total</span><span style="color: #339933;">;</span><span style="color: #000088;">$i</span><span style="color: #339933;">++</span><span style="color: #009900;">&#41;</span>
		<span style="color: #000088;">$url</span> <span style="color: #339933;">.=</span> <span style="color: #0000ff;">':'</span><span style="color: #339933;">.</span><span style="color: #000088;">$x</span><span style="color: #009900;">&#91;</span><span style="color: #000088;">$i</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
	<span style="color: #b1b100;">return</span> <span style="color: #000088;">$url</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
<span style="color: #000000; font-weight: bold;">function</span> show_banner<span style="color: #009900;">&#40;</span><span style="color: #000088;">$images</span><span style="color: #339933;">,</span> <span style="color: #000088;">$nr</span><span style="color: #009900;">&#41;</span>
	<span style="color: #009900;">&#123;</span>
			<span style="color: #000088;">$img</span> <span style="color: #339933;">=</span> get_name<span style="color: #009900;">&#40;</span><span style="color: #000088;">$images</span><span style="color: #009900;">&#91;</span><span style="color: #000088;">$nr</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
			<span style="color: #000088;">$url</span> <span style="color: #339933;">=</span> get_url<span style="color: #009900;">&#40;</span><span style="color: #000088;">$images</span><span style="color: #009900;">&#91;</span><span style="color: #000088;">$nr</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
			<span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">'&lt;a href=&quot;'</span><span style="color: #339933;">.</span><span style="color: #000088;">$url</span><span style="color: #339933;">.</span><span style="color: #0000ff;">'&quot; target=&quot;_blank&quot; &gt;&lt;img src=&quot;linktoimagesdir'</span><span style="color: #339933;">.</span><span style="color: #000088;">$img</span><span style="color: #339933;">.</span><span style="color: #0000ff;">'&quot; border=&quot;0&quot;/&gt;&lt;/a&gt;&lt;br/&gt;'</span><span style="color: #339933;">;</span>
			<span style="color: #990000;">unset</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$images</span><span style="color: #009900;">&#91;</span><span style="color: #000088;">$nr</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #009900;">&#125;</span>
<span style="color: #000088;">$i</span><span style="color: #339933;">=</span><span style="color: #cc66cc;">1</span><span style="color: #339933;">;</span>
<span style="color: #b1b100;">while</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$i</span><span style="color: #339933;">&lt;</span><span style="color: #cc66cc;">4</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
	<span style="color: #000088;">$bn</span><span style="color: #009900;">&#91;</span><span style="color: #000088;">$i</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #990000;">array_rand</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$images</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	show_banner<span style="color: #009900;">&#40;</span><span style="color: #000088;">$images</span><span style="color: #339933;">,</span><span style="color: #000088;">$bn</span><span style="color: #009900;">&#91;</span><span style="color: #000088;">$i</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #990000;">unset</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$images</span><span style="color: #009900;">&#91;</span><span style="color: #000088;">$bn</span><span style="color: #009900;">&#91;</span><span style="color: #000088;">$i</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #000088;">$i</span><span style="color: #339933;">++;</span>
<span style="color: #009900;">&#125;</span>
<span style="color: #000000; font-weight: bold;">?&gt;</span></pre></td></tr></table></div>

<p>Save this to index.php and place the file with the script in a directory located on your server. To show the rotating images on a certain page you need to call index.php</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?php</span>
<span style="color: #b1b100;">include</span> <span style="color: #009900;">&#40;</span><span style="color: #0000ff;">' pathtofile / index.php '</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000000; font-weight: bold;">?&gt;</span></pre></div></div>

<p>You can also call the file with the <i>require_once</i> function or an HTML iFrame.<br />
If you need any assistance feel free to leave me a comment and i will get back to you.</p>
<img src="http://softinquiry.com/?ak_action=api_record_view&id=63&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://softinquiry.com/standalone-php-script-for-displaying-random-images.html/feed</wfw:commentRss>
		<slash:comments>5</slash:comments>
	<creativeCommons:license>http://creativecommons.org/licenses/by-nc-nd/3.0/us/</creativeCommons:license>
	</item>
		<item>
		<title>Latest posts standalone script for phpbb3 and phpbb2</title>
		<link>http://softinquiry.com/latest-posts-standalone-script-for-phpbb3-and-phpbb2.html</link>
		<comments>http://softinquiry.com/latest-posts-standalone-script-for-phpbb3-and-phpbb2.html#comments</comments>
		<pubDate>Fri, 14 Mar 2008 21:54:12 +0000</pubDate>
		<dc:creator>Dan</dc:creator>
				<category><![CDATA[php]]></category>
		<category><![CDATA[phpbb3]]></category>
		<category><![CDATA[scripts]]></category>
		<category><![CDATA[phpbb2]]></category>

		<guid isPermaLink="false">http://softinquiry.com/latest-posts-standalone-script-for-phpbb3-and-phpbb2.html</guid>
		<description><![CDATA[I have tested this script on phpbb2 and phpbb3 and it works like a charm. If you have one, make sure you exclude your private section (for example t.forum_id != 4, where 4 is your private forum&#8217;s number). You can include this in your blog&#8217;s sidebar, a portal or a website. You can apply different [...]]]></description>
			<content:encoded><![CDATA[<p>I have tested this script on phpbb2 and phpbb3 and it works like a charm. If you have one, make sure you exclude your private section (for example <em>t.forum_id != 4</em>, where <em>4</em> is your private forum&#8217;s number). You can include this in your blog&#8217;s sidebar, a portal or a website. You can apply different filters by playing with the <em>WHERE</em> condition. Basically this script generates a table which is populated from the phpbb&#8217;s database according to the conditions which are imposed.</p>
<p>Of course you can customize it&#8217;s output by modifying the $query variable. If you are a newbie and need a quick php <em>Where</em> clause reference as you want to get a hang of the operators, check this one out: <a href="http://www.w3schools.com/php/php_mysql_where.asp" title="PHP MySQL Where Clause" target="_blank">PHP MySQL Where Clause</a></p>
<p>Finally here&#8217;s the script:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
</pre></td><td class="code"><pre class="php" style="font-family:monospace;"> <span style="color: #000000; font-weight: bold;">&lt;?php</span>
    <span style="color: #666666; font-style: italic;">// How Many Topics you want to display?</span>
    <span style="color: #000088;">$topicnumber</span> <span style="color: #339933;">=</span> <span style="color: #cc66cc;">5</span><span style="color: #339933;">;</span>
    <span style="color: #666666; font-style: italic;">// Scrolling towards up or down?</span>
    <span style="color: #000088;">$scroll</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;up&quot;</span><span style="color: #339933;">;</span>
    <span style="color: #666666; font-style: italic;">// Change this to your phpBB path</span>
    <span style="color: #000088;">$urlPath</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;/forum&quot;</span><span style="color: #339933;">;</span>
&nbsp;
    <span style="color: #666666; font-style: italic;">// Database Configuration (Where your phpBB config.php file is located)</span>
    <span style="color: #b1b100;">include</span> <span style="color: #0000ff;">'forum/config.php'</span><span style="color: #339933;">;</span>
&nbsp;
    <span style="color: #000088;">$table_topics</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$table_prefix</span><span style="color: #339933;">.</span> <span style="color: #0000ff;">&quot;topics&quot;</span><span style="color: #339933;">;</span>
    <span style="color: #000088;">$table_forums</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$table_prefix</span><span style="color: #339933;">.</span> <span style="color: #0000ff;">&quot;forums&quot;</span><span style="color: #339933;">;</span>
    <span style="color: #000088;">$table_posts</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$table_prefix</span><span style="color: #339933;">.</span> <span style="color: #0000ff;">&quot;posts&quot;</span><span style="color: #339933;">;</span>
    <span style="color: #000088;">$table_users</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$table_prefix</span><span style="color: #339933;">.</span> <span style="color: #0000ff;">&quot;users&quot;</span><span style="color: #339933;">;</span>
    <span style="color: #000088;">$link</span> <span style="color: #339933;">=</span> <span style="color: #990000;">mysql_connect</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;<span style="color: #006699; font-weight: bold;">$dbhost</span>&quot;</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">&quot;<span style="color: #006699; font-weight: bold;">$dbuser</span>&quot;</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">&quot;<span style="color: #006699; font-weight: bold;">$dbpasswd</span>&quot;</span><span style="color: #009900;">&#41;</span> or <span style="color: #990000;">die</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;Could not connect&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #990000;">mysql_select_db</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;<span style="color: #006699; font-weight: bold;">$dbname</span>&quot;</span><span style="color: #009900;">&#41;</span> or <span style="color: #990000;">die</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;Could not select database&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
    <span style="color: #000088;">$query</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;SELECT t.topic_id, t.topic_title, t.topic_last_post_id, t.forum_id, p.post_id, p.poster_id, p.post_time, u.user_id, u.username
    FROM <span style="color: #006699; font-weight: bold;">$table_topics</span> t, <span style="color: #006699; font-weight: bold;">$table_forums</span> f, <span style="color: #006699; font-weight: bold;">$table_posts</span> p, <span style="color: #006699; font-weight: bold;">$table_users</span> u
    WHERE t.topic_id = p.topic_id AND
    f.forum_id = t.forum_id AND
    t.forum_id != 4 AND
    t.topic_status &lt;&gt; 2 AND
    p.post_id = t.topic_last_post_id AND
    p.poster_id = u.user_id
    ORDER BY p.post_id DESC LIMIT <span style="color: #006699; font-weight: bold;">$topicnumber</span>&quot;</span><span style="color: #339933;">;</span>
    <span style="color: #000088;">$result</span> <span style="color: #339933;">=</span> <span style="color: #990000;">mysql_query</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$query</span><span style="color: #009900;">&#41;</span> or <span style="color: #990000;">die</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;Query failed&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>									
&nbsp;
    <span style="color: #b1b100;">print</span> <span style="color: #0000ff;">&quot;&lt;marquee id=<span style="color: #000099; font-weight: bold;">\&quot;</span>recent_topics<span style="color: #000099; font-weight: bold;">\&quot;</span> behavior=<span style="color: #000099; font-weight: bold;">\&quot;</span>scroll<span style="color: #000099; font-weight: bold;">\&quot;</span> direction=<span style="color: #000099; font-weight: bold;">\&quot;</span><span style="color: #006699; font-weight: bold;">$scroll</span><span style="color: #000099; font-weight: bold;">\&quot;</span> height=<span style="color: #000099; font-weight: bold;">\&quot;</span>170<span style="color: #000099; font-weight: bold;">\&quot;</span> scrolldelay=<span style="color: #000099; font-weight: bold;">\&quot;</span>100<span style="color: #000099; font-weight: bold;">\&quot;</span> scrollamount=<span style="color: #000099; font-weight: bold;">\&quot;</span>2<span style="color: #000099; font-weight: bold;">\&quot;</span> onMouseOver=<span style="color: #000099; font-weight: bold;">\&quot;</span>document.all.recent_topics.stop()<span style="color: #000099; font-weight: bold;">\&quot;</span> onMouseOut=<span style="color: #000099; font-weight: bold;">\&quot;</span>document.all.recent_topics.start()<span style="color: #000099; font-weight: bold;">\&quot;</span>&gt;
    &lt;table cellpadding='3' cellSpacing='2' width='350'&gt;&quot;</span><span style="color: #339933;">;</span>
    <span style="color: #b1b100;">while</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$row</span> <span style="color: #339933;">=</span> <span style="color: #990000;">mysql_fetch_array</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$result</span><span style="color: #339933;">,</span> MYSQL_ASSOC<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
&nbsp;
    <span style="color: #b1b100;">echo</span>  <span style="color: #0000ff;">&quot;&lt;tr valign='top'&gt;&lt;td&gt;&lt;font face=<span style="color: #000099; font-weight: bold;">\&quot;</span>Verdana, Arial, Helvetica, sans-serif<span style="color: #000099; font-weight: bold;">\&quot;</span> size=<span style="color: #000099; font-weight: bold;">\&quot;</span>1<span style="color: #000099; font-weight: bold;">\&quot;</span>&gt;&lt;font color=<span style="color: #000099; font-weight: bold;">\&quot;</span>#FFCC00<span style="color: #000099; font-weight: bold;">\&quot;</span>&gt;&lt;b&gt;&lt;a href=<span style="color: #000099; font-weight: bold;">\&quot;</span><span style="color: #006699; font-weight: bold;">$urlPath</span>/viewtopic.php?f=<span style="color: #006699; font-weight: bold;">$row[forum_id]</span>&amp;t=<span style="color: #006699; font-weight: bold;">$row[topic_id]</span>&amp;p=<span style="color: #006699; font-weight: bold;">$row[post_id]</span>#p<span style="color: #006699; font-weight: bold;">$row[post_id]</span><span style="color: #000099; font-weight: bold;">\&quot;</span> TARGET=<span style="color: #000099; font-weight: bold;">\&quot;</span>_blank<span style="color: #000099; font-weight: bold;">\&quot;</span>&gt;&quot;</span> <span style="color: #339933;">.</span>
    <span style="color: #000088;">$row</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">&quot;topic_title&quot;</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">.</span>
    <span style="color: #0000ff;">&quot;&lt;/a&gt;&lt;/td&gt;&lt;/font&gt;&lt;/b&gt;&lt;td&gt;&lt;font face=<span style="color: #000099; font-weight: bold;">\&quot;</span>Verdana, Arial, Helvetica, sans-serif<span style="color: #000099; font-weight: bold;">\&quot;</span> size=<span style="color: #000099; font-weight: bold;">\&quot;</span>1<span style="color: #000099; font-weight: bold;">\&quot;</span>&gt;&lt;font color=<span style="color: #000099; font-weight: bold;">\&quot;</span>#C0C0C0<span style="color: #000099; font-weight: bold;">\&quot;</span>&gt; by: &lt;a href=<span style="color: #000099; font-weight: bold;">\&quot;</span><span style="color: #006699; font-weight: bold;">$urlPath</span>/memberlist.php?mode=viewprofile&amp;u=<span style="color: #006699; font-weight: bold;">$row[user_id]</span><span style="color: #000099; font-weight: bold;">\&quot;</span> TARGET=<span style="color: #000099; font-weight: bold;">\&quot;</span>_blank<span style="color: #000099; font-weight: bold;">\&quot;</span>&gt;&quot;</span> <span style="color: #339933;">.</span>
    <span style="color: #000088;">$row</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">&quot;username&quot;</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">.</span>
    <span style="color: #0000ff;">&quot;&lt;/td&gt;&lt;td&gt;&lt;font face=<span style="color: #000099; font-weight: bold;">\&quot;</span>Verdana, Arial, Helvetica, sans-serif<span style="color: #000099; font-weight: bold;">\&quot;</span> size=<span style="color: #000099; font-weight: bold;">\&quot;</span>1<span style="color: #000099; font-weight: bold;">\&quot;</span>&gt;&lt;font color=<span style="color: #000099; font-weight: bold;">\&quot;</span>#C0C0C0<span style="color: #000099; font-weight: bold;">\&quot;</span>&gt;&quot;</span> <span style="color: #339933;">.</span>
    <span style="color: #990000;">date</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'F j, Y, g:i a'</span><span style="color: #339933;">,</span> <span style="color: #000088;">$row</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">&quot;post_time&quot;</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">.</span>
    <span style="color: #0000ff;">&quot;&lt;/td&gt;&lt;/tr&gt;&lt;/font&gt;&quot;</span><span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span>
    <span style="color: #b1b100;">print</span> <span style="color: #0000ff;">&quot;&lt;/table&gt;&lt;/marquee&gt;&quot;</span><span style="color: #339933;">;</span>
    <span style="color: #990000;">mysql_free_result</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$result</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #990000;">mysql_close</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$link</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #000000; font-weight: bold;">?&gt;</span></pre></td></tr></table></div>

<p>Feel free to use it as you want. If you have any questions just drop a comment.</p>
<img src="http://softinquiry.com/?ak_action=api_record_view&id=58&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://softinquiry.com/latest-posts-standalone-script-for-phpbb3-and-phpbb2.html/feed</wfw:commentRss>
		<slash:comments>74</slash:comments>
	<creativeCommons:license>http://creativecommons.org/licenses/by-nc-nd/3.0/us/</creativeCommons:license>
	</item>
		<item>
		<title>&#8220;WhoLinked&#8221; can be your way of saying &#8220;Thank you!&#8221;</title>
		<link>http://softinquiry.com/wholinked-can-be-your-way-of-saying-thank-you.html</link>
		<comments>http://softinquiry.com/wholinked-can-be-your-way-of-saying-thank-you.html#comments</comments>
		<pubDate>Wed, 05 Mar 2008 15:19:29 +0000</pubDate>
		<dc:creator>Dan</dc:creator>
				<category><![CDATA[scripts]]></category>
		<category><![CDATA[link service]]></category>
		<category><![CDATA[wholinked]]></category>

		<guid isPermaLink="false">http://softinquiry.com/wholinked-can-be-your-way-of-saying-thank-you.html</guid>
		<description><![CDATA[Wholinked is a great service that generates a javascript code which practically shows websites that link to you IN REAL TIME !  This can be your way of saying &#8220;thank you!&#8221;.
WhoLinked can be easily implemented in Wordpress, TypePad, Blogger, MovableType and other blogging platforms even on an ordinary website.
After you register, select your preferred platform [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://wholinked.com/" title="wholinked" target="_blank">Wholinked</a> is a great service that generates a javascript code which practically shows websites that link to you IN REAL TIME !  This can be your way of saying &#8220;thank you!&#8221;.</p>
<p>WhoLinked can be easily implemented in Wordpress, TypePad, Blogger, MovableType and other blogging platforms even on an ordinary website.</p>
<p>After you register, select your preferred platform and go ahead on customizing your list of links. You can choose the default language, the orientation and the number of links to display. The most important thing is that you can select which websites not to show.</p>
<p>If you want to see an example just check out my footer.</p>
<img src="http://softinquiry.com/?ak_action=api_record_view&id=50&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://softinquiry.com/wholinked-can-be-your-way-of-saying-thank-you.html/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
	<creativeCommons:license>http://creativecommons.org/licenses/by-nc-nd/3.0/us/</creativeCommons:license>
	</item>
		<item>
		<title>Style your RSS feed with SimplePie</title>
		<link>http://softinquiry.com/style-your-rss-feed-with-simplepie.html</link>
		<comments>http://softinquiry.com/style-your-rss-feed-with-simplepie.html#comments</comments>
		<pubDate>Mon, 25 Feb 2008 18:01:46 +0000</pubDate>
		<dc:creator>Dan</dc:creator>
				<category><![CDATA[scripts]]></category>
		<category><![CDATA[tips and tricks]]></category>
		<category><![CDATA[wordpress]]></category>
		<category><![CDATA[feed]]></category>
		<category><![CDATA[feedburner]]></category>
		<category><![CDATA[rss]]></category>
		<category><![CDATA[simplepie]]></category>
		<category><![CDATA[syndication]]></category>

		<guid isPermaLink="false">http://softinquiry.com/style-your-rss-feed-with-simplepie.html</guid>
		<description><![CDATA[This php class seems to do the trick if you&#8217;re after styling a RSS feed. It&#8217;s said that it brings the syndication back to it&#8217;s routs: simple, easy to use yet helpful. After spending like 10 minutes reading the documentation available i must say i couldn&#8217;t wait any longer to implement this neat script, so [...]]]></description>
			<content:encoded><![CDATA[<p>This php class seems to do the trick if you&#8217;re after styling a RSS feed. It&#8217;s said that it brings the syndication back to it&#8217;s routs: simple, easy to use yet helpful. After spending like 10 minutes reading the documentation available i must say i couldn&#8217;t wait any longer to implement this neat script, so there i was on the <em>plugins</em> page reading information about its possibilities of integrating into different CMSs, blog engines, etc.</p>
<p>SimplePie can be integrated within the following platforms:</p>
<ul class="toc">
<li class="level2">
<p class="li"><span class="li"><a href="http://simplepie.org/wiki/plugins/start#bitweaver" class="toc">BitWeaver</a></span></p>
</li>
<li class="level2">
<p class="li"><span class="li"><a href="http://simplepie.org/wiki/plugins/start#cakephp" class="toc">CakePHP</a></span></p>
</li>
<li class="level2">
<p class="li"><span class="li"><a href="http://simplepie.org/wiki/plugins/start#codeigniter" class="toc">CodeIgniter</a></span></p>
</li>
<li class="level2">
<p class="li"><span class="li"><a href="http://simplepie.org/wiki/plugins/start#dokuwiki" class="toc">DokuWiki</a></span></p>
</li>
<li class="level2">
<p class="li"><span class="li"><a href="http://simplepie.org/wiki/plugins/start#drupal" class="toc">Drupal</a></span></p>
</li>
<li class="level2">
<p class="li"><span class="li"><a href="http://simplepie.org/wiki/plugins/start#facebook" class="toc">Facebook</a></span></p>
</li>
<li class="level2">
<p class="li"><span class="li"><a href="http://simplepie.org/wiki/plugins/start#joomla" class="toc">Joomla!</a></span></p>
</li>
<li class="level2">
<p class="li"><span class="li"><a href="http://simplepie.org/wiki/plugins/start#modx" class="toc">MODx</a></span></p>
</li>
<li class="level2">
<p class="li"><span class="li"><a href="http://simplepie.org/wiki/plugins/start#mediawiki" class="toc">Mediawiki</a></span></p>
</li>
<li class="level2">
<p class="li"><span class="li"><a href="http://simplepie.org/wiki/plugins/start#nucleus" class="toc">Nucleus</a></span></p>
</li>
<li class="level2">
<p class="li"><span class="li"><a href="http://simplepie.org/wiki/plugins/start#php-nuke" class="toc">PHP-Nuke</a></span></p>
</li>
<li class="level2">
<p class="li"><span class="li"><a href="http://simplepie.org/wiki/plugins/start#plume_cms" class="toc">Plume CMS</a></span></p>
</li>
<li class="level2">
<p class="li"><span class="li"><a href="http://simplepie.org/wiki/plugins/start#punbb" class="toc">PunBB</a></span></p>
</li>
<li class="level2">
<p class="li"><span class="li"><a href="http://simplepie.org/wiki/plugins/start#silverstripe" class="toc">SilverStripe</a></span></p>
</li>
<li class="level2">
<p class="li"><span class="li"><a href="http://simplepie.org/wiki/plugins/start#textpattern" class="toc">Textpattern</a></span></p>
</li>
<li class="level2">
<p class="li"><span class="li"><a href="http://simplepie.org/wiki/plugins/start#wordpress" class="toc">WordPress</a></span></p>
</li>
</ul>
<p>That&#8217;s an evidence of the fact that SimplePie really gets the job done as it can be integrated with a lot of CMSs. I am particularly interested in the possibility of integrating SimplePie into WordPress. Of course there&#8217;s a plugin that does all the hard work for us. Unfortunately the <a href="http://simplepie.org/wiki/plugins/wordpress/simplepie_plugin_for_wordpress" title="download link" target="_blank">download link</a> seems to be outdated but there&#8217;s no need to worry as there is another <a href="http://wordpress.org/extend/plugins/simplepie-plugin-for-wordpress/" title="official download location" target="_blank">official download location</a> for SimplePie.</p>
<p>I&#8217;m sure that you agree with me when i say that there&#8217;s no better explanation than a <a href="http://simplepie.org/demo/" title="demo" target="_blank">demo</a> which demonstrates the potential of SimplePie. All you have to do is to enter your feeds address (if you don&#8217;t have any just choose one from the list) and feast your eyes on a simple, fast, easy to use feed.</p>
<p>A nice feature of SimplePie is that it supports templates so now you can create your own custom made layouts using the available <a href="http://simplepie.org/wiki/plugins/wordpress/simplepie_plugin_for_wordpress#template_tags" title="template tags" target="_blank">template tags</a>.</p>
<p>If you ran into problems or just want to find an answer to a simple question you can consult the  <a href="http://simplepie.org/wiki/faq/start" title="online documentation" target="_blank">online documentation</a> or <a href="http://simplepie.org/wiki/faq/start" title="faq" target="_blank">FAQ</a>. If you don&#8217;t find what you need be sure to check the <a href="http://simplepie.org/support/" title="community forums" target="_blank">community forums</a> (which are a proof of the great support that SimplePie has) though bare in mind that they are moving their support over at <a href="http://tech.groups.yahoo.com/group/simplepie-support/" title="yahoo! groups" target="_blank">Yahoo! Groups</a>.</p>
<p>Also you can <a href="http://simplepie.org/demo/easy_access/" title="integrate simplepie into firefox" target="_blank">integrate SimplePie into Firefox</a> browser and use it as a feed handler.</p>
<p>A <em>good-to-know</em> tip is that SimplePie works perfectly with <a href="http://www.feedburner.com/fb/a/help/wordpress_quickstart" title="FeedSmith" target="_blank">FeedBurner FeedSmith</a> plugin.</p>
<p>Check out SimplePies Wordpress plugin options:</p>
<p><a href="http://softinquiry.com/wp-content/gallery/simplepie/01-feb-25.png" class="thickbox" title="01-feb-25.png"><img src="http://softinquiry.com/wp-content/gallery/simplepie/thumbs/thumbs_01-feb-25.png" alt="01-feb-25.png" title="01-feb-25.png" /></a></p>
<img src="http://softinquiry.com/?ak_action=api_record_view&id=40&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://softinquiry.com/style-your-rss-feed-with-simplepie.html/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
	<creativeCommons:license>http://creativecommons.org/licenses/by-nc-nd/3.0/us/</creativeCommons:license>
	</item>
		<item>
		<title>phpbb3 should have native support for quick edit and quick reply</title>
		<link>http://softinquiry.com/phpbb3-should-have-native-support-for-quick-edit-and-quick-reply.html</link>
		<comments>http://softinquiry.com/phpbb3-should-have-native-support-for-quick-edit-and-quick-reply.html#comments</comments>
		<pubDate>Sat, 23 Feb 2008 21:11:10 +0000</pubDate>
		<dc:creator>Dan</dc:creator>
				<category><![CDATA[firefox addons]]></category>
		<category><![CDATA[phpbb3]]></category>
		<category><![CDATA[scripts]]></category>
		<category><![CDATA[tips and tricks]]></category>
		<category><![CDATA[firefox]]></category>
		<category><![CDATA[forums]]></category>
		<category><![CDATA[greasemonkey]]></category>
		<category><![CDATA[mods]]></category>
		<category><![CDATA[quick edit]]></category>
		<category><![CDATA[quick reply]]></category>

		<guid isPermaLink="false">http://softinquiry.com/phpbb3-should-have-native-support-for-quick-edit-and-quick-reply.html</guid>
		<description><![CDATA[I don&#8217;t know why they haven&#8217;t implemented quick reply and quick edit functions to phpbb 3.0.0.  I personally find them very useful and as i have seen they are highly appreciated by phpbb fans. It would have been a great thing to have native support for that. As expected, some good folks coded a [...]]]></description>
			<content:encoded><![CDATA[<p>I don&#8217;t know why they haven&#8217;t implemented quick reply and quick edit functions to phpbb 3.0.0.  I personally find them very useful and as i have seen they are highly appreciated by phpbb fans. It would have been a great thing to have native support for that. As expected, some good folks coded a few lines to help phpbb have that extra feeling it lacks.</p>
<p class="redbox">Don&#8217;t forget to backup your files before you proceed and to refresh your template files from ACP after you are done.</p>
<p><em>&#8220;<a href="http://www.phpbb.com/community/viewtopic.php?f=69&amp;t=595969" title="evil quick reply" target="_blank">Evil Quick Reply</a>&#8220;</em> is the name of the MOD which adds a button next to &#8220;Post Reply&#8221; that says &#8220;Quick Reply&#8221; and when pressed toggles a textbox (without refreshing the page) in which you can type a fast reply and submit it right away without going through the &#8220;advanced reply form&#8221;. This MOD is extremly easy to install, it doesn&#8217;t require any database adjusting and you can get it up and running in like 2 minutes. It has been successfully tested on the latest phpbb3 version (3.0.0). Also it supports prosilver and subsilver2 styles engines. Optionally you can choose to add the BBcodes and the smilies to the quick reply form.</p>
<p><a href="http://softinquiry.com/wp-content/gallery/phpbb/01-feb-23.png" class="thickbox" title="01-feb-23.png"></a></p>
<p style="text-align: center"><a href="http://softinquiry.com/wp-content/gallery/phpbb/01-feb-23.png" class="thickbox" title="01-feb-23.png"><img src="http://softinquiry.com/wp-content/gallery/phpbb/thumbs/thumbs_01-feb-23.png" alt="01-feb-23.png" title="01-feb-23.png" /></a></p>
<p>Unfortunately not even to this day there isn&#8217;t an official MOD designed to quick edit posts on both prosilver and subsilver2 styles. However if you use a subsilver2 based style you can consider yourself lucky because in spite of the fact that it&#8217;s just in its DEV state there is a MOD that provides the quick edit function. <em>&#8220;<a href="http://www.phpbb.com/community/viewtopic.php?f=70&amp;t=597644&amp;st=0&amp;sk=t&amp;sd=a" title="Ajax quick edit" target="_blank">Ajax Quick Edit</a>&#8220;</em> is also a great MOD that&#8217;s easy to install, supports phpbb 3.0.0 and it doesn&#8217;t require any database adjusting. The single disadvantage for the moment is that it currently supports only subsilver2 style engine but as the developer promised, support for prosilver will soon be available (i might post a <em>quick notice article</em> when prosilver will be supported just to give the ones that are interested a heads up).</p>
<p align="center"><a href="http://softinquiry.com/wp-content/gallery/phpbb/filephp-png-image-772x267-pixels_1203797604078.png" class="thickbox" title="filephp-png-image-772x267-pixels_1203797604078.png"><img src="http://softinquiry.com/wp-content/gallery/phpbb/thumbs/thumbs_filephp-png-image-772x267-pixels_1203797604078.png" alt="filephp-png-image-772x267-pixels_1203797604078.png" title="filephp-png-image-772x267-pixels_1203797604078.png" /></a><a href="http://softinquiry.com/wp-content/gallery/phpbb/filephp-png-image-259x199-pixels_1203797623140.png" class="thickbox" title="filephp-png-image-259x199-pixels_1203797623140.png"><img src="http://softinquiry.com/wp-content/gallery/phpbb/thumbs/thumbs_filephp-png-image-259x199-pixels_1203797623140.png" alt="filephp-png-image-259x199-pixels_1203797623140.png" title="filephp-png-image-259x199-pixels_1203797623140.png" /></a></p>
<p>These being written all that remains now is to inform you on the alternatives you have in case of you&#8217;re not the admin on the forum but still want to use this great functions as the forum administrator didn&#8217;t implemented the above MODs. As some of you already know, <a href="https://addons.mozilla.org/en-US/firefox/addon/748" title="GreaseMonkey" target="_blank">GreaseMonkey</a> is an awesome Firefox addon that supports user scripts. I bet most of you already know what i&#8217;m about to write because of the terms association <em>firefox-greasemonkey-userscript-phpbb</em>. You got that right ! There are two user scripts available that will enhance your experience with phpbb3 based forums.</p>
<p><em>&#8220;<a href="http://userscripts.org/scripts/show/11064" title="phpBBv3 Quick Edit" target="_blank">phpBBv3 Quick Edit</a>&#8220;</em> for GreaseMonkey is just another breathtaking, must have script (with a little AJAX) that&#8217;s more than useful because it offers you the chance of editing an article without refreshing the entire page EVEN when no such MOD has been implemented to that forum !</p>
<p align="center"> <a href="http://softinquiry.com/wp-content/gallery/phpbb/02-feb-23.png" class="thickbox" title="02-feb-23.png"><img src="http://softinquiry.com/wp-content/gallery/phpbb/thumbs/thumbs_02-feb-23.png" alt="02-feb-23.png" title="02-feb-23.png" /></a><a href="http://softinquiry.com/wp-content/gallery/phpbb/03-feb-23.png" class="thickbox" title="03-feb-23.png"><img src="http://softinquiry.com/wp-content/gallery/phpbb/thumbs/thumbs_03-feb-23.png" alt="03-feb-23.png" title="03-feb-23.png" /></a><a href="http://softinquiry.com/wp-content/gallery/phpbb/04-feb-23.png" class="thickbox" title="04-feb-23.png"><img src="http://softinquiry.com/wp-content/gallery/phpbb/thumbs/thumbs_04-feb-23.png" alt="04-feb-23.png" title="04-feb-23.png" /></a></p>
<p>&#8220;<em><a href="http://userscripts.org/scripts/show/10948" title="phpBBv3 Quick Reply" target="_blank">phpBBv3 Quick Reply</a></em>&#8221; script offers the much needed quick reply function to phpbb3 forums users. Remember that this is possible even if the forums don&#8217;t have MODs implemented !</p>
<p align="center"><a href="http://softinquiry.com/wp-content/gallery/phpbb/05-feb-23.png" class="thickbox" title="05-feb-23.png"><img src="http://softinquiry.com/wp-content/gallery/phpbb/thumbs/thumbs_05-feb-23.png" alt="05-feb-23.png" title="05-feb-23.png" /></a><a href="http://softinquiry.com/wp-content/gallery/phpbb/06-feb-23.png" class="thickbox" title="06-feb-23.png"><img src="http://softinquiry.com/wp-content/gallery/phpbb/thumbs/thumbs_06-feb-23.png" alt="06-feb-23.png" title="06-feb-23.png" /></a></p>
<p>The above two user scripts for GreaseMonkey represent a kind of consolation yet a very viable alternative !<br />
*<em>to download/install the MODs or scripts mentioned in the above article please refer to the links given.</em></p>
<img src="http://softinquiry.com/?ak_action=api_record_view&id=39&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://softinquiry.com/phpbb3-should-have-native-support-for-quick-edit-and-quick-reply.html/feed</wfw:commentRss>
		<slash:comments>8</slash:comments>
	<creativeCommons:license>http://creativecommons.org/licenses/by-nc-nd/3.0/us/</creativeCommons:license>
	</item>
	</channel>
</rss>
