<?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:series="http://unfoldingneurons.com/"
	>

<channel>
	<title>Anthology of Ideas &#187; Plugins</title>
	<atom:link href="http://anthologyoi.com/tag/plugins/feed" rel="self" type="application/rss+xml" />
	<link>http://anthologyoi.com</link>
	<description>Anthology of Ideas is an archive of thoughts and form.</description>
	<lastBuildDate>Sat, 03 Mar 2012 11:16:55 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Insert an image into a WordPress Post with a plugin.</title>
		<link>http://anthologyoi.com/dev/insert-an-image-into-a-wordpress-post-with-a-plugin.html</link>
		<comments>http://anthologyoi.com/dev/insert-an-image-into-a-wordpress-post-with-a-plugin.html#comments</comments>
		<pubDate>Thu, 15 Oct 2009 20:15:42 +0000</pubDate>
		<dc:creator>aaron</dc:creator>
				<category><![CDATA[Web Developing]]></category>
		<category><![CDATA[images]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Plugins]]></category>
		<category><![CDATA[wordress]]></category>

		<guid isPermaLink="false">http://anthologyoi.com/blogish/asides/insert-an-image-into-a-wordpress-post-with-a-plugin.html</guid>
		<description><![CDATA[]]></description>
			<content:encoded><![CDATA[<p>So in a project I&#8217;m working on I need to use a normal form to insert a post into the database. My client wanted the form to also add an image to the post. Furthermore, the image must be inserted using normal WordPress methods. The code below is the minimum required to insert an image into the database and attach it to a specific post.</p>
<p><pre class="brush: php">include_once(ABSPATH.&#039;/wp-admin/includes/media.php&#039;);
	include_once(ABSPATH.&#039;/wp-admin/includes/file.php&#039;);
	include_once(ABSPATH.&#039;/wp-admin/includes/image.php&#039;);
	
//	$id is the id of the post being inserted
//	$name is actually the name of the form input that uploaded the file so WP can access it using $_FILE[$name]
	media_handle_upload($name,$id);</pre></p>
<p>If you are inserting a new post, it makes sense to have the line <span class="inline-code">$id = wp_insert_post($post_data);</span> before this.</p>
]]></content:encoded>
			<wfw:commentRss>http://anthologyoi.com/dev/insert-an-image-into-a-wordpress-post-with-a-plugin.html/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>WordPress Dashboard Editor</title>
		<link>http://anthologyoi.com/wordpress/plugins/wordpress-dashboard-editor.html</link>
		<comments>http://anthologyoi.com/wordpress/plugins/wordpress-dashboard-editor.html#comments</comments>
		<pubDate>Tue, 18 Mar 2008 20:20:58 +0000</pubDate>
		<dc:creator>aaron</dc:creator>
				<category><![CDATA[Plugins]]></category>
		<category><![CDATA[dashboard editor]]></category>
		<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://anthologyoi.com/wordpress/plugins/wordpress-dashboard-editor.html</guid>
		<description><![CDATA[Of the entire website the Dashboard is seen by administrators the most, but it is the hardest part of WordPress to customize. Well not anymore. This plugin allows you to add whatever you want to the Dashboard through PHP and &#8230; <a href="http://anthologyoi.com/wordpress/plugins/wordpress-dashboard-editor.html">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Of the entire website the Dashboard is seen by administrators the most, but it is the hardest part of WordPress to customize. Well not anymore. This plugin allows you to add whatever you want to the Dashboard through PHP and HTML and allows you to <strong>even add Sidebar Widgets</strong>. You may also wipe the entire dashboard or  individually remove some of the more irritating sections like the Dev news, Planet WordPress and the getting started section. </p>
<p>In WordPress 2.5, the code is cleaner, the plugin is more responsive and you can add both &#8220;real&#8221; sidebar widgets, or add &#8220;fake&#8221; ones to match the dashboard.</p>
<p>This plugin is currently intended for 2.5, but it also works in  WordPress 2.1 &#8211; 2.3 and can work in WordPress 2.0.x if you use the Completely Wipe Dashboard option.</p>
<p><a href='http://anthologyoi.com/wp-content/uploads/2008/03/wordpress-25-dashboard.png'><img src="http://anthologyoi.com/wp-content/uploads/2008/03/wordpress-25-dashboard-300x148.png" alt="" title="wordpress-25-dashboard" width="300" height="148" class="aligncenter size-medium attachment wp-att-535" /></a></p>
<p><strong>Installation is a breeze:</strong></p>
<ol>
<li> <a href='http://downloads.wordpress.org/plugin/wordpress-dashboard-editor.zip' title='Wordpress Dashboard Editor'> Download the zip file for WordPress Dashboard Editor</a></li>
<li>Unzip and upload dashboard.php to your wp-content/plugins/ folder.</li>
<li>Go to your dashboard. There will be a new sub-menu item. </li>
<li>Select any options you want and add any PHP or HTML code that you want to the textbox. </li>
</ol>
<p><strong>Code Examples:</strong></p>
<p>To add a sidebar widget to your dashboard (after selecting the option from the Dashboard management page) use the code:<br />
<span class="inline-code">&lt;?php dynamic_sidebar(&#039;admin&#039;);?&gt;</span><br />
The Admin sidebar is modified and controlled the exact same way as any other sidebar.</p>
<p>If you use the WP-UserOnline plugin you can use:<br />
<span class="inline-code">&lt;?php echo useronline_page();?&gt;</span></p>
<p>In WordPress 2.1-2.3 f you find that your new content doesn&#8217;t align nicely you can add:<br />
<pre class="brush: php">&lt;div style=&quot;float:left; width:460px;&quot;&gt;
//
//Add all other content here
//
&lt;/div&gt;</pre></p>
<p>Any code that can be used in your WordPress Theme can be used in the dashboard. This means that you can have different information appear for the <a href="http://codex.wordpress.org/Roles_and_Capabilities">different user roles</a> among other things.</p>
]]></content:encoded>
			<wfw:commentRss>http://anthologyoi.com/wordpress/plugins/wordpress-dashboard-editor.html/feed</wfw:commentRss>
		<slash:comments>181</slash:comments>
		</item>
		<item>
		<title>A friday in my newsreader: Febuary 22.</title>
		<link>http://anthologyoi.com/blogish/linkage/a-friday-in-my-newsreader-febuary-22.html</link>
		<comments>http://anthologyoi.com/blogish/linkage/a-friday-in-my-newsreader-febuary-22.html#comments</comments>
		<pubDate>Fri, 22 Feb 2008 18:55:45 +0000</pubDate>
		<dc:creator>aaron</dc:creator>
				<category><![CDATA[Linkage]]></category>
		<category><![CDATA[Blogish]]></category>
		<category><![CDATA[images]]></category>
		<category><![CDATA[links]]></category>
		<category><![CDATA[plugin]]></category>
		<category><![CDATA[Plugins]]></category>
		<category><![CDATA[science]]></category>
		<category><![CDATA[University]]></category>

		<guid isPermaLink="false">http://anthologyoi.com/blogish/linkage/a-friday-in-my-newsreader-febuary-22.html</guid>
		<description><![CDATA[Occasionally, so many wonderful posts appear in the lull between the Thursday doldrums and the Friday excitation (pun much?) that I have to &#8220;link it up&#8230;er&#8230;mott&#8221;. It turns out that you can see the effects of trawling for fish from &#8230; <a href="http://anthologyoi.com/blogish/linkage/a-friday-in-my-newsreader-febuary-22.html">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.flickr.com/photos/46425925@N00/214003246/" title="" style="float:left; padding:5px 10px 0px 10px;" target="_blank"><img src="http://farm1.static.flickr.com/86/214003246_ece20e14bc_t.jpg" alt=""  border="0" /></a> Occasionally, so many wonderful posts appear in the lull between the Thursday doldrums and the Friday excitation (pun much?) that I have to &#8220;link it up&#8230;er&#8230;mott&#8221;. </p>
<ol>
<li>It turns out that you can see the <a href="http://scienceblogs.com/deepseanews/2008/02/trawling_effects_seen_from_spa.php#commentsArea">effects of trawling for fish from space</a>. Do we need any more evidence against it?</li>
<li>Uncertain Principles posts about the backlash from the Virginia Tech shootings: turns out stage plays with fake wooden weapons endanger students&#8230;according to <a href="http://scienceblogs.com/principles/2008/02/those_who_have_no_idea_go_into.php">some college administrators</a>.</li>
<li>Uncertain principles also wonders if there is any realistic nanotechnology in SciFi writing.</li>
<li>That encrypted hard drive you might have? <a href="http://techdirt.com/articles/20080221/232021319.shtml">Worthless now that the encryption can be broken&#8230;easily.</a></li>
</ol>
<p>Oh and as a side note, anyone else watch one of my favorite video blogs: <a href="http://tv.winelibrary.com/">http://tv.winelibrary.com/</a>?</p>
<p><small><a href="http://www.photodropper.com/creative-commons/" title="creative commons" target="_blank"><img src="http://anthologyoi.com/wp-content/plugins/photo_dropper//images/cc.gif" alt="Creative Commons License" border="0" /></a> image credit: <a href="http://www.flickr.com/people/Pulpolux !!!/" title="Pulpolux !!!" target="_blank">Pulpolux !!!</a></small></p>
]]></content:encoded>
			<wfw:commentRss>http://anthologyoi.com/blogish/linkage/a-friday-in-my-newsreader-febuary-22.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Tag Management for WordPress 2.3</title>
		<link>http://anthologyoi.com/wordpress/plugins/tag-management-for-wordpress-23.html</link>
		<comments>http://anthologyoi.com/wordpress/plugins/tag-management-for-wordpress-23.html#comments</comments>
		<pubDate>Mon, 22 Oct 2007 05:47:05 +0000</pubDate>
		<dc:creator>aaron</dc:creator>
				<category><![CDATA[Asides]]></category>
		<category><![CDATA[Plugins]]></category>
		<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://anthologyoi.com/wordpress/plugins/tag-management-for-wordpress-23.html</guid>
		<description><![CDATA[Now that you have gotten used to WP 2.3 and had time to fiddle around with all those tags, you are probably finding that you need to edit, rename or delete tags. While I was going to write my own &#8230; <a href="http://anthologyoi.com/wordpress/plugins/tag-management-for-wordpress-23.html">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>   Now that you have gotten used to WP 2.3 and had time to fiddle around with all those tags, you are probably finding that you need to edit, rename or delete tags. While I was going to write my own Plugins for this for a while, I found the perfect Plugins to do the work for me &#8212; and by perfect I mean really good, so I take no responsibility if they eat your dog.</p>
<p>The <a href="http://www.herewithme.fr/wordpress-plugins/simple-tags">Simple Tags</a> has been around for a long time, but now it works perfectly with WordPress tagging. What does it do? Most everything you could want (I could retype the list, but I&#8217;m going to borrow it straight from the Simple Tags website):</p>
<blockquote><ul>
<li><strong>type-ahead input tags</strong></li>
<li>auto suggestion of tags</li>
<li>tags management (rename, delete, amalgamate, search and add tags, edit tags ID)</li>
<li>List of non tagged contents</li>
<li><strong>Edit mass tags</strong></li>
<li><strong>Possibility to tag pages (not only posts) and include them inside the tags results</strong></li>
<li>Related content since common tags</li>
<li>Possibility to add related posts inside RSS</li>
<li><strong>Dynamic Tag Clouds with colors with Widgets</strong></li>
<li>Tags inside your header&#8217;s blog</li>
<li>Embedded tags ([tags]tag1, tag2[/tags]) for retro compatibility</li>
</ul>
</blockquote>
<p>I use <a href="http://anthologyoi.com/about/used-plugins">a lot of Plugins</a> and <a href="http://anthologyoi.com/tag/plugin/">write a lot of Plugins</a>, so the fact that I even use one usually means it is really well made or very useful, but this one is one of the very few that I thought was good enough to promote. Remember, if you have a favorite Plugin, do the author a favor and mention it once or twice. </p>
<p>Oh and what would be really nice is if it had a feature that would suggest related keywords based on the text (there used to be a Yahoo API that did this.) Wink Wink.</p>
]]></content:encoded>
			<wfw:commentRss>http://anthologyoi.com/wordpress/plugins/tag-management-for-wordpress-23.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>INAP and feed problems</title>
		<link>http://anthologyoi.com/news-briefs/inap-and-feed-problems.html</link>
		<comments>http://anthologyoi.com/news-briefs/inap-and-feed-problems.html#comments</comments>
		<pubDate>Sun, 29 Jul 2007 02:34:18 +0000</pubDate>
		<dc:creator>aaron</dc:creator>
				<category><![CDATA[News]]></category>
		<category><![CDATA[AJAX]]></category>
		<category><![CDATA[bugfix]]></category>
		<category><![CDATA[excerpt]]></category>
		<category><![CDATA[feeds]]></category>
		<category><![CDATA[INAP]]></category>
		<category><![CDATA[Plugins]]></category>

		<guid isPermaLink="false">http://anthologyoi.com/news-briefs/inap-and-feed-problems.html</guid>
		<description><![CDATA[If you use INAP and have noticed oddness with your full-text feeds lately, it may have been caused by INAP. Users that had the &#8220;custom options&#8221; selected would have their feeds trimmed as if it were a post. INAP 2.4.3 &#8230; <a href="http://anthologyoi.com/news-briefs/inap-and-feed-problems.html">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>If you use <a href="http://anthologyoi.com/inap/">INAP</a> and have noticed oddness with your full-text feeds lately, it may have been caused by INAP. Users that had the &#8220;custom options&#8221; selected would have their feeds trimmed as if it were a post. INAP <a href="http://downloads.wordpress.org/plugin/inline-ajax-page.2.4.3.zip">2.4.3</a> fixes this.</p>
<p>In other news, INAP is in the process of a major overhaul including a complete rewrite of most of its antiquated structure. When this process is complete it will be rebranded to demonstrate the totality of its features (it won&#8217;t be called INAP anymore because the name is too restrictive), but will be released as version 3.0</p>
]]></content:encoded>
			<wfw:commentRss>http://anthologyoi.com/news-briefs/inap-and-feed-problems.html/feed</wfw:commentRss>
		<slash:comments>57</slash:comments>
		</item>
		<item>
		<title>INAP listed on Mashable</title>
		<link>http://anthologyoi.com/news-briefs/inap-listed-on-mashable.html</link>
		<comments>http://anthologyoi.com/news-briefs/inap-listed-on-mashable.html#comments</comments>
		<pubDate>Sun, 22 Jul 2007 18:58:32 +0000</pubDate>
		<dc:creator>aaron</dc:creator>
				<category><![CDATA[News]]></category>
		<category><![CDATA[AJAX]]></category>
		<category><![CDATA[excerpt]]></category>
		<category><![CDATA[INAP]]></category>
		<category><![CDATA[Plugins]]></category>

		<guid isPermaLink="false">http://anthologyoi.com/news-briefs/inap-listed-on-mashable.html</guid>
		<description><![CDATA[Inline Ajax Page was listed on Mashable as one of &#8220;30 good [AJAX wordpress plugins].&#8221; While I&#8217;m thankful for the publicity (it seems half the internet is scraping Mashable&#8217;s feed which resulted in a huge Technorati boost), as always, it &#8230; <a href="http://anthologyoi.com/news-briefs/inap-listed-on-mashable.html">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Inline Ajax Page was listed on Mashable as one of &#8220;<a href="http://mashable.com/2007/07/20/ajax-wordpress/">30 good [AJAX wordpress plugins]</a>.&#8221; While I&#8217;m thankful for the publicity (it seems half the internet is scraping Mashable&#8217;s feed which resulted in a huge Technorati boost), as always, it was described as &#8220;Allow[ing] readers to see a snippet of a post, click a button and the remainder will appear without going to another page.&#8221;</p>
<p>I almost cried. That description fits only the 1.0 version of INAP that was released over a year ago&#8211;now it does so much more than that that it is almost like saying Google is just a search engine. Oh well,  the traffic generated was good quality.</p>
<p>In other news, version 2.4.25 was released a couple days ago to fix a bug that occurs when submitting a comment using the jQuery library under IE6. I think bugfixes this specific really showcase how mature the plugin has become, so if you have used it in the past, but stopped because of bugs, why not try it again?</p>
]]></content:encoded>
			<wfw:commentRss>http://anthologyoi.com/news-briefs/inap-listed-on-mashable.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>INAP 2.4 is Live</title>
		<link>http://anthologyoi.com/news-briefs/inap-24-is-live.html</link>
		<comments>http://anthologyoi.com/news-briefs/inap-24-is-live.html#comments</comments>
		<pubDate>Fri, 13 Jul 2007 16:05:16 +0000</pubDate>
		<dc:creator>aaron</dc:creator>
				<category><![CDATA[News]]></category>
		<category><![CDATA[AJAX]]></category>
		<category><![CDATA[excerpt]]></category>
		<category><![CDATA[INAP]]></category>
		<category><![CDATA[Plugins]]></category>
		<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://anthologyoi.com/news-briefs/inap-24-is-live.html</guid>
		<description><![CDATA[On this lovely Friday the 13th, Inline Ajax Page version 2.4 has finally been released. If you are upgrading or have ever installed INAP before follow the upgrade instructions here. Please report bugs as soon as you find them, as &#8230; <a href="http://anthologyoi.com/news-briefs/inap-24-is-live.html">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>On this lovely Friday the 13th, Inline Ajax Page version 2.4 has finally been released. </p>
<p><strong>If you are upgrading or have ever installed INAP before follow the <a href="http://anthologyoi.com/inap/inline-ajax-page-readme/#upgrading"> upgrade instructions here.</a></strong></p>
<p>Please report bugs as soon as you find them, as I will be making bug-fixing releases as they are fixed.</p>
<p>I am also specifically asking for feature ideas for the next version, so drop a note on the main page if you have any.</p>
]]></content:encoded>
			<wfw:commentRss>http://anthologyoi.com/news-briefs/inap-24-is-live.html/feed</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>WordPress Character Map and Unicode Encoder</title>
		<link>http://anthologyoi.com/wordpress/plugins/wordpress-charecter-map.html</link>
		<comments>http://anthologyoi.com/wordpress/plugins/wordpress-charecter-map.html#comments</comments>
		<pubDate>Sat, 07 Apr 2007 00:01:29 +0000</pubDate>
		<dc:creator>aaron</dc:creator>
				<category><![CDATA[Plugins]]></category>
		<category><![CDATA[charecter map]]></category>
		<category><![CDATA[entities]]></category>
		<category><![CDATA[unicode characters]]></category>
		<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://anthologyoi.com/wordpress/plugins/wordpress-charecter-map.html</guid>
		<description><![CDATA[WordPress Character Map and Unicode Encoder is a simple to use plugin that adds a character map underneath of your edit post box which provides easy access to all unicode entities. It also allows you to convert all special Unicode &#8230; <a href="http://anthologyoi.com/wordpress/plugins/wordpress-charecter-map.html">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>WordPress Character Map and Unicode Encoder is a simple to use plugin that adds a character map underneath of your edit post box which provides easy access to all unicode entities. It also allows you to convert all special Unicode characters (anything you wouldn&#8217;t see on the average American keyboard) to their respective entities and back again. (This feature can also be downloaded as a separate plugin.) The character map supports all Unicode characters (a few sets have been disabled because of their size) and allows you to set your &#8220;favorite&#8221; characters which will automatically be displayed underneath the edit box.  </p>
<p>The most powerful part of this plugin is the Unicode converter. I was able to go back to <a href="http://anthologyoi.com/blogish/fun-with-google-translator.html">one of my older posts</a> that had many Japanese and Chinese characters and convert the entire post to valid Unicode in one click. Go view the post and try switching Character encodings in your browser. Nothing changes if you do. &#9786;&#9787; before I converted it if it was viewed in anything other than UTF-8 it was all gobbledy-gook.</p>
<h3>Download:</h3>
<p><a href='http://anthologyoi.com/wp-content/uploads/2007/04/char_mapphp.txt' title='Character Map Version 0.1'>Character Map (with Unicode Encoder) Plugin Version 0.1</a> or you can <a href='http://anthologyoi.com/wp-content/uploads/2007/04/char_encphp.txt' title='Unicode Character Converter'>download the Unicode Encoder</a> as a separate plugin.</p>
<h3>Installation:</h3>
<ol>
<li>Save the plugin with the extension .php</li>
<li>Upload it to your &#8216;wp-content/plugins&#8217; directory</li>
<li>Activate the plugin named &#8220;Character Map&#8221; or if you downloaded just the Character Encoder activate it.</li>
</ol>
<h3>Character Map Usage:</h3>
<ul>
<li>The character map appears directly under content box on your new/edit post page.</li>
<li>On the right side is a list of the character groups (and the options panel) clicking one of these will update the character map shown.</li>
<li>It is best to save your posts with entities rather than characters because of the way Unicode and character encodings work. For example, let&#8217;s say I have the word Aret&#233; if I use an entity it will display correctly on all browsers and web servers (unless they are unable to display the character itself); however, if I were to use the actual character &#8216;&#233;&#8217; and saved it using my websites default character encoding, it would &#8220;lock in&#8221; the character to that one encoding. If a user from another country, whose browser used a different encoding, visited they would just see some random characters&#8211;specifically: &#195;&#169;. However, if I had saved the &#8216;&#233;&#8217; as an entity it would always display the same way.</li>
<li>Checking the Safe Mode option will make it so you automatically add the entities to the posts rather than characters. You can easily switch the entities to characters by clicking &#8220;Char- &gt; Ent&#8221; button. When you are done editing you can switch them back by clicking &#8220;Ent -&gt; Chars&#8221; </li>
<li>Under the options panel you can add special characters that will always show by default when you load the edit post/page panel. You can add characters to this as either the actual character &#963;, as Unicode entities &amp;#963; or as an HTML entity &amp;sigma;, or as just its name (sigma) or number (963). The plugin will automatically convert them to the correct format.  </li>
<li>Sometimes the special characters &amp;, &gt;, and &lt; will not display like entities or characters like the rest of custom charecters in the options panel. You may ignore this because this is done intentionally. No matter the form, the characters will work correctly.</li>
</ul>
<h3>Character Encoder Usage:</h3>
<ul>
<li>If you use the non-rich text editor you will see two new buttons in your toolbar. These buttons are pretty self explanatory. (&#8220;ent&#8221; means entity and &#8220;char&#8221; means character)</li>
<li>Normal characters (a,%,8,&#8221;) will not be converted to entities, and HTML special charecters (&amp;gt;,&amp;lt;,&amp;amp;, &gt;,&lt;,&amp;) will never be converted from one form to another.</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://anthologyoi.com/wordpress/plugins/wordpress-charecter-map.html/feed</wfw:commentRss>
		<slash:comments>25</slash:comments>
		</item>
		<item>
		<title>Improvements for Stattraq plugin.</title>
		<link>http://anthologyoi.com/wordpress/improvements-for-stattraq-plugin.html</link>
		<comments>http://anthologyoi.com/wordpress/improvements-for-stattraq-plugin.html#comments</comments>
		<pubDate>Thu, 29 Mar 2007 19:06:30 +0000</pubDate>
		<dc:creator>aaron</dc:creator>
				<category><![CDATA[WordPress]]></category>
		<category><![CDATA[improvements]]></category>
		<category><![CDATA[Plugins]]></category>
		<category><![CDATA[stattraq]]></category>
		<category><![CDATA[tips and tricks]]></category>

		<guid isPermaLink="false">http://anthologyoi.com/wordpress/improvements-for-stattraq-plugin.html</guid>
		<description><![CDATA[Ever since I originally started using Stattraq a few things bothered me about the way it worked. Here are the fixes to a few of them. Include pages with posts in your stats. Open stattraq.php Find: global $doing_rss, $p Replace &#8230; <a href="http://anthologyoi.com/wordpress/improvements-for-stattraq-plugin.html">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Ever since I originally started using Stattraq a few things bothered me about the way it worked. Here are the fixes to a few of them.</p>
<p><strong>Include pages with posts in your stats.</strong></p>
<ol>
<li>Open stattraq.php</li>
<li>Find:<br />
<span class="inline-code"> global $doing_rss, $p</span><br />
Replace With:<br />
<span class="inline-code">global $doing_rss, $p, $page_id, $pagename,</span>
</li>
<li>Find:<br />
<pre class="brush: php">if (($p != &#039;&#039;)){
	$p = intval($p);
	$article_id = $p;
}</pre><br />
Replace with:<br />
<pre class="brush: php">if (($p != &#039;&#039;)){
	$p = intval($p);
	$article_id = $p;
}elseif (($page_id != &#039;&#039;)){
	$page_id = intval($page_id);
	$article_id = $page_id;
}elseif (($pagename != &#039;&#039;)){
 $reqpage = get_page_by_path($pagename);
	if ( !empty($reqpage) )
		$article_id = $reqpage-&gt;ID;
}</pre>
</li>
</ol>
<p>To add a list of all Pages that link to your site grouped by Website (excluding Google):<br />
Open &#8220;wp-stattraq/reporter/summary.php&#8221;</p>
<p>Find:<br />
<pre class="brush: php">&lt;?php echo PrintTimestamp();?&gt;
			&lt;/div&gt;
			&lt;div id=&quot;queryTerms&quot;&gt;</pre><br />
Before Add:<br />
<pre class="brush: php">&lt;table id=&quot;referrersTable&quot;&gt;
					&lt;thead&gt;
						&lt;tr&gt;
							&lt;th&gt;#&lt;/th&gt;
							&lt;th&gt;Referrer&lt;/th&gt;
							&lt;th&gt;Pages&lt;/th&gt;
						&lt;/tr&gt;
					&lt;/thead&gt;
					&lt;tfoot&gt;
						&lt;tr&gt;
							&lt;th&gt;#&lt;/th&gt;
							&lt;th&gt;Referrer&lt;/th&gt;
							&lt;th&gt;Pages&lt;/th&gt;
						&lt;/tr&gt;
					&lt;/tfoot&gt;		
					&lt;tbody&gt;
&lt;?php
if($results){
	$i=0;
	foreach($results as $row){
		preg_match(&#039;/(http.*?\:\/\/.*?)(\/.*)/&#039;, htmlentities($row-&gt;ref), $matches);
		$ref_array[$matches[1]][] = $matches[2];
	}

				
	while( list($site, $pages) = @each($ref_array) ){
		if(strpos($site,&#039;google&#039;) ==false &amp;&amp; $site != &#039;&#039;){?&gt;

			&lt;tr class=&quot;&lt;?php echo ($i % 2 == 0 ? &#039;even&#039; : &#039;odd&#039; );?&gt;&quot;&gt;&lt;td&gt;&lt;?php echo ++$i;?&gt;&lt;/td&gt;
			&lt;td&gt;
			&lt;a href=&quot;&lt;?php echo $site;?&gt;&quot;&gt;&lt;?php echo substr($site,0,50);?&gt;&lt;/a&gt;&lt;/td&gt;
			&lt;td class=&quot;right&quot;&gt;

		&lt;?php foreach($pages as $page){?&gt;

			&lt;a href=&quot;&lt;?php echo $site.$page;?&gt;&quot;&gt;&lt;?php echo substr($page,0,50);?&gt;&lt;/a&gt;&lt;br/&gt;

		&lt;?php}?&gt;


		&lt;/td&gt;
		&lt;/tr&gt;
&lt;?php 	}
	}
}?&gt;
					&lt;/tbody&gt;
				&lt;/table&gt;</pre></p>
]]></content:encoded>
			<wfw:commentRss>http://anthologyoi.com/wordpress/improvements-for-stattraq-plugin.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>WordPress How To:  Easily make an admin panel for a plugin</title>
		<link>http://anthologyoi.com/wordpress/wordpress-how-to-easily-make-an-admin-panel-for-a-plugin.html</link>
		<comments>http://anthologyoi.com/wordpress/wordpress-how-to-easily-make-an-admin-panel-for-a-plugin.html#comments</comments>
		<pubDate>Mon, 19 Mar 2007 16:42:01 +0000</pubDate>
		<dc:creator>aaron</dc:creator>
				<category><![CDATA[WordPress]]></category>
		<category><![CDATA[admin panel]]></category>
		<category><![CDATA[how to]]></category>
		<category><![CDATA[HTML]]></category>
		<category><![CDATA[Plugins]]></category>

		<guid isPermaLink="false">http://anthologyoi.com/wordpress/wordpress-how-to-easily-make-an-admin-panel-for-a-plugin.html</guid>
		<description><![CDATA[I find the Admin panel the most tedious part of plugin development&#8211;even the slightest changes to the plugin requires major changes to the Admin panel, and it can be hard to remember every option you have in your plugin. However &#8230; <a href="http://anthologyoi.com/wordpress/wordpress-how-to-easily-make-an-admin-panel-for-a-plugin.html">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>I find the Admin panel the most tedious part of plugin development&#8211;even the slightest changes to the plugin requires major changes to the Admin panel, and it can be hard to remember every option you have in your plugin. However by following a few simple rules, your next Admin panel will be a breeze. Once you have the basic parts down, new options are just a cut and past away. One thing to note is that his Admin panel uses a few features that are best if repeated inside your plugin itself. </p>
<p><em>Please note that these same general techniques work outside of WordPress also; the only thing that you would need to do is to change the way options are actually set. Also, I assume you already know HTML; this is not a basic HTML tutorial, but rather is a way to do a specific task. Some basics 	are explained, but if you don&#8217;t already know the difference between a checkbox and radiobox this isn&#8217;t the best place for you to start. </em></p>
<p>There are rules for the easiest Admin panel. </p>
<ol>
<li>Always name your variables the same ways in the form and the database&#8211; there is absolutely no reason to have to change the name&#8217;s assign to variables individually. Especially seeing as this tutorial shows you the easiest ways to set all variables, and it requires the names to be the same. </li>
<li>Always use arrays for your variables in both the form and database&#8211;you don&#8217;t want to spend a lot of time in your code pulling individual items from the database and assigning them to names, nor do you want to fill the users database up with a lot of individual options. You can, however, assign individual options to some variable such as $background inside the functions, but it is easiest just to leave all the options in a single array ($my_plugin['background']) that doesn&#8217;t change from function to function.</li>
<li>Always make your variable names sensible. If you can&#8217;t figure out what it does just by looking at the variable name it is useless. EX. If I want to set an option for the background color any of the following would be good names: background_color, back_color, bkgrnd_clr, backgroundcolor. backcolor etc. These names all make sense however if you were to use back, color, bc, monkeys, x, gqyjkl it is difficult to understand or remmeber exactly what it does. Furthermore, obvious meanings in your options make it easier to update the plugin later with more options. For example, if I set the background color with the option named color what will happen when I decide to give a new option for foreground color, border color, and text color? Not only can you net tell immediately which option color sets, but in CSS color means text color not background color. Why not &#8216;bc&#8217; you may ask, well it is nice to save the shortest abbreviations for other things (as demonstrated in the radio and checkboxes settings), or for inside the actual code.</li>
<li>Never use words as the values for individual checkboxes- individual checkboxes are useful for on or off statements, so it is perfectly simple to use the values 1 and 0 for checked and unchecked respectively.</li>
<li> Try to use numbers as values for radio boxes whenever possible&#8211; sometimes it is too confusing to remember what the difference between 4 and 2 is when it comes to the actual code, so when you have to use strings as the values make them short (use the rules above) but descriptive (ex &#8216;student&#8217;,'teacher&#8217;,'admin&#8217;,'gen_staff&#8217;). </li>
<li>Text boxes are for text &#8212; don&#8217;t expect your user to only input the options you suggest. If you require that one of a few option is selected use a checkbox, radiobox, list or dropdown list, otherwise you will have to perform a check every single time a user inputs a value.</li>
<li>Administrative panels are for administrators; because of this, you don&#8217;t have to worry about abuse usually. If you give a radio box with the options 1, 2, and 3, you don&#8217;t have to check to make sure that only one of those options was selected. However, when using any sort of checks always check for all but one of the possible values (see radio boxes section) and then just use an else statement to default to one. </li>
<li>Unless the option with the value 0 is meant as false, don&#8217;t start radio boxes from 0&#8211; doing this doesn&#8217;t make any sense.</li>
<li>If your Administration panel is more than a few options long, separate it from the rest of the plugin. Otherwise, the entire thing has to be read into memory every time a page is loaded.</li>
</ol>
<p>There are a few basic rules that we use in this Admin panel (and our plugin). </p>
<ol>
<li>Globals are our friend. By using global variables we make it very easy to access information from any part of WordPress, and can even allow other plugins to interact with our variables. Globals also allow us to get the information only a single time from the database and then reuse it over and over<br />
again. Just as a reminder globals should be named uniquely. It may make sense for your plugin to use the global $post, but if you do so neither WordPress or your plugin will work as expected.</li>
<li>This Admin panel uses one global array to store all of the options ($mypluginall) and one array for for the options when submitted (myplugin).</li>
</ol>
<p>Of course we need to tell the plugin that there is an Admin panel. The following is just an example, if you would like to learn what it all means, then please visit <a href="http://codex.wordpress.org/Adding_Administration_Menus">the WordPress Codex page dedicated to it</a>.<br />
<pre class="brush: php">add_action(&#039;admin_menu&#039;, &#039;myplguin_menu&#039;);

function myplugin_menu() {
	// Add a submenu to the Dashboard:
	add_submenu_page(&#039;post.php&#039;, &#039;My Plugin Managment&#039;, &#039;My Plugin Managment&#039;, 8, &#039;myplugin/myplugin_admin.php&#039;);
}</pre></p>
<p>Before we create any options we should create the function that sets them (this way we can test it as we go along). The following function I developed makes it very easy to update the options. There really isn&#8217;t much to explain, but by taking advantage of the rules above, it takes an array of values and their names (keys), and translates it into the options for the plugin. We could have this as part of the admin panel, but ti is much clearner if we seperate it. I&#8217;m not going to go to in depth into how it actually works, but it goes throug hall of the values ($options) we passed to it (the new options) finds the name of the option ($option) and its corresponding value ($value). it then adds these same names and values to our global array of variables. This is the reason why we have the same names in our form and our database. If we didn&#8217;t, we would have to specifically set map each form option to the database option (cat to dog, background_color to back_color etc). The entire array is a global so it automatically updates the options before they go into the database.<br />
<pre class="brush: php">function myplugin_update_options($options){
global $mypluginall;
//This is the section where we add individual rules to single options (see checkbox part.)

// End that section.
	while (list($option, $value) = each($options)) {
// this line here just fixes individual server bugs.
// If our user has magic quotes turned on and then wordpress tries to add slashes to it we will have everything double slashed.
		if( get_magic_quotes_gpc() ) { 
		$value = stripslashes($value);
		}
		$mypluginall[$option] =$value;
	}
return $mypluginall;
}</pre></p>
<p>This part goes at the top of our administration page. It checks if we just set some options (line 1), then passes the new options on to our function above for processing (line 2), and finally updates the options in the database. Because we were smart and used a global array for our values, we can continue loading the form without pulling the new values out of the database again.<br />
<pre class="brush: php">if ($_POST[&quot;action&quot;] == &quot;saveconfiguration&quot;) {
			$mypluginall = myplugin_update_options($_REQUEST[&#039;myplugin&#039;]);
			update_option(&#039;myplugin&#039;,$mypluginall);
			$message .= &#039;My Plugin Options have Been Updated.&lt;br/&gt;&#039;;

		//$mypluginall doesn&#039;t need to be updated because it has the new values added to it immediately

	echo &#039;&lt;div class=&quot;updated&quot;&gt;&lt;p&gt;&lt;strong&gt; Updated &lt;br/&gt; &#039;.$message;
	echo &#039;&lt;/strong&gt;&lt;/p&gt;&lt;/div&gt;&#039;;
}</pre></p>
<p>Now for some things we will need to set default values, or process the values in some way before the form sees them. In these cases we would add them before the form, but after the update option function.</p>
<p>This section is the panel itself. It doesn&#8217;t require much explanation because it is just a basic form, but this is where we will put the actual inputs.<br />
<pre class="brush: php">echo &lt;&lt;&lt;block
	echo &#039;&lt;div class=&quot;wrap&quot;&gt;&lt;fieldset class=&quot;manage&quot; style=&quot;width:100%; text-align:center;&quot;&gt;&#039;;
	echo &#039;&lt;form method=&quot;post&quot;&gt;&#039;;
	echo &#039;&lt;table width=&quot;90%&quot;&gt;&#039;;
	&lt;tr&gt;
		&lt;td colspan=&quot;2&quot;&gt;&lt;strong&gt;Edit My Plugin Configutarion&lt;/strong&gt;&lt;/td&gt;
	&lt;/tr&gt;

	&lt;tr&gt;
		&lt;td colspan=&quot;2&quot;&gt;&lt;p&gt;&lt;strong&gt;Post Options&lt;/strong&gt;&lt;/p&gt;&lt;/td&gt;
	&lt;/tr&gt;
block;

// Inside this block add all of your options.
echo &lt;&lt;&lt;block



block;
	
	echo &#039;	&lt;/table&gt;
			&lt;input type=&quot;hidden&quot; name=&quot;action&quot; value=&quot;saveconfiguration&quot;&gt;
			&lt;input type=&quot;submit&quot; value=&quot;Save&quot;&gt;
		&lt;/form&gt;
	&lt;/fieldset&gt;&#039;;</pre></p>
<p>Setting Default Options</p>
<p>Code to use for checkboxes, radioboxes, textareas, selectboxes and text boxes. </p>
<p><strong>To add a TextBox:</strong></p>
<ol>
<li>The text box is the easiest of all the HTML inputs: (this one is named &#8216;title_text&#8217;)<br />
<pre class="brush: php">&lt;tr&gt;
	&lt;td&gt;My plugins title text:&lt;/td&gt;
	&lt;td&gt;&lt;input type=&quot;text&quot; value=&quot;$mypluginall[title_text]&quot; name=&quot;myplugin[title_text]&quot;&gt;&lt;/td&gt;
&lt;/tr&gt;</pre></li>
<li>Because a user might use a quote (&#8216;) or double quote(&#8220;) we need to add the following text to the &#8216;set options&#8217; portion of the admin panel. This code makes whatever the default value be valid HTMl that won&#8217;t break our plugin by encoding HTML special characters like &amp;, &lt;, $gt; etc.<br />
<span class="inline-code">$mypluginall[&#039;title_text&#039;] = stripslashes(htmlspecialchars($mypluginall[&#039;title_text&#039;],ENT_QUOTES));</span></li>
</ol>
<p><strong>To add a single checkbox: (best for on or off options)</strong></p>
<ol>
<li>We first add a checkbox to the admin panel table with the name &#8220;say_yes&#8221;.<br />
<pre class="brush: php">&lt;tr&gt;
		&lt;td&gt;Would you like me to say yes?:&lt;/td&gt;
		&lt;td&gt;&lt;input type=&quot;checkbox&quot; value=&quot;1&quot; $sy name=&quot;myplugin[say_yes]&quot;&gt;&lt;/td&gt;
	&lt;/tr&gt;</pre><br />
Did you notice the $sy inside the input?  In basic HTML to check a checkbox we have to add the attribute checked=&#8217;checked&#8217;, but if we don&#8217;t want it checked we can&#8217;t add this input. If we were to leave the attribute checked=&#8221;checked&#8221; out the cjkebox would always be blank no matter what option was selected, but this is bad for usability. So to set the default option we do the following:.  </li>
<li>Because the initial value of the checkbox isn&#8217;t as simple to set a textbox, we then add the following in the &#8216;set options&#8217; section of the admin panel. Notice that we set the variable $sy to be  &#8216;checked=&#8221;checked&#8221;&#8216;. As said above this is how we tell the browser that this option should be selected by default. The best thing about this is if the option isn&#8217;t checked (does not evaluate to 1) the $sy is just empty which means the checkbox isn&#8217;t checked .  The name $sy does not mean anything it could just as easily be named $the_monkey, but t makes it a lot easier because it is just an abbreviation of the option name &#8220;say_yes&#8217;.<br />
<pre class="brush: php">if($mypluginall[&#039;say_yes&#039;] == 1){ $sy = &#039;checked=&quot;checked&quot;&#039;; }</pre>
</li>
<li>The checkbox is unique because of the way it sends its data. If the checkbox is selected it sends data, but if it isn&#8217;t selected it doesn&#8217;t send anything. This can cause a problem when we are updating the options if you don&#8217;t check if the option is set first. To fix this behavior we just add the following to the update options function.<br />
<pre class="brush: php">if(!$options[&#039;say_yes&#039;]){$options[&#039;say_yes&#039;] = 0; }</pre></li>
</ol>
<p><strong>To add multiple radioboxes:</strong></p>
<ol>
<li>We first add the radioboxes to the admin panel table with the name &#8220;fav_num&#8221;.<br />
<pre class="brush: php">&lt;tr&gt;
		&lt;td&gt;Which of these is your favorite Number &lt;/td&gt;
		&lt;td&gt;
&lt;label&gt;My Favorite Number is one :&lt;input type=&quot;radio&quot; value=&quot;1&quot; $fn1 name=&quot;inap[fav_num]&quot;/&gt;&lt;/label&gt;&lt;br/&gt; 
&lt;label&gt;My Favorite Number is two :&lt;input type=&quot;radio&quot; value =&quot;2&quot; $fn2 name=&quot;inap[fav_num]&quot;/&gt;&lt;/label&gt; &lt;br/&gt;
&lt;label&gt;My Favorite Number is three :&lt;input type=&quot;radio&quot; value =&quot;3&quot; $fn3 name=&quot;inapfav_num]&quot;/&gt;&lt;/label&gt;
             &lt;/td&gt;
	&lt;/tr&gt;</pre><br />
Did you notice the $fn1,$fn2, $fn3  inside the input? This is done for the same reason as $sy is done above.  As with checkboxes the  In basic HTML the attribute checked=&#8217;checked&#8217; means that that raadio box is the defaut.  So to set the default option we do the following:.  </li>
<li>Because there is are more than one possible initial value for this radiobox (1, 2 or 3) , we have to use a larger statement to decide which one is set. As above we then assign the attribute checked=&#8221;checked&#8221; to one of the three variables and leave the other two blank.<br />
	<pre class="brush: php">if($mypluginall[&#039;fav_num&#039;] == &#039;3&#039;){
		$fn3 = &#039;checked=&quot;checked&quot;&#039;; 
	}elseif($mypluginall[&#039;fav_num&#039;] == &#039;2&#039;){
		$fn2 = &#039;checked=&quot;checked&quot;&#039;; 
	}else{
		$fn = &#039;checked=&quot;checked&quot;&#039;; 
	}</pre><br />
You will notice two things about the above example: the numbers count down and option one is the default. Both are by personal taste. I always have option one be the default so it makes more sense to look for the others first (and coujnting 3,2,1 makes more sense then 2,3,1), so that way if the other values are not found it defaults to one automatically. However, it doesn&#8217;t matter which order you do it it in as long as the default value comes last and is not specifically checked for.
</li>
<li>Because we always set a default value there is always some value sent with a radio box (unless the user specifically tries not to), so we don&#8217;t need to add a check as we did in step three of the checkbox.</li>
</ol>
<p><strong>The Text Area</strong></p>
<ol>
<li>The text are is basically the same as the textbox, but it allows multiple lines of data (this one is named list)<br />
<pre class="brush: php">&lt;tr&gt;
	&lt;td&gt;List of my favorite things:&lt;/td&gt;
	&lt;td&gt;&lt;textarea  name=&quot;myplugin[favthings]&gt;$mypluginall[favthings]&lt;/textarea&gt;&lt;/td&gt;
&lt;/tr&gt;</pre><br />
Notice that the textarea uses a different format for its input. Specifically, it does not start with input and its default value goes between two tags rather than in a attribute named value.</li>
<li>For the same reasons as the textbox we add the following in the set options section of the Admin panel.<br />
<span class="inline-code">$mypluginall[&#039;title_text&#039;] = stripslashes(htmlspecialchars($mypluginall[&#039;title_text&#039;],ENT_QUOTES));</span></li>
</ol>
<p><strong> The Select Box</strong></p>
<ol>
<li>The select or drop down box is the single best argument for using descriptive names.  This is because we can either just add an extra option to it to set the current value, or we can do a loop, and check each option individually before we set them. The latter is a complete waste of coding time and memory and you will have to define an array of possible values etc etc, so I prefer to just add a default option. This is named &#8216;fav_color&#8217;<br />
<pre class="brush: php">&lt;tr&gt;
	&lt;td&gt;What is your Favorite Color:&lt;/td&gt;
	&lt;td&gt;&lt;select name=&quot;myplugin[fav_color]&quot;&gt;
		 $fc
		&lt;option value=&quot;red&quot;&gt;Red&lt;/option&gt;
		&lt;option value=&quot;orange_red&quot;&gt;Orange Red&lt;/option&gt;
		&lt;option value=&quot;orange&quot;&gt;Orange&lt;/option&gt;
		&lt;/select&gt;&lt;/td&gt;
&lt;/tr&gt;</pre><br />
as you can see the values are fairly attractive, with a little manipulation the values can also be used as the displayed text. $fav_color will be our default value.</li>
<li>You get the drill, the following is added to the set options section of the Admin panel. However, we do a few manipulations to the name to make it look good.<br />
<pre class="brush: php">if($mypluginall[&#039;fav_color&#039;] != &#039;&#039;){
	$fc = &#039;&lt;option selected=&quot;selected&quot; value=&quot;&#039;.$mypluginall[&#039;fav_color&#039;].&#039;&quot;&gt;&#039;.ucwords(str_replace(&#039;-&#039;,&#039; &#039;,$mypluginall[fav_color])).&#039;&lt;/option&gt;&#039;;
}</pre><br />
No matter what value is set we a re going to have a duplicate value, so the least we can do is make it look nice, but this part is optional. The str_replace removes any underscores in the values and males it a space and then the ucwords makes the first letter of each word uppercase to make it match the preset values&#8211;we could also use ucfirst to make only the first letter an uppercase. </ol>
<p>That is pretty much it. As a final note this administration panel isn&#8217;t perfect, but ti will make your life a lot easier. Before developing this system it was extremely irritating to add  even a single option. I wouldn&#8217;t do it unless I had no other choice, but now it literally takes a few seconds to add 3 or 4 new options by using the same templates and just changing their names and descriptions.</p>
]]></content:encoded>
			<wfw:commentRss>http://anthologyoi.com/wordpress/wordpress-how-to-easily-make-an-admin-panel-for-a-plugin.html/feed</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
	</channel>
</rss>

