View Full Version : Settings Table
mADmAX`
03-28-2003, 04:51 PM
Edit (let me rephrase):
I have a url ($forumsurl) in the settings table in mysql. I am trying to call this url in certain parts of the forums for links. How do I make it pass this globaly (not sure where to put it). It will call it in the header/footer but not anywhere else.
filburt1
03-28-2003, 05:09 PM
Settings are already in the global scope.
mADmAX`
03-28-2003, 05:17 PM
by <a href="$forumsurl/member.php?s=$session[sessionhash]&action=getinfo&find=lastposter&forumid=$forum[forumid]"><b>$forum[lastposter]</b></a>
Would you happen to know why it wont call it there?
Dean C
03-28-2003, 05:39 PM
Use the variable $bburl - that's what its for :D
- miSt
mADmAX`
03-28-2003, 05:45 PM
$bburl would give me the directory for that part of the forums not the main forums.
I have 2 forums running sharing the database (one forums, one a file database). I want the certain links (like the profile of that user that posted it) to pull from the main forums profile page.
filburt1
03-28-2003, 06:13 PM
As I said:
Today at 02:09 PM filburt1 said this in Post #2 (https://vborg.vbsupport.ru/showthread.php?postid=374600#post374600)
Settings are already in the global scope.
mADmAX`
03-28-2003, 06:20 PM
Today at 08:13 PM filburt1 said this in Post #6 (https://vborg.vbsupport.ru/showthread.php?postid=374627#post374627)
As I said:
No offense but I am well aware how to read and as I stated, I know its suppose to but its not pulling it for some reason. I am not totally stupid on hacks, etc for vb so its not even that.
This is the code in forumhome_lastpostby:
by <a href="$forumsurl/member.php?s=$session[sessionhash]&action=getinfo&userid=$lastpostuserid"><b>$forum[lastposter]</b></a>
This is whats in $forumsurl:
http://www.xxx.com/beta
This is the url it gives when called on index.php:
http://www.xxx.com
-----------------
Its as if it see's the "/" after $forumsurl and goes to the root of the address. Almost as if $forumsurl is not defined but its called everywhere else I have it but here.
mADmAX`
03-28-2003, 06:23 PM
I just tested $bburl in place of $forumsurl and it still doesnt display path for $bburl, it also goes to root of address.
filburt1
03-28-2003, 06:48 PM
Make sure you're adding the variable to the options template. vB is dumb and has data redundancy in a lot of places.
mADmAX`
03-28-2003, 06:59 PM
I did a little playing because I felt as if it was not passing globaly...
$forumsurl = $DB_site->query("SELECT value FROM setting WHERE varname ='forumsurl'");
$forumsurl = $DB_site->fetch_array($forumsurl);
$forumsurl = $forumsurl[value];
Placing that in index.php made it work but then I found out it doesnt pass in other places also. Seems it will pass these variables in header and footer and certain other parts but will not in lastposteby, postbits, etc.
Where would be a good place to place this to make it global since its a little faulty the current way it is.
mADmAX`
03-28-2003, 07:03 PM
Today at 08:48 PM filburt1 said this in Post #9 (https://vborg.vbsupport.ru/showthread.php?postid=374649#post374649)
Make sure you're adding the variable to the options template. vB is dumb and has data redundancy in a lot of places.
Yeah I also noticed that when I removed something else (through phpMyAdmin) in settings and it kept calling it til I went into options and saved it.
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.