vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Modification Graveyard (https://vborg.vbsupport.ru/forumdisplay.php?f=224)
-   -   Forum Home Enhancements - Track Guest Visits (https://vborg.vbsupport.ru/showthread.php?t=131314)

Paul M 11-11-2006 10:00 PM

Track Guest Visits
 
This modification is no longer available or supported.

Something that has been repeatedly asked in the "Members who visited today" modifications (all versions) is a similar way to track the number of guests that have visited a forum each day. This isn't possible in stock vbulletin as no record is kept of guest visits, they are a 'realtime' display only. I've therefore finally got round to looking at the issue and produced this modification.

This will add (another) section to the "What's Going On" area. The data is kept in a new table so it should be possible for other uses to be made of it (or display it in other ways). A screenshot of the current display is attached.

Options / Features ;

* The ability to turn it on/off.
* The ability to turn just the display on/off.
* The ability to allow (or prevent) certain usergroups viewing the display.
* The ability to run the display code on all pages (not just forumhome).
* The ability to switch between 'Today' and Rolling 24 Hours display (default).
* The list of guests can be set to be always collapsed on initial view.

* The script that the Guest is running is logged (e.g. showthread, usercp etc).
* The request variables in use are logged (e.g. threadid, userid etc).
* The guest table can be cleaned of old records to help control it's size.
* Controls for the displays automatic template update.
* The datastore read (for spider detection) will read from the File/APC/Memcache/Xcache datastore [if used].

Version 1.19+

* Guest Views data collection - tracking each guests viewing of the forum index page, forums and threads.
* Guest Views data collection can be separately disabled.
* Multiple guest visits to the same page are logged separately.
* Clicking on a Guest type in the main display will list all recent visits by guests of that type.
* Clicking on the option in the guest listing will show that guests viewing data (if enabled).
* Usergroup permissions are now done with the standard vbulleten usergroup permissions system.

Four new usergroup permissions are provided in the usergroup manager.

* Can View the Guests Visited Display - Members can view the guests visited display on Forumhome.
* Can View Guest IP Addresses - Members can see the ip addresses of visiting guests.
* Can View Guest Visits List - Members can view the list of guest visits page.
* Can View Guest Tracking Data - Members can view the individual guest visit tracking page.


Version 1.22+

The option to keep a record of [and display] the most ever guests has been added - this used to be provided by a seperate add-on product.


* All (non usergroup) modification settings are in vBulletin Options > Guest Tracking.

To install ;
  • Unzip the XML files.
  • Upload the bitfields file to your ../includes/xml folder.
  • Import the product into vB using the ACP Product Manager.
  • Set your required permissions in the usergroup manager.
Note that by default no permissions are given, you must set them.

You can get an improved Spiders Definition file, that recognises many more spiders, from this post.

Note: For Spider detection to work you must set Enable Spider Display to 'Yes' in vBulletin Options > Who's Online Options.

A German translation has been provided by hurik in post #769 - (for Version 1.22).


History:

v1.00 : Internal dev version.
v1.01 : Initial vb 3.6 beta release.
v1.02 : Phrasing added, final beta version.
v1.03 : Initial full version, some new options added.
v1.04 : Fix potential variable name clash with WVT Mod.
v1.05 : More options added, script and request variable logging added.
v1.06 : Minor internal code changes, phrasing altered slightly.
v1.07 : Datastore call changed to standard fetch function.
v1.08 : Moved Datastore call due to oddities, and fixed small bug.
v1.09 : Simplified always collapsed code.
v1.10 : Datastore call moved and reverted back to db_fetch.
v1.11 : Added Spider Cache Refresh on install (limited release).
v1.12 : Unique Guest id changed from standard vb id to internally created id.
v1.13 : Changed the SQL to force MySQL to use the index on forumhome.
v1.14 : Changed install code to delete old spider cache before rebuilding it.
v1.15 : Added check to try and detect a broken spider cache and fix it.
v1.16 : Number formatting added to individual totals in display list.
v1.17 : New usergroup display options added, datastore read updated.
v1.18 : Beta for new display options - listing guests and tracking guest views.
v1.19 : First release with the new permissions and display options.
v1.20 : Minor changes to install code only.
v1.21 : Internal development version, not released.
v1.22 : Added the "Most ever guests" option.


memomemo 11-12-2006 12:39 AM

Thank you sir

AzzidReign 11-12-2006 01:18 AM

This should come in handy since each day google has been adding over 100 pages from my site...now its time to see if my guest stats increase :D

Thanks!

Zia 11-12-2006 01:22 AM

helo PaulM..this is really a nice modifications..

can it be shown in the same block of "User Visited Today"
also can it show Spider Visited today in the same block? Hence its showing the spider too...

thnx in advance

DPSR 11-12-2006 01:23 AM

Its looks good, will install it later on :)

Shazz 11-12-2006 02:51 AM

Ive been waiting for one of these
Looks good :)

engager 11-12-2006 03:29 AM

Quote:

Originally Posted by Zia
helo PaulM..this is really a nice modifications..

can it be shown in the same block of "User Visited Today"
also can it show Spider Visited today in the same block? Hence its showing the spider too...

thnx in advance

Great hack, Paul M! :)

I agree with Zia...Paul, can you do this, or give us the code to add to "User Visited Today" template, as this strip does take up a large amount of space which has, or will have, little detail in it!

Would appreciate it!

Br.

INSTALL -clicked!

Shazz 11-12-2006 05:08 AM

If you removed the plugin, it does take the table it adds away right?

Ascor 11-12-2006 06:24 AM

Very nice and useful, thank you :)
Ho can i change the name "Visitors" and "Google Spiders" ?

efil 11-12-2006 06:46 AM

Thank you!
it's working.

Allan 11-12-2006 07:22 AM

Thank you for this hack Paul ;)

Snake 11-12-2006 08:03 AM

Wow! I have been waiting for this. Thanks! :D

Veer 11-12-2006 08:16 AM

WOW, Great Hack ;)

Clicks INSTALL.

But waiting for stable release !! :)

Thanks.

bashy 11-12-2006 08:35 AM

Well, what can i say, i just couldn't help myself, this is a great add-on and i just had to try it, not that im like that ya know, it aint as if i try every hack out there :o

Anyway, nice idea but it didn't work, well not for me, It gave a blank page, i refreshed a few times and got this db error

Code:

Database error in vBulletin 3.6.3:

Invalid SQL:

        SELECT * FROM guest WHERE lastactive > 1163289600;

MySQL Error  : Table '++++++++.guest' doesn't exist Error Number : 1146
Date        : Sunday, November 12th 2006 @ 10:31:05 AM
Script      : http://www.bashys-place.com/forums/index.php

I am assuming it didn't add the table?
I will try to add this manually and see what happens, that's as long as the table is in the product lol

EDIT:

Nope it wont let me add it manually, i cannot see whats wrong as i do not know sql

redlabour 11-12-2006 10:00 AM

Can you Phrase this please within the next Update ? ;)

jluerken 11-12-2006 10:10 AM

Nice Hack Paul but "Total guests that have visited the forum today:" needs to be phrased :D

Paul M 11-12-2006 10:12 AM

Quote:

Originally Posted by redlabour
Can you Phrase this please within the next Update ? ;)

Like the notes say, this is a beta version. I'm more interested in it actually working than the pretty stuff like options and phrasing - they will come in later versions. Same for those asking about linking it to the "Visitors Today" mod. :cool:

redlabour 11-12-2006 10:16 AM

Quote:

Originally Posted by Paul M
Like the notes say, this is a beta version. I'm more interested in it actually working than the pretty stuff like options and phrasing - they will come in later versions. Same for those asking about linking it to the "Visitors Today" mod. :cool:

Works great on 3.6.3 ! ;)

Rich 11-12-2006 10:49 AM

Great mod Paul, thanks for releasing it! Any chance on a 3.5 version for those of us that are running a board with that version?

Allan 11-12-2006 11:12 AM

File attach: French language :)

maroceve 11-12-2006 11:28 AM

Thanks Paul !
Merci Allan, installé en Francais sur maroceve.com !

Paul M 11-12-2006 12:08 PM

Quote:

Originally Posted by Rich
Great mod Paul, thanks for releasing it! Any chance on a 3.5 version for those of us that are running a board with that version?

There will not be an official 3.5 version. However, I believe that if you edit the XML file to remove the executionorder="x" bit's you should be able to import it on a 3.5 board.

voteforbird 11-12-2006 12:43 PM

Thank you for the base code, here. I went ahead and modified it to make a simpler display. Please see http://www.volconvo.com/forums/

Is there any way this minimized display can be a default option? And perhaps a switch to make it say (X members, Y guests and Z spiders) as well?

Thanks!

projectego 11-12-2006 01:52 PM

Thank you for sharing, Paul. :)

Paul M 11-12-2006 02:30 PM

Version 1.02 (Beta 2) is now uploaded - this should include all the phrasing.

Please remember the install 'button' if you install this (it helps me judge usage, and means you get the notification e-mails).



(and I don't object to MOTM nominations if you feel it worthy)

jluerken 11-12-2006 02:49 PM

"Total guests that have visited the forum today"
still not phrased in the template Paul :D

Please add a version number to the download file

Shazz 11-12-2006 03:02 PM

/me updates

Paul M 11-12-2006 03:52 PM

Quote:

Originally Posted by jluerken
"Total guests that have visited the forum today"
still not phrased in the template Paul :D

Um, yes it is.

Quote:

Originally Posted by jluerken
Please add a version number to the download file

Sorry, that's not likely to happen.

redlabour 11-12-2006 03:55 PM

Update works ! ;)

bashy 11-12-2006 04:52 PM

Hi Paul

I still get a db error as soon as i install this

Code:

Database error in vBulletin 3.6.3:

Invalid SQL:

                REPLACE INTO guest
                (guestid, hostip, useragent, lastactive, spider)
                VALUES
                ('b7a7a78a0f0ab05079e72c6a96628b62', 'Some IP addy', 'Mozilla/5.0 (compatible; Googlebot/2.1; +http://www.google.com/bot.html)', 1163355326, 'Google');

MySQL Error  : Table '***********.guest' doesn't exist Error Number : 1146
Date        : Sunday, November 12th 2006 @ 06:15:26 PM
Script      : http://www.bashys-place.com/forums/showthread.php?p=6293

Any ideas please?

Paul M 11-12-2006 05:45 PM

It's not created the table.

Uninstall it, then edit the xml file and remove (or comment out) the $db->hide_errors(); at line 19 - and then reinstall it. If the table creation fails you should get an error displayed telling you why. If it fails you will need to uninstall it again afterwards.

Gizmo5h1t3 11-12-2006 05:53 PM

Quote:

Originally Posted by Paul M
There will not be an official 3.5 version. However, I believe that if you edit the XML file to remove the executionorder="x" bit's you should be able to import it on a 3.5 board.


quick heads up, removing the executionorder="x" comments dont work on 3.5....

borked my board up...lost the index when applying it.

Paul M 11-12-2006 05:57 PM

Hmm, actually it won't work because $vbulletin->db->query_read_slave does not exist in 3.5 - you need to edit that to just $vbulletin->db->query_read if you try using it on 3.5

wengi 11-12-2006 08:23 PM

Better wait for final release of this nd thnks for sharing paul :)

Rich 11-12-2006 09:16 PM

LOL, I removed the execution order earlier and then editted the _slave and it worked. Thanks.

Zoints 11-12-2006 09:31 PM

Nice hack Paul :)

Paul M 11-13-2006 02:20 AM

JFYI ;

As no major problems have been reported in 1.01 or 1.02, the next update (in a few days) will remove the beta status.

bashy 11-13-2006 05:21 AM

Hi Paul

Did what ya said, it didnt give any errors at all m8, still a blank index though so have removed again lol.....

Quote:

Originally Posted by Paul M (Post 1115639)
It's not created the table.

Uninstall it, then edit the xml file and remove (or comment out) the $db->hide_errors(); at line 19 - and then reinstall it. If the table creation fails you should get an error displayed telling you why. If it fails you will need to uninstall it again afterwards.


Zia 11-13-2006 06:30 AM

Quote:

Originally Posted by Paul M (Post 1115370)
they will come in later versions. Same for those
asking about linking it to the "Visitors Today" mod. :cool:

Thanx Man (Y) :)

[high]* Zia kliks install[/high]

Greek76 11-13-2006 08:14 AM

Nice hack Paul install went smoothly and it works just fine for 3.6.2.


All times are GMT. The time now is 07: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.01988 seconds
  • Memory Usage 1,832KB
  • 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
  • (9)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)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