The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
Using vB data in another script...
We're running two BB systems on our site; a vB and a proprietary board with threading. If vB3 ever arrives we'll close the proprietary board down but until then I'm looking at ways of making the change more gradual for our users.
What I am working on is using the vB member info in the proprietary board (prop board) so that users have to login before using the prop board. Granted, I'm a newbie when it comes to PHP scripting, but this is a bit more frustrating than I thought it would be. I know I have to require the global.php, but as this is in another subdirectory than the rest of the props board (as in root/forum1 where the other is in root/forum2), I'm not sure how to go about doing it in the best if I use chdir ("../forum2/"); do I need to chdir("../forum1/") back before continuing with the script? When I c'n'p'ed a small script from another thread (forgot which) just to test it: PHP Code:
Ir's rather early - local time - and I haven't really slept, so I'm probably just missing something very basic, but it would really make my day, if one of you could push me in the right direction here. Thanks, Martin P.S: I know of the (two) hacks, but I'm not interested in those, but I'm not really looking for any large-scale solutions. I just need to get these kinks ironed out. |
#2
|
||||
|
||||
PHP Code:
|
#3
|
|||
|
|||
It still won't do as I want it to, though. The same parse errors. I'm almost certain I've got the path right (this time).
|
#4
|
||||
|
||||
There are no errors with that script. Make sure you are uploading in ASCII mode and using a normal text editor (i.e not Word).
|
#5
|
|||
|
|||
This is the message I'm given:
Parse error: parse error in /home/yada/yada-yada/yada/head.php on line 71 Line 71 is the line with the if-statement: PHP Code:
|
#6
|
||||
|
||||
Your error is before my code, then. What is the full file?
|
#7
|
||||
|
||||
Are you an Opera or Mac user?
Take a look at your "if" line in your first message: There is an alien char right after if in your code. Opera browser converts spaces to some alien chars when you copy paste it from your browser screen. So try these: a) Delete all space chars from your code and rewrite them by pressing SPACE button. b) Do not copy/paste, write the section by hand. c) Get IE or netscape! |
#8
|
|||
|
|||
I AM using Opera. (And quite a happy one - usually ) Thank you for your suggestion, I'll try. (fingers crossed)
|
#9
|
||||
|
||||
]
Quote:
Result: Code:
Parse error: parse error, unexpected T_STRING in /home/wooolf/WWW/phpnuke/themes/OceanBlue/theme.php(358) : eval()'d code on line 2 PHP Code:
PHP Code:
|
#10
|
||||
|
||||
]I have also tried to use this script:
PHP Code:
IS it possible to use vB data on pages outside of the /forum folder? I'm mostly interested in including php files as I amde 3-4 of them and thought it willl work, but I jest get errors... |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|