The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
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? |
#2
|
|||
|
|||
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?
|
#3
|
|||
|
|||
Such as $vbulletin->session or $vbulletin->userinfo
|
#4
|
|||
|
|||
Hmmm, that is interesting. Usually it works when you include the global.php file.
Did you include it this way: PHP Code:
|
#5
|
|||
|
|||
Yeah... here's what I have.
global.php Code:
ob_start(); include('./updateForm.php'); $dpo = ob_get_contents(); ob_end_clean(); require_once(CWD . '/includes/init.php'); Code:
$dpo And on updateForm.php Code:
chdir("/my/site/addressy/www/vbulletin"); require_once('./global.php'); --------------- Added [DATE]1262699927[/DATE] at [TIME]1262699927[/TIME] --------------- The template is membership_details and the actual page i membership_details.php |
#6
|
|||
|
|||
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:
|
#7
|
|||
|
|||
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. |
#8
|
|||
|
|||
The file with this code:
PHP Code:
|
#9
|
|||
|
|||
I included that on global.php
|
#10
|
|||
|
|||
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.
|
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|