[prev in list] [next in list] [prev in thread] [next in thread] 

List:       squirrelmail-plugins
Subject:    Re: [SM-PLUGINS] Accessing global variables from a plugin?
From:       p dont think <pdontthink () angrynerds ! com>
Date:       2004-09-24 18:43:57
Message-ID: 41546AED.6010701 () angrynerds ! com
[Download RAW message or body]

> How does one get access to global variables from within a plugin. In
> playing with the patched version of newuser_wiz, that automatically
> subscribes people to their mailfolders, I discovered it would produce an
> error trying to subscribe them again to the folders that are used by
> default eg: $draft_folder $sent_folder $trash_folder
> 
> I tried just defining them within the code like this:
> 
> global  $draft_folder, $sent_folder, $trash_folder;
> 
> but they don't seem to get picked up. I have to re-specify the values I
> set withing that module, making my code non-portable.

those values will in fact be globally available as you expect.  if they 
are not, config.php has not been included yet.  do you include 
validate.php first?  it will include everything you need and make those 
variables available in the global namespace.


-------------------------------------------------------
This SF.Net email is sponsored by: YOU BE THE JUDGE. Be one of 170
Project Admins to receive an Apple iPod Mini FREE for your judgement on
who ports your project to Linux PPC the best. Sponsored by IBM.
Deadline: Sept. 24. Go here: http://sf.net/ppc_contest.php
--
squirrelmail-plugins mailing list
Posting Guidelines: http://squirrelmail.org/wiki/wiki.php?MailingListPostingGuidelines
List Address: squirrelmail-plugins@lists.sourceforge.net
List Archives: http://news.gmane.org/thread.php?group=gmane.mail.squirrelmail.plugins
List Archives: http://sourceforge.net/mailarchive/forum.php?forum_id=3931
List Info: https://lists.sourceforge.net/lists/listinfo/squirrelmail-plugins
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic