Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 3.5 > vBulletin 3.5 Add-ons
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
vB News Ticker Details »»
vB News Ticker
Version: 1.03, by davidw davidw is offline
Developer Last Online: Nov 2023 Show Printable Version Email this Page

Version: 3.5.5 Rating:
Released: 08-04-2006 Last Update: 07-25-2007 Installs: 52
Uses Plugins Template Edits
 
No support by the author.

What does this do? It allows you to take your news from your news forums (up to 9 news forums) and display them. You have a choice on how many you can pull from each forum, how fast you want the ticker to scroll, the length of the title of each news item, etc.

This works on 3.5.4, 3.5.5, and should work on pretty much any of the 3.5.x. I've not tested this for 3.6, but I have been told that it does work for 3.6.

Install/Upgrade Instructions

Step 1: Go to your admin Control Panel => Styles & Templates => Style Manager
Find your Master/Parent style or the style you wish to add this to and drop down the All Style Options menu dropdown and choose Edit Templates
Click Go if it does not redirect you
Open up your Forum Home Templates subdirectory and choose your FORUMHOME template

Find
PHP Code:
<!-- main --> 
Add above
PHP Code:
$vbnews_ticker 
Click Save & Reload

Step 2: Go to your admin Control Panel => Plugin System => Manage Products => [Add/Import Product];
Click Browse and find product-christianb_vbnews_ticker.xml
Remove contents of second line ./includes/xml/product.xml
Click the button next to Yes in Allow Overwrite
Click Import

Step 3: Go to your admin Control Panel => vBulletin Options => vBulletin Options => vB News Ticker => [Edit Settings]
Alter Settings as appropriate
*** IMPORTANT *** Make sure that if you do not enter an item in the forumIDs after the first one, the rest must be set to 0
- if it is not set to 0 or a forumid number, it will result in a database error.
Click Save

I've included the readme and the .xml Product/Plugin in the zip file.

If there are features you'd like to see for a future release, please let me know.

Frequently Asked Questions

What is the forumid?
The forumid is the id of the forum you have created. Each forum has its own unique number assigned to it. When you click on a forum link you can see a number that is assigned to it. This will show up in the URL of the page you are browsing. Another way of seeing the forumid is to go to your admin control panel => Forums & Moderators => Forum Manager => Click on [Expand All] and then move your mouse over (hover) any of the forums you've created. Your status bar (bottom of screen) should display your forumid (number at the end of the link/url).

How do I add the news ticker to the IBProArcade or Photoplog?
Thanks to Mark.B for his add - https://vborg.vbsupport.ru/showpost....&postcount=144

Changes

1.0.4 Added security

1.0.3 Changed the hook location from forumhome_complete to global_start giving admin ability to put the news ticker most places rather than in forum home.
Updated the query to remove a JOIN that may have been causing delays.

1.0.2
Added instructions to comment out unneccessary query pulls in the array to reduce wait times.
Optimized the query by removing non-essential SELECTs.
Added option for user to separate news items in admincp.
Fixed IE whitespace issue for ticker height as seen here:
https://vborg.vbsupport.ru/showpost....3&postcount=28

1.0.1 Fixed a width issue as seen here:
https://vborg.vbsupport.ru/showpost....3&postcount=12


Known Bugs/Issues:

From my testing on the new updates, when I (or a user on my site) clicks on any of the links that has the news ticker, it works fine, but when I or a user hits the refresh button, it can hang. I'm unsure why this is happening.

Temporary demo location:
http://www.christianboards.org/forum.php

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #42  
Old 08-07-2006, 04:03 PM
davidw's Avatar
davidw davidw is offline
 
Join Date: Jul 2005
Location: Arkansas
Posts: 2,815
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

ok, try this then in the plugin, find this:

PHP Code:
            $gettickers $db->query_read("
                SELECT t.threadid, t.title, t.lastpost, t.forumid, t.open, t.replycount, t.postusername, t.postuserid, t.lastposter, t.dateline, t.views, t.visible, t.firstpostid, f.title AS forumtitle 
                FROM " 
TABLE_PREFIX "forum f 
                INNER JOIN " 
TABLE_PREFIX "thread t ON t.forumid = f.forumid AND t.visible = 1 AND " $desclim " > ( SELECT count(" $desclim ") FROM " TABLE_PREFIX "thread WHERE forumid = f.forumid AND visible = 1 AND dateline > t.dateline )
                LEFT OUTER JOIN " 
TABLE_PREFIX "post AS post ON post.postid = t.firstpostid WHERE t.forumid IN (" implode(','$tickarray) . ") 
                ORDER BY field(f.forumid," 
implode(','$tickarray) . "), t.dateline desc
            "
); 
and replace with this
PHP Code:
            $gettickers $db->query_read("
                SELECT t.threadid, t.title, t.forumid, t.open, t.dateline, t.visible, t.firstpostid 
                FROM " 
TABLE_PREFIX "forum f 
                INNER JOIN " 
TABLE_PREFIX "thread t ON t.forumid = f.forumid AND t.visible = 1 AND " $desclim " > ( SELECT count(" $desclim ") FROM " TABLE_PREFIX "thread WHERE forumid = f.forumid AND visible = 1 AND dateline > t.dateline )
                LEFT OUTER JOIN " 
TABLE_PREFIX "post AS post ON post.postid = t.firstpostid WHERE t.forumid IN (" implode(','$tickarray) . ") 
                ORDER BY field(f.forumid," 
implode(','$tickarray) . "), t.dateline desc
            "
); 
and then find this
PHP Code:
                $ticker['title']        = preg_replace('/\<[a-zA-Z0-9 \&lt;\<\,\&gt;\>\.\?\/\:\;\~"\`\!\@\#\$\%\^\&\*\(\)\_\-\+\=]*\>/'''$ticker['title']);
                
$ticker['title']        = fetch_trimmed_title(fetch_censored_text(unhtmlspecialchars($ticker['title'])), $titlelim);
                
$ticker['date']            = vbdate($vbulletin->options['dateformat'], $ticker['dateline']);
                
$ticker['time']            = vbdate($vbulletin->options['timeformat'], $ticker['dateline']);
                
$ticker['replycount']    = vb_number_format($ticker['replycount']);
                
$ticker['views']        = vb_number_format($ticker['views']); 
and replace with this:
PHP Code:
                $ticker['title']        = preg_replace('/\<[a-zA-Z0-9 \&lt;\<\,\&gt;\>\.\?\/\:\;\~"\`\!\@\#\$\%\^\&\*\(\)\_\-\+\=]*\>/'''$ticker['title']);
                
$ticker['title']        = fetch_trimmed_title(fetch_censored_text(unhtmlspecialchars($ticker['title'])), $titlelim);
                
$ticker_titles             .= '<a href="showthread.php?t='$ticker['threadid'] .'" title="'$ticker['title'] .'" target="blank">'$ticker['title'] .'</a> '$ticksep.''
Reply With Quote
  #43  
Old 08-07-2006, 04:59 PM
VaaKo VaaKo is offline
 
Join Date: Jul 2005
Location: Lebanon
Posts: 400
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thank you for taking my rewuest into consideration.
However, I'm getting this error when I installed it.

Code:
Database error in vBulletin 3.5.4:

Invalid SQL:

				SELECT t.threadid, t.title, t.lastpost, t.forumid, t.open, t.replycount, t.postusername, t.postuserid, t.lastposter, t.dateline, t.views, t.visible, t.firstpostid, f.title AS forumtitle 
				FROM forum f 
				INNER JOIN thread t ON t.forumid = f.forumid AND t.visible = 1 AND 10 > ( SELECT count(10) FROM thread WHERE forumid = f.forumid AND visible = 1 AND dateline > t.dateline )
				LEFT OUTER JOIN post AS post ON post.postid = t.firstpostid WHERE t.forumid IN (0,0,0,0,0,0,0,0,0) 
				ORDER BY field(f.forumid,0,0,0,0,0,0,0,0,0), t.dateline desc;

MySQL Error  : You have an error in your SQL syntax near 'SELECT count(10) FROM thread WHERE forumid = f.forumid AND visible = 1 AND datel' at line 4
Error Number : 1064
Date         : Tuesday, August 8th 2006 @ 12:07:32 AM
Script       : http://www.onelebanon.com/forum/index.php
Referrer     : http://www.onelebanon.com/forum/index.php
IP Address   : 82.198.0.27
Username     : Golani
Classname    : vb_database
Reply With Quote
  #44  
Old 08-07-2006, 05:24 PM
davidw's Avatar
davidw davidw is offline
 
Join Date: Jul 2005
Location: Arkansas
Posts: 2,815
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

What do you have for your first forumid? it looks like 0. You need something for your forumid. Also, you may want to edit your code to remove your IP address and username.

Also, what version of SQL are using? This will only run on 4.1 or higher.
Reply With Quote
  #45  
Old 08-07-2006, 07:12 PM
bhxtyrant bhxtyrant is offline
 
Join Date: Jun 2005
Posts: 205
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hey christianb,i was wondering does this version only work with 3.5.5 or will it work ok with 3.5.4 as well?I tried installing it but i cant seem to get it working with 3.5.4 is there a version of this mod for 5.4?
Reply With Quote
  #46  
Old 08-07-2006, 07:15 PM
davidw's Avatar
davidw davidw is offline
 
Join Date: Jul 2005
Location: Arkansas
Posts: 2,815
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Yes, it does work with 3.5.4 (that's what I'm running). What kind of problem are you seeing?
Reply With Quote
  #47  
Old 08-07-2006, 07:17 PM
bhxtyrant bhxtyrant is offline
 
Join Date: Jun 2005
Posts: 205
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I think it may be due to me trying to use it in the header template rather then ForumHome as my ticker area is in the header,When i add the approriate mod and import the xml i set the forum id to "2" and set height width ect but nothing shows in the area at all.
Reply With Quote
  #48  
Old 08-07-2006, 07:17 PM
Eagle Creek's Avatar
Eagle Creek Eagle Creek is offline
 
Join Date: Jan 2004
Location: Netherlands
Posts: 742
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by christianb
I got mine up to 1.699seconds (in firefox) - try this - I removed a bunch of stuff that needn't be used (things I had from a query that I'm using for a hack I'm going to release later this week).

Try this one out - if this works, I'll update the hack today - which it possibly could. I disabled my vbshout and installed this and shaved 70% off my delay.
Still slow as * .

Quote:
Originally Posted by christianb
ok, try this then in the plugin, find this:

PHP Code:
            $gettickers $db->query_read("
                SELECT t.threadid, t.title, t.lastpost, t.forumid, t.open, t.replycount, t.postusername, t.postuserid, t.lastposter, t.dateline, t.views, t.visible, t.firstpostid, f.title AS forumtitle 
                FROM " 
TABLE_PREFIX "forum f 
                INNER JOIN " 
TABLE_PREFIX "thread t ON t.forumid = f.forumid AND t.visible = 1 AND " $desclim " > ( SELECT count(" $desclim ") FROM " TABLE_PREFIX "thread WHERE forumid = f.forumid AND visible = 1 AND dateline > t.dateline )
                LEFT OUTER JOIN " 
TABLE_PREFIX "post AS post ON post.postid = t.firstpostid WHERE t.forumid IN (" implode(','$tickarray) . ") 
                ORDER BY field(f.forumid," 
implode(','$tickarray) . "), t.dateline desc
            "
); 
and replace with this
PHP Code:
            $gettickers $db->query_read("
                SELECT t.threadid, t.title, t.forumid, t.open, t.dateline, t.visible, t.firstpostid 
                FROM " 
TABLE_PREFIX "forum f 
                INNER JOIN " 
TABLE_PREFIX "thread t ON t.forumid = f.forumid AND t.visible = 1 AND " $desclim " > ( SELECT count(" $desclim ") FROM " TABLE_PREFIX "thread WHERE forumid = f.forumid AND visible = 1 AND dateline > t.dateline )
                LEFT OUTER JOIN " 
TABLE_PREFIX "post AS post ON post.postid = t.firstpostid WHERE t.forumid IN (" implode(','$tickarray) . ") 
                ORDER BY field(f.forumid," 
implode(','$tickarray) . "), t.dateline desc
            "
); 
and then find this
PHP Code:
                $ticker['title']        = preg_replace('/\<[a-zA-Z0-9 \&lt;\<\,\&gt;\>\.\?\/\:\;\~"\`\!\@\#\$\%\^\&\*\(\)\_\-\+\=]*\>/'''$ticker['title']);
                
$ticker['title']        = fetch_trimmed_title(fetch_censored_text(unhtmlspecialchars($ticker['title'])), $titlelim);
                
$ticker['date']            = vbdate($vbulletin->options['dateformat'], $ticker['dateline']);
                
$ticker['time']            = vbdate($vbulletin->options['timeformat'], $ticker['dateline']);
                
$ticker['replycount']    = vb_number_format($ticker['replycount']);
                
$ticker['views']        = vb_number_format($ticker['views']); 
and replace with this:
PHP Code:
                $ticker['title']        = preg_replace('/\<[a-zA-Z0-9 \&lt;\<\,\&gt;\>\.\?\/\:\;\~"\`\!\@\#\$\%\^\&\*\(\)\_\-\+\=]*\>/'''$ticker['title']);
                
$ticker['title']        = fetch_trimmed_title(fetch_censored_text(unhtmlspecialchars($ticker['title'])), $titlelim);
                
$ticker_titles             .= '<a href="showthread.php?t='$ticker['threadid'] .'" title="'$ticker['title'] .'" target="blank">'$ticker['title'] .'</a> '$ticksep.''

Do I have to try these things also?
Reply With Quote
  #49  
Old 08-07-2006, 07:21 PM
Eagle Creek's Avatar
Eagle Creek Eagle Creek is offline
 
Join Date: Jan 2004
Location: Netherlands
Posts: 742
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

EDIT:

Made the changes but not any differences..
Reply With Quote
  #50  
Old 08-07-2006, 07:26 PM
davidw's Avatar
davidw davidw is offline
 
Join Date: Jul 2005
Location: Arkansas
Posts: 2,815
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

@bhxtyrant - it won't work, as far as I know, in the header. It will only work in the forumhome template.

@Eagle Creek - Those are the same changes in the product I posted earlier for you. Those changes are to be made in the plugin. If you go to your Plugin System => Plugin Manager => find vB News Ticker under forumhome_complete and click on [Edit] on the right side - it will give you the option to edit the plugin.
Reply With Quote
  #51  
Old 08-07-2006, 07:30 PM
Eagle Creek's Avatar
Eagle Creek Eagle Creek is offline
 
Join Date: Jan 2004
Location: Netherlands
Posts: 742
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I think there is something really wrong with your code.

It just take up to 20 seconds?
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 02:19 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.08244 seconds
  • Memory Usage 2,386KB
  • Queries Executed 25 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)bbcode_code
  • (10)bbcode_php
  • (2)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (1)pagenav_pagelinkrel
  • (11)post_thanks_box
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (11)postbit_onlinestatus
  • (11)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.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
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete