Forum Search:
FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.
Calendar
Search
Help
Members
Control Panel
Logout [ CommonCrawl [Bot] ]
Home
Post Form
Logged in user:
CommonCrawl [Bot] [
logout
]
Forum:
FUDforum 3.0+
Title:
Poll:
[CREATE POLL]
Message Icon:
No Icon
Smiley Shortcuts:
[
list all smilies
]
Formatting Tools:
Size
1
2
3
4
5
6
7
Color
Sky Blue
Royal Blue
Blue
Dark Blue
Orange
Orange Red
Crimson
Red
Firebrick
Dark Red
Green
Lime Green
Sea Green
Deep Pink
Tomato
Coral
Purple
Indigo
Burly Wood
Sandy Brown
Sienna
Chocolate
Teal
Silver
Font
Arial
Times
Courier
Century
Body:
Forum Options:
HTML
code is
off
BBcode
is
on
Images
are
on
Smilies
are
on
Editing Time Limit
: Unlimited
[quote title=Ilia wrote on Wed, 17 January 2007 19:05]The export list was expanded.[/quote]
File Attachments:
Allowed File Extensions:
jpg jpeg png gif txt doc gz bz2 inc php zip diff
Maximum File Size:
150KB
Maximum Files Per Message:
5
Options:
Post Notification
Notify me when someone replies to this message.
Include Signature
Include your profile signature.
Disable smilies in this message
Topic View
Re: getting the GLOBALS needed for fudapi
Wed, 17 January 2007 19:05
Ilia
Karma:
The export list was expanded.
getting the GLOBALS needed for fudapi
Wed, 17 January 2007 14:40
maarten
Karma:
I'm using fudforum_login.php and fudapi.inc.php in a context where I'm confined into function scope, so I'm relying on the technique in __fud_login_common() to read GLOBALS.php, eval it, and then export the ones that matter.
Catch is:
the variables exported don't cover all the ones needed by fudapi.inc.php.
For example, when fud_add_user() copies $vals['login'] to the alias, it relies on $GLOBALS['MAX_LOGIN_SHOW'] and will fail if that's not set, and the alias field will stay blank.
I searched fudapi for uses of globals and added these to be exported:
'SERVER_TZ', 'MAX_LOGIN_SHOW', 'POSTS_PER_PAGE',
'WWW_ROOT', 'LOGEDIN_TIMEOUT', 'TMP'
There may be other ones in code called from fudapi? For easier future integration, it'd be great if there was a fool-proof way to get all globals exported correctly.
Simply including GLOBALS.php at the top of fudapi.inc.php won't work for me because fudapi.inc.php is being included inside a function and I have no control over that.
Current Time:
Wed Jan 15 06:27:40 EST 2025
Total time taken to generate the page: 0.04958 seconds