The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
||||
|
||||
$vbulletin->options['bburl'] questions
I am kind of a novice at writing plugins so bare with me.
I wrote a plugin to change the value of $vbulletin->options['bburl'] to match the url the user was using to visit my site. Basically I made a plugin on the hook global_setup_complete with the code PHP Code:
Quote:
Thanks!!! |
#2
|
||||
|
||||
Add the full URL:
PHP Code:
|
#3
|
|||
|
|||
And try the init_startup or global_start hook instead.
|
#4
|
||||
|
||||
You guys rock!!!!
My forum is in the root dir so I changed it to PHP Code:
Thanks for the assistance!!!! |
#5
|
||||
|
||||
There may be a possibility of XSS there. HTTP_HOST can be spoofed by the browser using the "Host" header. Since 'bburl' is used in the display of the pages, it will print right out into the source code.
|
#6
|
||||
|
||||
hmm. Do you have any suggestions on how to get the url the user is visiting from to show up where the bburl value instead of the one that is hard coded into the admincp?
Maybe a series of if then statements in the plugin? If the http_host =url1 then bburl=preset url 1? |
#7
|
||||
|
||||
PHP Code:
|
#8
|
||||
|
||||
No luck. When I try to save the plugin with that code it says "In order to accept POST request originating from this domain, the admin must add this domain to the whitelist."
|
#9
|
||||
|
||||
That's not an error with the plugin, that's an error from vBulletin itself. The error speaks for itself.
|
#10
|
||||
|
||||
You are right, right after I posted that I restarted my browsers and everything is working again. I must have had some bad code in there or something from other attempts at re-writing the plugin my self.
Thanks for the help!!! I think that will accomplish exactly what I was looking for and much cleaner than any code I was attempting to create. |
Thread Tools | |
Display Modes | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|