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)

indiamike 04-27-2002 08:27 PM

Perfect, that seems to have fixed it.

Thank you!!!!!

Mike

wintz 04-28-2002 05:11 PM

ok would it be possible and if so how would i do it, but instead of having the most user every online stats, replace it with online today stats? thanks

NTLDR 04-28-2002 05:52 PM

Quote:

Originally posted by wintz
ok would it be possible and if so how would i do it, but instead of having the most user every online stats, replace it with online today stats? thanks
Thats what the hack origionally did, had the online today stats, it is posible to keep this feature in, but then you lose the ability to store the most ever online users (in a day and members in a day), although I am looking into a solution for this.

LightBringer 04-28-2002 06:25 PM

How would one go about applying this hack so that when a user wants to access this they don't have to go to:

http://www.url.com/forums/home.php

Instead, they can go to http://www.url.com
?

NTLDR 04-28-2002 06:41 PM

The quickest and easist was I have found is to have a simple HTML redirect page that just sends them to http://www.url.com/forum/home.php when they go to http://www.url.com

JoeHarrison 04-29-2002 12:26 AM

Hi... I just installed vbIndex and everything is working except the news icons. A blank pic with an [X] in it comes up folled by '.gif" border="0"> News Title' This may have already been answered, but I didnt see anything on the pages I looked at. (I gave up after about page 8).

Thanks,
Joe

wintz 04-29-2002 07:43 AM

All i did was to put this <img src="{imagesfolder}/icons/icon0.gif" border="0"> in the home_newsbit name a gif to icon0 and upload it to the icon dir

FlyingDutchman 04-29-2002 11:00 AM

I need help... :(
I have installed the hack... it works perfect :) except for 2 things:

-It says 'No poll available'
-No news shows up, only the 'latest threads' and that's it

I tried everything, I DO have the variables set correctly, but it just doesn't show up!?!?!
please help me, because I REALLY want to get this hack installed :D

erdem 04-29-2002 12:58 PM

@FlyingDutchman :
recheck ur variables at the top of index.php .. maybe its because the permissions :lick:

@LightBringer :

i did that thing. put ur new index.php to ur root. and ur forum's index.php is in forum/index.php .. i mean:

..root
/index.php -> this is new one.. vbindex thing
/forum/index.php -> normal forum index file .

here what u have to do :

put chdir("forum"); before require('./global.php'); in vbindex's index.php.
then modify all ur vbindex templates.. all you have to do is putting "forum/" before all links and imgs

it should work :lick:

greetz

FlyingDutchman 04-29-2002 06:17 PM

Quote:

Originally posted by erdem
@FlyingDutchman :
recheck ur variables at the top of index.php .. maybe its because the permissions :lick:

uhm, I may be dumb, but I'm not so dumb after all, and as I said I tried everthing, from editing the permissions to changing templates to changing index.php, tried the german version, and so on...

erdem 04-29-2002 06:28 PM

hey dont get me wrong!
may be sometimes u can miss little [better wash my mouth][better wash my mouth][better wash my mouth][better wash my mouth]s!

anyway...
:lick:

indiamike 04-29-2002 08:31 PM

Quote:

Originally posted by FlyingDutchman
I need help... :(
I have installed the hack... it works perfect :) except for 2 things:

-It says 'No poll available'
-No news shows up, only the 'latest threads' and that's it

I tried everything, I DO have the variables set correctly, but it just doesn't show up!?!?!
please help me, because I REALLY want to get this hack installed :D

I wish you had a link to it so we could check it out, maybe it's just a simple fix.
The one thing I noticed that when I did this hack and created the new forums, news and polls, they don't show up unless there is a new post in them. Could it be as simple as that? Dunno?

Could you post a link, if not PM me and I will take a look. I pulled my hair trying to get this thing to work right and am pretty confident now that I know it in and out.


Mike

NTLDR 04-29-2002 09:33 PM

Quote:

Originally posted by indiamike
The one thing I noticed that when I did this hack and created the new forums, news and polls, they don't show up unless there is a new post in them. Could it be as simple as that? Dunno?
Thats correct Mike, if there isn't a poll as the Latest Thread then it will not show up at all.

Another thought is you do have $news in your home template?

neuron 04-30-2002 01:37 AM

any fix for the poll time yet?

I got a dual amd 1800MP proc on a oc3, server load 0.03 atm, running the poll query takes 12 seconds...

there HAS to be a better way of doing it ;)

NTLDR 04-30-2002 06:41 AM

Quote:

Originally posted by neuron
any fix for the poll time yet?

I got a dual amd 1800MP proc on a oc3, server load 0.03 atm, running the poll query takes 12 seconds...

there HAS to be a better way of doing it ;)

Only takes 0.136secs to generate mine with 49 queries at the moment, thats on a dual 1GHz Itel Pentium III, server load around 0.60-0.70.

I've never had any problems with the load time, even when the page had 60 queries on it and was on an AMD K6-3 450, still didn't take that long.

FlyingDutchman 04-30-2002 12:06 PM

I did post a news thread and a poll
of course i did

I just installed the hack, and set the variables and inserted the [better wash my mouth][better wash my mouth][better wash my mouth][better wash my mouth] from index.php to the new index.php. nothing more, because nothing more is needed... but just doesn't work

neuron 04-30-2002 12:11 PM

guess it's becouse of database size or something...

I'll see if I can test a little to find out what it is.

Becouse that ONE query takes 12 seconds, if I take away that the rest goes in 0 sec's :)

// edit

It's the LEFT JOIN that does it, it's a major performance hit in mysql, I'll post more info if I can find a solution.

(adding indexes will probably speed it up to about 0sec per query ;) )

//edit2

if you have a fairly new mysql server (connect to it and confirm that the query works) replace the LEFT JOIN with INNER JOIN, my results on a 1.4ghz tbird, big database:

INNER JOIN:
1 row in set (0.01 sec)
LEFT JOIN:
1 row in set (50.18 sec)

output is identical of course

:)

NTLDR 04-30-2002 02:43 PM

Quote:

Originally posted by neuron
...It's the LEFT JOIN that does it, it's a major performance hit in mysql, I'll post more info if I can find a solution...
Try taking a look at the lastest version of vbPortal's code and see if the poll code has change there, I belive the code is pretty similar if not identical to that of vbPortal, so wajones may have changed the code since the realease od vBindex and it maybe more optimised now.

NTLDR 04-30-2002 02:45 PM

Quote:

Originally posted by FlyingDutchman
I did post a news thread and a poll
of course i did


I just installed the hack, and set the variables and inserted the **** from index.php to the new index.php. nothing more, because nothing more is needed... but just doesn't work

Do you have a URL or could you send me the file so I can take a look at it for you? I'm guessing that its something simple, cus it works fine for me and everyone else by the looks of it, we all make simple mistakes ;)

erdem 04-30-2002 04:44 PM

<a href="http://www.trojanforge.net/" target="_blank">http://www.trojanforge.net/</a> -> demo... i did what i said before..

new index.php is on root and forum index.php is in forum folder..

erdem 04-30-2002 05:31 PM

hi..

its me again..
after installing vbindex , my most user online count started to act like user online count..

how to fix?
i look into code but .. erm..
:cross-eyed:

NTLDR 04-30-2002 05:55 PM

Quote:

Originally posted by erdem
hi..

its me again..
after installing vbindex , my most user online count started to act like user online count..

how to fix?
i look into code but .. erm..
:cross-eyed:

See my post on page 16 for the fix to this.

erdem 04-30-2002 06:15 PM

tnx!
uhmm

so is there way to use vbindex with colored online thing.. u can see at my site..

tnx!

erdem 04-30-2002 06:20 PM

uhmm no luck!
still same..

NTLDR 04-30-2002 06:25 PM

Did you remove or comment out all the code that was shown on the page? That fix does work, you need to wait for the number of members online to decrease to see it working, it works fine on my site now.

I'll just find the secions of code you need to edit for the coloured users on who's online.

NTLDR 04-30-2002 06:30 PM

Isn't the who's online already coloured on your site? It seems to be working with the hack that you already have installed, unless you don't want it to look like it does in the attached image.

erdem 04-30-2002 06:44 PM

trojanman is mod.. so it has to be in green :P

and also most user online user still go up and down like user online thing :D

NTLDR 04-30-2002 06:54 PM

OK, you need to change in the vbindex PHP file:

This:
PHP Code:

// pm
// -------------------------
$newpm=$DB_site->query_first("SELECT COUNT(*) AS messages FROM privatemessage WHERE userid=$bbuserinfo[userid] AND dateline>$bbuserinfo[lastvisit] AND folderid=0");

if (
$bbuserinfo['userid']!=0) {
  
$username=$bbuserinfo['username'];
  eval(
"\$logincode = \"".gettemplate('home_logout')."\";");
  eval(
"\$buddy = \"".gettemplate('home_buddy1')."\";");

} else {
  eval(
"\$logincode = \"".gettemplate('home_login')."\";");
  
$buddy "";


To This

Code:

// pm
// -------------------------
$newpm=$DB_site->query_first("SELECT COUNT(*) AS messages FROM privatemessage WHERE userid=$bbuserinfo[userid] AND dateline>$bbuserinfo[lastvisit] AND folderid=0 $ignoreusers");

if ($bbuserinfo['userid']!=0) {
  $username=$bbuserinfo['username'];
  eval("\$welcome = \"".gettemplate('home_welcome')."\";");
  eval("\$logincode = \"".gettemplate('home_logout')."\";");
  eval("\$buddy = \"".gettemplate('home_buddy1')."\";");
 
} else {
  eval("\$welcome = \"".gettemplate('home_unregwelcome')."\";");
  eval("\$logincode = \"".gettemplate('home_login')."\";");
  $buddy = "";
}

$activeusers = "";
$loggedinusers = "";
if ($displayloggedin) {
  $datecut=time()-$cookietimeout;

  $loggedins=$DB_site->query_first("SELECT COUNT(*) AS sessions FROM session WHERE userid=0 AND lastactivity>$datecut");
  $numberguest=$loggedins['sessions'];

  $numbervisible=0;
  $numberregistered=0;

  $loggedins=$DB_site->query("SELECT DISTINCT session.userid,username,invisible,usergroupid
                              FROM session
                              LEFT JOIN user ON (user.userid=session.userid)
                              WHERE session.userid>0 AND session.lastactivity>$datecut
                              ORDER BY invisible ASC, username ASC");
  if ($loggedin=$DB_site->fetch_array($loggedins)) {
    $numberregistered++;
    if ($loggedin['invisible']==0 or $bbuserinfo['usergroupid']==6) {
      $numbervisible++;
      $userid = $loggedin['userid'];
      if ($loggedin['invisible'] == 1) { // Invisible User but show to Admin
        $invisibleuser = '*';
      } else {
        $invisibleuser = '';
      }
      if ($loggedin['usergroupid'] == 6 and $highlightadmin) {
              $username = "<font color=FONT COLOR FOR ADMIN><b><i>$loggedin[username]</i></b></font>";
      } else if (($mod["$userid"] or $loggedin['usergroupid'] == 5) and $highlightadmin) {
              $username = "<font color=FONT COLOR FOR MOD><b>$loggedin[username]</b></font>";
      } else {
            $username = $loggedin['username'];
          }
      eval("\$activeusers = \"".gettemplate('forumhome_loggedinuser')."\";");
    }

    while ($loggedin=$DB_site->fetch_array($loggedins)) {
      $numberregistered++;
      $invisibleuser = '';
      if ($loggedin['invisible']==1 and $bbuserinfo['usergroupid']!=6) {
        continue;
      }
      $numbervisible++;
      $userid=$loggedin['userid'];
      if ($loggedin['invisible'] == 1) { // Invisible User but show to Admin
        $invisibleuser = '*';
      }
      if ($loggedin['usergroupid'] == 6 and $highlightadmin) {
            $username = "<font color=COLOR FOR ADMIN><b><i>$loggedin[username]</i></b></font>";
          } else if (($mod["$userid"] or $loggedin['usergroupid'] == 5) and $highlightadmin) {
                  $username = ""<font color=COLOR FOR MOD><b>$loggedin[username]</b></font>";
          } else {
            $username = $loggedin['username'];
          }
      eval("\$activeusers .= \", ".gettemplate('forumhome_loggedinuser')."\";");
    }
  }
  $DB_site->free_result($loggedins);

  $totalonline=$numberregistered+$numberguest;
  $numberinvisible=$numberregistered-$numbervisible;

  $maxusers=explode(" ", gettemplate('maxloggedin',0,0));

Making sure you change the colours for the Admins and Mod's as directed.


Please make sure you backup your file before making this mod, the second part of the code works fine on vBindex 1.0, but hasn't been tested on 1.3. I am not responsible for the outcome.

erdem 04-30-2002 07:06 PM

after fixing a small typo it gives a error around :

"eval("$activeusers .= "|".gettemplate('forumhome_loggedinuser')."\"; "); "

error is : Warning: Unexpected character in input: '\' (ASCII=92) state=1 in and a parse error..

greetz

NTLDR 04-30-2002 07:10 PM

For some reason it won't diaplay the code correctly and is missing a \ This is what it should be:

Code:

eval("\$activeusers .= \", ".gettemplate('forumhome_loggedinuser')."\";");
So just change that eval statement, that should get rid of the parse error.

erdem 04-30-2002 07:29 PM

no luck... still same colors..
also most user online stuff not working.. :)

NTLDR 04-30-2002 07:41 PM

If you PM me the vbindex file I will take a look at the code you have.

erdem 04-30-2002 07:56 PM

also i cant make new messages table addon to vbindex..

why i want this? if u look into my forum, i am using it like file database,document database and so on..

i want to make additional 3 tables like latest files,documents and blabla

but noluck.. i create new template.. edit thread code but i didnt show anything.. any idea?

NTLDR 04-30-2002 08:16 PM

Hi,

I PM'ed you the update file, I hope it works, incase ayone else is wondering about this and has this hack installed here is the code:

PHP Code:

// Afterburners Colored OnlineUserHack Start
      
if ($loggedin['usergroupid'] == and $highlightadmin) {
          
$username "<b><i><font color=#ff0000>$loggedin[username]</font></i></b>"// Color for Admin
      
} else if (($loggedin['usergroupid'] == 5) and $highlightadmin) {
          
$username "<b><font color=#8b0000>$loggedin[username]</font></b>"// Color for Supermod
      
} else if (($mod["$userid"]) and $highlightadmin) {
          
$username "<b><font color=#008000>$loggedin[username]</font></b>"// Color for Mod
      
} else {
        
$username "<font color=#0000ff>$loggedin[username]</font>"// Color for normal Member or "Highlight Admin" is turned of
      
}
      eval(
"\$activeusers = \"".gettemplate('forumhome_loggedinuser')."\";");
    }

    while (
$loggedin=$DB_site->fetch_array($loggedins)) {
      
$numberregistered++;
      
$invisibleuser '';
      if (
$loggedin['invisible']==and $bbuserinfo['usergroupid']!=6) {
        continue;
      }
      
$numbervisible++;
      
$userid=$loggedin['userid'];
      if (
$loggedin['invisible'] == 1) { // Invisible User but show to Admin
        
$invisibleuser '*';
      }
      if (
$loggedin['usergroupid'] == and $highlightadmin) {
          
$username "<b><i><font color=#ff0000>$loggedin[username]</font></i></b>"// Color for Admin
      
} else if (($loggedin['usergroupid'] == 5) and $highlightadmin) {
          
$username "<b><font color=#8b0000>$loggedin[username]</font></b>"// Color for Supermod
      
} else if (($mod["$userid"]) and $highlightadmin) {
          
$username "<b><font color=#008000>$loggedin[username]</font></b>"// Color for Mod
      
} else {
        
$username "<font color=#0000ff>$loggedin[username]</font>"// Color for normal Member or "Highlight Admin" is turned of
      
}
// Afterburners Colored OnlineUserHack End 

Hopefull this will work ;)

I am affraid I haven't installed the addons at the moment, but I may try in the future.

erdem 05-01-2002 03:56 PM

NTLDR tnx!

i fixed some more bugs in codes..
i think its because of my modified vbindex..

also i remove most user online update in code.. so its show only online users and not try to update muo thing..

tnx!

hmm i want to add more tables.. like newer msgs from some forums.. how to that? add new templates and codes..
like threads stuff right?

NTLDR 05-01-2002 04:12 PM

No problem, gald I could help you out.

To the latest threads from specific forums you need to change and add in again the news code, but this will add alot of extra queries to the page and I wouldn't recommend atting to much more.

As you alrady have 50 queries on that page I wouldn't add any more, I belive around 30 is the max that you want to have for any page!

erdem 05-01-2002 05:46 PM

hmm... anyway i will try and see what i have ;)

JoeHarrison 05-01-2002 06:07 PM

el3m3nt,

In your English distribution, the home_threadbit template needs to be updated. I think you just missed translating one thing because it says 'Last Post 05-01-2002 05:05 PM
von Joe'. No biggie... just thought I'd metion it.

Thanks,
Joe

FlyingDutchman 05-02-2002 05:51 AM

Quote:

Originally posted by neuron
guess it's becouse of database size or something...

I'll see if I can test a little to find out what it is.

Becouse that ONE query takes 12 seconds, if I take away that the rest goes in 0 sec's :)

// edit

It's the LEFT JOIN that does it, it's a major performance hit in mysql, I'll post more info if I can find a solution.

(adding indexes will probably speed it up to about 0sec per query ;) )

//edit2

if you have a fairly new mysql server (connect to it and confirm that the query works) replace the LEFT JOIN with INNER JOIN, my results on a 1.4ghz tbird, big database:

INNER JOIN:
1 row in set (0.01 sec)
LEFT JOIN:
1 row in set (50.18 sec)

output is identical of course

:)

Were you talking to me? I mean, i have no f*cking idea were you are talking about :(
My database should be ok, and the server has 2x 800 mhz PIII... the latest threads do show up, but the news and the poll just don't :(

I can't give you guys and URL, because it's in a private network...
I really need to get this hack to work :(

NTLDR 05-02-2002 08:26 AM

Quote:

Originally posted by FlyingDutchman
I can't give you guys and URL, because it's in a private network...
I really need to get this hack to work :(

Put this into the address bar: http://urltoyourforums/vbindex.php?explain=1

Where: urltoyourforums is the URL to where the vbindex file is and vbindex.php is the vbindex file.

At the bottom of the page you will see something similar to:

Code:

Page generated in 0.22719204425812 seconds with 15 queries,
spending 0.039559841156006 doing MySQL queries and 0.18763220310211 doing PHP things.

Can you post those results here?


All times are GMT. The time now is 05:50 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.02016 seconds
  • Memory Usage 1,882KB
  • 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
  • (3)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)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