<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Nicholas Kwan &#187; Web Application Development</title>
	<atom:link href="http://nicholaskwan.com/category/web-application-development/feed/" rel="self" type="application/rss+xml" />
	<link>http://nicholaskwan.com</link>
	<description>Technology, Hobbies, Life</description>
	<lastBuildDate>Sat, 10 Apr 2010 17:50:59 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>How to embed a flash Video in Feature Box with Thesis Theme</title>
		<link>http://nicholaskwan.com/2009/07/02/how-to-embed-a-flash-video-in-feature-box-with-thesis-theme/</link>
		<comments>http://nicholaskwan.com/2009/07/02/how-to-embed-a-flash-video-in-feature-box-with-thesis-theme/#comments</comments>
		<pubDate>Thu, 02 Jul 2009 22:43:20 +0000</pubDate>
		<dc:creator>Nicholas</dc:creator>
				<category><![CDATA[Web Application Development]]></category>
		<category><![CDATA[feature box]]></category>
		<category><![CDATA[thesis]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://nicholaskwan.com/?p=593</guid>
		<description><![CDATA[For all you Thesis fans out there (myself included), I have written a (really) short tutorial on how to include a flash video in your feature box.  First I tried the most logical and easiest method of putting an object in the feature but that didn&#8217;t seem to work.  So, I decided to try the [...]]]></description>
			<content:encoded><![CDATA[<p></p><p>For all you Thesis fans out there (myself included), I have written a (really) short tutorial on how to include a flash video in your feature box.  First I tried the most logical and easiest method of putting an object in the feature but that didn&#8217;t seem to work.  So, I decided to try the next step up which is putting in a separate frame.</p>
<p>So, let&#8217;s get into it and see if this works*</p>
<p>Open you custom_functions.php file,<br />
So we initiate the feature box with the following:</p>
<pre class="brush: php;">
add_action('thesis_hook_feature_box', 'my_thesis_feature_box');
</pre>
<p>And then we incorporate the frame within the feature box:</p>
<pre class="brush: php;">
function my_thesis_feature_box() {
echo '&lt;p&gt;&lt;iframe src=&quot;wp-content/themes/thesis/custom/images/test.swf&quot; width=&quot;100%&quot; height=380 &gt;&lt;/iframe&gt;&lt;/p&gt;';
}
</pre>
<p>Obviously, the src is wherever you have your flash file and width and height are self-explanatory.</p>
<p>And if you want some text above or below the graphics</p>
<pre class="brush: php;">
function my_thesis_feature_box() {
echo '&lt;div&gt;thesis_hook_feature_box&lt;p&gt;Within &lt;code&gt;div#feature_box&lt;/code&gt;; the feature box must be enabled in the Thesis Options for this hook to have any effect.&lt;/p&gt;&lt;/div&gt;
&lt;p&gt;&lt;iframe src=&quot;wp-content/themes/thesis/custom/images/test.swf&quot; width=&quot;100%&quot; height=380 &gt;&lt;/iframe&gt;&lt;/p&gt;';
}
</pre>
<p>Remember to activate the Feature Box in Design Options and pick where you want it!</p>
<p>After some testing, this method seemed to work in IE, Chrome, Safari, and Firefox for Windows.  There seems to be some caching issue with Firefox 3 in Mac.  If your graphic isn&#8217;t showing, clear the cache and reload the page and it should come up.</p>
<p>Leave me a comment if it doesn&#8217;t work!<br />
[edit: I have temporarily taken down my own feature box for editing]</p>
<p>*This article doesn&#8217;t cover the basics (such as hooks, css, and custom files) of the Thesis theme</p>
]]></content:encoded>
			<wfw:commentRss>http://nicholaskwan.com/2009/07/02/how-to-embed-a-flash-video-in-feature-box-with-thesis-theme/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>Common Multiple Import Plugin errors</title>
		<link>http://nicholaskwan.com/2009/06/27/common-multiple-import-plugin-errors/</link>
		<comments>http://nicholaskwan.com/2009/06/27/common-multiple-import-plugin-errors/#comments</comments>
		<pubDate>Sat, 27 Jun 2009 20:57:02 +0000</pubDate>
		<dc:creator>Nicholas</dc:creator>
				<category><![CDATA[Web Application Development]]></category>
		<category><![CDATA[documentation]]></category>
		<category><![CDATA[multiple import]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://nicholaskwan.com/?p=393</guid>
		<description><![CDATA[
Multiple Import is a plugin written by Michael Ha, who is a colleague of mine.  This plugin allows the admin to import multiple blogs from the same server to one specific blog.  Because this plugin can import all the blogs linked to the server, it is important to limit the permission to use this plugin [...]]]></description>
			<content:encoded><![CDATA[<p></p><div style="color: #000000; font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 10px; background-image: initial; background-repeat: initial; background-attachment: initial; -webkit-background-clip: initial; -webkit-background-origin: initial; background-color: #ffffff; font: normal normal normal 13px/19px Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif; background-position: initial initial; padding: 0.6em; margin: 0px;">
<p>Multiple Import is a plugin written by Michael Ha, who is a colleague of mine.  This plugin allows the admin to import multiple blogs from the same server to one specific blog.  Because this plugin can import all the blogs linked to the server, it is important to limit the permission to use this plugin to specific blogs.</p>
<p>The plugin does the following:</p>
<ol>
<li>Takes the file that you uploaded.</li>
<li>Reads through all the url&#8217;s in the file and compares to all the url&#8217;s in the server.</li>
<li>Requests confirmation on the blogs it is about to upload.</li>
<li>Goes through each option and import only the posts/pages with specific tags.</li>
<li>Uploads all the files attached as well if selected.</li>
</ol>
<p>There were many problems with privacy issues while uploading the file, because of the nature of this problem, it is difficult to pin down one solution, most solutions can be found easily online.</p>
<p>After the file can be uploaded, there might be errors about cookie sessions such as:</p>
<p><strong style="font-weight: bold;">Warning</strong>: session_start() [<a href="../../aggregate2009/wp-admin/function.session-start">function.session-start</a>]: Cannot send session cache limiter &#8211; headers already sent (output started at /home/portfolio/wordpress/wp-admin/admin-header.php:103) in <strong style="font-weight: bold;">/home/portfolio/wordpress/wp-content/plugins/multipleimport/multipleimportform.php</strong> on line <strong style="font-weight: bold;">66</strong></p>
<p>Many solutions online suggest to take out the white spaces and white lines in the files it complains about and the wp-admin.php file.  However, this didn&#8217;t solve the problem because the problem resides in the cookie session not starting soon enough.  (However, the white spaces and white lines have to be taken care of also if there exist any in specified files, refer to online resources for more details).  The session has to start before any of the objects are displayed on the webpage; therefore, the line &#8220;session_start();&#8221; has to be placed right after &lt;?php on line 2 in the file &#8216;wordpress/wp-admin/includes/template.php&#8217; .  This will start a cookie session before any of the objects are displayed and will solve the &#8220;headers already sent&#8221; problems.</p>
<p>I am not sure if there are side effects in keeping the &#8220;session_start();&#8221; in the template.php but I have not had any problems related to it.  I assume there will be a lot of cookie&#8217;s added to the visitor&#8217;s browsers but no lethal side effects.</p>
<p>There are still warnings when importing the blog and it seems to happen only with new blogs:</p>
<p><strong style="font-weight: bold;">Warning:</strong> Invalid argument supplied for foreach() in <strong style="font-weight: bold;">/home/portfolio/wordpress/wp-content/plugins/multipleimport/beginimport.php </strong>on line <strong style="font-weight: bold;">58</strong><br />
Checking page <em style="font-style: italic;">About</em></p>
<p>This warning seem to only affect empty blogs or blogs that have no new content in them, I am still currently trying to troubleshoot this problem.</p>
<p>I know Michael didn&#8217;t leave any methods to reach him or contact him on the official Wordpress site, but if you leave me a comment here, I can try my best to help you out.</p>
<p>This article was written for the Faculty of Education at the University of British Columbia and cannot be copied, modified, or published without the consent of the University.</p>
</div>
]]></content:encoded>
			<wfw:commentRss>http://nicholaskwan.com/2009/06/27/common-multiple-import-plugin-errors/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Modifying mxc-ldap plugin to create a new blog for new user</title>
		<link>http://nicholaskwan.com/2009/06/27/modifying-mxc-ldap-plugin-to-create-a-new-blog-for-new-user/</link>
		<comments>http://nicholaskwan.com/2009/06/27/modifying-mxc-ldap-plugin-to-create-a-new-blog-for-new-user/#comments</comments>
		<pubDate>Sat, 27 Jun 2009 20:48:10 +0000</pubDate>
		<dc:creator>Nicholas</dc:creator>
				<category><![CDATA[Web Application Development]]></category>
		<category><![CDATA[documentation]]></category>
		<category><![CDATA[ldap]]></category>
		<category><![CDATA[mxc]]></category>
		<category><![CDATA[plugin]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://nicholaskwan.com/?p=389</guid>
		<description><![CDATA[The mxc-ldap plugin has a simplified layout because it does not have any graphic interface to input the LDAP server information.  To enter the information, open the mxc-ldap.php file andfill in LDAP_HOST, LDAP_PORT (389), LDAP_VERSION, BASE_DN, ADMIN_DN, ADMIN_PW.  The plugin seems to work without the ADMIN_DN and the ADMIN_PW.  The plugin as default will create [...]]]></description>
			<content:encoded><![CDATA[<p></p><p>The mxc-ldap plugin has a simplified layout because it does not have any graphic interface to input the LDAP server information.  To enter the information, open the mxc-ldap.php file andfill in LDAP_HOST, LDAP_PORT (389), LDAP_VERSION, BASE_DN, ADMIN_DN, ADMIN_PW.  The plugin seems to work without the ADMIN_DN and the ADMIN_PW.  The plugin as default will create a Wordpress user upon signing in with their LDAP id&#8217;s.</p>
<p>To create a blog for the ldap user that signs in for the first time, we have to add several lines after creating the user (line 60).</p>
<p><span style="font-family: 'Courier New'; line-height: 18px; font-size: 12px; white-space: pre;"> </span></p>
<pre class="brush: php;">
$userID = wp_insert_user($userData);  //gets the userID from the userData that was just inserted and puts it into $userID
$user = get_userdatabylogin($username);		//gets the username
$sitename = 'vfolio.educ.ubc.ca';	//the site where the blog is held, 'efolio.educ.ubc.ca' for production server
$blogdir = &quot;/&quot;.$ldapuser[0][LOGIN][0]; //  the directory of where the blog will be; the url that comes after the sitename
$blogtitle = $ldapuser[0][LOGIN][0];	// title of the blog (can be changed)
$meta = &quot;&quot;;
wpmu_create_blog($sitename,$blogdir,$blogtitle,$userID,$meta,'1');  //creates the blog with above information&lt;/code&gt;
</pre>
<p>The plugin webpage doesn&#8217;t exist anymore and the author webpage is in French, so help for this plugin is very limited.  Feel free to leave me comments if you get stuck with this plugin and I will try to help you best to my ability.  However, make sure you read Clifton&#8217;s <a href="http://clifgriffin.com/2009/05/13/simple-ldap-login-13-for-wordpress/">post</a> on his plugin first, which is what the mxc-ldap plugin is based on (but you already know that).</p>
<p>This article was written for the Faculty of Education at the University of British Columbia and cannot be copied, modified, or published without the consent of the University.</p>
]]></content:encoded>
			<wfw:commentRss>http://nicholaskwan.com/2009/06/27/modifying-mxc-ldap-plugin-to-create-a-new-blog-for-new-user/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Modifying Mike Smullin&#8217;s List Author plugin to work with Wordpress 2.7 and 2.8</title>
		<link>http://nicholaskwan.com/2009/06/27/modifying-mike-smullins-list-author-plugin-to-work-with-wordpress-2-7-and-2-8/</link>
		<comments>http://nicholaskwan.com/2009/06/27/modifying-mike-smullins-list-author-plugin-to-work-with-wordpress-2-7-and-2-8/#comments</comments>
		<pubDate>Sat, 27 Jun 2009 20:35:24 +0000</pubDate>
		<dc:creator>Nicholas</dc:creator>
				<category><![CDATA[Web Application Development]]></category>
		<category><![CDATA[documentation]]></category>
		<category><![CDATA[List Authors]]></category>
		<category><![CDATA[plugin]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://nicholaskwan.com/?p=386</guid>
		<description><![CDATA[The list authors plugin by Mike Smullin listed the authors of all the posts in the blog in the sidebar; when the user presses on the name, all the posts by the user will be filters.  however, this plugin only worked up until 2.6.3.  At 2.7.1, the plugin simply didn&#8217;t show up on the Dashboard.
The [...]]]></description>
			<content:encoded><![CDATA[<p></p><p style="text-align: left;">The list authors plugin by Mike Smullin listed the authors of all the posts in the blog in the sidebar; when the user presses on the name, all the posts by the user will be filters.  however, this plugin only worked up until 2.6.3.  At 2.7.1, the plugin simply didn&#8217;t show up on the Dashboard.</p>
<p style="text-align: left;">The list authors plugin by Matthew Toso worked in 2.7+ but the plugin didn&#8217;t list all the authors of the posts in the blog, only the ones that were linked to the blog, whether a subscriber, editor, etc.</p>
<p style="text-align: left;">The code that was changed in Matthew&#8217;s plugin was in the section where the author was pulled from the database and blog, while Mike pulled from both, Matthew only cared about the ones that were linked to the blog, so the fix was to replace Matthew&#8217;s Code with Mike&#8217;s code that were between the author tags:</p>
<p style="text-align: left;">Remove:</p>
<p><code>
<pre class="brush: php;">
&lt;!-- Authors --&gt;
&lt;ul&gt;
&lt;?php wp_list_authors('optioncount='.$options['Option Count'].'&amp;exclude_admin='.$options['Exclude Administrator'].'&amp;show_fullname='.$options['Show Full Name'].'&amp;hide_empty='.$options['Hide Empty'].$feed_image); ?&gt;
&lt;/ul&gt;
&lt;!-- /Authors --&gt;
&lt;span style=&quot;font-family: Georgia;&quot;&gt;</pre>
<p></span></code></p>
<p style="text-align: left;">And replace with:<br />
<span style="font-family: -webkit-monospace;"> </span></p>
<p style="text-align: left;">
<p style="text-align: left;"><span style="font-family: -webkit-monospace;">
<pre class="brush: php;">
&lt;!-- Authors --&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p style=&quot;text-align: left;&quot;&gt;&lt;code&gt;&lt;ul&gt;
&lt;?php
require_once(ABSPATH.'wp-load.php');
global $wpdb;
global $blog_id;
$authors = $wpdb-&gt;get_col(&quot;SELECT DISTINCT post_author FROM wp_&quot;.$blog_id.&quot;_posts&quot;);
foreach( $authors as &amp;$author) {
$author_names = $wpdb-&gt;get_row(&quot;SELECT ID, display_name, user_nicename FROM wp_users WHERE ID=&quot;.$author);
echo '&lt;li&gt;&lt;a href=&quot;'.get_bloginfo('url').'/author/'.$author_names-&gt;user_nicename.'&quot;&gt;'.$author_names-&gt;display_name.'&lt;/a&gt;&lt;/li&gt;';
}
unset($author);
wp_list_authors('optioncount='.$options['Option Count'].'&amp;exclude_admin='.$options['Exclude Administrator'].'&amp;show_fullname='.$options['Show Full Name'].'&amp;hide_empty='.$options['Hide Empty']); ?&gt;
&lt;/ul&gt;
&lt;!-- /Authors --&gt;&lt;/code&gt;&lt;/p&gt;

&lt;p style=&quot;text-align: left;&quot;&gt;</pre>
</p>
<p style="text-align: left;">
<p style="text-align: left;">This article was written for the Faculty of Education at the University of British Columbia and cannot be copied, modified, or published without the consent of the University.</p>
]]></content:encoded>
			<wfw:commentRss>http://nicholaskwan.com/2009/06/27/modifying-mike-smullins-list-author-plugin-to-work-with-wordpress-2-7-and-2-8/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Spammers be gone</title>
		<link>http://nicholaskwan.com/2009/06/02/spammers-be-gone/</link>
		<comments>http://nicholaskwan.com/2009/06/02/spammers-be-gone/#comments</comments>
		<pubDate>Tue, 02 Jun 2009 16:01:43 +0000</pubDate>
		<dc:creator>Nicholas</dc:creator>
				<category><![CDATA[Web Application Development]]></category>
		<category><![CDATA[recaptcha]]></category>
		<category><![CDATA[spam]]></category>

		<guid isPermaLink="false">http://nicholaskwan.com/?p=320</guid>
		<description><![CDATA[Not even one month after setting up this blog, I was getting ridiculously spammed on my Home page.  Although 3 or 4 a day might not seem like a lot, these spam messages do add up.  So I had to make a site a littler uglier and install reCaptcha.
EDIT: decided to go back to Akismet [...]]]></description>
			<content:encoded><![CDATA[<p></p><p>Not even one month after setting up this blog, I was getting ridiculously spammed on my Home page.  Although 3 or 4 a day might not seem like a lot, these spam messages do add up.  So I had to make a site a littler uglier and install reCaptcha.</p>
<p>EDIT: decided to go back to Akismet instead, reCaptcha seemed like a drag</p>
]]></content:encoded>
			<wfw:commentRss>http://nicholaskwan.com/2009/06/02/spammers-be-gone/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
