<?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"
	>
<channel>
	<title>Comments on: Using Forum Members Site-Wide</title>
	<atom:link href="http://nslog.com/2007/02/21/using_forum_members_site-wide/feed" rel="self" type="application/rss+xml" />
	<link>http://nslog.com/2007/02/21/using_forum_members_site-wide</link>
	<description>The Weblog of Erik J. Barzeski</description>
	<pubDate>Wed, 20 Aug 2008 09:37:53 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.6.1</generator>
		<item>
		<title>By: Richard Sheppard</title>
		<link>http://nslog.com/2007/02/21/using_forum_members_site-wide#comment-39660</link>
		<dc:creator>Richard Sheppard</dc:creator>
		<pubDate>Sat, 24 Feb 2007 19:23:07 +0000</pubDate>
		<guid isPermaLink="false">http://nslog.com/2007/02/21/using_forum_members_site-wide#comment-39660</guid>
		<description>[quote comment="39610"]Drupal may be able to do it, but at incredible cost and research and at the expense of being able to "get started" fairly quickly, as Drupal masters aren't exactly as widespread as general PHP or RoR practitioners.[/quote]

I would argue that Drupal costs far less than other CMS frameworks, requires far less research to get started quickly, that the Drupal community is larger and more mature than the RoR community, and that PHP executes far faster than Ruby in web application environments.</description>
		<content:encoded><![CDATA[<p class="quote_header"><a href="http://nslog.com/2007/02/21/using_forum_members_site-wide#comment-39610">Erik J. Barzeski said</a> on February 21, 2007:</p>
<blockquote cite="http://nslog.com/2007/02/21/using_forum_members_site-wide#comment-39610"><p>
Drupal may be able to do it, but at incredible cost and research and at the expense of being able to "get started" fairly quickly, as Drupal masters aren't exactly as widespread as general PHP or RoR practitioners.</p>
</blockquote>
<p>I would argue that Drupal costs far less than other CMS frameworks, requires far less research to get started quickly, that the Drupal community is larger and more mature than the RoR community, and that PHP executes far faster than Ruby in web application environments.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Amorya</title>
		<link>http://nslog.com/2007/02/21/using_forum_members_site-wide#comment-39637</link>
		<dc:creator>Amorya</dc:creator>
		<pubDate>Fri, 23 Feb 2007 13:29:50 +0000</pubDate>
		<guid isPermaLink="false">http://nslog.com/2007/02/21/using_forum_members_site-wide#comment-39637</guid>
		<description>That is what I'm encouraging - but only in the sense that PHPBB's session handling is run on every page (which is necessary to get a single login) and its core functions are included.

Essentially, it's a lot more work to get two systems synchronised than it is to just use the existing code for user management and the like. Doing it any other way would be repetition of effort. If you don't run PHPBB's function session_pagestart() then you would have to make sure you read the values of the session cookie yourself, parse them, and query the database to work out who it is. That's more work for little gain, in my mind.

I understand that you might feel tied or trapped to one product if you do it this way. I just maintain it's less effort. The choice is of course yours :)</description>
		<content:encoded><![CDATA[<p>That is what I'm encouraging - but only in the sense that PHPBB's session handling is run on every page (which is necessary to get a single login) and its core functions are included.</p>
<p>Essentially, it's a lot more work to get two systems synchronised than it is to just use the existing code for user management and the like. Doing it any other way would be repetition of effort. If you don't run PHPBB's function session_pagestart() then you would have to make sure you read the values of the session cookie yourself, parse them, and query the database to work out who it is. That's more work for little gain, in my mind.</p>
<p>I understand that you might feel tied or trapped to one product if you do it this way. I just maintain it's less effort. The choice is of course yours <img src='http://nslog.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Erik J. Barzeski</title>
		<link>http://nslog.com/2007/02/21/using_forum_members_site-wide#comment-39631</link>
		<dc:creator>Erik J. Barzeski</dc:creator>
		<pubDate>Fri, 23 Feb 2007 01:04:37 +0000</pubDate>
		<guid isPermaLink="false">http://nslog.com/2007/02/21/using_forum_members_site-wide#comment-39631</guid>
		<description>[quote comment="39630"]I can't off hand see what I misunderstood - care to enlighten me?[/quote]

It's more that I felt as though you were encouraging a system built on top of phpBB rather than building an entirely stand-alone system that integrated with phpBB.

Admittedly, truly understanding is difficult in these short snippets. I certainly meant no offense by any possible misunderstanding - on my part or yours. If anything, I viewed it as a failure to be clear on my part.</description>
		<content:encoded><![CDATA[<p class="quote_header"><a href="http://nslog.com/2007/02/21/using_forum_members_site-wide#comment-39630">Amorya said</a> on February 22, 2007:</p>
<blockquote cite="http://nslog.com/2007/02/21/using_forum_members_site-wide#comment-39630"><p>
I can't off hand see what I misunderstood - care to enlighten me?</p>
</blockquote>
<p>It's more that I felt as though you were encouraging a system built on top of phpBB rather than building an entirely stand-alone system that integrated with phpBB.</p>
<p>Admittedly, truly understanding is difficult in these short snippets. I certainly meant no offense by any possible misunderstanding - on my part or yours. If anything, I viewed it as a failure to be clear on my part.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Amorya</title>
		<link>http://nslog.com/2007/02/21/using_forum_members_site-wide#comment-39630</link>
		<dc:creator>Amorya</dc:creator>
		<pubDate>Fri, 23 Feb 2007 00:57:44 +0000</pubDate>
		<guid isPermaLink="false">http://nslog.com/2007/02/21/using_forum_members_site-wide#comment-39630</guid>
		<description>[quote comment="39618"]Amorya, I think you've misunderstood the question in some ways, but you have reminded me that both phpBB and vBulletin do allow for extra fields. We aren't required to use them in the forum section of the site, after all&#8230; Thanks.[/quote]

I can't off hand see what I misunderstood -- care to enlighten me?

I was under the impression that you wanted to use PHPBB's member database and permissions manager in pages you were coding yourself in PHP, to maintain a single username/password combo for each member, rather than having them log into the forums and the site separately. Is this not the case?

If you are wanting to interface PHPBB with other (free or commercial) existing scripts, then you'll either need scripts that know about PHPBB, or to use the Authentication Plugin functionality that exists in PHPBB3 beta.

Have a look at www.scifiminds.net -- a site that is kinda inactive these days (alas) but demonstrates the tech I'm talking about. The same login is used to post stories and access the secure areas, and for the forum.</description>
		<content:encoded><![CDATA[<p class="quote_header"><a href="http://nslog.com/2007/02/21/using_forum_members_site-wide#comment-39618">Erik J. Barzeski said</a> on February 22, 2007:</p>
<blockquote cite="http://nslog.com/2007/02/21/using_forum_members_site-wide#comment-39618"><p>
Amorya, I think you've misunderstood the question in some ways, but you have reminded me that both phpBB and vBulletin do allow for extra fields. We aren't required to use them in the forum section of the site, after all&hellip; Thanks.</p>
</blockquote>
<p>I can't off hand see what I misunderstood -- care to enlighten me?</p>
<p>I was under the impression that you wanted to use PHPBB's member database and permissions manager in pages you were coding yourself in PHP, to maintain a single username/password combo for each member, rather than having them log into the forums and the site separately. Is this not the case?</p>
<p>If you are wanting to interface PHPBB with other (free or commercial) existing scripts, then you'll either need scripts that know about PHPBB, or to use the Authentication Plugin functionality that exists in PHPBB3 beta.</p>
<p>Have a look at <a href="http://www.scifiminds.net" >http://www.scifiminds.net</a> -- a site that is kinda inactive these days (alas) but demonstrates the tech I'm talking about. The same login is used to post stories and access the secure areas, and for the forum.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Seeking an Entrpreneurial Web Developer/Designer &#124; NSLog();</title>
		<link>http://nslog.com/2007/02/21/using_forum_members_site-wide#comment-39619</link>
		<dc:creator>Seeking an Entrpreneurial Web Developer/Designer &#124; NSLog();</dc:creator>
		<pubDate>Thu, 22 Feb 2007 16:44:36 +0000</pubDate>
		<guid isPermaLink="false">http://nslog.com/2007/02/21/using_forum_members_site-wide#comment-39619</guid>
		<description>[...] posted briefly about this "thing" yesterday, but today I'm officially announcing that I'm looking for an entrepreneurial web [...]</description>
		<content:encoded><![CDATA[<p>[...] posted briefly about this "thing" yesterday, but today I'm officially announcing that I'm looking for an entrepreneurial web [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Erik J. Barzeski</title>
		<link>http://nslog.com/2007/02/21/using_forum_members_site-wide#comment-39618</link>
		<dc:creator>Erik J. Barzeski</dc:creator>
		<pubDate>Thu, 22 Feb 2007 14:49:07 +0000</pubDate>
		<guid isPermaLink="false">http://nslog.com/2007/02/21/using_forum_members_site-wide#comment-39618</guid>
		<description>Amorya, I think you've misunderstood the question in some ways, but you have reminded me that both phpBB and vBulletin do allow for extra fields. We aren't required to use them in the forum section of the site, after all&#8230; Thanks.</description>
		<content:encoded><![CDATA[<p>Amorya, I think you've misunderstood the question in some ways, but you have reminded me that both phpBB and vBulletin do allow for extra fields. We aren't required to use them in the forum section of the site, after all&hellip; Thanks.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Amorya</title>
		<link>http://nslog.com/2007/02/21/using_forum_members_site-wide#comment-39617</link>
		<dc:creator>Amorya</dc:creator>
		<pubDate>Thu, 22 Feb 2007 12:01:12 +0000</pubDate>
		<guid isPermaLink="false">http://nslog.com/2007/02/21/using_forum_members_site-wide#comment-39617</guid>
		<description>Just to add to my previous comment:

You can add new fields to the members table with no problem at all. They all get stored in $userdata[] -- it's just a dump of the current member's row.

For your different user levels, the groups function would be appropriate. Make a few groups for different user levels, hardcode those group IDs into your script, then use PHPBB's user management interface to handle adding and removing users from the group. (Set it to a closed group, so users can't add themselves.) Users can be members of multiple groups with no problem.

Finally, don't forget to change $phpbb_root_path to whatever it is! I suggest you leave PHPBB itself in a folder, and have your own files outside that folder -- in that case, use a root path of './phpbb/' or something.</description>
		<content:encoded><![CDATA[<p>Just to add to my previous comment:</p>
<p>You can add new fields to the members table with no problem at all. They all get stored in $userdata[] -- it's just a dump of the current member's row.</p>
<p>For your different user levels, the groups function would be appropriate. Make a few groups for different user levels, hardcode those group IDs into your script, then use PHPBB's user management interface to handle adding and removing users from the group. (Set it to a closed group, so users can't add themselves.) Users can be members of multiple groups with no problem.</p>
<p>Finally, don't forget to change $phpbb_root_path to whatever it is! I suggest you leave PHPBB itself in a folder, and have your own files outside that folder -- in that case, use a root path of './phpbb/' or something.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Amorya</title>
		<link>http://nslog.com/2007/02/21/using_forum_members_site-wide#comment-39616</link>
		<dc:creator>Amorya</dc:creator>
		<pubDate>Thu, 22 Feb 2007 11:56:11 +0000</pubDate>
		<guid isPermaLink="false">http://nslog.com/2007/02/21/using_forum_members_site-wide#comment-39616</guid>
		<description>PHPBB's pretty easy to do that. There's a few lines of PHP you can put at the start of every page and then you have access to all the user stuff.

For example:

&lt;code&gt;define('IN_PHPBB', true);
$phpbb_root_path = 'bboard/';
include($phpbb_root_path . 'extension.inc');
include($phpbb_root_path . 'common.'.$phpEx);&lt;/code&gt;

&lt;code&gt;$userdata = session_pagestart($user_ip, PAGE_INDEX);
init_userprefs($userdata);&lt;/code&gt;

&lt;code&gt;$page_title = 'Homepage';
include($phpbb_root_path . 'includes/page_header.'.$phpEx);&lt;/code&gt;

&lt;code&gt;// Do stuff here&lt;/code&gt;

&lt;code&gt;include($phpbb_root_path . 'includes/page_tail.'.$phpEx);&lt;/code&gt;

If you don't want to use PHPBB's header and footer templates, omit the last two include lines.

You can then get the current member's information by reading $userdata (for example, $userdata['username'] or $userdata['user_id']).

You can get a list of members with:
&lt;code&gt;$sql = "SELECT * FROM " . USERS_TABLE;&lt;/code&gt;

You can work out if a user is currently logged in by checking $userdata['user_logged_in']. The code that goes at the top of your page starts the PHPBB session on every page.

To check the user is a member of a given group, use:
&lt;code&gt;$query = "SELECT * FROM '.USERS_TABLE.' WHERE group_id = '194' AND user_id = ". $userdata[user_id] . " LIMIT 1";&lt;/code&gt;

(Obviously replace the 194 with the ID of the group you want to check membership of. This can be useful for things like a moderator area.)

To check if a user is an admin, use $userdata['user_level'] == ADMIN;

These things all work for PHPBB 2. Things have changed a bit in PHPBB 3, but since it's still in beta I've not re-learned everything yet.</description>
		<content:encoded><![CDATA[<p>PHPBB's pretty easy to do that. There's a few lines of PHP you can put at the start of every page and then you have access to all the user stuff.</p>
<p>For example:</p>
<p><code>define('IN_PHPBB', true);<br />
$phpbb_root_path = 'bboard/';<br />
include($phpbb_root_path . 'extension.inc');<br />
include($phpbb_root_path . 'common.'.$phpEx);</code></p>
<p><code>$userdata = session_pagestart($user_ip, PAGE_INDEX);<br />
init_userprefs($userdata);</code></p>
<p><code>$page_title = 'Homepage';<br />
include($phpbb_root_path . 'includes/page_header.'.$phpEx);</code></p>
<p><code>// Do stuff here</code></p>
<p><code>include($phpbb_root_path . 'includes/page_tail.'.$phpEx);</code></p>
<p>If you don't want to use PHPBB's header and footer templates, omit the last two include lines.</p>
<p>You can then get the current member's information by reading $userdata (for example, $userdata['username'] or $userdata['user_id']).</p>
<p>You can get a list of members with:<br />
<code>$sql = "SELECT * FROM " . USERS_TABLE;</code></p>
<p>You can work out if a user is currently logged in by checking $userdata['user_logged_in']. The code that goes at the top of your page starts the PHPBB session on every page.</p>
<p>To check the user is a member of a given group, use:<br />
<code>$query = "SELECT * FROM '.USERS_TABLE.' WHERE group_id = '194' AND user_id = ". $userdata[user_id] . " LIMIT 1";</code></p>
<p>(Obviously replace the 194 with the ID of the group you want to check membership of. This can be useful for things like a moderator area.)</p>
<p>To check if a user is an admin, use $userdata['user_level'] == ADMIN;</p>
<p>These things all work for PHPBB 2. Things have changed a bit in PHPBB 3, but since it's still in beta I've not re-learned everything yet.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Erik J. Barzeski</title>
		<link>http://nslog.com/2007/02/21/using_forum_members_site-wide#comment-39610</link>
		<dc:creator>Erik J. Barzeski</dc:creator>
		<pubDate>Wed, 21 Feb 2007 23:30:19 +0000</pubDate>
		<guid isPermaLink="false">http://nslog.com/2007/02/21/using_forum_members_site-wide#comment-39610</guid>
		<description>[quote comment="39608"]I recommend &lt;a href="http://drupal.org/"&gt;Drupal&lt;/a&gt;&#8230;[/quote]

I don't believe that any one package will be so easily modified to suit the specific needs of this site in a more economical fashion than building a custom application. Drupal may be able to do it, but at incredible cost and research and at the expense of being able to "get started" fairly quickly, as Drupal masters aren't exactly as widespread as general PHP or RoR practitioners.

I'll email you, though, as perhaps I'm wrong or perhaps you may even be interested.

[quote comment="39609"]Sounds like you need custom written MySQL/PHP database stuff. You can always search VB sites to see if it's been built already, but sounds like you already have what you want in mind.[/quote]

Steve, that misses the point. I know that I need a custom-designed site. What I'd like is to not have to write an entirely new forum package. I am interested in hearing whether existing forum packages allow their "members" table to be expanded upon and/or used outside of the forum itself.</description>
		<content:encoded><![CDATA[<p class="quote_header"><a href="http://nslog.com/2007/02/21/using_forum_members_site-wide#comment-39608">David Sinclair said</a> on February 21, 2007:</p>
<blockquote cite="http://nslog.com/2007/02/21/using_forum_members_site-wide#comment-39608"><p>
I recommend <a href="http://drupal.org/">Drupal</a>&hellip;</p>
</blockquote>
<p>I don't believe that any one package will be so easily modified to suit the specific needs of this site in a more economical fashion than building a custom application. Drupal may be able to do it, but at incredible cost and research and at the expense of being able to "get started" fairly quickly, as Drupal masters aren't exactly as widespread as general PHP or RoR practitioners.</p>
<p>I'll email you, though, as perhaps I'm wrong or perhaps you may even be interested.</p>
<p class="quote_header"><a href="http://nslog.com/2007/02/21/using_forum_members_site-wide#comment-39609">Steve said</a> on February 21, 2007:</p>
<blockquote cite="http://nslog.com/2007/02/21/using_forum_members_site-wide#comment-39609"><p>
Sounds like you need custom written MySQL/PHP database stuff. You can always search VB sites to see if it's been built already, but sounds like you already have what you want in mind.</p>
</blockquote>
<p>Steve, that misses the point. I know that I need a custom-designed site. What I'd like is to not have to write an entirely new forum package. I am interested in hearing whether existing forum packages allow their "members" table to be expanded upon and/or used outside of the forum itself.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Steve</title>
		<link>http://nslog.com/2007/02/21/using_forum_members_site-wide#comment-39609</link>
		<dc:creator>Steve</dc:creator>
		<pubDate>Wed, 21 Feb 2007 23:30:09 +0000</pubDate>
		<guid isPermaLink="false">http://nslog.com/2007/02/21/using_forum_members_site-wide#comment-39609</guid>
		<description>Sounds like you need custom written MySQL/PHP database stuff. You can always search VB sites to see if it's been built already, but sounds like you already have what you want in mind.

Vbulletin.org is going to be the best search option.</description>
		<content:encoded><![CDATA[<p>Sounds like you need custom written MySQL/PHP database stuff. You can always search VB sites to see if it's been built already, but sounds like you already have what you want in mind.</p>
<p>Vbulletin.org is going to be the best search option.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
