vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Modification Graveyard (https://vborg.vbsupport.ru/forumdisplay.php?f=224)
-   -   Show Thread Enhancements - Who viewed this thread? (https://vborg.vbsupport.ru/showthread.php?t=61222)

weaver 04-24-2004 10:27 PM

Quote:

2.) Is there the possibility to signal how many times a user has seen that threads?
I'm interested in this as well... or some way of telling when was the most recent time they viewed the thread.

welo 04-25-2004 12:54 AM

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>
..right before

HTML Code:

<a style="float:$stylevar[right]" href="#top" etc>
...to clarify a bit. Might also be prudent in the SHOWTHREAD template to wrap the whole thing with a quick "if" statement to restrict viewing only to admins:

Code:

<if condition="in_array($bbuserinfo['usergroupid'], array(5, 6, 7))">
[SHOWTHREAD code goes here]
</if>

Thanks. This will come in handy.

Gary King 04-25-2004 12:57 AM

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)">

welo 04-25-2004 01:08 AM

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.

welo 04-25-2004 02:15 AM

Quote:

Originally Posted by Gary W
Also, you should use the following instead: <if condition="is_member_of($bbuserinfo, 5, 6, 7)">

Sorry man, this code doesn't work. I was able to see it but no other usergroup could (probably because the rest of my staff are all in specially created usergroups, an dnot in the default list). My code works.

Gary King 04-25-2004 01:36 PM

Well just replace the ID no. with yours.

welo 04-25-2004 03:24 PM

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.

Gary King 04-25-2004 03:31 PM

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.

welo 04-25-2004 04:13 PM

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.

Gary King 04-25-2004 04:16 PM

Check the membergroupids, not just usergroupid


All times are GMT. The time now is 11:57 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.01186 seconds
  • Memory Usage 1,736KB
  • 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
  • (1)bbcode_code_printable
  • (2)bbcode_html_printable
  • (2)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
  • (10)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