vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 2.x Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=4)
-   -   News "Hack" (https://vborg.vbsupport.ru/showthread.php?t=40241)

Link14716 06-23-2002 10:00 PM

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 :)

Xenon 06-24-2002 09:27 PM

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

Link14716 06-24-2002 09:30 PM

Cool.

/me updates own global.php, the .txt file, and gives Xenon some candy.

Velocd 06-24-2002 09:39 PM

When you say "news", what exactly are you referring to? The announcements?

Xenon 06-24-2002 09:42 PM

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 :)

Link14716 06-24-2002 09:52 PM

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 ;)

MrLister 06-25-2002 02:01 AM

Congradulations on your first hack! Great job!

Link14716 06-25-2002 04:26 AM

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.

Chris M 06-25-2002 10:31 AM

Great!

Saves me the trouble of making it:)

*installs*

Satan

Link14716 06-27-2002 10:29 PM

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. ;)


All times are GMT. The time now is 04:22 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
  • Page Generation 0.01695 seconds
  • Memory Usage 1,728KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete