<?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; plugin</title>
	<atom:link href="http://nicholaskwan.com/tag/plugin/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>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>
	</channel>
</rss>
