![]() |
Passing $vbulletin to custom pages
I'm writing a custom page for the User Control Panel for a client...
I have the page and template created. I defined a special include in global.php to pull in a form on said page. However, I can't access $vbulletin for the life of me from this page. I have global.php included on the page, but it makes no difference. I need a way for the form to be able to access items such as the UID. Putting the form into the template itself isn't an option. A little help, please? |
Not quite sure what your trying to accomplish here whether you mean $vbulletin as in $vbulletin->db or $vbulletin as in you define what that variable does. Could you specify please?
|
Such as $vbulletin->session or $vbulletin->userinfo
|
Hmmm, that is interesting. Usually it works when you include the global.php file.
Did you include it this way: PHP Code:
|
Yeah... here's what I have.
global.php Code:
ob_start(); Code:
$dpo And on updateForm.php Code:
chdir("/my/site/addressy/www/vbulletin"); --------------- Added [DATE]1262699927[/DATE] at [TIME]1262699927[/TIME] --------------- The template is membership_details and the actual page i membership_details.php |
This might be ridiculous to have you do but I'm curious to see if it changes anything.
Change this line: PHP Code:
PHP Code:
|
Haha. I actually tried that this morning after I posted that code. Didn't change anything, sadly.
I managed to get the user ID from $_COOKIE, so I suppose this works for now. |
The file with this code:
PHP Code:
|
Quote:
|
So you edited vBulletin's global.php file? If so, remove that code and use it in a plugin instead for global_start plugin hook location. Also remove include('./updateForm.php'); from that as you are having issues because your causing it to go in a circle. If you didn't edit vBulletin's global.php file then honestly I can't say for sure why its not working other than you must have something somewhere causing it to stop working.
|
All times are GMT. The time now is 01:20 PM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|