![]() |
Quote:
|
Great hack, Gary. Thank you. :)
|
Quote:
|
Quote:
|
Go to View Source and check to see if you can find:
Code:
collapseobj_forumhome_todayactiveusers |
Hi, Gary! Quick question...
For this hack, you say to put the code ABOVE this text: Code:
In vB 3.0.1, directly above the "Set Thread Last View" section, is a comment listed: "END LINEAR / THREADED" So, the question is: Should we still be inserting the code above the "Set Thread Last View" section? Or should we be putting at the END of the "Update Views Counter" Section? :) |
The lower the better, before the output of the postbit anyways.
So I say, put it lower if you can't put it exactly where it's supposed to be :) |
Quote:
Thanks, Gary. :) |
thats a reaaly good one
thank u very much greetz knetgummi |
I installed! Works great...thanks!!
|
Quote:
|
Installed. Nice little hack. Took me a minute to find the first <tbody> tag (at the end of the line), and I added
HTML Code:
<div style="float:left">Who viewed this thread:</div> HTML Code:
<a style="float:$stylevar[right]" href="#top" etc> Code:
<if condition="in_array($bbuserinfo['usergroupid'], array(5, 6, 7))"> |
Well not everyone wants to only show this to staff :)
Also, you should use the following instead: <if condition="is_member_of($bbuserinfo, 5, 6, 7)"> |
Got it. Any idea how to add how many guests have viewed the thread? That would be pretty cool too.
Ah, wait, that wouldn't work anyway. I suppose some math could be coded to subtract the number of names in the list from the number of thread views, but that would give a distorted measurement unless you install this hack on a fresh board. Was a passing thought. Thanks again. |
Quote:
|
Well just replace the ID no. with yours.
|
That's what I did. In our case I had to use ($bbuserinfo, 6, 9, 10, 11, 17). In this case the only default usergroup is 6 (me). I could see it but nobody else on staff could (I didn't know this until someone mentioned it, so I logged in as then and confirmed). Once I switched it back to my code they could all see it fine.
|
Then probably has to be an array.
is_member_of($bbuserinfo, array(5, 6, 7)) just try that :) The reason you should use this code instead of yours, because it checks additional groups as well. |
Sorry man. Using that code I can't even see it. Am also unclear what you mean by "...because it checks additional groups..." Checking them for what? All other groups are excluded.
|
Check the membergroupids, not just usergroupid
|
I apologize once again, because I have no idea what you just said.
|
the is_member_of function also checks the additional usergroups for users, not just their primary usergroup
|
Ah, I see what you mean. Kinda makes it too bad it doesn't work, huh? ;)
|
It should.
|
Check the function declaration to see that you are using it properly.
|
Ok, look - I've tried applying what you gave me exactly as you stated and it doesn't work. This is especially frustrating when I started out this whole thing by posting code that does work. Since it's clear you're feeding me suggestions you aren't bothering to test, I say we stop this conversation now. Give me something that you know works or quit wasting my time by increasing your post count with useless one-sentence replies.
I hate to sound harsh or frustrated, but damn. I'm only trying to help make your hack better. Peace, out. |
Nice Hack Gary W. /me clicks install.
|
gettin this error when i try to view a thread.....
Database error in vBulletin 3.0.1: Invalid SQL: SELECT whoviewed FROM thread WHERE threadid = 6505 mysql error: Unknown column 'whoviewed' in 'field list' mysql error number: 1054 Date: Friday 28th of May 2004 05:35:42 AM Script: xxx Referer: xxx Username: xxx IP Address: xxx |
PHP Code:
It seems like this code will record "guest id = 0" too. Should it check if $bbuserinfo['userid'] exist? |
Quote:
What would I have to change if I would like that members with a certain user ID or members of a certain usergroup are NOT displayed on the "Who viewed this thread?" list, even if they have viewed a certain thread? I don't want myself listed for others. |
Quote:
|
I have a really great idea for a way to improve this hack.
The basis is this - it's nice to be able to see who has viewed a particular Thread. But once that Thread gets going - it becomes next to useless if you need to ask "Okay, who has viewed this Thread since Post #13 was made?" I would recommend, for Admins only, that the functionality be added so that they can see who last viewed a given thread since a particular date and time. This can be done in a number of ways with varying levels of functionality: Method 1 Underneath the current "Already viewed this thread" section, a second section would be added - "Viewed this Thread since..." This section will be updated just like the first one. However, this section will have a Reset button. When an Admin clicks on the Reset button - it clears all users from that section. The section will list the new Date/Timestamp - and will start collecting User View information from that point on. So that it will now show, for example, "Users who have viewed this Thread since 6/2/2004 10:31pm:" Effectively, it works like your car's Trip Odometer. This method would (I think) only require an additional field in the database for a second set of User View data. It would get updated just like the first one - it's just that there is a Reset button in each ShowThread page that allows Admins to clear this second set of data and set a new Date/Timestamp to be shown. I would think that this first method should be very easy to implement. But Gary would have to chime in here to confirm. :) Method 2 Add the ability for this hack to store Date/Timestamps for each user who views any given thread. It only needs to store the Last Viewed date/time. Then, add a second section (similar to example 1) - however, this one has an Input Box that allows you to type a date (and possibly a time) in. Then, you can refresh the page and that second section will show all users who have Viewed that Thread since the date/time you entered. As a secondary benefit/implementation - since under this method, the date/time of Last Viewed will be stored for each user, it should be easy to make it so that by hovering your mouse over a username in the first section (the "Already viewed this thread" section), you can get a tooltip with the date and time that that user last viewed this thread. The advantage of this method over Method #1, is that you can check for Last Viewed data retroactively. The disadvantage, of course, is the complication of implementing this. And perhaps, a performance concern. So, what do you guys think? Would this be useful to you? :) Gary, do you like this idea? Is either Method practically doable? |
I'd personnally find that very useful. I have a thread where I update the progress of certains items on the website. At the moment I have to delete the thread and re-create it, if I want to see who's viewed it again, since I last made any updates.
Option 1 is probably more work than option 2. The timestamp from my perspective would be the one to go for. It would be great if someone could implement this change. |
Quote:
Method 1 would only add another Field (i.e. "whoviewedsince" ), which would be handled in exactly the same manner. If we go with Method 2, some way needs to be found to efficiently store a date/timestamp with each UserID for each thread. To my mind, that makes Method 2 more complicated to implement - although I agree that it would be the more useful option. :) |
this should be updated for 3.0.1
|
no update i take it ?
|
Will this hack be udated to work on vB3.0.3 please ... thanks in advance guys, keep up the excellent work ;)
|
Quote:
|
Quote:
update would be adding a line, saying it works with ... some versions :D |
@ Ocean .. thanks for the reply, after reading that it worked for you, I checked again .. it was my bad application of the hack .. when copying I had missed off the last } .. all working fine now .. thanks ;)
|
All times are GMT. The time now is 05:53 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 | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|