The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
||||
|
||||
Don't know where to ask this, but.... Variables
Ok, I use a news ticker to show current up to date news in my header. I was wondering how I can edit the news on all templates via vBulletin Options. I have already added the setting for it with the variable $news, but I need to know how to actually get that variable to work in the header. Thanks...
Also, I will do a second one for a news fader on some templates in the newsfader template (fader_news) to show up on forumhome. If instructions for that would be different, please tell me. Thanks. |
#2
|
||||
|
||||
*Bump*
Can someone tell me? Please? |
#3
|
||||
|
||||
you have to define the $news-variable in the phpinclude-template, or in the global.php file.
|
#4
|
||||
|
||||
The problem is that I don't know how to. Do I just put $news in it or something? And where would I put it in the global.php file?
|
#5
|
||||
|
||||
it depends on how do you write your news.
your post is a bit unclear in this question. normally if you put it into phpiclude use this way: $news="Text of news in it"; |
#6
|
||||
|
||||
well, I already made the $news variable in the settings table, so that I could edit it in the vBulletin Options part of the admin CP, and that is where I want to edit the news. Is there a way I can do that easily?
|
#7
|
||||
|
||||
ahh, i see
ok, you have to edit your global.php find this line: // parse css, header & footer ################## just before add this: $news=$DB_site->query_first("SELECT * FROM setting WHERE settingid=x"); change the x to the settingid of your news-setting. then you should be able to use $news[value] in your header template |
#8
|
||||
|
||||
Thanks. I will try it out.
|
#9
|
||||
|
||||
Nope, it didn't work
Everywhere I put the variable, it says "Array" |
#10
|
||||
|
||||
Oh, nevermind, I was stupid. LOL
|
Thread Tools | |
Display Modes | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|