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)
-   -   vBindex (https://vborg.vbsupport.ru/showthread.php?t=37021)

Steph2k 07-16-2002 08:47 PM

Hmmm. I did this but it does not seem to be working for me. Any other ideas?

Steph

Quote:

Originally posted by NTLDR
OK, I have removed the folloing code from the file and at the moment it seems to be working correctly.

Either remove (or comment out each line with // ):
PHP Code:

// today online hack by Mystics - start
  
if ((int)$maxusers[0] <= $totalonline) {
    
$time time();
    
$maxloggedin "$totalonline " $time " " $maxusers[2] . " " $maxusers[3];
    
$DB_site->query("UPDATE template SET template='$maxloggedin' WHERE title='maxloggedin'");
    
$maxusers[0] = $totalonline;
    
$maxusers[1] = $time;
  }

  
$todayloggedinusers "";
  
$numbertodayonline 0;
  
$numbertodayonlineinvisible 0;

  
$todayusers=$DB_site->query("SELECT userid, username, usergroupid, lastactivity, invisible FROM user
                WHERE lastactivity > " 
mktime(0,0,0,date("m"),date("d"),date("Y")) . "
                ORDER BY username"
);
  while (
$todayuser=$DB_site->fetch_array($todayusers)) {
    
$numbertodayonline++;
    if (
$todayuser['invisible']==and $bbuserinfo['usergroupid']!=6) {
      
$numbertodayonlineinvisible++;
      continue;
    }
  }

  
$DB_site->free_result($todayusers);

  if (
$bbuserinfo[usergroupid] == 6) {
    
$todayonline $numbertodayonline;
  } else {
    
$todayonline $numbertodayonline $numbertodayonlineinvisible;
  }
//today online hack by Mystics - end 

The downside to this is that you can't display the number of registered users logged in today on the vBindex page, so you also need to remove (or comment out):

Code:

<a href="online.php?s=$session[sessionhash]">Online Today</a>: <b>$todayonline</b><br>
From the template home_left

Let me know if this works for you, it seems to for me at the moment :D


NTLDR 07-17-2002 12:00 PM

Quote:

Originally posted by Steph2k
Hmmm. I did this but it does not seem to be working for me. Any other ideas?
That should do the job, its worked perfectly for me since I made that modification to my forums. I would guess that its something else that is causing the problem.

Vinney 07-17-2002 12:43 PM

Quote:

Originally posted by NTLDR


Is it vBhome or vBindex you have? If its vBhome then this is the wrong thread.

57 is a high number of queries, you want to try and keep it bellow 30 for optimal performance, if you don't have many conncurrent visitors though it doesn't matter to much.


sorry i have vbindex ...... the one on this thread. why is my vbindex running so many queries ???

NTLDR 07-17-2002 01:03 PM

Quote:

Originally posted by Vinney
sorry i have vbindex ...... the one on this thread. why is my vbindex running so many queries ???
Because of all the stuff you have displayed on the page, the only way to reduce the number of queries is to remove sections of the code, like news, latest threads, polls etc.

Spingo 07-19-2002 09:38 AM

Great mod peoples. I have successfully got it running rather smoothly in the directory below my forums (the hack is installed in /, the forums under /forums). I just have one problem though... (of course I do, otherwise I wouldn't be writing this)

If I write a post in the news forum like:
Quote:

This is written on the first line.

This is written on the third line, and there is a blank line between this and the first line.
it shows on the vbindex page as:
Quote:

This is written on the first line. This is written on the third line, and there is a blank line between this and the first line.
ie., the line breaks appear in the post, but not on the vbindex page.

This is the only lil minor problem that I'm having at the moment. I've tried looking in the vbindex.php file, and from what I can see, the following three lines get the post from the database:
Quote:

$getnews=$DB_site->query_first("SELECT * FROM post WHERE threadid='$newsthreadid' ORDER BY postid ASC LIMIT 1");
$newstext=bbcodeparse($getnews[pagetext],$newsforum,1);
$newstext=str_replace("<br />","",$newstext);
Has anyone been able to get line breaks to appear in the vbindex page? If so, how did you do it?

Also, with the amount of codefixes and ammendments that have been made since the v1.3 release, are we likely to see v1.4 soon?

NTLDR 07-19-2002 04:57 PM

Quote:

Originally posted by Spingo
This is the only lil minor problem that I'm having at the moment. I've tried looking in the vbindex.php file, and from what I can see, the following three lines get the post from the database:
Remove this line to allow line breaks in the newsblock

PHP Code:

$newstext=str_replace("<br />","",$newstext); 

Quote:

Also, with the amount of codefixes and ammendments that have been made since the v1.3 release, are we likely to see v1.4 soon?
I have no idea if el3m3nt is supporting or going to release a new version of this hack, he doesn't seem to post much in this thread, I may see about releasing a new version if he isn't going to and theres any interest.

iblis 07-23-2002 05:17 PM

OMG! my site is SO slow with vBindex..

take a look: http://www.freakforum.nu/index.php

takes up to one minutte to load.. whats wrong?

please help, its a bussy norwegian site! ;)

NTLDR 07-23-2002 09:28 PM

Quote:

Page generated in 26.07498503 seconds (0.43% PHP - 99.57% MySQL) with 65 queries.
This is why its so slow, the main page has 65 queries on it. You will need to remove some functions from your vbindex PHP file to reduce the number of queries and thus speeding up the load time of the page.

iblis 07-24-2002 05:21 AM

NTLDR: ahh.. thanks.. I removed the polls from index.php and the templates.. works perfect now! ;)

love this hack! :)

btw NTLDR, you know of a easy way to add the avatar on the user on the index page?

Ninth Dimension 07-24-2002 10:20 AM

Hi all, i've just installed this hack here (soon to be here), and so far it's looking really good.

What I want to do, once i've moved the forum to GameVine.co.uk is use this file in the root directory rather than the forum dir, what would I need to change in order for this to be possable?

Cheers (sorry if this quistion has already been asked, but over 300 posts is a bit too much to track though)


All times are GMT. The time now is 11:47 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.01658 seconds
  • Memory Usage 1,768KB
  • 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)bbcode_code_printable
  • (2)bbcode_php_printable
  • (10)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