<?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>thedeadone.net &#187; Game-Crafters-Guild</title>
	<atom:link href="http://thedeadone.net/tag/game-crafters-guild/feed/" rel="self" type="application/rss+xml" />
	<link>http://thedeadone.net</link>
	<description></description>
	<lastBuildDate>Tue, 14 Feb 2012 22:06:46 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1.3</generator>
		<item>
		<title>A personal perspective of the demise of DiddlySquat</title>
		<link>http://thedeadone.net/blog/a-personal-perspective-of-the-demise-of-diddlysquat/</link>
		<comments>http://thedeadone.net/blog/a-personal-perspective-of-the-demise-of-diddlysquat/#comments</comments>
		<pubDate>Fri, 27 Apr 2007 08:27:19 +0000</pubDate>
		<dc:creator>Mark Cunningham</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[Game-Crafters-Guild]]></category>
		<category><![CDATA[Irish-Gaming]]></category>
		<category><![CDATA[roleplaying]]></category>

		<guid isPermaLink="false">http://thedeadone.net/blog/a-personal-perspective-of-the-demise-of-diddlysquat/</guid>
		<description><![CDATA[Specky, one of the founders of DiddlySquat, has given his personal account of the demise of DiddlySquat. According to the Irish Gaming and Roleplaying Wiki: Diddlysquat is an RPG publishing company founded by Geoff Moore in 2004 with the intention of producing a horror/sci-fi tabletop RPG called Spectres. The Spectres game was intended to be [...]]]></description>
			<content:encoded><![CDATA[
<!-- google_ad_section_start -->
<!--INFOLINKS_ON-->
<p><p><a HREF="http://specky-ie.livejournal.com">Specky</a>, one of the founders of DiddlySquat, has given his <a href="http://specky-ie.livejournal.com/91019.html">personal account of the demise of DiddlySquat</a>.</p>
<p>According to the <a HREF="http://irishgamingwiki.com/wiki/DiddlySquat">Irish Gaming and Roleplaying Wiki</a>:</p>
<blockquote><p>Diddlysquat is an RPG publishing company founded by Geoff Moore in 2004 with the intention of producing a horror/sci-fi tabletop RPG called Spectres. The Spectres game was intended to be released as three prequels followed by the main game system.</p></blockquote>
<p>But sadly DiddlySquat is no more and I guess we won&#8217;t be seeing Spectres as a full game (though the work will probably be made available via <a HREF="http://www.gamecraftersguild.com">GCG</a>).</p>
<p>When you read this kind of things it really makes you cynical about the communities involved (both online and offline). Sure I&#8217;ve argued and caused near-flame wars in the online half of the Irish gaming community, but I would hope that people don&#8217;t bare grudges and that they should realise that, sometimes, antagonistic nature of online discussion is actually healthy. But I don&#8217;t think that&#8217;s true. People do hold grudges for the slightest things.</p>
<p>So, here is a farewell to another doomed project of the Irish Gaming Community. I roll my dice to you (*sounds of all dice scattering across the table and getting lost on the floor* doh!) <img src='http://thedeadone.net/wp-includes/images/smilies/icon_sad.gif' alt=':(' class='wp-smiley' /> </p>
<p>As an aside, I can&#8217;t help but draw some parrallels to <a HREF="http://games.groups.yahoo.com/group/igaming/message/35752">this earlier history</a> of other projects in the community too and the recent <a HREF="http://community.livejournal.com/irishgaming/6356.html">flop of the an Game Chef concept</a> (see <a HREF="http://community.livejournal.com/irishgaming/6356.html?thread=28116#t28116">this comment</a>). I guess I&#8217;m too old for this shit. <img src='http://thedeadone.net/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /><br />
<h3 class='related_post_title'>Related Posts:</h3>
<ul class='related_post'>
<li><a href='http://thedeadone.net/blog/frustrating/' title='Frustrating!'>Frustrating!</a></li>
<li><a href='http://thedeadone.net/blog/gcg-its-alive/' title='GCG&#8230; it&#8217;s alive!'>GCG&#8230; it&#8217;s alive!</a></li>
<li><a href='http://thedeadone.net/blog/irish-scenario-con-question-2009/' title='Some of my thoughts on the Irish Scenario-Con question'>Some of my thoughts on the Irish Scenario-Con question</a></li>
<li><a href='http://thedeadone.net/blog/new-the-adventuring-party-podcast/' title='New: The Adventuring Party podcast'>New: The Adventuring Party podcast</a></li>
<li><a href='http://thedeadone.net/blog/some-fun-with-planet-irish-gaming/' title='Some fun with Planet Irish Gaming'>Some fun with Planet Irish Gaming</a></li>
</ul>

<!--INFOLINKS_OFF-->
<!-- google_ad_section_end -->
]]></content:encoded>
			<wfw:commentRss>http://thedeadone.net/blog/a-personal-perspective-of-the-demise-of-diddlysquat/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Add a &#8220;pligg it&#8221; button to your webpage!</title>
		<link>http://thedeadone.net/how-to/add-a-pligg-it-button-to-your-webpage/</link>
		<comments>http://thedeadone.net/how-to/add-a-pligg-it-button-to-your-webpage/#comments</comments>
		<pubDate>Tue, 07 Nov 2006 10:00:18 +0000</pubDate>
		<dc:creator>Mark Cunningham</dc:creator>
				<category><![CDATA[How To]]></category>
		<category><![CDATA[Game-Crafters-Guild]]></category>
		<category><![CDATA[Pligg]]></category>
		<category><![CDATA[Redbrick]]></category>

		<guid isPermaLink="false">http://thedeadone.net/news/add-a-pligg-it-button-to-your-webpage/</guid>
		<description><![CDATA[Found this neat little feature in Pligg that allows you to easily add a link to Pligg. The simple code can be expanded so you can add a button to your webpage that allows it to be easily submitted to Pligg. It&#8217;s not world-shattering, nor is it an unusual feature to find. However, if your [...]]]></description>
			<content:encoded><![CDATA[
<!-- google_ad_section_start -->
<!--INFOLINKS_ON-->
<p><p>Found this neat little feature in <a HREF="http://www.pligg.com">Pligg</a> that allows you to easily add a link to Pligg. The simple code can be expanded so you can add a button to your webpage that allows it to be easily submitted to Pligg. It&#8217;s not world-shattering, nor is it an unusual feature to find.</p>
<p>However, if your a <a HREF="http://www.redbrick.dcu.ie">Redbrick Member</a> you could add this piece of code to any of your webpages that would all you or another Redbrick user to submit it to Pligg.</p>
<p><a HREF="javascript:q=(document.location.href);void(open('http://www.redbrick.dcu.ie/~cammy/pig/submit.php?url='+escape(q),'','resizable,location,menubar,toolbar,scrollbars,status'));">Submit this to Redbrick Pligg!</a></p>
<p>If you want, you can replace &#8220;document.location.href&#8221; with an explicit URL. I guess what we really need is a icon for Redbrick Pligg!</p>
<p>I&#8217;m considering adding it to <a HREF="http://planet.redbrick.dcu.ie">Planet Redbrick</a> and <a HREF="http://wiki.redbrick.dcu.ie">Redbrick Wiki</a>. Is it a good idea? I could package it up in a <a HREF="http://wordpress.org">WordPress</a> plugin but I don&#8217;t know how many Redbrick Bloggers use WordPress.</p>
<p>The same also applies for <a HREF="http://www.gamecraftersguild.com/p/">Game Crafter&#8217;s Guild&#8217;s Pligg</a>, however this Pligg is specifically for Gaming and Roleplaying related content, and we don&#8217;t have an icon either!</p>
<p><a HREF="javascript:q=(document.location.href);void(open('http://www.gamecraftersguild.com/p/submit.php?url='+escape(q),'','resizable,location,menubar,toolbar,scrollbars,status'));">Submit to Game Crafter&#8217;s Guild&#8217;s Pligg!</a><br />
<h3 class='related_post_title'>Related Posts:</h3>
<ul class='related_post'>
<li><a href='http://thedeadone.net/blog/a-thought-exercise-redbrick-web-20/' title='A thought-exercise: Redbrick &#8220;Web 2.0&#8243;'>A thought-exercise: Redbrick &#8220;Web 2.0&#8243;</a></li>
<li><a href='http://thedeadone.net/blog/frustrating/' title='Frustrating!'>Frustrating!</a></li>
<li><a href='http://thedeadone.net/how-to/integrating-pligg-beta-810-with-wordpress-204/' title='Integrating Pligg beta 8.1.0 with WordPress 2.0.4 (v1.1)'>Integrating Pligg beta 8.1.0 with WordPress 2.0.4 (v1.1)</a></li>
<li><a href='http://thedeadone.net/how-to/integrating-pligg-beta-810-with-pubcookie/' title='Integrating Pligg beta 8.1.0 with PubCookie'>Integrating Pligg beta 8.1.0 with PubCookie</a></li>
<li><a href='http://thedeadone.net/blog/a-new-look-for-thedeadonenet/' title='A new look for thedeadone.net'>A new look for thedeadone.net</a></li>
</ul>

<!--INFOLINKS_OFF-->
<!-- google_ad_section_end -->
]]></content:encoded>
			<wfw:commentRss>http://thedeadone.net/how-to/add-a-pligg-it-button-to-your-webpage/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Frustrating!</title>
		<link>http://thedeadone.net/blog/frustrating/</link>
		<comments>http://thedeadone.net/blog/frustrating/#comments</comments>
		<pubDate>Thu, 19 Oct 2006 10:50:14 +0000</pubDate>
		<dc:creator>Mark Cunningham</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[COG]]></category>
		<category><![CDATA[Fiction]]></category>
		<category><![CDATA[Game-Crafters-Guild]]></category>
		<category><![CDATA[Irish-Gaming]]></category>
		<category><![CDATA[Redbrick]]></category>
		<category><![CDATA[roleplaying]]></category>
		<category><![CDATA[Wiki]]></category>
		<category><![CDATA[Wordpress]]></category>

		<guid isPermaLink="false">http://thedeadone.net/news/frustrating/</guid>
		<description><![CDATA[&#8230; and just a little soul draining. My last few entries on my blog have all been about the Game Crafters Guild website and mostly technical in nature. Here, here and here. I thought the idea behind the GCG site was/is a good one. It would be something I would contribute to and participate in. [...]]]></description>
			<content:encoded><![CDATA[
<!-- google_ad_section_start -->
<!--INFOLINKS_ON-->
<p><p>&#8230; and just a little soul draining. My last few entries on my blog have all been about the <a href="http://www.gamecraftersguild.com">Game Crafters Guild</a> website and mostly technical in nature. <a href="http://thedeadone.net/software/integrating-pligg-beta-810-with-wordpress-204/">Here</a>, <a href="http://thedeadone.net/software/getting-dokuwiki-to-use-wordpress-authentication/">here</a> and <a href="http://thedeadone.net/blog/gcg-its-alive/">here</a>. </p>
<p>I thought the idea behind the GCG site was/is a good one. It would be something I would contribute to and participate in. So I made a new feature-rich version of it and it went live a little while ago. I didn&#8217;t just plug together some pieces of software, I wrote code to join them, tested it, created new themes and templates for and brought it all together. It works. It is alive. </p>
<p>However, it is barely shambling forward.<br />
<span id="more-261"></span><br />
I only know a little about getting communities started. I believe I succeeded with the <a href="http://wiki.redbrick.dcu.ie">Redbrick Wiki</a>, failed with <a href="http://thedeadone.net/blog/project-free-brick/">Project Freebrick</a> and <a href="http://thedeadone.net/blog/the-occult-is-dead/">Occult Wiki</a>. The <a href="http://irishgamingwiki.com">IrishGamingWiki.com</a> is ticking over, at least more so than GCG. I&#8217;m only involved in running <a href="http://planet.redbrick.dcu.ie">Redbrick Planet</a> but that seems to be trickling along.</p>
<p>The Formula: People must want it, then you fulfil that need and off you go. Once you have three or four people who believe the idea other than you and start using it earnestly, things start to happen. </p>
<p>With GCG, I was under the impression that there were quite a few people who would be interested in it. But I guess I did the site upgrade in a sort of vacuum. No-one was calling for it. No-one was arguing about it. Just me, thinking it was a good idea. Still do. Still working on the site. But there was no &#8220;buzz&#8221; anywhere about it. It just happened. Perhaps I should start some flame war on igaming or irishgaming.com/forums&#8230; that would generate interest, polarise people for and against the idea&#8230;</p>
<p>It&#8217;s just frustrating that barely anyone has logged on. I can imagine more than few had a look at the site and went &#8220;hmm, that looks good, <i>when people start using it</i>&#8221; and then buggered off&#8230; not realising that we need to turn you lurkers into users. I feel like a cafe manager sitting in a brand new cafe, that’s totally empty with the staff constantly cleaning tables to look busy. People look in and see it&#8217;s not busy, so they&#8217;ll come back later!</p>
<p>Maybe I&#8217;m just coming down off my &#8220;creative&#8221; run with it. I did do a lot in a short space of time. Maybe I&#8217;m not patient enough, that it&#8217;ll happen in good time. Perhaps with the impending Gaelcon, people are too busy but after Gaelcon will start using it. Maybe. The worst thing is when your friends say, they like it and would use it and they&#8217;ll log on&#8230; and then don&#8217;t. They have good excuses and all that, I can&#8217;t fault them per say, but they <i>all</i> have excuses and reasons.</p>
<p>What do people who read my blog think about it? Is GCG a good idea? Would use it and if so, why aren&#8217;t you, what’s the thing its missing?</p>
<p>One of the more frustrating elements about it is that I put some other personal projects on hold to try and finish the site. In a sense, I got buried in code so I can&#8217;t contribute to the site as a user would, as <b>I</b> would if someone else had created the site. I have a project (mentioned <a href="http://thedeadone.net/blog/writing-huh/">here</a> and <a href="http://thedeadone.net/writing/rpg/conflict-resolution-and-you-thought-i-was-weird/">here</a> as &#8220;COG&#8221;) that I had planned to use the site to do something with for example but that’s paused right now. I had a few blog entries I wanted to write about too, which are now just empty drafts waiting patiently to be filled in.</p>
<h3 class='related_post_title'>Related Posts:</h3>
<ul class='related_post'>
<li><a href='http://thedeadone.net/blog/gcg-its-alive/' title='GCG&#8230; it&#8217;s alive!'>GCG&#8230; it&#8217;s alive!</a></li>
<li><a href='http://thedeadone.net/blog/some-fun-with-planet-irish-gaming/' title='Some fun with Planet Irish Gaming'>Some fun with Planet Irish Gaming</a></li>
<li><a href='http://thedeadone.net/blog/maybe-not-the-end-of-an-era-but-the-end-of-something/' title='Maybe not the end of an era, but the end of something!'>Maybe not the end of an era, but the end of something!</a></li>
<li><a href='http://thedeadone.net/blog/a-personal-perspective-of-the-demise-of-diddlysquat/' title='A personal perspective of the demise of DiddlySquat'>A personal perspective of the demise of DiddlySquat</a></li>
<li><a href='http://thedeadone.net/download/getting-dokuwiki-to-use-wordpress-authentication/' title='Getting DokuWiki to use WordPress Authentication (v1.2)'>Getting DokuWiki to use WordPress Authentication (v1.2)</a></li>
</ul>

<!--INFOLINKS_OFF-->
<!-- google_ad_section_end -->
]]></content:encoded>
			<wfw:commentRss>http://thedeadone.net/blog/frustrating/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Integrating Pligg beta 8.1.0 with WordPress 2.0.4 (v1.1)</title>
		<link>http://thedeadone.net/how-to/integrating-pligg-beta-810-with-wordpress-204/</link>
		<comments>http://thedeadone.net/how-to/integrating-pligg-beta-810-with-wordpress-204/#comments</comments>
		<pubDate>Tue, 17 Oct 2006 10:59:18 +0000</pubDate>
		<dc:creator>Mark Cunningham</dc:creator>
				<category><![CDATA[How To]]></category>
		<category><![CDATA[Game-Crafters-Guild]]></category>
		<category><![CDATA[Pligg]]></category>
		<category><![CDATA[Wordpress]]></category>

		<guid isPermaLink="false">http://thedeadone.net/software/integrating-pligg-beta-810-with-wordpress-204/</guid>
		<description><![CDATA[I&#8217;ve managed to get Pliggto use WordPress authentication and user database. You can see it running on the Game Crafter&#8217;s Guild website. I recently got Pligg using Pubcookie and that formed the basis of this work, however they are very different. I&#8217;ve only tested this with Pligg Beta 8.1.0. I believe future versions may have [...]]]></description>
			<content:encoded><![CDATA[
<!-- google_ad_section_start -->
<!--INFOLINKS_ON-->
<p><p>I&#8217;ve managed to get <a href="http://www.pligg.com/">Pligg</a>to use <a href="http://wordpress.org">WordPress</a> authentication and user database. You can see it running on the <a href="http://gamecraftersguild.com/p">Game Crafter&#8217;s Guild website</a>.</p>
<p>I recently got <a href="http://thedeadone.net/software/integrating-pligg-beta-810-with-pubcookie/">Pligg using Pubcookie</a> and that formed the basis of this work, however they are very different.</p>
<p>I&#8217;ve only tested this with Pligg Beta 8.1.0. I believe future versions may have a better approach for external authentication so I can&#8217;t guarantee this will work with future versions.<br />
<span id="more-260"></span><br />
This approach is very &#8220;hacky&#8221;. I&#8217;ve also been slightly lazy. It assumes that you will use WordPress&#8217; login, logout and register pages. This will break the existing login, logout and register forms in Pligg. The ultimate solution would allow the Pligg forms to login and logout also on WordPress and the register form to create new users in WordPress.</p>
<p>It also does not attempt to merge the user databases from WordPress and Pligg together. Instead they are left seperate. This means that administrators have two places to manage users. If you want to delete a user, you&#8217;ve got to delete them from WordPress and Pligg seperately.</p>
<p>I&#8217;ve done previous external application integrations with WordPress, most notable with <a href="http://thedeadone.net/software/getting-dokuwiki-to-use-wordpress-authentication/">DokuWiki</a>. In these previous case, I was able to allow the use of WordPress template tags in DokuWiki. However, in the case of Pligg, it is not possible as there are several function name clashes. Pligg and WordPress are considered CMSs (Content Management Systems) and it is inevitable that function names and variables clash.</p>
<h2>Version History</h2>
<h3>1.1 (19/10/2006)</h3>
<p>Stray header redirection in login.php removed.</p>
<h3>1.0 (17/09/2006)</h3>
<p>First Release</p>
<h2>Installation locations</h2>
<p>The first thing to do is decide on where you will install Pligg and WordPress. Pligg must be installed in either a directory on the same level as WordPress or a subdirectory of WordPress. In my code examples, I&#8217;ve installed WordPress and Pligg on the same level. I will refer to the WordPress directory as &#8220;wp&#8221; and Pligg as &#8220;p&#8221;. So, for reference, I have Pligg and WordPress installed like this:</p>
<pre>
/public_html/wp
/public_html/p
</pre>
<p>Equally valid would be:</p>
<pre>
/public_html/wp
/public_html/wp/p
</pre>
<p>Pligg and WordPress should be part of the same domain. Otherwise the WordPress cookies won&#8217;t be picked up by Pligg.</p>
<h2>Installing the software</h2>
<p>Install WordPress normally and configured it how you will. Make sure it&#8217;s all working. Make a not eof your database prefix and site url. You can get your database prefix from &#8216;wp-config.php&#8217;. It is the &#8216;$table_prefix&#8217; variable. Your site url (or URI if you want to be pedantic), is where you access WordPress from. You can get the exact value from your &#8220;Options&#8221;, &#8220;General&#8221; panel when you log in to WordPress as admin. Your site url should have no trailing slash. It is important you get this right as you won&#8217;t be able to log in to Pligg later otherwise. For example, if you install into a different directory, then your webpage&#8217;s url will be different from your WordPress url.</p>
<p>Now install Pligg, but use the same database. Make sure everything is working, in particular that you can log in using the &#8220;god&#8221; account.</p>
<h2>Modifying Pligg</h2>
<p>All the work to modify Pligg takes place in &#8216;libs/login.php&#8217;. What we want to do is get Pligg to login using WordPress cookies/authentication. If the user doesn&#8217;t yet exist in Pligg, create it. Also, copy over all the existing user data to the Pligg database. We won&#8217;t be using Pligg&#8217;s login, authentication or logout any more.</p>
<p>However, we can&#8217;t just include wordpress and call wordpress functions. Instead, we&#8217;re going to have to do it manually. What I&#8217;ve done is added a function called is_user_logged_onto_wp(), which does all the extra work.</p>
<p>Here is the modified &#8216;libs/login.php&#8217;. Make sure to correctly set the $wp_db_prefix to your database prefix (including the underscore) and $wp_siteurl to your WordPress url.</p>
<p>< ?php<br />
// The source code packaged with this file is Free Software, Copyright (C) 2005 by<br />
// Ricardo Galli <gallir at uib dot es>.<br />
// It&#8217;s licensed under the AFFERO GENERAL PUBLIC LICENSE unless stated otherwise.<br />
// You can get copies of the licenses here:<br />
// 		http://www.affero.org/oagpl.html<br />
// AFFERO GENERAL PUBLIC LICENSE is also included in the file called &#8220;COPYING&#8221;.<br />
// Modified by Mark Cunningham <mark dot cunningham at gmail dot com><br />
// (http://thedeadone.net). Log in using WordPress<br />
// WordPress path (you don&#8217;t really need this)<br />
//if(!defined(&#8216;WP_ROOT&#8217;)) define(&#8216;WP_ROOT&#8217;, mnmpath.&#8217;/../wp/&#8217;);<br />
//<br />
// Can&#8217;t do this, sadly as &#8220;get_permalink&#8221; collides in both code bases.<br />
// Must do everything manually!<br />
//require_once WP_ROOT.&#8217;wp-config.php&#8217;;<br />
$wp_db_prefix = &#8220;wp_&#8221;;<br />
$wp_siteurl = &#8220;http://www.myblog.com/wp&#8221;;<br />
// Generate cookie keys!<br />
if( !defined(&#8216;WP_COOKIEHASH&#8217;) ) {<br />
   // this value should be the same as siteurl<br />
   $cookiehash = md5($wp_siteurl);<br />
   define(&#8216;WP_COOKIEHASH&#8217;, $cookiehash);<br />
}<br />
if ( !defined(&#8216;WP_USER_COOKIE&#8217;) )<br />
   define(&#8216;WP_USER_COOKIE&#8217;, &#8216;wordpressuser_&#8217;. WP_COOKIEHASH);<br />
if ( !defined(&#8216;WP_PASS_COOKIE&#8217;) )<br />
   define(&#8216;WP_PASS_COOKIE&#8217;, &#8216;wordpresspass_&#8217;. WP_COOKIEHASH);<br />
// TODO: storing copy of password in pligg?<br />
class UserAuth {<br />
	var $user_id  = 0;<br />
	var $user_login = &#8220;&#8221;;<br />
	var $md5_pass = &#8220;&#8221;;<br />
	var $authenticated = FALSE;<br />
    function is_user_logged_onto_wp(){<br />
        global $db, $wp_db_prefix;<br />
        // Most of this stuff I&#8217;ve taken (and modified) from WordPress codebase<br />
        // Do we have a username and password?<br />
	    if ( !empty($_COOKIE[WP_USER_COOKIE]) &#038;&#038; !empty($_COOKIE[WP_PASS_COOKIE]) ){<br />
	       $wp_username = $_COOKIE[WP_USER_COOKIE];<br />
	       $wp_password = $_COOKIE[WP_PASS_COOKIE];<br />
           // Does the user exist in wordpress?<br />
           if(!$wp_user = $db->get_row(&#8220;SELECT * FROM &#8220;.$wp_db_prefix.&#8221;users WHERE user_login = &#8216;$wp_username&#8217;&#8221;)){<br />
              // User doesn&#8217;t exist in wordpress&#8230; so&#8230;<br />
              // &#8230; should I delete this user in Pligg?<br />
              echo &#8220;<strong><font color=\"red\">This user $wp_username does not exist in WordPress!</font></strong><br />&#8220;;<br />
              return false;<br />
           }<br />
           // Grab data for user<br />
           $wp_userdata = $db->get_results(&#8220;SELECT meta_key, meta_value FROM &#8220;.$wp_db_prefix.&#8221;usermeta WHERE user_id = &#8216;$wp_user->ID&#8217;&#8221;);<br />
           if ($wp_userdata) {<br />
		      foreach ( $wp_userdata as $meta ) {<br />
		   	     @ $value = unserialize($meta->meta_value);<br />
		   		 if ($value === FALSE)<br />
		   		    $value = $meta->meta_value;<br />
		   		    $wp_user->{$meta->meta_key} = $value;<br />
		   			// We need to set user_level from meta, not row<br />
		   			if ( $wp_db_prefix.&#8221;user_level&#8221; == $meta->meta_key )<br />
		   				$wp_user->user_level = $meta->meta_value;<br />
		   		}<br />
		   }<br />
		   // Check if username and password are valid!<br />
		   if ( md5($wp_user->user_pass) != $wp_password) {<br />
		      // bad password!<br />
		      echo &#8220;<strong><font color=\"red\">Bad password in cookie for $wp_username!</font></strong><br />&#8220;;<br />
		      return false;<br />
		   }<br />
           // Okay, user exists and _is_ logged into wordpress!<br />
	       // check if user exists in pligg!<br />
		   $ok = 1;<br />
		   // if a user doesn&#8217;t exit&#8230; create the user<br />
		   if(!user_exists($wp_username)){<br />
		     $userip = $_SERVER['REMOTE_ADDR'];<br />
		     $ok = $db->query(&#8220;INSERT INTO users (user_login, user_email, user_pass, user_date, user_ip) VALUES (&#8216;$wp_username&#8217;, &#8216;$wp_user->user_email&#8217;, &#8216;password&#8217;, now(), &#8216;$userip&#8217;)&#8221;);<br />
		   }<br />
		   // if user creation was okay or user was already created, sync and log in<br />
		   if($ok) {<br />
               // grab pligg user data<br />
			   $user=$db->get_row(&#8220;SELECT user_id, user_pass, user_login FROM users WHERE user_login = &#8216;$wp_username&#8217;&#8221;);<br />
			   // Copy user data from wordpress!<br />
			   $sql  = &#8220;UPDATE users set &#8220;;<br />
			   // admins should be set as &#8220;god&#8221; in pligg. What other levels should be mapped?<br />
               if($wp_user->user_level >= &#8217;10&#8242;){<br />
                  $sql .= &#8220;user_level=&#8217;god&#8217;, &#8220;;<br />
               } else {<br />
                  $sql .= &#8220;user_level=&#8217;normal&#8217;, &#8220;;<br />
               }<br />
               $sql .= &#8220;user_date=&#8217;$wp_user->user_registered&#8217;, &#8220;;<br />
			   $sql .= &#8220;user_url=&#8217;$wp_user->user_url&#8217;, &#8220;;<br />
			   $sql .= &#8220;user_aim=&#8217;$wp_user->user_aim&#8217;, &#8220;;<br />
			   $sql .= &#8220;user_yahoo=&#8217;$wp_user->user_yim&#8217;, &#8220;;<br />
               $sql .= &#8220;user_gtalk=&#8217;$wp_user->jabber&#8217;, &#8220;;<br />
               $sql .= &#8220;user_email=&#8217;$wp_user->user_email&#8217; &#8220;;<br />
               $sql .= &#8220;WHERE user_id=$user->user_id&#8221;;<br />
               // there are other fields in pligg that don&#8217;t exist in wordpress.<br />
               // Just ignoring them for the time being.<br />
               $db->query($sql);<br />
               // These are required for login to Pligg<br />
               $this->user_login = $user->user_login;<br />
			   $this->user_id = $user->user_id;<br />
			   $this->authenticated = TRUE;<br />
			   $this->md5_pass = md5($user->user_pass);<br />
			   $this->SetIDCookie(1, false);<br />
               // Oh, don&#8217;t forget to log the ip!<br />
			   $lastip=$_SERVER['REMOTE_ADDR'];<br />
			   mysql_query(&#8220;UPDATE users SET user_lastip = &#8216;$lastip&#8217; WHERE user_id = {$user->user_id} LIMIT 1&#8243;);<br />
			   mysql_query(&#8220;UPDATE users SET user_lastlogin = now() WHERE user_id = {$user->user_id} LIMIT 1&#8243;);<br />
               // All good!<br />
			   return true;<br />
	       }<br />
	       else<br />
	       {<br />
	          echo &#8220;<strong><font color=\"red\">Problem creating user in Pligg!</font></strong><br />&#8220;;<br />
	       }<br />
	    }<br />
	    else<br />
	    {<br />
	       //debug<br />
	       //echo &#8220;<strong>No wordpress user found!</strong><br />&#8220;;<br />
	    }<br />
	    return false;<br />
    }<br />
    function UserAuth() {<br />
		global $db;<br />
        // Are we logged into wordpress?<br />
        // Don&#8217;t do anything unless we are!<br />
        if($this->is_user_logged_onto_wp()){<br />
			if(isset($_COOKIE['mnm_user']) &#038;&#038; isset($_COOKIE['mnm_key']) &#038;&#038; $_COOKIE['mnm_user'] !== &#8221;) {<br />
				// Si ya está autentificado de antes, rellenamos la estructura.<br />
				$userInfo=explode(&#8220;:&#8221;, base64_decode($_REQUEST['mnm_key']));<br />
				if(crypt($userInfo[0], 22)===$userInfo[1]<br />
					&#038;&#038; $_COOKIE['mnm_user'] === $userInfo[0]) {<br />
					$dbusername = $db->escape($_COOKIE['mnm_user']);<br />
					$dbuser=$db->get_row(&#8220;SELECT user_id, user_pass, user_level FROM users WHERE user_login = &#8216;$dbusername&#8217;&#8221;);<br />
					if($dbuser->user_id > 0 &#038;&#038; md5($dbuser->user_pass)==$userInfo[2]) {<br />
						$this->user_id = $dbuser->user_id;<br />
						$this->user_level = $dbuser->user_level;<br />
						$this->user_login  = $userInfo[0];<br />
						$this->md5_pass = $userInfo[2];<br />
						$this->authenticated = TRUE;<br />
					}<br />
				}<br />
			}<br />
	    // Logout of Pligg if not logged in to wordpress<br />
		} else {<br />
		   $this->user_login = &#8220;&#8221;;<br />
		   $this->authenticated = FALSE;<br />
		   $this->SetIDCookie (0,false);<br />
		   header(&#8220;Cache-Control: no-cache, must-revalidate&#8221;);<br />
		   header(&#8220;Expires: &#8221; . gmdate(&#8220;r&#8221;, time()-3600));<br />
		}<br />
	}<br />
	function SetIDCookie($what, $remember) {<br />
		switch ($what) {<br />
			case 0:	// Borra cookie, logout<br />
				setcookie (&#8220;mnm_user&#8221;, &#8220;&#8221;, time()-3600, &#8220;/&#8221;); // Expiramos el cookie<br />
				setcookie (&#8220;mnm_key&#8221;, &#8220;&#8221;, time()-3600, &#8220;/&#8221;); // Expiramos el cookie<br />
				break;<br />
			case 1: //Usuario logeado, actualiza el cookie<br />
				// Atencion, cambiar aqu?cuando se cambie el password de base de datos a MD5<br />
				$strCookie=base64_encode(join(&#8216;:&#8217;,<br />
					array(<br />
						$this->user_login,<br />
						crypt($this->user_login, 22),<br />
						$this->md5_pass)<br />
					)<br />
				);<br />
				if($remember) $time = time() + 3600000; // Lo dejamos v?idos por 1000 horas<br />
				else $time = 0;<br />
				setcookie(&#8220;mnm_user&#8221;, $this->user_login, $time, &#8220;/&#8221;);<br />
				setcookie(&#8220;mnm_key&#8221;, $strCookie, $time, &#8220;/&#8221;);<br />
				break;<br />
		}<br />
	}<br />
	function Authenticate($username, $pass, $remember=false) {<br />
		global $db;<br />
		$dbusername=$db->escape($username);<br />
		$user=$db->get_row(&#8220;SELECT user_id, user_pass, user_login FROM users WHERE user_login = &#8216;$dbusername&#8217;&#8221;);<br />
		$saltedpass=generateHash($pass, substr($user->user_pass, 0, SALT_LENGTH));<br />
		if ($user->user_id > 0 &#038;&#038; $user->user_pass === $saltedpass) {<br />
			$this->user_login = $user->user_login;<br />
			$this->user_id = $user->user_id;<br />
			$this->authenticated = TRUE;<br />
			$this->md5_pass = md5($user->user_pass);<br />
			$this->SetIDCookie(1, $remember);<br />
			$lastip=$_SERVER['REMOTE_ADDR'];<br />
			mysql_query(&#8220;UPDATE users SET user_lastip = &#8216;$lastip&#8217; WHERE user_id = {$user->user_id} LIMIT 1&#8243;);<br />
            mysql_query(&#8220;UPDATE users SET user_lastlogin = now() WHERE user_id = {$user->user_id} LIMIT 1&#8243;);<br />
			return true;<br />
		}<br />
		return false;<br />
	}<br />
	function Logout($url=&#8217;./&#8217;) {<br />
		$this->user_login = &#8220;&#8221;;<br />
		$this->authenticated = FALSE;<br />
		$this->SetIDCookie (0);<br />
		//header(&#8220;Pragma: no-cache&#8221;);<br />
		header(&#8220;Cache-Control: no-cache, must-revalidate&#8221;);<br />
		header(&#8220;Location: $url&#8221;);<br />
		header(&#8220;Expires: &#8221; . gmdate(&#8220;r&#8221;, time()-3600));<br />
		header(&#8220;ETag: \&#8221;logingout&#8221; . time(). &#8220;\&#8221;");<br />
		die;<br />
	}<br />
}<br />
$current_user = new UserAuth();<br />
?><br />
[/soure]</p>
<p>Now login to wordpress and go to your Pligg frontpage. You may have to reload, but you should be automatically logged into Pligg! Remember, don&#8217;t use Pligg&#8217;s login or logout any more. I&#8217;ll deal with what you need to change in the templates to handle that soon. If you use your wordpress admin account, you&#8217;ll have full &#8216;god&#8217; mode in Pligg.</p>
<h2>Final modifications</h2>
<p>Your site isn&#8217;t fully secure yet. Delete &#8216;register.php&#8217; so that no-one can create accounts using Pligg. We can also simply remove &#8216;login.php&#8217; but lets not be so drastic. Lets modify &#8216;login.php. Look for these lines:</p>
<p>1<br />
if($_POST["processlogin"] == 1) {<br />
                $username = trim($_POST['username']);<br />
                $password = trim($_POST['password']);<br />
                $persistent = $_POST['persistent'];<br />
                if($current_user->Authenticate($username, $password, $persisten$<br />
                        $errorMsg=PLIGG_Visual_Login_Error;} else {<br />
                        if(strlen($_REQUEST['return']) > 1) {<br />
                                header(&#8216;Location: &#8216;.$_REQUEST['return']);<br />
                        } else {<br />
                                header(&#8216;Location: &#8216;.my_pligg_base.&#8217;/');<br />
                        }<br />
                        die;<br />
                }<br />
        }</p>
<p>We want to prevent hackers from using direct URLs to log in. So comment out the normal authentication test, as below.</p>
<p>if($_POST["processlogin"] == 1) {<br />
                $username = trim($_POST['username']);<br />
                $password = trim($_POST['password']);<br />
                $persistent = $_POST['persistent'];<br />
                if($current_user->Authenticate($username, $password, $persisten$<br />
                        $errorMsg=PLIGG_Visual_Login_Error;} else {<br />
                        if(strlen($_REQUEST['return']) > 1) {<br />
                                header(&#8216;Location: &#8216;.$_REQUEST['return']);<br />
                        } else {<br />
                                header(&#8216;Location: &#8216;.my_pligg_base.&#8217;/');<br />
                        }<br />
                        die;<br />
                }<br />
        }</p>
<p>Pligg also comes preconfigured with one special user account, the &#8220;god&#8221; account. You can&#8217;t delete this account via the admin interface. You can create the &#8220;god&#8221; account in WordPress to prevent some user creating it and gaining &#8220;god&#8221; rights on Pligg. Or if you know sql or have access some sort of web access to your database, you can rename the &#8220;god&#8221; account to match the username of an existing admin user or delete the user outright.</p>
<h2>Required Template Changes</h2>
<p>So, now your WordPress users can log in on WordPress and then be automatically logged in to Pligg. But you&#8217;ve got to point the login, logout and register links to your WordPress equivelents. If your happy enough modifying the template then your ready to go. However, heres a run down of the minimal changes required to make sure it&#8217;s okay.</p>
<p>Lets create a copy of the existing template, mollio-beat. To do this, just make a copy of &#8216;templates/mollio-beat&#8217; in &#8216;templates/&#8217; (including all subdirectories). Make sure the permissions are correct, etc. I renamed this copy &#8220;gcg1&#8243; (for Game Crafters Guild version1), so I now had a &#8216;template/gcg1&#8242;. I went into the admin interface in Pligg and under the Template configuration, changed &#8216;mollio-beat&#8217; to &#8216;gcg1&#8242; and disabled the option that lets users change the template. We don&#8217;t want users being able to go back to the old way of authentication.</p>
<p>We can&#8217;t use WordPress template tags. You can always write PHP and SQL code that access the data manually in your database if your that way inclined. This means we have to use direct links.</p>
<h3>template/gcg1/header.tpl</h3>
<p>Open up &#8216;template/gcg1/header.tpl&#8217;. Look for these lines:</p>
<li class="last"><a href="{$URL_logout}">{#PLIGG_Visual_Logout#}</a></li>
<p>{else}</p>
<li><a href="{$URL_login}">{#PLIGG_Visual_Login#}</a></li>
<li class="last"><a href="{$URL_register}">{#PLIGG_Visual_Register#}</a></li>
<p>Change them to:</p>
<li class="last"><a href="{$my_base_url}/wp/wp-login.php?action=logout&#038;redirect_to=<?php echo $_SERVER['REQUEST_URI']; ?>&#8220;>{#PLIGG_Visual_Logout#}</a></li>
<p>{else}</p>
<li><a href="{$my_base_url}/wp/wp-login.php?redirect_to=<?php echo $_SERVER['REQUEST_URI']; ?>&#8220;>{#PLIGG_Visual_Login#}</a></li>
<li class="last"><a href="{$my_base_url}/wp/wp-register.php">{#PLIGG_Visual_Register#}</a></li>
<p><strong>Note</strong>: In my installation of Pligg, I&#8217;ve updated &#8220;my_base_url&#8221; (via the admin interface) correctly. I also have WordPress as a subdirectory of that same base url, so it became a handy shortcut to use &#8216;{$my_base_url}/wp&#8217; to reference any WordPress links directly.</p>
<p>header.tpl controls the header of all the Pligg pages so these changes will make sure those login, logout and register links are fixed across the entire Pligg site.</p>
<h3>template/gcg1/profile_center.tpl</h3>
<p>&#8216;template/gcg1/profile_center.tpl&#8217; controls what users can modify in their profile. We&#8217;ll want to disable as much as possible of this as their profiles are overwritten from WordPress everytime they login.</p>
<p>Some where in the file, add this so users know where to modify their profile:</p>
<p>Please use <a href="{$my_base_url}/wp/wp-admin/">this form</a> to modify your profile.</p>
<p>Delete these lines. Users won&#8217;t be able to modify their passwords here, so remove the option:</p>
<p class="l-mid">{#PLIGG_Visual_Profile_ChangePass#}</p>
<table style="border:none">
<tr>
<td width="30%">
<p class="l-mid"><label for="password">{#PLIGG_Visual_Profile_NewPass#}:</label></p>
<input type="password" id="password" name="password" size="25" tabindex="13"/>
</td>
<td>
<p class="l-mid"><label for="verify">{#PLIGG_Visual_Profile_VerifyNewPass#}: </label></p>
<input type="password" id="verify" name="password2" size="25" tabindex="14"/>
</td>
</tr>
</table>
<p>Now we need to disable the fields that are copied over by wordpress. These are aim, email, yahoo, url and gtalk.</p>
<input name="aim" tabIndex="2" disabled="true" id="aim" />
<input name="email" tabIndex="3" disabled="true" id="email" /><em>{#PLIGG_Visual_Profile_OnlyAdmins#}</em></p>
<input name="yahoo" tabIndex="6" disabled="true" id="yahoo" />
<input name="url" tabIndex="7" disabled="true" id="url" />
<input name="gtalk" tabIndex="8" disabled="true" id="gtalk" />
<h3>template/gcg1/story_center.tpl</h3>
<p>&#8216;template/gcg1/story_center.tpl&#8217; controls the display of individual stories. If a non-logged in user, views a story, they will see a login and logout link!</p>
<p>Replace:</p>
<p align="center" style="clear: both; font-weight: bold; padding-bottom: 8px; margin-left: auto; width: 400px; margin-right: auto; text-align: center; border: #ccc 1px solid" id="commentform"><a href="{$login_url}">{#PLIGG_Visual_Story_LoginToComment#}</a> {#PLIGG_Visual_Story_Register#} <a href="{$register_url}">{#PLIGG_Visual_Story_RegisterHere#}</a>.</p>
<p>With:</p>
<p align="center" style="clear: both; font-weight: bold; padding-bottom: 8px; margin-left: auto; width: 400px; margin-right: auto; text-align: center; border: #ccc 1px solid" id="commentform"><a href="http://thedeadone.net/wp-admin/%7B$my_base_url%7D/wp/wp-login.php?redirect_to=&lt;?php echo $_SERVER['REQUEST_URI']; ?&gt;">Login</a><br />
<a href="{$my_base_url}/wp/wp-register.php">Register</a></p>
<h3>template/gcg1/sidebar/login.tpl</h3>
<p>&#8216;template/gcg1/sidebar/login.tpl&#8217; is the sidebar login form you see. Replace it with this:</p>
<h3>{#PLIGG_Visual_Login_Title#}</h3>
</p>
<p id="register"><a href="{$my_base_url}/wp/wp-register.php">Register</a></p>
<p id="login"><a href="http://thedeadone.net/wp-admin/%7B$my_base_url%7D/wp/wp-login.php?redirect_to=&lt;?php echo $_SERVER['REQUEST_URI']; ?&gt;">Login</a></p>
<h3>template/gcg1/sidebar/logged_in.tpl</h3>
<p>&#8216;template/gcg1/sidebar/logged_in.tpl&#8217; is the sidebar panel you see when logged in. Replace the logout link:</p>
<p><a href="{$URL_logout}">{#PLIGG_Visual_Logout#}</a></p>
<p>With something like this:</p>
<p><a href="http://thedeadone.net/wp-admin/%7B$my_base_url%7D/wp/wp-login.php?action=logout&amp;redirect_to=&lt;?php echo $_SERVER['REQUEST_URI']; ?&gt;">{#PLIGG_Visual_Logout#}</a></p>
<p>I also add a link to the WordPress Admin panel for convience here.</p>
<li><a href="{$my_base_url}/wp/wp-admin/">WP Admin</a></li>
<h2>Ready to go!</h2>
<p>After all these changes, you should be able to login using WordPress only and be logged in on your Pligg page too! If you have any comments, feedback or find any bugs, just leave a comment here. Thanks.</mark><br />
<h3 class='related_post_title'>Related Posts:</h3>
<ul class='related_post'>
<li><a href='http://thedeadone.net/lj/add-a-pligg-it-button-to-your-webpage/' title='Add a &#8220;pligg it&#8221; button to your webpage!'>Add a &#8220;pligg it&#8221; button to your webpage!</a></li>
<li><a href='http://thedeadone.net/blog/frustrating/' title='Frustrating!'>Frustrating!</a></li>
<li><a href='http://thedeadone.net/download/getting-dokuwiki-to-use-wordpress-authentication/' title='Getting DokuWiki to use WordPress Authentication (v1.2)'>Getting DokuWiki to use WordPress Authentication (v1.2)</a></li>
<li><a href='http://thedeadone.net/blog/gcg-its-alive/' title='GCG&#8230; it&#8217;s alive!'>GCG&#8230; it&#8217;s alive!</a></li>
<li><a href='http://thedeadone.net/blog/where-has-tdo-mini-forms-plugin-gone/' title='Where has TDO Mini Forms plugin gone?'>Where has TDO Mini Forms plugin gone?</a></li>
</ul>

<!--INFOLINKS_OFF-->
<!-- google_ad_section_end -->
]]></content:encoded>
			<wfw:commentRss>http://thedeadone.net/how-to/integrating-pligg-beta-810-with-wordpress-204/feed/</wfw:commentRss>
		<slash:comments>22</slash:comments>
		</item>
		<item>
		<title>Getting DokuWiki to use WordPress Authentication (v1.2)</title>
		<link>http://thedeadone.net/download/getting-dokuwiki-to-use-wordpress-authentication/</link>
		<comments>http://thedeadone.net/download/getting-dokuwiki-to-use-wordpress-authentication/#comments</comments>
		<pubDate>Tue, 10 Oct 2006 09:30:07 +0000</pubDate>
		<dc:creator>Mark Cunningham</dc:creator>
				<category><![CDATA[Downloads]]></category>
		<category><![CDATA[DokuWiki]]></category>
		<category><![CDATA[Game-Crafters-Guild]]></category>
		<category><![CDATA[Wiki]]></category>
		<category><![CDATA[Wordpress]]></category>

		<guid isPermaLink="false">http://thedeadone.net/software/getting-dokuwiki-to-use-wordpress-authentication/</guid>
		<description><![CDATA[This extension does not transform your WordPress (WP) posts into DokuWiki (DW) entires. If your looking for that functionality, I&#8217;d recommend doing a google search for dwBliki plugin. What this extension does is to get DokuWiki to use WordPress&#8217; authentication, i.e. DokuWiki to use WordPress&#8217; user database, using an authentication plugin for DokuWiki. Download the [...]]]></description>
			<content:encoded><![CDATA[
<!-- google_ad_section_start -->
<!--INFOLINKS_ON-->
<p><p>This extension does not transform your <a href="http://wordpress.org">WordPress (WP)</a> posts into <a href="http://www.splitbrain.org/projects/dokuwiki">DokuWiki (DW)</a> entires. If your looking for that functionality, I&#8217;d recommend doing a google search for dwBliki plugin.</p>
<p><strong>What this extension does is to get DokuWiki to use WordPress&#8217; authentication, i.e. DokuWiki to use WordPress&#8217; user database, using an authentication plugin for DokuWiki.</strong></p>
<p><span id="more-254"></span></p>
<p><strong><a href="http://thedeadone.net/wp-content/sw/Wordpress/Wordpress&amp;DokuWiki1.2.zip">Download the DokuWiki Authentication Extension (v1.2)</a></strong></p>
<p>Previous downloads:<strike><a href="http://thedeadone.net/wp-content/sw/Wordpress/Wordpress&amp;DokuWiki1.1.zip">Download the DokuWiki Authentication Extension (v1.1)</a></strike> and <strike><a href="http://thedeadone.net/wp-content/sw/Wordpress/Wordpress&amp;DokuWiki1.zip">Download the DokuWiki Authentication Extension</a></strike></p>
<p>Before you begin, you&#8217;ll need to be able to run MySQL commands on your WP database and shouldn&#8217;t be afraid of modifying some code.</p>
<p>Much of this work was based on the DW splitbrain.org wiki documentation. I used the phpbb integration as a template. See:</p>
<p><a href="http://wiki.splitbrain.org/wiki:auth:mysql">http://wiki.splitbrain.org/wiki:auth:mysql</a><br />
<a href="http://wiki.splitbrain.org/wiki:tips:integrate_with_phpbb">http://wiki.splitbrain.org/wiki:tips:integrate_with_phpbb</a></p>
<p>I&#8217;ve tested this with versions:</p>
<p>DokuWiki: <strong>2006-03-09d</strong><br />
Wordpress: <strong>2.0.4</strong></p>
<p>I can&#8217;t speak for other versions.</p>
<h2>Version History</h2>
<h3>1.2 (10/10/2006)</h3>
<ul>
<li>The extension turns back on &#8220;magic quotes&#8221; which causes additional slashes in DW articles after editing.</li>
</ul>
<h3>1.1 (03/10/2006)</h3>
<ul>
<li>Small fix for using WordPress tags while logged in.</li>
<li>Documentation/Instructions updates</li>
</ul>
<h3>1.0 (27/09/2006)</h3>
<ul>
<li>First Release</li>
</ul>
<h2>Notes on using this authentication plugin</h2>
<p>I&#8217;d recommend that you get your users to use the WP&#8217;s Register, Login and Logout interface rather than DW&#8217;s. However, DW&#8217;s Login and Logout should work fine and they should log in and out of WP at the same time.</p>
<p><strong>BUT</strong> you should use WP to add new users. If you use DW, they won&#8217;t be configured correctly to use WP as you need to modify two SQL tables and DW will only modify one.</p>
<p>By default all users are a member of the &#8220;defaultgroup&#8221;. WP does not have any concept of user groups. It does have a concept of roles which I have ignored because I wanted the flexibility of DW&#8217;s user groups. You can&#8217;t really remove users from this group unless you modify &#8220;wordpress.class.php&#8221;.</p>
<p>You can use DW&#8217;s &#8220;User Manager&#8221; to add and remove your WP users from DW&#8217;s user groups but avoid the &#8220;Configuration Settings&#8221; as this overwrites your local.php and seems to cause problems for the WP authenication.</p>
<p>This plugin also introduces a useful feature. Because it pulls in your WordPress files, you can then, anywhere else in DW, access WordPress functions. This means, for example, you can use template functions like &#8220;get_header();&#8221; or &#8220;get_sidebar();&#8221; if your skinning your DW. <img src='http://thedeadone.net/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<h2>First up: Installing WordPress and/or DokuWiki</h2>
<p>For installing WP or DW, refer to the included installation documentation.</p>
<p>Install WP first and make sure everything is up and running before installing DW. Make sure that DW is installed in a directory at the same level as WP or as a subdirectory of WP. This is to make sure that the cookie domains are the same.</p>
<p>In my test environment I had wordpress installed @ ~/public_html/test/wp and DW installed @ ~/public_html/test/dw.</p>
<h2>Now, configuring DokuWiki&#8230;</h2>
<p>First, copy &#8220;wordpress.class.php&#8221; to <dokuwiki></dokuwiki>/inc/auth. Open it in your favorite text editor and make sure that WP_ROOT is correct:</p>
<p>if(!defined(&#8216;WP_ROOT&#8217;)) define(&#8216;WP_ROOT&#8217;, DOKU_INC.&#8217;../wp/&#8217;);</p>
<p>I have it configured by default to assume that dokuwiki is installed at the same level as WP and that WP is installed in a directory called &#8220;wp&#8221;.</p>
<h3>acl.auth.php</h3>
<p>You probably created a &#8220;conf/acl.auth.php&#8221; when you installed DW initially. If you didn&#8217;t, make a copy of conf/acl.auth.php.dist and name it &#8220;acl.auth.php&#8221;.</p>
<h3>local.php</h3>
<p>You probably created a &#8220;conf/local.php&#8221; when you installed DW initially. If you didn&#8217;t, make a copy of conf/local.php.dist and name it &#8220;local.php&#8221;. Open it in your favorite text editor and add (or modify) these settings:</p>
<p>// Disable the ability to register: users should register via the WordPress interface<br />
$conf['openregister']= 0;<br />
// Disable password autogen: not important if users can&#8217;t register<br />
$conf['autopasswd'] = 1;<br />
// Disable password resend: let wordpress do this<br />
$conf['resendpasswd']= 0;<br />
// Enable access control<br />
$conf['useacl'] = 1;<br />
// Use wordpress authentication<br />
$conf['authtype'] = &#8216;wordpress&#8217;;<br />
// Not sure what passcrypt needs to be set to, but this works<br />
$conf['passcrypt'] = &#8216;smd5&#8242;;<br />
// Recommend you set defaultgroup to &#8220;user&#8221; and &#8220;superuser&#8221; admin group.<br />
// as we&#8217;ll be creating them during our integration.<br />
$conf['defaultgroup']= &#8216;user&#8217;;<br />
$conf['superuser'] = &#8216;@admin&#8217;;<br />
// Updating profile requires password<br />
$conf['profileconfirm'] = &#8217;1&#8242;;</p>
<h2>Finally, modifying your SQL Database</h2>
<p>First, backup your database. You can do this quite easily via WP&#8217;s Database plugin.</p>
<p>You need to create two new tables to support DW. In the code below I&#8217;ve called these tables &#8220;wp_dw_groups&#8221; and &#8220;wp_dw_usergroups&#8221;. If you did not use &#8220;wp_&#8221; as your database prefix for WordPress, you will need to modify these commands before you use them and replace &#8220;wp_&#8221; with the prefix you used. &#8220;wordpress.class.php&#8221; uses the database prefix to reference these tables.</p>
<p>Connect to your database and run these two commands:</p>
<p>CREATE TABLE `wp_dw_groups` (<br />
`gid` int(10) UNSIGNED NOT NULL AUTO_INCREMENT,<br />
`name` varchar(50) NOT NULL DEFAULT &#8221;,<br />
PRIMARY KEY (`gid`),<br />
UNIQUE KEY `name` (`name`)<br />
) TYPE = MYISAM;<br />
CREATE TABLE `wp_dw_usergroup` (<br />
`uid` int(10) UNSIGNED NOT NULL DEFAULT &#8217;0&#8242;,<br />
`gid` int(10) UNSIGNED NOT NULL DEFAULT &#8217;0&#8242;,<br />
PRIMARY KEY (`uid`,`gid`)<br />
) TYPE = MYISAM;</p>
<p>These will create the two tables you need. However, you need to setup some groups too. So these two commands will create a user and an admin group.</p>
<p>INSERT INTO `wp_dw_groups` VALUES (1,&#8221;admin&#8221;);<br />
INSERT INTO `wp_dw_groups` VALUES (2,&#8221;user&#8221;);</p>
<p>Now you need to give yourself admin rights. Normally the first user created in WP is the admin account. This normally has the ID of 1. So now we will add admin user to admin and user groups.</p>
<p>INSERT INTO `wp_dw_usergroup` VALUES (1,1);<br />
INSERT INTO `wp_dw_usergroup` VALUES (1,2);</p>
<h2>Finished</h2>
<p>Now you should be able to login and logout using your WP&#8217;s users on DW! <img src='http://thedeadone.net/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /><br />
<h3 class='related_post_title'>Related Posts:</h3>
<ul class='related_post'>
<li><a href='http://thedeadone.net/blog/frustrating/' title='Frustrating!'>Frustrating!</a></li>
<li><a href='http://thedeadone.net/blog/gcg-its-alive/' title='GCG&#8230; it&#8217;s alive!'>GCG&#8230; it&#8217;s alive!</a></li>
<li><a href='http://thedeadone.net/blog/some-fun-with-planet-irish-gaming/' title='Some fun with Planet Irish Gaming'>Some fun with Planet Irish Gaming</a></li>
<li><a href='http://thedeadone.net/how-to/integrating-pligg-beta-810-with-wordpress-204/' title='Integrating Pligg beta 8.1.0 with WordPress 2.0.4 (v1.1)'>Integrating Pligg beta 8.1.0 with WordPress 2.0.4 (v1.1)</a></li>
<li><a href='http://thedeadone.net/blog/wordpress-20/' title='Wordpress 2.0!'>WordPress 2.0!</a></li>
</ul>

<!--INFOLINKS_OFF-->
<!-- google_ad_section_end -->
]]></content:encoded>
			<wfw:commentRss>http://thedeadone.net/download/getting-dokuwiki-to-use-wordpress-authentication/feed/</wfw:commentRss>
		<slash:comments>44</slash:comments>
		</item>
		<item>
		<title>GCG&#8230; it&#8217;s alive!</title>
		<link>http://thedeadone.net/blog/gcg-its-alive/</link>
		<comments>http://thedeadone.net/blog/gcg-its-alive/#comments</comments>
		<pubDate>Mon, 09 Oct 2006 09:21:00 +0000</pubDate>
		<dc:creator>Mark Cunningham</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[Game-Crafters-Guild]]></category>
		<category><![CDATA[Irish-Gaming]]></category>
		<category><![CDATA[roleplaying]]></category>
		<category><![CDATA[Wiki]]></category>
		<category><![CDATA[Wordpress]]></category>

		<guid isPermaLink="false">http://thedeadone.net/news/gcg-its-alive/</guid>
		<description><![CDATA[So I&#8217;ve been quiet. Hidden away in a bunker, miles underground. All I had was a laptop and broadband. The data packets crackled with the potential of lightning. My eyes were bleary and red as I fumbled trying to stitched the limbs on&#8230; in my final moments of exhaustion, I was transfixed with horror as [...]]]></description>
			<content:encoded><![CDATA[
<!-- google_ad_section_start -->
<!--INFOLINKS_ON-->
<p><p>So I&#8217;ve been quiet. Hidden away in a bunker, miles underground. All I had was a laptop and broadband. <a href="http://www.gamecraftersguild.com"><img width=300px src="http://thedeadone.net/wp-content/gcg-screenshot.png" alt="screenshot of gcg" align=right border=0 /></a> The data packets crackled with the potential of lightning. My eyes were bleary and red as I fumbled trying to stitched the limbs on&#8230; in my final moments of exhaustion, I was transfixed with horror as it opened it&#8217;s eyes&#8230;</p>
<p>&#8220;It&#8217;s alive&#8230;&#8221; I shuddered before I lost my mind.</p>
<p>Well the truth is, I probably lost my mind long before then.<br />
<span id="more-257"></span><br />
I&#8217;ve kinda been consumed on a web project these last few days. All my spare &#8220;creative&#8221; cycles have gone into it. What started as a little demo, became a prototype, became a full working site! And I just couldn&#8217;t stop. </p>
<p>I wanted to show <a href="http://www.livejournal.com/users/specky_ie/">specky_ie</a> what could be done, fairly easily, with existing open-source software for the <a href="http://www.gamecraftersguild.com">Game Crafter&#8217;s Guild of Ireland</a> website. As I discovered, a lot can be done. I&#8217;ll reserve the details of how and what I did for another post as I think it&#8217;d be useful for a lot of <a href="http://wordpress.org">wordpress</a> fans.</p>
<p>Anyway, the site is currently live, but we haven&#8217;t officially announced it yet. The Guild is place for people who want to be creative using roleplaying games. It&#8217;s not specifically for the <a href="http://thedeadone.net/blog/Irish-online-gaming-community-zombie-or-something/">online Irish gaming community</a> at all. It is distinct, different and hopefully open to everyone who has or might have an interest, either as contributor, self-promotion or just wants to get the latest news.</p>
<p>Anyway, it&#8217;s online, it&#8217;s up. Go see it and tell me what you think (either here or there, I don&#8217;t mind). In fact, start contributing by joining the forums. It&#8217;s a shell waiting to be filled right now.<br />
Now, my next big problem is, I think I may have to redesign my own <a href="http://thedeadone.net">website</a>!
</p>
<h3 class='related_post_title'>Related Posts:</h3>
<ul class='related_post'>
<li><a href='http://thedeadone.net/blog/frustrating/' title='Frustrating!'>Frustrating!</a></li>
<li><a href='http://thedeadone.net/blog/some-fun-with-planet-irish-gaming/' title='Some fun with Planet Irish Gaming'>Some fun with Planet Irish Gaming</a></li>
<li><a href='http://thedeadone.net/blog/a-personal-perspective-of-the-demise-of-diddlysquat/' title='A personal perspective of the demise of DiddlySquat'>A personal perspective of the demise of DiddlySquat</a></li>
<li><a href='http://thedeadone.net/download/getting-dokuwiki-to-use-wordpress-authentication/' title='Getting DokuWiki to use WordPress Authentication (v1.2)'>Getting DokuWiki to use WordPress Authentication (v1.2)</a></li>
<li><a href='http://thedeadone.net/blog/my-newest-experiement-the-irish-gaming-wiki/' title='My newest experiement: The Irish Gaming Wiki'>My newest experiement: The Irish Gaming Wiki</a></li>
</ul>

<!--INFOLINKS_OFF-->
<!-- google_ad_section_end -->
]]></content:encoded>
			<wfw:commentRss>http://thedeadone.net/blog/gcg-its-alive/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

