vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.5 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=113)
-   -   vB News Ticker (https://vborg.vbsupport.ru/showthread.php?t=123126)

davidw 08-04-2006 10:00 PM

vB News Ticker
 
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

mholtum 08-05-2006 04:03 PM

w00t #1

-Installed

Snake 08-05-2006 04:31 PM

Second one to install this. Thanks! :D

PitPunks 08-05-2006 04:32 PM

#1 complainer :P

Do you have any non christian news ticker? :P

davidw 08-05-2006 04:49 PM

You can pull the news from any forums on your website you want to. The forums you put in the forumid can be anti-Christian if that is how you feel.

I don't have a test website so I do all my testing on a live website - my own. :) (Otherwise my links would reflect a test website for the demo and for the screenshots) - hope that helps.

Oddjob 08-05-2006 08:35 PM

This work on 3.6?

rmxs 08-05-2006 08:52 PM

thanks :) installed

TNAImpact 08-05-2006 09:42 PM

Great stuff.

How can I edit it so that I can put for example, "Latest Threads:" before the ticker? Oh and add - between each thread title to make it a little cleaner.

I'll use it once or if the above is do able. :) Cheers!

davidw 08-05-2006 10:19 PM

on the Latest Threads, all you have to do is go to your templates in the admincp, find the vbnews_ticker template and add Latest threads: before $ticker_titles like this
PHP Code:

<div align="center" style="padding:7px"><marquee width="{$vboptions[tickwidth]}"height="{$vboptions[tickheight]}behavior=scroll scrollamount="{$vboptions[tickspeed]}onmouseover='this.stop()' onmouseout='this.start()'>Latest threads$ticker_titles</marquee></div

or if you want the Latest threads: bolded, add the strong tag <strong>Latest Threads: </strong> such as this:
PHP Code:

<div align="center" style="padding:7px"><marquee width="{$vboptions[tickwidth]}"height="{$vboptions[tickheight]}behavior=scroll scrollamount="{$vboptions[tickspeed]}onmouseover='this.stop()' onmouseout='this.start()'><strong>Latest Threads: </strong>$ticker_titles</marquee></div

for the second part, in the edit the plugin in the plugin manager, find vB News Ticker under forumhome_complete.
Look for &nbsp; &nbsp; and put a - (hyphen) in between the two &nbsp; symbols.

davidw 08-05-2006 11:18 PM

@oddjob - I've not tried it, but I don't see why it shouldn't work on 3.6 (I've not installed 3.6 as of yet). However, once I get a development board up and running, I'll let everyone know (unless someone has 3.6 and it works fine for them).

C_P 08-06-2006 03:39 AM

Have it on 3.6 at www.cpfools.com/forum and works perfect. Thank you for the great addition!

Buraq 08-06-2006 05:50 AM

hey there, cool mod (installed)

Is there a way to make the stream continuous? For some reason on my forum it goes through the forums listed, waits till the last of the text clears, then starts again.

Also, there's a little browser-compliance issue:
Code:

marquee width="{$vboptions[tickwidth]}"%
makes the width of the marquee 100 pixels (if it's set to 100) in IE. Easy fix:
Code:

marquee width="{$vboptions[tickwidth]}%"
move the "%" inside the the quote, gives you the proper width in IE and firefox.

TNAImpact 08-06-2006 07:42 AM

Quote:

Originally Posted by christianb
on the Latest Threads, all you have to do is go to your templates in the admincp, find the vbnews_ticker template and add Latest threads: before $ticker_titles like this
PHP Code:

<div align="center" style="padding:7px"><marquee width="{$vboptions[tickwidth]}"height="{$vboptions[tickheight]}behavior=scroll scrollamount="{$vboptions[tickspeed]}onmouseover='this.stop()' onmouseout='this.start()'>Latest threads$ticker_titles</marquee></div

or if you want the Latest threads: bolded, add the strong tag <strong>Latest Threads: </strong> such as this:
PHP Code:

<div align="center" style="padding:7px"><marquee width="{$vboptions[tickwidth]}"height="{$vboptions[tickheight]}behavior=scroll scrollamount="{$vboptions[tickspeed]}onmouseover='this.stop()' onmouseout='this.start()'><strong>Latest Threads: </strong>$ticker_titles</marquee></div

for the second part, in the edit the plugin in the plugin manager, find vB News Ticker under forumhome_complete.
Look for &nbsp; &nbsp; and put a - (hyphen) in between the two &nbsp; symbols.


Perfect. :) Quality mod.

Installed.

Foxsake 08-06-2006 08:40 AM

Installed this and works fine - nice i must say;)

However i dont understand the forum id bit :confused: how do you know the number? and how to you get it to pull the data and display it?

the only way i can see to adjust the ticker is manually changing the text in the template - is this how it works?
Sorry im a bit new still to all this

Foxsake 08-06-2006 08:59 AM

ah ha - sorry forget the last message i've sussed it - Brilliant :)

davidw 08-06-2006 11:19 AM

@Burgaq - I'm looking into making it stream continuously - I've wondered that myself. Thanks for the tip on the ". My original code didn't work when I used the " that way, but didn't think to test it after changing the code to $vboptions.

@Foxsake - 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).

davidw 08-06-2006 11:22 AM

Quote:

Originally Posted by Foxsake
ah ha - sorry forget the last message i've sussed it - Brilliant :)

Good job :)

rmxs 08-06-2006 07:43 PM

Sugestion: color chenge
seperators (add one option if user add for exaple - or / or \ seperate the topics if not add somethis appeard without seperators)
make addon that if user wont pass from the screen all the attachments in X forum with x size.. :) (with this you can make new hack) LOL

davidw 08-06-2006 08:30 PM

Color change as in background color or border color?

Also - the separators, currently you can manually edit the xml, such as this:
Quote:

Originally Posted by christianb
in the edit the plugin in the plugin manager, find vB News Ticker under forumhome_complete.
Look for &nbsp; &nbsp; and put a - (hyphen) in between the two &nbsp; symbols.

or in your case a / or \ - however, I can look at adding this to the options so that a user can control this from the admincp rather than having to edit it manually :). I'm not sure I follow the last part in regards to the attachments.

davidw 08-06-2006 09:00 PM

Ok, here's an updated XML file with the admincp control to change your spacing between news items.

rmxs 08-06-2006 10:37 PM

LOL you are very fast i know this thing with edit byt others user maube not :)
i have already change the &nbsp; &nbsp;

now about the color i mean the letter...no boarder on option in admin control panel that user can set 2 different collors EXAPLE 1-3-5-7 topics BLUE 2-4-6-8 topics RED :)

davidw 08-06-2006 11:01 PM

Honestly, I am not sure if the even/odd color is probable. The information is gathered in a single query and then run through a while loop. The while loop is then run each time for each instance of what is pulled out of the query. This is done sequencially.

If it is possible, I would like to know (and how) (and I could then make changes to do so).

davidw 08-07-2006 12:22 AM

I'm working on an update right now that will give users the option to choose a border, a border size, a border color, a background color, in addition to the change made earlier (admincp control on spacing). It won't be ready until tomorrow though as I've written it but haven't had time to test it.

Harley-Heaven 08-07-2006 06:55 AM

Hi Chris,

had a look at the mod/hack, looks great. Can you give a newbie a little piece of advice please??

Where do I find the forum numbers from if I am using a Hack/Mod called "About Today" where I can select a number of news sources i.e. CNN, BBC, Yahoo etc.

Thanks for your assistance.

davidw 08-07-2006 12:02 PM

I'm not familiar with that hack. However, if that information is going into a forum, then you have no problems. Here is a snippit of something I posted yesterday but it should help you out, especially if About Today does insert into a forum.
Quote:

Originally Posted by christianb
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).


davidw 08-07-2006 12:15 PM

@rmxs - now that I think about it - I think it CAN be done - I just have to figure out how.

Eagle Creek 08-07-2006 12:27 PM

My homepage is slow after installing this?

Could that be caused by the ticker? (I have set 7 items) or just something else?

EDIT:
In FireFox it looks great. But when using IE I puts extra whitelines between it.

Look:
http://www.nucia.nl/forum/

davidw 08-07-2006 12:40 PM

TBH, I'm not sure why it is slow (in testing most of the time 7-8 out of 10 times it worked fine) but I think it could have something to do with the subquery. However, I don't know for sure. However, I am caching templates, so that should speed things up on the ticker.

EDIT: in the control panel, go to vbulletin options => vB News Ticker => Ticker Height => change the number from 50 to 10. That should fix it.

Eagle Creek 08-07-2006 12:53 PM

Homepage takes 8(!) seconds to load :(.
Both IE and FireFox.

When I disable the ticker it's running fine. I really like the feature but when it's slowing down my HP so much I can't have it installed.

(the height is ok now in IE)

I'm running:
PHP 4.4.2
MySQL Version 4.1.19-standard-log

davidw 08-07-2006 12:58 PM

It's probably the subquery then. I'll see what I can do to try to speed this up.

I've updated the zip file to include the latest changes.

Eagle Creek 08-07-2006 01:06 PM

I have the idea my whole forum is slowing down? Also posting a reply takes ages now.

I will de?nstall and re?nstall :).

Eagle Creek 08-07-2006 01:12 PM

Noo :(.

Take a look: http://www.nucia.nl/forum/ . Takes a long time to load.

davidw 08-07-2006 01:17 PM

The only page that should be affected is the forumhome. I see 6 seconds on regular pages and 8 seconds on the forumhome. Try disabling the plugin. I want to see what I reach your page with it disabled.

Eagle Creek 08-07-2006 01:21 PM

It's now disabled, please try again.


Enabled:
Page generated in 5.46892 seconds with 22 queries [Server Loads: 0.44 0.35 : 0.35]

Disabled:
Page generated in 0.14331 seconds with 22 queries [Server Loads: 0.42 0.36 : 0.35]

davidw 08-07-2006 01:23 PM

I see 5 seconds on the forumhome now and 1 1/2 seconds on regular pages.

Eagle Creek 08-07-2006 01:24 PM

You see the difference?

My forumhome is quicker (about <1 second) but there is a difference.

davidw 08-07-2006 01:34 PM

I'll see what I can do about making this quicker. Quicker is better.

Eagle Creek 08-07-2006 01:37 PM

Thankyou :).

I'll keep track on this thread.

davidw 08-07-2006 01:57 PM

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.

Buraq 08-07-2006 03:45 PM

Yeah I'm experiencing slower loading times as well. Normally my forum home takes fractions of a second to load, with this hack it sometimes takes upwards of 10 (sometimes 12) seconds.

I'll hold off on trying the new xml file till you release the final version, since I made some modifications to the way it displays and don't wanna have to do them again and again.


All times are GMT. The time now is 06:46 AM.

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.01415 seconds
  • Memory Usage 1,857KB
  • 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
  • (2)bbcode_code_printable
  • (6)bbcode_php_printable
  • (4)bbcode_quote_printable
  • (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
  • (40)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