vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Modification Graveyard (https://vborg.vbsupport.ru/forumdisplay.php?f=224)
-   -   Members who have visited today (with last 24 hours option). (https://vborg.vbsupport.ru/showthread.php?t=71533)

Paul M 01-27-2005 04:15 PM

Quote:

Originally Posted by detalhe
I've instaled it, works great, but I'd like to know where can I modify the 'Total Users.....' phrase to another language than English ;)

It's embedded in the template code, see this extract ;

Code:

<!-- Todays active users -->
<tbody>
        <tr>
                <td class="thead" colspan="2">
                        <a style="float:$stylevar[right]" href="#top" onclick="return toggle_collapse('forumhome_todayusers')"><img id="collapseimg_forumhome_todayusers" src="$stylevar[imgdir_button]/collapse_thead$vbcollapse[collapseimg_forumhome_todayusers].gif" alt="" border="0" /></a>
                        Total users that have visited today: $totaltoday
                </td>
        </tr>
</tbody>


detalhe 01-27-2005 05:20 PM

Quote:

Originally Posted by Paul M
It's embedded in the template code, see this extract ;

Code:

<!-- Todays active users -->
<tbody>
        <tr>
                <td class="thead" colspan="2">
                        <a style="float:$stylevar[right]" href="#top" onclick="return toggle_collapse('forumhome_todayusers')"><img id="collapseimg_forumhome_todayusers" src="$stylevar[imgdir_button]/collapse_thead$vbcollapse[collapseimg_forumhome_todayusers].gif" alt="" border="0" /></a>
                        Total users that have visited today: $totaltoday
                </td>
        </tr>
</tbody>


Great!! Thanks ;)

chinch 01-27-2005 09:51 PM

Quote:

Originally Posted by Paul M
Uncomment this line ;

PHP Code:

//$cutoff = $now - 86400 ;  // Uncomment this line if you don't have vB 3.0.3 and all users are showing. 


thanks... will try that now :)

MajorFm.com 01-29-2005 08:03 PM

What about...

Where it says:
Members That Have Visited Today - Total: 75

I want:
Total That Have Visited Today - Members: 75 Guests: ??

I want to display the total guests aswell

Paul M 01-29-2005 08:37 PM

That would be very difficult to do.

Lyricsmama 02-01-2005 08:00 PM

Added and simple thx!

KanyeWest 02-02-2005 01:54 AM

thanks man :nervous:

pingme 02-02-2005 05:38 AM

Quote:

Originally Posted by Paul M
Uncomment this line ;

PHP Code:

//$cutoff = $now - 86400 ;  // Uncomment this line if you don't have vB 3.0.3 and all users are showing. 


Paul, I did this, but still it cuts off the users at midnight :( Can you please help in making it rolling 24hrs

Paul M 02-02-2005 07:33 AM

Quote:

Originally Posted by pingme
Paul, I did this, but still it cuts off the users at midnight :( Can you please help in making it rolling 24hrs

Sorry, but if you have correctly uncommented it (removed the first two slashes, not the second set) and saved it - then it is impossible for it not to work. I suggest you check your edit. :)

bigmonay2k 02-02-2005 12:49 PM

see attachment :disappointed: thank you

pingme 02-02-2005 01:33 PM

Quote:

Originally Posted by Paul M
Sorry, but if you have correctly uncommented it (removed the first two slashes, not the second set) and saved it - then it is impossible for it not to work. I suggest you check your edit. :)


hehehe :D Silly me, I added two more lines as I read it "comment this line"

I will check it tonight

Thanks for quick reply Paul

Paul M 02-02-2005 11:58 PM

Quote:

Originally Posted by bigmonay2k
see attachment :disappointed: thank you

A template error - check that you modified it correctly.

mystery250 02-03-2005 05:22 PM

Hmm. The who's online today, when I install this, is blank.

I am sure I installed it right, as I have used the previous versions, and they have worked glitch free....

Paul M 02-03-2005 09:29 PM

Quote:

Originally Posted by mystery250
Hmm. The who's online today, when I install this, is blank.

I am sure I installed it right, as I have used the previous versions, and they have worked glitch free....

Not really sure what you mean - a link may help.

Check your edits again. :)

zaon 02-05-2005 05:21 AM

Thanks, Paul!!

Works great :-)

And yes, SIMPLE is indeed way better than the other hacks I've seen that involve tampering with the database itself or requiring so many other modifications/changes. Your hack also makes for better compatibility with regular vbulletin 3.x.x releases.

So thanks again! :-)

bigmonay2k 02-07-2005 03:17 AM

Quote:

Originally Posted by Paul M
A template error - check that you modified it correctly.

it only happen when members in my board have b-day(Today's Birthdays) :ermm: if there's no b-day it's fine dude..I really does not know what to do.

Paul M 02-07-2005 12:03 PM

Quote:

Originally Posted by bigmonay2k
it only happen when members in my board have b-day(Today's Birthdays) :ermm: if there's no b-day it's fine dude..I really does not know what to do.

PM me a copy of your template.

ALcorn 02-07-2005 01:15 PM

Very nice hack, Paul M. Just one thing is missing for me - number of guests who have visited. Is it possible to add this info into the hack ? Thank you again.

Paul M 02-07-2005 02:48 PM

Quote:

Originally Posted by ALcorn
Very nice hack, Paul M. Just one thing is missing for me - number of guests who have visited. Is it possible to add this info into the hack ? Thank you again.

Sorry, it's not possible.

BocaDev 02-08-2005 06:15 PM

Works great, thanks! :)

Viks 02-08-2005 08:48 PM

Oh GREAT!! this is cool, I've been looking for this.
thanks Ericgtr.
I've installed it.. however i have some minor issue. I've attached a pic...whats happenning is that
1. the FONT size of members is bigger compared to other locations..

2. On click on "membername" the url takes me to root/members instead of root/forums/member.

any suggestions how i can fix this!?

thanks

Viks 02-09-2005 04:17 AM

Quote:

Originally Posted by Viks
any suggestions how i can fix this!?

thanks

ok I fixed the problem. It was just a temeplate edit to match my font.

But Eric i got another issue! The Module shows online visitors "today" starting at midnight but Paul's original mod shows users in last 24 hours on my fourmshome.

:ermm:

I thought, it wud show the number of users on cmps page as forumshomepage which is users visited in last 24 hrs.??!?!

isnt that right??

Paul M 02-09-2005 07:31 AM

Quote:

Originally Posted by Viks
But Eric i got another issue! The Module shows online visitors "today" starting at midnight but Paul's original mod shows users in last 24 hours on my fourmshome.

Uncomment this line to switch to the rolling 24 hr's ;

PHP Code:

//$cutoff = $now - 86400 ;  // Uncomment this line if you don't have vB 3.0.3 and all users are showing. 

:)

Viks 02-09-2005 08:37 AM

thanks Paul.

Pamela 02-10-2005 05:03 AM

Easy installation and great instructions. Thanks! :)

havefun 02-10-2005 10:46 AM

works fine, thx paul :)

Paul M 02-15-2005 03:47 PM

I have uploaded v1.35 today which has a very minor bugfix - this will not affect anyone who already has this working - but I think it may cure the odd case (in vb versions prior to 3.0.3) where the vbdate function would not work (and hence people switched to the rolling 24 hours display).

Trekkie 02-15-2005 03:48 PM

nice

hankster 02-22-2005 02:21 PM

Quote:

Originally Posted by noppid
You may want to consider adding a conditional to your phpinclude_start template to only run that query when the page selected is forum home or your new WWOL page. As it is that code runs on every page loaded whether it's used or not. Just a little optimization suggestion. :)

Does anyone know how this conditional could be added?

MickDoneDee 02-23-2005 12:07 AM

Try:

<if condition="THIS_SCRIPT=='index'>
ob_start();
include('whos.online.today.php');
ob_end_clean();
</if>

In case people are wondering where your quote came from it was:
https://vborg.vbsupport.ru/showpost....&postcount=110

zaon 02-23-2005 04:28 PM

You're saying that the code we inserted into index.php gets launched and processed all the time because a template called "phpinclude_start" (present in most templates on the board) points to code in index.php and so is referenced in showthread and other various templates on the board? So the proposed conditional tells phpinclude_start to only call the todays active users code from index.php when and if the template calling is the forum home but otherwise to ignore that code in index.php? (sorry, newbie, so a bit lost here).

MickDoneDee 02-23-2005 05:31 PM

To learn a bit more about phpinclude_start have a look at these links:

https://vborg.vbsupport.ru/showthread.php?t=71313

http://www.vbulletin.com/docs/html/m...pinclude_start

http://www.vbulletin.com/forum/showt...pinclude_start

The reason Mosaicvb is using phpinclude_start is because he doesn't want to edit/hack his index.php file which voids the Jelsoft User Support eligability. So he created a PHP script (whos.online.today.php) that will do the same job using the phpinclude_start template to create the HTML and insert the data on the forum home page. However, since the phpinclude_start template loads with every page a conditional is used to run the whos.online.today.php file only when the index.php page is loaded.

Paul M 02-23-2005 09:47 PM

Quote:

Originally Posted by zaon
You're saying that the code we inserted into index.php gets launched and processed all the time because a template called "phpinclude_start" (present in most templates on the board) points to code in index.php ...........

No.

Just to be clear and repeat what MickDoneDee is saying - this hack edits index.php, and the code only runs when you are on the forum homepage.

However, Mosaicvb decided that they didn't want to run it this way and built themselves a seperate php file with the hack code in it, and then added code to the phpinclude_start template to run his file (see here). The problem being that this means it gets run on every vb Page that you view, not just the forumhome page. I do not support this method of running it.

zaon 02-24-2005 06:57 AM

oh ok, thanks Paul!!

Yeah, I run it in the default method except for uncommenting for rolling 24 hours because of international clientele ;-)

lazytown 02-25-2005 12:07 AM

Great mod. What kind of performance hit does this cause?

-V

Paul M 02-25-2005 07:49 AM

Quote:

Originally Posted by vissa
Great mod. What kind of performance hit does this cause?

-V

It adds about 0.01 seconds to the homepage.

Mosh 02-25-2005 09:29 PM

Paul,

This is nice and simple and works great, it is by far the easiest 'Last Visited' hack to install (1 php file alteration, 1 template alteration and an optional SQL query) have available atm by far, I know I have tried them all at one stage or another.

Also works without a hitch with v 3.0.7 and the optional query does speed up page load time.

Thanks for the painless install.

jd :)

smokering 02-27-2005 03:42 PM

excellent and simple to use thank you

Paul M 02-27-2005 04:41 PM

Quote:

Originally Posted by smokering
excellent and simple to use thank you

Thanks.

jozo1 02-28-2005 04:11 AM

great work, very simple! just take one minute to hacks this mod, thank again !


All times are GMT. The time now is 07:33 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.01603 seconds
  • Memory Usage 1,833KB
  • 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
  • (2)bbcode_code_printable
  • (3)bbcode_php_printable
  • (17)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
  • (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