![]() |
News "Hack"
Ok, I made a news ticker hack. This is my first hack. YAY!
Description: This hack allows you to enter a message in the General Settings part of vBulletin Options in your Admin CP. Enter $news anywhere on any template and the message will show up. HUGE credit to Xenon for showing me how to get the variables to work. Without him, this wouldn't exist. Credit to Andy Sookram for the news ticker. News Ticker found here. To do: 1 MySQL Query 1 File Edit ? Template Modification(s) Enjoy! UPDATE 12/22/02 I decided to give this simple little hack an update. It no longer adds a query, and it is less confusing to install. Enjoy :) |
thanks for the flowers :) (Common german task, hope it exists also in english ;))
an optional addition to your code: after $news=$DB_site->query_first("SELECT * FROM setting WHERE settingid=x"); put this: $news[value]=bbcodeparse2($news[value],1,1,1,1); so you can use bbcode and smilies in your news too |
Cool.
/me updates own global.php, the .txt file, and gives Xenon some candy. |
When you say "news", what exactly are you referring to? The announcements?
|
I would call it a message Hack.
You could enter a message and can decide where to show up. in the header template or wherever. News is really a bit unprecious name :) |
Yea, more of a Message hack. I use it in a news ticker (and another installation, with $news2 for a fader). So, someone might as well rename the topic to "Message" hack so no one gets confused on what I mean ;)
|
Congradulations on your first hack! Great job!
|
Attached is a News Ticker that is tested to work for it (heck, I made it for this ticker.) Credit for the ticker goes to Andy Sookram.
|
Great!
Saves me the trouble of making it:) *installs* Satan |
Thanks for the compliments.
Right now I am trying to get the BB Code parsing to work in newsfaders. Everytime I try, the news doesn't show up, but I will get it eventually. ;) |
:)
Satan |
congratz! this would go well if I alrady didnt have mine ony my forums (feel free to somewhat use) www.ecforums.com/forums if you need it. I love the gradient backround
|
what news ticker u using Rober9?
|
/me bump
|
hi,
I ran the query in phpMyAdmin, but i got the following mistake: Quote:
best regards Schumi |
It would help if it where english, since that is my ONLY language, but, I think I know the problem.....
Are you using phpMyAdmin 2.2.0 or something? Anyways, to get it to work, go into the setting table, see what the bottom settingid is (make sure you have it to view all), and add a new row. Setting ID: 1 above the last one Setting Group ID: 2 News news Insert forum news here.......... textarea 7 That should do it. |
Satan gave you a compliment! :surprised:
I'm not sure if that's good or bad... :laugh: :D :) |
Quote:
thanks, Schorsch |
*bump*
|
Let me "shed" some light on this.
He is using a javascript news fader. You can get a hack to have a fader somewhere around here (doesn't exactly require a hack, but it makes it considerably better), just use the little search box. :D Also, the optional step in the text file has not worked for me with javascript faders, so I am guessing that it won't work with any javascript. |
jep I already tried to install THIS Newsfader Hack, but it doesn't work :( :(
so is there no damn working simple news fading hack on the world ?? *gg* cu Schorsch |
UPDATE 12/22/02
I decided to give this simple little hack an update. It no longer adds a query, and it is less confusing to install. Enjoy :) |
Hi Link14716
I installed you hack into my test forums but can?t seem to get it to work correctly. All I get scrolling across the screen is the first letter ONLY of the news I enter in the general settings. Any ideas? XrayHead :confused: Link to example.............here!! |
Quote:
|
Yeh, This is a real bummer as it looks really nice and would be very usefull indeed....................
|
Yeah! i was so excited to use it...then..i just saw my little T going across and was like...damn
|
Well, I must have messed up when I updated this hack, hold on...
|
Did you use the EXACT code (or very close to it) in the attachment with the HTML code for the news ticker? If you did, in the header template, change $news[value] to $news. I don't see anything else that might be causing it.
|
BTW, would there be any way to make it so that we could use $username, $totalposts...or other things in it?
|
As far as I know, there isn't, unless you hard-edit it into the template. Sorry.
EDIT: I could eval it, although it won't let you use bbcode (you'd have to use HTML). Let me see if I can get this to work. |
Damn... thanks, though
|
Not tested, but try it anyways:
In global.php, find: Code:
$news=bbcodeparse2($news,1,1,1,1); Code:
eval("\$news = \"$news\";"); |
It'd let you use HTML code and PHP variables (of course you won't be able to use smilies or bbcode).
|
Thanks for the reply, It works OK now.
|
No problem. Glad you like it. :)
|
i dont understand. I have the ticker working, but I don't understand where i enter the news to be used by the ticker.
As you can see at www.warvoice.com, on the right hand side, below to news feed, I have it set up with a static message. load the $news variable. Where does it pull the data from? |
All times are GMT. The time now is 10:29 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:
|