2 yabba May 15, 2006 11:52

But wouldn't that make my cookie and value only avaliable for that session.
I would like the cookie's life to be pernament.
Though i think blueyed is adding the SkinInit event for such things, so should be no biggie anyway.
Just for the record: Plugin::session_set() / Plugin:session_get() would be the "clean way" to do it (it's a wrapper to Session::set()).
But: using the session data is problematic, because it's limited in size (TEXT and therefor ~64kb). Using it (especially with a large/no timeout) should be avoided.
I'll add a BeforeBlogDisplay in _blog_main.inc.php.
We live and learn :D
¥
Just for completion (and learning ;):
I've added the BeforeBlogDisplay hook to _blog_main.inc.php, which should be what you need, balupton.
Cheers
blueyed wrote:
Just for completion (and learning ;):
I've added the BeforeBlogDisplay hook to _blog_main.inc.php, which should be what you need, balupton.
I just downloaded the latest nightly cvs snapshot;
http://doc.b2evolution.net/b2evo_HEAD_snapshot.tgz
And the term 'BeforeBlogDisplay' is not in any of the files....
/*
* Now, we'll jump to displaying!
*/
// Trigger plugin event:
$Plugins->trigger_event( 'BeforeBlogDisplay' );
// Check if a temporary skin has been requested (used for RSS syndication for example):
if( !empty($tempskin) )
{
(around line 398)
¥
All right got it now, mustn't of been updated when i downloaded it, or i was re-downling a cached version. Oh well it's there now. :D
Use the session object :-
Set "cookie"
Get "cookie"
¥