Re: BBCard support discussion

This BBCard idea sounds good. I think using RDF or VCard isn't really necessary and only makes things more complex. Storing passwords wouldn't be a good idea either, because it's dangerous to use one password for multiple web sites.

What do you think about this:

<user xmlns="?" xmlns:PunBB="http://punbb.org/1.x" xmlns:phpBB="http://www.phpbb.com/2.x">
<!-- Each BB system can use it?s own namespace -->

    <nickname>Donald Duck</nickname>
    <nickname>Duck, Donald</nickname>
    <nickname>DD</nickname>
    <!-- Users can have several alternative nicknames, in case the preferred one is already taken -->

    <nickname preferred="yes">Donald</nickname>
    <!-- The preferred nickname can be marked with preferred="yes" -->

    <nickname for="http://gamingsite.example/forums/">CyberDonald</nickname>
    <!-- Users can specify a preferred nickname for one forum -->

    <resource title="Disney Online - The Official Home Page of The Walt Disney Company!">http://disney.go.com/home/today/index.html</resource>
    <resource title="Donalds Imaginary Weblog">http://donaldduck.example/blog/</resource>
    <resource>xmpp:donald@disney.com</resource>
    <!-- The user can specify several URIs/IRIs for multiple web sites, an email address, etc. -->

    <resource public="no">mailto:donald@disney.com</resource>
    <!-- This user doesn?t want his email address to be displayed -->

    <real-name>Donald Fauntleroy Duck</real-name>

    <location>Duckburg, Calisota</location>

    <signature type="application/xhtml+xml" xml:lang="en"><body xmlns="http://www.w3.org/1999/xhtml"><blockquote><p><cite>Donald</cite>:</p><p>Quack!</p></blockquote></body></signature>
    <signature type="text/x-bbcode" xml:lang="en"><![CDATA[[quote=Donald]Quack![/quote]
]]></signature>
    <!-- Users can have several versions of their signature -->

    <avatar width="10" height="10">data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAIAAAACUFjqAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAALEgAACxIB0t1+/AAAAAd0SU1FB9EFBAoYMhVvMQIAAAAtSURBVHicY/z//z8DHoBH+v///yy4FDEyMjIwMDDhM3lgpaEuh7gTEzDiDxYA9HEPDF90e5YAAAAASUVORK5CYII=</avatar>
    <!-- Avatars could be provided as ?data? URI? -->

    <avatar width="80" height="80" preferred="yes">http://gravatar.com/avatar.php?gravatar_id=49df1f21d9f8ebe4793c249be9520edb</avatar>
    <!-- ?or as a link -->

    <topics-per-page>30</topics-per-page>
    <posts-per-page>14</posts-per-page>
    <allow-form-mail>yes</allow-form-mail>
    <show-smilies>yes</show-smilies>
    <show-images>yes</show-images>
    <show-images-in-signatures>no</show-images-in-signatures>
    <show-avatars>yes</show-avatars>
    <show-signatures>yes</show-signatures>
    <time-zone>-8</time-zone>
    <language>en-US</language>

    <style for="http://punbb.org/forums/">http://punbb.org/forums/style/Oxygen.css</style>
    <style for="http://bb.example/">http://www.w3.org/StyleSheets/Core/Chocolate</style>
    <!-- Users can specify their preferred style sheet -->

    <PunBB:save-password>yes</PunBB:save-password>
    <PunBB:use-avatar>yes</PunBB:use-avatar>
    <PunBB:title>World?s Most Famous Duck</PunBB:title>
    <PunBB:msn><phpBB:msn>donald.duck@disney.com</phpBB:msn></PunBB:msn>
    <PunBB:irc><phpBB:irc>123456</phpBB:irc></PunBB:irc>
    <phpBB:occupation>Unemployed</phpBB:occupation>
    <phpBB:interests>Sleeping</phpBB:interests>
    <phpBB:private-messaging>no</phpBB:private-messaging>
    <!-- System specific settings -->

</user>

I'm trying to make an XML-based forum system, so something like this would be useful for the database and for a BBCard system, if Rickard and others are going to implement it too.

Re: BBCard support discussion

I like it. The problem with the BBCard idea, apart from actually implementing it smile, is that I am not familiar with the XML capabilities of PHP. Does PHP contain an XML parser that could be used for this? If so, is this parser enabled by default and is it available in all post 4.3.0 versions of PHP?

"Programming is like sex: one mistake and you have to support it for the rest of your life."

Re: BBCard support discussion

Rickard wrote:

Does PHP contain an XML parser that could be used for this? If so, is this parser enabled by default and is it available in all post 4.3.0 versions of PHP?

Doesn't look like it, judging by this page.

Re: BBCard support discussion

Rickard wrote:

Does PHP contain an XML parser that could be used for this?

I think DOM XML would be useful for that. It's replaced by the DOM extension in PHP 5. Maybe you can make two versions of the BBCard parser, if DOM XML and DOM don't have much differences.

Rickard wrote:

If so, is this parser enabled by default and is it available in all post 4.3.0 versions of PHP?

DOM XML isn't enabled by default I think, but I don't know how many providers have enabled it. (Mine has, for example.) In PHP 5, DOM is enabled by default.

Maybe you can make the BBCard support optional, for those who have XML enabled?

There still are problems with the BBCard I proposed, like the fact that every system uses it's own BBCode (or maybe that could be standardized too?).