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)

bhxtyrant 08-07-2006 07:40 PM

thanks christian,Is there any hope of getting this to work with the header template?I found another hack here called "Latest Threads IN Marquee" which does work in the header but it doesnt have nearly as many features as yours does such as the ability to pull news from only a single forum id.

davidw 08-07-2006 07:46 PM

@Eagle Creek, just out of curiousity, how long does it take to start the forums here: http://www.christianboards.org/forum.php

@bhyxtyrant, I can see what I can do but I'm not sure. It might possibly work but changing the plugin (in the plugin manager) from forumhome_complete to global_start and then trying the $vbnews_ticker where you want it - try that. I've not tested it, so I'm not sure if that will work or not.

Eagle Creek 08-07-2006 08:16 PM

Quote:

Originally Posted by christianb
@Eagle Creek, just out of curiousity, how long does it take to start the forums here: http://www.christianboards.org/forum.php

@bhyxtyrant, I can see what I can do but I'm not sure. It might possibly work but changing the plugin (in the plugin manager) from forumhome_complete to global_start and then trying the $vbnews_ticker where you want it - try that. I've not tested it, so I'm not sure if that will work or not.

FORUMHOME:
First time load, it kept loading and loading and after 400 (!) seconds I stopped it.
Second try: 3.156 seconds.
After a refresh of the page: 6.453

FORUMDISPLAY:
1.954 seconds

davidw 08-07-2006 08:47 PM

My average load time (for me) is about 1.7 seconds. I have done a refresh and connected as quick as 1.117. I think distance may play a part in it though.

Eagle Creek 08-07-2006 10:55 PM

I guess so.. Cause when you say my forumhome takes 6 seconds, I say you are slow :p.

But anyway: The script is slowing down my index.

Any change you will re-write the script? (I saw you already added some functions).

davidw 08-07-2006 11:13 PM

I will look at optimizing the script to make it go faster. I don't like hangups on code and will work on this moreso this week. I have 2-3 ideas I am working on. I have also thought possibly that the location (forumhome_complete) may be part of the issue there.

davidw 08-08-2006 11:24 AM

Ok, I believe I've figured out the problem :)

This works for the forumids you are not using.
(I will update the readme later today for this.)
Go to your plugin (admincp => Plugin System => Plugin Manager)
Find vB News Ticker under forumhome_complete, click [Edit]

Find (near the top)

PHP Code:

            $tickarray    =    array(
                
$vbulletin->options['fid1'],
                
$vbulletin->options['fid2'],
                
$vbulletin->options['fid3'],
                
$vbulletin->options['fid4'],
                
$vbulletin->options['fid5'],
                
$vbulletin->options['fid6'],
                
$vbulletin->options['fid7'],
                
$vbulletin->options['fid8'],
                
$vbulletin->options['fid9']
            ); 

### EXAMPLE ###
If you are only pulling news from 2 forumids, comment out fid3 - fid9 (like below) and remove the comma after the fid2 (as shown)
Remove the comma from fid2 if you are commenting out fid3

PHP Code:

            $tickarray    =    array(
                
$vbulletin->options['fid1'],
                
$vbulletin->options['fid2']       // remove the comma here
                //$vbulletin->options['fid3'],
                //$vbulletin->options['fid4'],
                //$vbulletin->options['fid5'],
                //$vbulletin->options['fid6'],
                //$vbulletin->options['fid7'],
                //$vbulletin->options['fid8'],
                //$vbulletin->options['fid9']
            
); 

Why should this work? I thought about this - this morning. There is an array of 9 variables being passed through 1 query and a subquery REGARDLESS of whether or not it is being used. Commenting out the ones not being used - it will not be passed through the query, nor will it be passed through the subquery. I did a test on my website to try it out. My forumhome load went from 1.787s to 0.897 when I commented out those above.

For now, this is a manual fix, until I can figure out how to fix this so that it doesn't have to be edited through the plugin.

Eagle Creek 08-08-2006 12:11 PM

I'm using
PHP Code:

    $tickarray    =    array(
                
$vbulletin->options['fid1']
                
//$vbulletin->options['fid2'],
                //$vbulletin->options['fid3'],
                //$vbulletin->options['fid4'],
                //$vbulletin->options['fid5'],
                //$vbulletin->options['fid6'],
                //$vbulletin->options['fid7'],
                //$vbulletin->options['fid8'],
                //$vbulletin->options['fid9']
            
); 

now because I only use one forum to pull the news out.

Whieeeeeeeeeee! It's working!
I can still see there is a delay in loading, but it isn't big (<1 seconds).

EDIT: :( no...
When I open the page, it takes about 1.5 second. After a refresh also.
When I go to a forumdisplay, and at the top I click at the hompage link it takes about 6 seconds :(.

EDIT2: Even when I'm direct opening the homepage, is slow again. Strange.

Eagle Creek 08-08-2006 02:21 PM

Ok People,

with the help from Christian (another modification) it's working fine now!
It's slowing down a little bit, but that's normal because there's more to load. You almost don't know you have the hack installed :).

Thx again David ;).

davidw 08-08-2006 04:50 PM

Quote:

Originally Posted by rmxs
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 :)

Ok, I believe I have got this figured out :)
You need to edit the plugin to make this work.

Find:
PHP Code:

while($ticker $db->fetch_array($gettickers)) 

Add above:
PHP Code:

$color1 "#0000FF"//blue
            
$color2 "#FF0000"//red
            
$color 1

Find:
PHP Code:

$ticker_titles             .= '<a href="showthread.php?t='$ticker['threadid'] .'" title="'$ticker['title'] .'" target="blank">'$ticker['title'] .'</a> '$ticksep.''

Replace with:
PHP Code:

$tick_color                = ($color 2) ? $color1 $color2;
                
$ticker_titles             .= '<a href="showthread.php?t='$ticker['threadid'] .'" title="'$ticker['title'] .'" target="blank"><font color="'$tick_color .'">'$ticker['title'] .'</font></a> '$ticksep .'';
                
$color++; 

The screenshot is what it does:


All times are GMT. The time now is 01:14 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.01272 seconds
  • Memory Usage 1,772KB
  • 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
  • (7)bbcode_php_printable
  • (2)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (1)pagenav_pagelinkrel
  • (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