vB News Ticker v1.3

本帖由 Xiao.T2008-04-05 发布。版面名称:vBulletin 3.7.X 英文插件

  1. Xiao.T

    Xiao.T 管理员 技术员

    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 now allows you to add up to 5 external RSS feeds to the ticker. This uses magpierss-0.72 as found at sourceforge. It may be possible that your site might not work with magpie.

    I've updated this a little and it works on 3.7. If you have a previous version, uninstall it first and then install this one. Make sure you copy your admincp settings for this down first.

    Install/Upgrade Instructions

    For Zipped 1.3 versionUpload the RSS folder to the root of your forums. If you rename this folder or change the location, you MUST edit the path in the XML file for each of the require_once 'rss/rss_fetch.inc'; paths.

    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

    Add above
    Click Save & Reload

    Step 2: Go to your admin Control Panel => Plugin System => Manage Products => [Add/Import Product];
    Click Browse and find product-davidw_vbnews_ticker.xml
    [If upgrading] 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

    Why does this seem slow?
    For a couple links or for a couple displayed items per link/news item, it should display fine, but as you add more (fill up) each potential slot and up the number of items to pull it will take longer to load. It it easy to add up fast.

    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 my vB Advanced?
    To get the ticker in your vbadvanced, you need to add global output variables
    Admin CP => vBa CMPS => Default Settings => Portal Output Global Variables and put vbnews_ticker in there

    How do I add the news ticker to the IBProArcade or Photoplog?
    Thanks to Mark.B for his add - http://www.vbulletin.org/forum/showp...&postcount=144

    How do I change the color of the text?
    You need to edit the plugin to make this work.

     while($ticker $db->fetch_array($gettickers))  
    Add above:
     $color1 "#0000FF"//blue 
    $color2 "#FF0000"//red 
    $color 1;  
     $ticker_titles             .= ''$ticker['title'] .' '$ticksep.'';  
    Replace with:
     $tick_color                = ($color 2) ? $color1 $color2
    $ticker_titles             .= ''$ticker['title'] .' '$ticksep .''

    How do I change the color of the background?
    To change the background color you should be able to just edit the $vbnews_ticker template and add something like this in this div tag:
    right before the "> add
     z-index: -1;  background-color:#FF0000; layer-background-color:#FF0000;
    - change the colors as necessary.
    Also, remove the padding:7px to adjust the height (or change the number to a lower number).


    How do I put in (absolute) links directly to the location rather than relative links?

    In the plugin, find each instance of
    $ticker_titles 			.= ''. $ticker['title'] .' '. $ticksep.'';
    and change the href="showthread... part to a full url.
    $ticker_titles 			.= ''. $ticker['title'] .' '. $ticksep.'';



    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.


  2. aryeputra

    aryeputra 普通会员

    thank for informations

    I want to try it