vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Modification Graveyard (https://vborg.vbsupport.ru/forumdisplay.php?f=224)
-   -   Display who has read a thread - Version 3 (https://vborg.vbsupport.ru/showthread.php?t=112192)

lasto 05-21-2006 01:45 AM

quick question to Paul M

installs perfect and works fine - but one thing

it shows at the bottom of my threads - i would like to be at the top and cant find where to change it - any help m8 ?

Paul M 05-21-2006 02:35 AM

It attaches itself to the currently viewing box, moving it away from that would involve code and template changes.

Boofo 05-21-2006 02:36 AM

Is there a way to have the box collapsed when first viewing it instead of open?

Paul M 05-21-2006 02:41 AM

Quote:

Originally Posted by Boofo
Is there a way to have the box collapsed when first viewing it instead of open?

You can edit the template so it's collapsed by default when the page is loaded, and you have to manually expand it. But it won't remember it's state, it will always be collapsed when you load the page.

(I did this on our forum and the peasants revolted, I had to change it back).

Boofo 05-21-2006 02:44 AM

Quote:

Originally Posted by Paul M
You can edit the template so it's collapsed by default when the page is loaded, and you have to manually expand it. But it won't remember it's state, it will always be collapsed when you load the page.

(I did this on our forum and the peasants revolted, I had to change it back).

I would like it that way as the only time I would open it up is when I wanted to know who has read that aprticular thread. How and where would I change that?

Paul M 05-21-2006 02:57 AM

Replace the Display_Readers template with this ;

Code:

<!-- Thread Readers -->
<if condition="$show[whohasread]">
    <table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" align="center">
    <tr>
        <td class="tcat" colspan="2">
            <a style="float:$stylevar[right]" href="#top" onclick="return toggle_collapse('thread_readers')"><img id="collapseimg_thread_readers" src="$stylevar[imgdir_button]/collapse_thead_collapsed.gif" alt="" border="0" /></a>
            $trtitle
        </td>
    </tr>
    <tbody id="collapseobj_thread_readers" style="display:none;">
        <tr>
            <td class="alt1" colspan="2">
                <span class="smallfont">$treaders</span>
            </td>
        </tr>
    </tbody>
    </table>
</if>
<!-- End Thread Readers -->


Boofo 05-21-2006 03:41 AM

Excellent, that works great! Thank you, sir. ;)

So, what gets changed to make it like that? I have another one that I want the last line of it to display when it is collasped.

Paul M 05-21-2006 09:53 AM

Basically, two lines have changed, shown in bold.

Code:

<!-- Thread Readers -->
<if condition="$show[whohasread]">
    <table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" align="center">
    <tr>
        <td class="tcat" colspan="2">
            <a style="float:$stylevar[right]" href="#top" onclick="return toggle_collapse('thread_readers')"><img id="collapseimg_thread_readers" src="$stylevar[imgdir_button]/collapse_thead_collapsed.gif" alt="" border="0" /></a>
            $trtitle
        </td>
    </tr>
    <tbody id="collapseobj_thread_readers" style="display:none;">        <tr>
            <td class="alt1" colspan="2">
                <span class="smallfont">$treaders</span>
            </td>
        </tr>
    </tbody>
    </table>
</if>
<!-- End Thread Readers -->


lasto 05-21-2006 10:14 AM

so i cant have it at the top of the thread then ??

also i dont have `who`s viewing this thread` enabled.

Paul M 05-21-2006 10:51 AM

If you move the whole block of "who's viewing" (shown below) to the top of your threads by editing SHOWTHREAD then it will move with it.

HTML Code:

<!-- currently active users -->
<if condition="$show['activeusers']">
        <table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" align="center">
        <tr>
                <td class="tcat" colspan="2">
                        <phrase 1="$totalonline" 2="$numberregistered" 3="$numberguest">$vbphrase[users_viewing_this_thread_x_y_z]</phrase>
                </td>
        </tr>
        <tr>
                <td class="alt1" colspan="2">
                        <span class="smallfont">$activeusers</span>
                </td>
        </tr>
        </table>
</if>
<!-- end currently active users -->


lasto 05-21-2006 12:07 PM

cheers paul m will look at that

thanks

havefun 05-30-2006 02:43 PM

thx for this version :)

xlegends 06-02-2006 06:18 AM

very nice..

Yorixz 06-02-2006 07:16 PM

"2. Restrict the display to certain usergroups"
I'm wondering if it's also possible to configure it in a way that it'll only show these stats to moderators of that subforum? Thanks for your support and great work so far!

Dave-G 06-03-2006 04:25 PM

Any idea how to fix this error... See attached

Freesteyelz 06-04-2006 01:44 AM

Thanks, Paul M. :) *Clicked Install*

I've made subtle changes to the template (used my own):

MegaHertz 06-04-2006 04:59 PM

Paul,

Thanks for a great mod. This is so close to what I was looking for. The only thing I would like to see added as an option if at all possible, is the ability to insert the collected information as a user note. This is not an option I would want to use all the time, but on occasion I have had a need for something that would help me track exactly when a thread was viewed by each user.

Belisario 06-13-2006 06:53 PM

Thanks ever so much!:banana:

sinaluna 06-18-2006 06:26 PM

Quote:

Originally Posted by Yorixz
"2. Restrict the display to certain usergroups"
I'm wondering if it's also possible to configure it in a way that it'll only show these stats to moderators of that subforum? Thanks for your support and great work so far!

I would also be interested in this. Thanks - great hack!

Paul M 06-18-2006 07:02 PM

Sorry, it's not possible without altering the code, which I don't have the time for atm.

hotwheels 06-18-2006 07:26 PM

great idea, can't believe i didn't add this earlier.........thanks

Vogelfreund 07-02-2006 02:49 PM

Quote:

Originally Posted by Yorixz
"2. Restrict the display to certain usergroups"

Hi,

is there any way to change it to usernumbers instet og groups?

Vogelfreund 07-02-2006 02:54 PM

i mean...

change:

PHP Code:

    $groups explode(',',$vbulletin->options['whohasreadgrps']); 
    if (
is_member_of($vbulletin->userinfo,$groups) OR $groups[0] == 0

Into somthing like this:

PHP Code:

    $members explode(',',$vbulletin->options['whohasreadgrps']); 
    if (
$vbulletin->userid,$members

Can someone help with the correct variables ?

Montana 07-02-2006 07:33 PM

Where doers this show up in the AdminCP? I'm not seeing where I can administer it.

Paul M 07-02-2006 07:35 PM

It tells you in the main post.

paul41598 07-24-2006 11:56 AM

nice! Thanks Paul

I||usi0nz 07-31-2006 03:59 PM

worsk great, thanks :)

Whiterook 08-02-2006 12:36 AM

Thank You Paul, I hope to get this installed tonight.



Edited to Read as follows:

Got it to install just fine!, works great too, but.........

I had another one installed, deleted it via the plugin manager. My problem is, for some reason the other plugin did not completely uninstall (only a guess). I have attached the two variations shown in the jpg.

Here is the code I find in the "SHOWTHREAD". Am I seeing two instances below? If so, could you tell me which one to remove?
I see no other "who viewed this thread" in the document. If this code is correct, could someone possibly tell me which template the other was coded?

The other mod was called "who_has_viewed_this_thread.xml" 4KB. I will search for the author, I am unprepared as usual.


Code:

<!-- who viewed this thread -->
        <br />
        <table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" align="center">
        <tr>
                <td class="tcat" colspan="2">
                        $vbphrase[already_viewed_this_thread]
                </td>
        </tr>
        <tr>
                <td class="alt1" colspan="2">
                        <span class="smallfont">$thread[viewers]</span>
                </td>
        </tr>
        </table>
<!-- who viewed this thread -->


Many Thanks to any who can help,
WhiteRook



Edit 1 more time!

Before anyone tells me the above syntax is not apart of Pauls mod.... I just found that out. I love finding my own errors... :D

So, if anyone has installed the above named Mod, and you have tried to uninstall it. You will need to find the above code in the Showthread template, and Remove it as well. That code was manually placed in the template, and needs to be manually removed of course... *whistles as he looks to the sky :D

Thanks again for the mod Paul.... great work man!

grazianno 09-04-2006 04:47 PM

Quote:

Originally Posted by bada_bing
reserved for later use.. Any screen shots?

too funny :)

Mikecp421 09-25-2006 02:17 PM

Quote:

Originally Posted by Paul M
To work, this comment must be present in the showthread template (in the appropiate place).

PHP Code:

<!-- end currently active users --> 

Obviously it's in the default vb style, but it maybe missing from your custom style so you will need to add it.

nice ! good info right there, got it reworking in my custom template

snyperj 09-28-2006 06:51 PM

A superior job. Great work and thanks! :)

apokphp 12-11-2006 08:16 PM

Is this working with 3.6?

Paul M 12-11-2006 10:52 PM

<a href="https://vborg.vbsupport.ru/showthread.php?t=122594" target="_blank">https://vborg.vbsupport.ru/showthread.php?t=122594</a>

Zinzara 09-14-2007 02:12 PM

installed, fantastic


All times are GMT. The time now is 04:26 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.01457 seconds
  • Memory Usage 1,827KB
  • 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
  • (3)bbcode_code_printable
  • (1)bbcode_html_printable
  • (3)bbcode_php_printable
  • (6)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (34)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