<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	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/"
		>
<channel>
	<title>Comments for The Braindonor Network</title>
	<atom:link href="http://www.braindonor.net/comments/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.braindonor.net</link>
	<description>Just another WordPress weblog</description>
	<lastBuildDate>Fri, 09 Jul 2010 21:15:08 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
	<item>
		<title>Comment on Hijack the WordPress Media Gallery by Simon</title>
		<link>http://www.braindonor.net/coding-blog/hijack-the-wordpress-media-gallery/228/comment-page-1/#comment-383</link>
		<dc:creator>Simon</dc:creator>
		<pubDate>Fri, 09 Jul 2010 21:15:08 +0000</pubDate>
		<guid isPermaLink="false">http://www.braindonor.net/?p=228#comment-383</guid>
		<description>This is great, thanks so much for posting.

I was having problems using the wp_enqueue_script(&#039;media-upload&#039;); - I was getting the properly sized editor but my custom send_to_editor() function wasn&#039;t being triggered. I found that if I listed the dependencies on my own custom JS code, that solved the problem. 

Like so:

function admin_add_scripts() {
	add_thickbox();
	wp_enqueue_script(&#039;media-upload&#039;);
// My js file, with an array of dependencies
	wp_enqueue_script( &#039;admin.js&#039;, get_stylesheet_directory_uri() . &quot;/scripts/admin.js&quot;, array(&#039;jquery&#039;, &#039;media-upload&#039;) );
}
add_action(&#039;admin_init&#039;, &#039;admin_add_scripts&#039;);

Simon</description>
		<content:encoded><![CDATA[<p>This is great, thanks so much for posting.</p>
<p>I was having problems using the wp_enqueue_script(&#8216;media-upload&#8217;); &#8211; I was getting the properly sized editor but my custom send_to_editor() function wasn&#8217;t being triggered. I found that if I listed the dependencies on my own custom JS code, that solved the problem. </p>
<p>Like so:</p>
<p>function admin_add_scripts() {<br />
	add_thickbox();<br />
	wp_enqueue_script(&#8216;media-upload&#8217;);<br />
// My js file, with an array of dependencies<br />
	wp_enqueue_script( &#8216;admin.js&#8217;, get_stylesheet_directory_uri() . &#8220;/scripts/admin.js&#8221;, array(&#8216;jquery&#8217;, &#8216;media-upload&#8217;) );<br />
}<br />
add_action(&#8216;admin_init&#8217;, &#8216;admin_add_scripts&#8217;);</p>
<p>Simon</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Apache Optimization and NGINX by John Hoff</title>
		<link>http://www.braindonor.net/coding-blog/apache-optimization-and-nginx/206/comment-page-1/#comment-340</link>
		<dc:creator>John Hoff</dc:creator>
		<pubDate>Wed, 02 Jun 2010 12:18:43 +0000</pubDate>
		<guid isPermaLink="false">http://www.braindonor.net/?p=206#comment-340</guid>
		<description>Tom,

Two other reasons besides mod_php quickly come to mind on why I use prefork apache--mod_perl and mod_python.  The solution of using NGINX as a reverse proxy is gaining more and more popularity because NGINX is written with this in mind as a primary operating task.  Apache can be used as a very effective reverse proxy as well.  In fact, my first professional introduction into Apache optimization had once instance of Apache serving static content and two other instances of Apache serving mod_perl content.  Regardless of how you separate things, the value is the separation and optimizing the area that will provide the greatest improvement for the effort.

One of the reasons that there are so few published benchmarks is the variety of architectures that can be used.  Apache, lighthttpd, NGINX, FastCGI, Catalyst, Perlbal...the list keeps going.  Combine that with custom webserver frameworks--think Python web framework--and it should be clear that there is no single solution.

The other reason is the challenge of testing real-world web application performance.  It is much the same reason why you do not see worthwhile benchmarks comparing Apache to IIS.  Nearly very large web application is a custom application and architecture.  Building a valuable benchmark requires three elements: a testing environment that can produce a significant fraction of the production environment capacity, a testing framework that is able to emulate real-world web traffic, and a metric gathering framework that is able to measure capacity usage on a per-request basis.  I have only had access to all of those elements once--and only because my team received a new production environment a month ahead of schedule.

Do not let a lack of benchmarks stop you from experimenting!  Experimenting with tools such as FastCGI will give you one more tool to work with and will definitely give you a perspective that is different from the standard Apache CGI environment.</description>
		<content:encoded><![CDATA[<p>Tom,</p>
<p>Two other reasons besides mod_php quickly come to mind on why I use prefork apache&#8211;mod_perl and mod_python.  The solution of using NGINX as a reverse proxy is gaining more and more popularity because NGINX is written with this in mind as a primary operating task.  Apache can be used as a very effective reverse proxy as well.  In fact, my first professional introduction into Apache optimization had once instance of Apache serving static content and two other instances of Apache serving mod_perl content.  Regardless of how you separate things, the value is the separation and optimizing the area that will provide the greatest improvement for the effort.</p>
<p>One of the reasons that there are so few published benchmarks is the variety of architectures that can be used.  Apache, lighthttpd, NGINX, FastCGI, Catalyst, Perlbal&#8230;the list keeps going.  Combine that with custom webserver frameworks&#8211;think Python web framework&#8211;and it should be clear that there is no single solution.</p>
<p>The other reason is the challenge of testing real-world web application performance.  It is much the same reason why you do not see worthwhile benchmarks comparing Apache to IIS.  Nearly very large web application is a custom application and architecture.  Building a valuable benchmark requires three elements: a testing environment that can produce a significant fraction of the production environment capacity, a testing framework that is able to emulate real-world web traffic, and a metric gathering framework that is able to measure capacity usage on a per-request basis.  I have only had access to all of those elements once&#8211;and only because my team received a new production environment a month ahead of schedule.</p>
<p>Do not let a lack of benchmarks stop you from experimenting!  Experimenting with tools such as FastCGI will give you one more tool to work with and will definitely give you a perspective that is different from the standard Apache CGI environment.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Apache Optimization and NGINX by Tom D</title>
		<link>http://www.braindonor.net/coding-blog/apache-optimization-and-nginx/206/comment-page-1/#comment-339</link>
		<dc:creator>Tom D</dc:creator>
		<pubDate>Wed, 02 Jun 2010 06:06:10 +0000</pubDate>
		<guid isPermaLink="false">http://www.braindonor.net/?p=206#comment-339</guid>
		<description>Hi,

Thanks for a good article. I realize most people use apache prefork because of thread safety issues with worker (or more likely because that&#039;s how things get set up by default out of the distro&#039;s repos). The most common solution is yours apache for php and nginx for static files. What about using apache w/ fastcgi and having apache serve the static files as worker w/o all the overhead of mod_php for servign a gif?

I&#039;ve been trying to find some decent benchmarks for this, but no one seems to be using worker so no one seems to be benchmarking it. I wish I had the hardware to do it myself but I don&#039;t so I was wondering if you have considered this?

Thanks.</description>
		<content:encoded><![CDATA[<p>Hi,</p>
<p>Thanks for a good article. I realize most people use apache prefork because of thread safety issues with worker (or more likely because that&#8217;s how things get set up by default out of the distro&#8217;s repos). The most common solution is yours apache for php and nginx for static files. What about using apache w/ fastcgi and having apache serve the static files as worker w/o all the overhead of mod_php for servign a gif?</p>
<p>I&#8217;ve been trying to find some decent benchmarks for this, but no one seems to be using worker so no one seems to be benchmarking it. I wish I had the hardware to do it myself but I don&#8217;t so I was wondering if you have considered this?</p>
<p>Thanks.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on WordPress Custom Field Search Plugin by Tom Lany</title>
		<link>http://www.braindonor.net/coding-blog/wordpress-custom-field-search-plugin/102/comment-page-1/#comment-328</link>
		<dc:creator>Tom Lany</dc:creator>
		<pubDate>Fri, 28 May 2010 06:06:30 +0000</pubDate>
		<guid isPermaLink="false">http://www.braindonor.net/?p=102#comment-328</guid>
		<description>Thanks for sharing this!  I have been needing some way to search through authors (that I store in custom fields) for along time, and this works wonderfully!

Thanks!</description>
		<content:encoded><![CDATA[<p>Thanks for sharing this!  I have been needing some way to search through authors (that I store in custom fields) for along time, and this works wonderfully!</p>
<p>Thanks!</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Hijack the WordPress Media Gallery by John Hoff</title>
		<link>http://www.braindonor.net/coding-blog/hijack-the-wordpress-media-gallery/228/comment-page-1/#comment-282</link>
		<dc:creator>John Hoff</dc:creator>
		<pubDate>Sat, 17 Apr 2010 15:12:22 +0000</pubDate>
		<guid isPermaLink="false">http://www.braindonor.net/?p=228#comment-282</guid>
		<description>The media-upload script needs to be called before wordpress starts sending content to the browser.  By the time it starts parsing banner.php, it is already too late.  You&#039;ll see how I addressed part of this in the &#039;hijack_thickbox_include&#039; action in hijack.php.  I placed your wp_enqueue_script call in there, and everything appears to have worked:&lt;br /&gt;
&lt;code&gt;add_action(&#039;admin_init&#039;, &#039;hijack_thickbox_include&#039;);
function hijack_thickbox_include() {
    add_thickbox();
    wp_enqueue_script(&#039;media-upload&#039;);
}&lt;/code&gt;&lt;br /&gt;

That should fix your problems with the media upload.  There is likely a better method for including it, but I&#039;ll have to do more digging to find it.</description>
		<content:encoded><![CDATA[<p>The media-upload script needs to be called before wordpress starts sending content to the browser.  By the time it starts parsing banner.php, it is already too late.  You&#8217;ll see how I addressed part of this in the &#8216;hijack_thickbox_include&#8217; action in hijack.php.  I placed your wp_enqueue_script call in there, and everything appears to have worked:<br />
<code>add_action('admin_init', 'hijack_thickbox_include');<br />
function hijack_thickbox_include() {<br />
    add_thickbox();<br />
    wp_enqueue_script('media-upload');<br />
}</code></p>
<p>That should fix your problems with the media upload.  There is likely a better method for including it, but I&#8217;ll have to do more digging to find it.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Hijack the WordPress Media Gallery by rofflox</title>
		<link>http://www.braindonor.net/coding-blog/hijack-the-wordpress-media-gallery/228/comment-page-1/#comment-273</link>
		<dc:creator>rofflox</dc:creator>
		<pubDate>Thu, 08 Apr 2010 19:38:21 +0000</pubDate>
		<guid isPermaLink="false">http://www.braindonor.net/?p=228#comment-273</guid>
		<description>Thanks John for your great article.

I&#039;m currently working on a theme using WP 2.9.2. Out of the box, your script doesn&#039;t work properly here. I&#039;d to change the following things:

1) In my custom admin-option-page the required thickbox css and js file wouldn&#039;t be load by default. To add the required fields to the wordpress list of loaded files, just call &lt;code&gt;add_thickbox();&lt;/code&gt; in your init-function of your admin-page or before wp_head();.

2) Same goes for my custom js file: Put the line &lt;code&gt;wp_enqueue_script(&#039;&lt;a&gt;_custom_js&#039;, &#039;/js/custom.js&#039;);&lt;/code&gt; in your init-function.

3) I&#039;d the problem, that the value attribute of my input field wasn&#039;t updated. If you use the built-in jquery support from wordpress, you have to &quot;wrap&quot; every jquery call since WP 2.8+. Instead of using $();, you have to write jQuery();. This took me some time to figure out.

So you have to change the function send_to_editor to the following:

&lt;code&gt;
function send_to_editor(html) { 
var source = html.match(/src=\&quot;.*\&quot; alt/); 
source = source[0].replace(/^src=\&quot;/, &quot;&quot;).replace(/&quot; alt$/, &quot;&quot;); 
&lt;b&gt;jQuery&lt;/b&gt;(&quot;#banner_image&quot;).attr(&#039;src&#039;, source); 
&lt;b&gt;jQuery&lt;/b&gt;(&#039;#banner_image_input&quot;).attr(&#039;value&#039;, source);
tb_remove(); 
} 
&lt;/code&gt;

However, one problem remains:

The thickbox window isn&#039;t loaded at full size. I&#039;ve tried to load the built-in js script &quot;media-upload&quot; with &lt;code&gt;wp_enqueue_script(&#039;media-upload&#039;);&lt;/code&gt; which seems to work, but this breaks the whole script.

If anybody has a solution, please post ;)</description>
		<content:encoded><![CDATA[<p>Thanks John for your great article.</p>
<p>I&#8217;m currently working on a theme using WP 2.9.2. Out of the box, your script doesn&#8217;t work properly here. I&#8217;d to change the following things:</p>
<p>1) In my custom admin-option-page the required thickbox css and js file wouldn&#8217;t be load by default. To add the required fields to the wordpress list of loaded files, just call <code>add_thickbox();</code> in your init-function of your admin-page or before wp_head();.</p>
<p>2) Same goes for my custom js file: Put the line <code>wp_enqueue_script('<a>_custom_js', '/js/custom.js');</a></code> in your init-function.</p>
<p>3) I&#8217;d the problem, that the value attribute of my input field wasn&#8217;t updated. If you use the built-in jquery support from wordpress, you have to &#8220;wrap&#8221; every jquery call since WP 2.8+. Instead of using $();, you have to write jQuery();. This took me some time to figure out.</p>
<p>So you have to change the function send_to_editor to the following:</p>
<p><code><br />
function send_to_editor(html) {<br />
var source = html.match(/src=\".*\" alt/);<br />
source = source[0].replace(/^src=\"/, "").replace(/" alt$/, "");<br />
<b>jQuery</b>("#banner_image").attr('src', source);<br />
<b>jQuery</b>('#banner_image_input").attr('value', source);<br />
tb_remove();<br />
}<br />
</code></p>
<p>However, one problem remains:</p>
<p>The thickbox window isn&#8217;t loaded at full size. I&#8217;ve tried to load the built-in js script &#8220;media-upload&#8221; with <code>wp_enqueue_script('media-upload');</code> which seems to work, but this breaks the whole script.</p>
<p>If anybody has a solution, please post <img src='http://www.braindonor.net/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Custom Pages with WordPress Plugins by Brad</title>
		<link>http://www.braindonor.net/coding-blog/custom-pages-with-wordpress-plugins/230/comment-page-1/#comment-262</link>
		<dc:creator>Brad</dc:creator>
		<pubDate>Mon, 22 Mar 2010 10:25:40 +0000</pubDate>
		<guid isPermaLink="false">http://www.braindonor.net/?p=230#comment-262</guid>
		<description>Thanks for the reply.  I lost track of this web page, and finally found it again! 

-Brad</description>
		<content:encoded><![CDATA[<p>Thanks for the reply.  I lost track of this web page, and finally found it again! </p>
<p>-Brad</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Hijack the WordPress Media Gallery by John Hoff</title>
		<link>http://www.braindonor.net/coding-blog/hijack-the-wordpress-media-gallery/228/comment-page-1/#comment-255</link>
		<dc:creator>John Hoff</dc:creator>
		<pubDate>Mon, 15 Mar 2010 19:11:44 +0000</pubDate>
		<guid isPermaLink="false">http://www.braindonor.net/?p=228#comment-255</guid>
		<description>That error message originates from the menu.php page inside wp-admin.  I believe it is happening because the user that is trying to update the page is not an administrator.  You&#039;ll want to check the documentation for adding an administration menus: &lt;a href=&quot;http://codex.wordpress.org/Adding_Administration_Menus&quot; target=&quot;_blank&quot; rel=&quot;nofollow&quot;&gt;http://codex.wordpress.org/Adding_Administration_Menus&lt;/a&gt;.  Currently, I have the plugin set to user level 8--which is an older, legacy user level.  Since I snipped this plugin out of older code, it remained.  You&#039;ll likely want to play around with the capability required by the menu page to get it working.  All of that is in hijack.php file.</description>
		<content:encoded><![CDATA[<p>That error message originates from the menu.php page inside wp-admin.  I believe it is happening because the user that is trying to update the page is not an administrator.  You&#8217;ll want to check the documentation for adding an administration menus: <a href="http://codex.wordpress.org/Adding_Administration_Menus" target="_blank" rel="nofollow">http://codex.wordpress.org/Adding_Administration_Menus</a>.  Currently, I have the plugin set to user level 8&#8211;which is an older, legacy user level.  Since I snipped this plugin out of older code, it remained.  You&#8217;ll likely want to play around with the capability required by the menu page to get it working.  All of that is in hijack.php file.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Hijack the WordPress Media Gallery by Ryan Paul Young</title>
		<link>http://www.braindonor.net/coding-blog/hijack-the-wordpress-media-gallery/228/comment-page-1/#comment-254</link>
		<dc:creator>Ryan Paul Young</dc:creator>
		<pubDate>Mon, 15 Mar 2010 16:52:07 +0000</pubDate>
		<guid isPermaLink="false">http://www.braindonor.net/?p=228#comment-254</guid>
		<description>Hey John,

I installed the plugin with NO issues, THANKS so much. BUT... when I choose an image from the media gallery, and Save Changes, I get the &quot;You do not have sufficient permissions to access this page.&quot; error... any ideas?</description>
		<content:encoded><![CDATA[<p>Hey John,</p>
<p>I installed the plugin with NO issues, THANKS so much. BUT&#8230; when I choose an image from the media gallery, and Save Changes, I get the &#8220;You do not have sufficient permissions to access this page.&#8221; error&#8230; any ideas?</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on New Category: Always Learning by The Braindonor Network &#187; New Language Direction With Erlang</title>
		<link>http://www.braindonor.net/news-events/new-category-always-learning/303/comment-page-1/#comment-246</link>
		<dc:creator>The Braindonor Network &#187; New Language Direction With Erlang</dc:creator>
		<pubDate>Thu, 11 Mar 2010 23:30:28 +0000</pubDate>
		<guid isPermaLink="false">http://www.braindonor.net/?p=303#comment-246</guid>
		<description>[...] Direction With Erlang posted March 11th, 2010 &#124; by John Hoff   In my two most recent posts, Always Learning and Coders at Work, I talked about my personal and professional need to keep learning. My most [...]</description>
		<content:encoded><![CDATA[<p>[...] Direction With Erlang posted March 11th, 2010 | by John Hoff   In my two most recent posts, Always Learning and Coders at Work, I talked about my personal and professional need to keep learning. My most [...]</p>
]]></content:encoded>
	</item>
</channel>
</rss>
