my own function: how to write it and how to use it?

Author Message

Alessandro Cipriani

Tuesday 02 March 2004 8:43:10 am

hi all
i'm writing my own php function to retrieve the session id

the function is
<?php
function getSessionId()
{
$session = & $GLOBALS["eZSessionObject"];
return $session->id();
}
?>

i'd like to know:
- is it alright or there is some error?
- where shall i place my php file with the function?
- how shall i call my function from my template?

best regards
alessandro

James Packham

Tuesday 02 March 2004 8:55:34 am

If you don't get a reply you might do better posting this in the developer forum...

Regards,

James

Alex Jones

Tuesday 02 March 2004 9:17:36 am

Alessandro, have you read the documentation about Modules? It should help guide you in the right direction.

http://www.ez.no/ez_publish/documentation/development/extensions/module

Alex

Alex
[ bald_technologist on the IRC channel (irc.freenode.net): #eZpublish ]

<i>When in doubt, clear the cache.</i>

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.