The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
||||
|
||||
![]()
If I wanted to increment a counter every time a user (registered or not) viewed a page, what would be the best way to go about it?
Example, person hits the forumhome page. counter= 1. Person clicks a forum link and goes to the forum display page - counter = 2. Person clicks the link to go to the last post in a thread - counter = 3. Person goes back to forumhome page - counter = 4. And so on. I'm just not sure the best way to carry the counter around without making it visible on the url, which I definitely don't want. Thanks, Amy |
#2
|
||||
|
||||
![]()
Do a table in the db and just run a query to add to the count on each page you want counted. I have a counter like that but only for my forumhome.
|
#3
|
||||
|
||||
![]() Quote:
|
#4
|
||||
|
||||
![]() Quote:
![]() |
#5
|
||||
|
||||
![]()
Well, this is weird. I added the column, and put in the counter. It works fine in Internet Explorer and in Firefox if I am logged out. But for some reason, if I browse while logged in with firefox, it's creating a new entry in the session table for every thing I do.
Amy |
#6
|
||||
|
||||
![]() Quote:
So, it can be done from the session table. 1. add the pagecounter column 2. after the query in this section // check for session sent through URL/cookie increment the pagecounter. 3. Make sure to change the modify and insert queries to include the pagecounter. Saved two queries for ya, Bob. (But, you'll have to check the location if you only want it done on forumhome) Amy |
#7
|
||||
|
||||
![]() Quote:
![]() How did you pull it from the db without a query? |
#8
|
|||
|
|||
![]()
I think she used a query bob, just an existing database query instead of adding a new one
![]() |
#9
|
||||
|
||||
![]() Quote:
|
#10
|
||||
|
||||
![]() |
![]() |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|