vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.0 Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=33)
-   -   Show Spiders Online on ForumHome (https://vborg.vbsupport.ru/showthread.php?t=75986)

amykhar 03-20-2005 04:21 AM

Quote:

Originally Posted by esfron
eval('$activeusers .= ",' . fetch_template('forumhome_loggedinuser') . '";'); does'nt work for me.

you need to be more specific. Doesn't work HOW?

esfron 03-20-2005 04:27 AM

Sorry. Remove the space the space after the comma does'nt work for me. I got John , Pete , Barry.

amykhar 03-20-2005 04:33 AM

The code I gave you isn't for John, Pete and Barry. It is for Google, Yahoo, etc.

esfron 03-20-2005 04:41 AM

So sorry. I got Google , Yahoo , MSN , etc. How to remove the space ?

funkmeister 03-20-2005 05:09 AM

Quote:

Originally Posted by amykhar
To remove the space, Find this code in index.php:
Code:

eval('$activeusers .= ", ' . fetch_template('forumhome_loggedinuser') . '";');
Remove the space after the comma there.

Nope, that isn't it. I tripled checked and tested, but the extra space is still shown, but thanks for the quick response.....any ideas?

Your response on my other request works great, thanks.

esfron 03-20-2005 05:29 AM

Quote:

Originally Posted by funkmeister
Nope, that isn't it. I tripled checked and tested, but the extra space is still shown, but thanks for the quick response.....any ideas?

Your response on my other request works great, thanks.

I have the same problem than you. IceFanatic too: https://vborg.vbsupport.ru/showpost....&postcount=125

amykhar 03-20-2005 12:35 PM

Quote:

Originally Posted by funkmeister
Nope, that isn't it. I tripled checked and tested, but the extra space is still shown, but thanks for the quick response.....any ideas?

Your response on my other request works great, thanks.

I guess I don't multitask too well at 1 a.m. I'll play with it now.

amykhar 03-20-2005 01:00 PM

Found it. The string needs to be trimmed in two places.

Code:

$loggedin['musername'] = trim(key($spiderlist)) . "(" . $spidername.")";
and

Code:

$loggedin['musername'] = trim(key($spiderlist));
I'll update the directions.

Acers 03-20-2005 01:10 PM

Quote:

Originally Posted by amykhar
I can't verify the problem because your online.php is not available for guests to view.

ummm i didn't get ya... how can i show the file? Should i mail that

Anyway see the problem in these screens
(My forumhome is always showing 0 spiders.... :ermm:

amykhar 03-20-2005 01:41 PM

Quote:

Originally Posted by Acers
ummm i didn't get ya... how can i show the file? Should i mail that

Anyway see the problem in these screens
(My forumhome is always showing 0 spiders.... :ermm:

When this has happened to others, they were missing the code edits that were supposed to be inserted ABOVE
Code:

// memory saving
Check that in your index.php.

esfron 03-20-2005 02:19 PM

Quote:

Originally Posted by amykhar
Found it. The string needs to be trimmed in two places.

Code:

$loggedin['musername'] = trim(key($spiderlist)) . "(" . $spidername.")";
and

Code:

$loggedin['musername'] = trim(key($spiderlist));
I'll update the directions.


Sorry. It does'nt work for me. I get always the space: user , google , etc.
.
.


Code:

        while ($spidername = current($spiderlist))
        {
            if ($spidername > 1) {
              $loggedin['musername'] = trim(key($spiderlist)) . "(" . $spidername.")";
          }
          else
          {
              $loggedin['musername'] = trim(key($spiderlist));
          }
          $loggedin['userid'] = 0;
          eval('$activeusers .= ", ' . fetch_template('forumhome_loggedinuser') . '";');
          next($spiderlist);
        }


esfron 03-20-2005 02:47 PM

OK fixed it.

I don't undertand why but remove all spaces in template forumhome_loggedinuser fixed it.

FROM:
Code:

<if condition="$loggedin[userid]">
<a href="member.php?$session[sessionurl]u=$loggedin[userid]">$loggedin[musername]</a>$loggedin[invisiblemark]$loggedin[buddymark]
<else />
$loggedin[musername]
</if>

TO:
Code:

<if condition="$loggedin[userid]"><a href="member.php?$session[sessionurl]u=$loggedin[userid]">$loggedin[musername]</a>$loggedin[invisiblemark]$loggedin[buddymark]<else />$loggedin[musername]</if>
Now, it's fine.

Thanks amykhar
Nice hack

Click Install.

caislander 03-20-2005 03:08 PM

Amy,

I hate to ask this after all the work it looks like you went throught to get it right but I want to remove the spider from showing in the member list, is that possible? I just want the count in the "currently Active User" line, then if they want to know what bot(s) let them run whois online..
BTW, this is a great hack and works fine, in my case it just provide more info than is needed..

Thanks

amykhar 03-20-2005 03:27 PM

Quote:

Originally Posted by caislander
Amy,

I hate to ask this after all the work it looks like you went throught to get it right but I want to remove the spider from showing in the member list, is that possible? I just want the count in the "currently Active User" line, then if they want to know what bot(s) let them run whois online..
BTW, this is a great hack and works fine, in my case it just provide more info than is needed..

Thanks


Just remove this:
Code:

        while ($spidername = current($spiderlist))

        {

            if ($spidername > 1) {

              $loggedin['musername'] = trim(key($spiderlist)) . "(" . $spidername.")";

          }

          else

          {

              $loggedin['musername'] = trim(key($spiderlist));

          }

          $loggedin['userid'] = 0;
          $loggedin['musername'] = trim($loggedin['musername']);

          eval('$activeusers .= ",' . fetch_template('forumhome_loggedinuser') . '";');

          next($spiderlist);

        }


IceFanatic 03-20-2005 05:06 PM

Quote:

Originally Posted by esfron
OK fixed it.

I don't undertand why but remove all spaces in template forumhome_loggedinuser fixed it.

FROM:
Code:

<if condition="$loggedin[userid]">
<a href="member.php?$session[sessionurl]u=$loggedin[userid]">$loggedin[musername]</a>$loggedin[invisiblemark]$loggedin[buddymark]
<else />
$loggedin[musername]
</if>

TO:
Code:

<if condition="$loggedin[userid]"><a href="member.php?$session[sessionurl]u=$loggedin[userid]">$loggedin[musername]</a>$loggedin[invisiblemark]$loggedin[buddymark]<else />$loggedin[musername]</if>
Now, it's fine.

Thanks amykhar
Nice hack

Click Install.

That worked. Thank you very much.

funkmeister 03-20-2005 05:50 PM

Quote:

Originally Posted by esfron
OK fixed it.

I don't undertand why but remove all spaces in template forumhome_loggedinuser fixed it.

FROM:
Code:

<if condition="$loggedin[userid]">
<a href="member.php?$session[sessionurl]u=$loggedin[userid]">$loggedin[musername]</a>$loggedin[invisiblemark]$loggedin[buddymark]
<else />
$loggedin[musername]
</if>

TO:
Code:

<if condition="$loggedin[userid]"><a href="member.php?$session[sessionurl]u=$loggedin[userid]">$loggedin[musername]</a>$loggedin[invisiblemark]$loggedin[buddymark]<else />$loggedin[musername]</if>
Now, it's fine.

Thanks amykhar
Nice hack

Click Install.

Yep, that's working for me too, thanks. Didn't require touching 'index.php' again.

funkmeister 03-20-2005 05:59 PM

Quote:

Originally Posted by amykhar
Taking things a step further. If you want guest or guests(12), etc. to show on your list as well,

In index.php Find:
Code:

$numberguest = $numberguest - $numberspiders;
Add After:
Code:

        if ($numberguest > 0)
        {
          if ($numberguest > 1)
          {
              $loggedin['musername'] = "guests(".$numberguest.")" ;
          }
          else
          {
              $loggedin['musername'] = "guest";
          }
          $loggedin['userid'] = 0;
            eval('$activeusers .= ", ' . fetch_template('forumhome_loggedinuser') . '";');
        }


How can I get the entry 'guest' to display before the spiders? For example, I would like it like this.....Barry, John, Steve, guest, MSNbot - right now 'guest' is shown at the very end...Barry, John, Steve, MSNbot, guest

Thanks.

amykhar 03-20-2005 06:00 PM

Move that chunk of code up above the chunk of code that displays the spiders. I quoted the spider code in post 174.

funkmeister 03-20-2005 06:12 PM

When I do that, it does place the 'guest' where I want it, BUT, it also adds the total number of guests and spiders together and places that total in the parentheses for the guests. So it looks like guests (6), MSNbot (4) when in fact there are are only 2 guests and 4 spiders. It doesn't effect the spider reporting, so in other words, in this example, MSNbot (4), is shown correctly.

Any ideas? Thanks.

amykhar 03-20-2005 06:23 PM

Let me think on it a bit.

Shackbase 03-20-2005 06:23 PM

Why is it looking right on the front page: www.talkshack.com but looks like this:

1 members and 1 guests and [ARG:3 UNDEFINED] spiders3="0" on page:

http://www.talkshack.com/online.php?...age=1&who=&ua=

--Tone

amykhar 03-20-2005 06:36 PM

Shack, please read the thread. That question has been asked and answered many times. When I look at your site, It doesn't look right on any page. This suggests to me that you haven't had it update to all styles.

Shackbase 03-20-2005 08:56 PM

oops - i thought i had changed to my new template - but the default was still the.. default.. thats fixed now..

damn - that online editor makes it look like there is a space between the ] and the 3= but in reality there isn't... i did not realize that til I just cut'n paste that portion in this post that I just edited.. in shame...

EXCELLENT mod - thanks guy!

--Tone

caislander 03-20-2005 10:46 PM

Quote:

Originally Posted by amykhar
Just remove this:
Code:

        while ($spidername = current($spiderlist))

        {

            if ($spidername > 1) {

              $loggedin['musername'] = trim(key($spiderlist)) . "(" . $spidername.")";

          }

          else

          {

              $loggedin['musername'] = trim(key($spiderlist));

          }

          $loggedin['userid'] = 0;
          $loggedin['musername'] = trim($loggedin['musername']);

          eval('$activeusers .= ",' . fetch_template('forumhome_loggedinuser') . '";');

          next($spiderlist);

        }


Thanks much, does exactly what I want :cool:

amykhar 03-20-2005 10:51 PM

Quote:

Originally Posted by amykhar
Let me think on it a bit.

I'm not the sharpest tool in the shed today. Just grab the
Code:

$numberguest = $numberguest - $numberspiders;
line as well and move it up above that chunk. It will work then. I have it that way on my site now.

Shackbase 03-20-2005 11:26 PM

Quote:

Originally Posted by amykhar
I'm not the sharpest tool in the shed today. Just grab the
Code:

$numberguest = $numberguest - $numberspiders;
line as well and move it up above that chunk. It will work then. I have it that way on my site now.

uhm.. what chunk? :ermm:

--Tone

funkmeister 03-21-2005 03:10 AM

Quote:

Originally Posted by amykhar
I'm not the sharpest tool in the shed today. Just grab the
Code:

$numberguest = $numberguest - $numberspiders;
line as well and move it up above that chunk. It will work then. I have it that way on my site now.

Thanks, it's working perfectly now and just the way I want it - really appreciate the great support and impressive response times.

intrigue 03-21-2005 01:21 PM

Any idea why i would be getting this?
Code:

Users Online: 1
1 members and 0 guests and [ARG:3 UNDEFINED] spiders

.matt

amykhar 03-21-2005 01:51 PM

Yes Matt. Read the thread and you'll find your answer.

intrigue 03-21-2005 01:55 PM

ok sorry i will trawl through the 13 pages now :p
.matt

Marco van Herwaarden 03-21-2005 02:09 PM

Quote:

Originally Posted by intrigue
ok sorry i will trawl through the 13 pages now :p
.matt

Just a small tip: View the thread in print mode (Thread Tools->Show Printable version), you can then click on show 100 posts a page, this will reduce the time you need to scan all posts.

amykhar 03-21-2005 02:15 PM

Actually, his answer is in the first post of the thread ;)

lasto 03-21-2005 02:53 PM

for what it does amykhar its quite a nifty hack - thanks and clicked installed

amykhar 03-21-2005 04:19 PM

It amuses me to no end that this has become my most popular hack. I've written others that were much more useful and others that were much more elaborate. Go figure :D

Amy

venomx 03-21-2005 04:25 PM

Its the best because we all like to see what bots are visiting us.. :)

Thanks!

Hey someone want to make this for vBadvanced CMPS? :P

amykhar 03-21-2005 04:34 PM

I actually use that portal, Venom. So, if I get time I'll do it later today. Others, feel free to post the fixes for other portals.

venomx 03-21-2005 05:11 PM

wow thanks Amy! :)

Shackbase 03-21-2005 06:33 PM

This wouldn't work for CMPS? bummmer. i was thinking about installing it.

--Tone

MentaL 03-24-2005 12:24 PM

does it affect the load in any way?

amykhar 03-24-2005 03:42 PM

There's one extra query on the forumhome page.


All times are GMT. The time now is 10:03 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.02284 seconds
  • Memory Usage 1,842KB
  • 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
  • (21)bbcode_code_printable
  • (16)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