![]() |
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. |
*Bump*
Can someone tell me? Please? |
you have to define the $news-variable in the phpinclude-template, or in the global.php file.
|
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?
|
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"; |
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?
|
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 |
Thanks. I will try it out.
:D |
Nope, it didn't work :(
Everywhere I put the variable, it says "Array" |
Oh, nevermind, I was stupid. LOL
|
All times are GMT. The time now is 09:57 PM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|