Hi SPIP Devs,
I sent this to spip-en@ last week and Ben replied that it's OK to use English on this list as well.
Any suggestions about fixing the following problems will be gratefully received.
Thanks,
Thomas Sutton
bouncingorange
From: Thomas Sutton <thomas@bouncingorange.com>
Date: 22 October 2008 7:09:45 PM
To: Spip Mailing List <spip-en@rezo.net>
Subject: Sessions for anonymous users; private area interface things; and licences for plug-inHi folks,
I'm still working on my plug-in (a catalogue and shopping cart for SPIP) and have a few questions to ask. All of the below is with respect to 1.9.2e, but I'll be moving to 2.0.0 when it's stable. Thanks to everyone who's already answered my previous questions (Fil, Pierre, Gilles, and everyone else) and in advance to anyone who responds to this lot. My questions are below, easy ones first.
SPIP plug-ins should be under GPLv2 as they're derivative works, shouldn't they?
My notes on writing this plug-in are reasonably incomplete (it's mostly a list of stuff that *doesn't* work), but its about 9 A4 pages or so currently. Where's the best place to make it public: spip.net, plugins.spip.net, spip-contrib.net, doc.spip.org, our company web-site, or my personal blog (or some combination)?
Is there a block diagram or flow chart or something that explains SPIP's architecture? Writing this plug-in (or, more correctly, trying to figure out how to write this plug-in) has given me a much better understanding of SPIP, but it's also been extremely frustrating, not particularly elucidating and I can't imagine that it'll be a popular way to learn.
Now for the harder, technical questions.
I've looked through the code in inc/session.php and inc/utils.php and I get the impression that SPIP's session handling is for authenticated users (accounts in `spip_auteurs`). Is this true? If I want to store session information for anonymous users, is there a proper way to go about it (from PHP in a plug-in, not a template)? In particular, I want to maintain a shopping cart in a session without forcing users to log-in first (indeed, I'd rather they not login at all). Can I do this with SPIP's session handling? Or will I need to fall back on session_start() and $_SESSION?
Since I sent this message, I've looked at inc/session.php some more and decided to use session_start(). It's all working fine.