Jump to content


- - - - -

(SOS31) Topic Viewed by Users 2.1.0


  • Please log in to reply
47 replies to this topic

#1 Adriano Faria

Adriano Faria

    ...a curious guy...

  • Modders
  • PipPipPipPipPipPipPipPipPipPip
  • 3,268 posts
  • Location:Brazil
  • Real Name:Adriano
  • IPB Version:v3.3.x
Contributor

Posted 25 June 2009 - 01:49 AM

Posted Image

File Name: (SOS31) Topic Viewed by Users 2.1.0
File Submitter: Adriano Faria
File Submitted: 24 Jun 2009
File Updated: 10 Mar 2011
File Category: IP.Board v3.0 & v3.1

This hook will show a list of users that already has visited the topic.  You can set which forums do you want it to happen, user groups that will  can see this list, user groups that won't appear in the list (even if  some member of this group has already visited the topic) and the way you  want to sort the users on this list.

Compatibility:

  • IP.Board 3.X

Click here to download this file

#2 Jimmy S

Jimmy S

    Invision Modding Helper

  • IM Supporters
  • PipPipPipPipPipPipPip
  • 609 posts
  • Location:Loganville, Ga.
  • Real Name:Jimmy
  • IPB Version:v3.0.x
Contributor

Posted 25 June 2009 - 02:23 AM

I've always liked mods like this that show you who has read a topic and when they have last read it.  I will install this one tomorrow.  Thank you ;)

#3 Pr0grammer1

Pr0grammer1

    n00b

  • Members
  • Pip
  • 2 posts
  • Real Name:Alex
  • IPB Version:v3.0.x

Posted 27 June 2009 - 10:16 AM

This mod breaks announcements. I get this error when I try to view one with the hook enabled:


===================================================
  Date: Sat, 27 Jun 2009 09:24:37 +0000
  Error Number: 1064
  Error: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1
  IP Address: ...
  Page: /forum-1/announcement-4-.../
  Debug: array (
   1 => 
   array (
	 'file' => '/home/.../public_html/.../ips_kernel/classDb.php',
	 'line' => 982,
	 'function' => 'query',
	 'class' => 'db_driver_mysql',
   ),
   4 => 
   array (
	 'file' => '/home/.../public_html/.../admin/sources/classes/output/publicOutput.php',
	 'line' => 2773,
	 'function' => 'getOutput',
	 'class' => 'tviewedby',
   ),
   5 => 
   array (
	 'file' => '/home/.../public_html/.../admin/sources/classes/output/publicOutput.php',
	 'line' => 2101,
	 'function' => 'templateHooks',
	 'class' => 'output',
   ),
   6 => 
   array (
	 'file' => '/home/.../public_html/.../admin/applications/forums/modules_public/forums/announcements.php',
	 'line' => 175,
	 'function' => 'sendOutput',
	 'class' => 'output',
   ),
   7 => 
   array (
	 'file' => '/home/.../public_html/.../admin/sources/base/ipsController.php',
	 'line' => 291,
	 'function' => 'doExecute',
	 'class' => 'public_forums_forums_announcements',
   ),
 )
  mySQL query error: SELECT id, member_id, tid FROM ibf_topic_viewedby WHERE member_id=52 and tid=

Disabling the hook or just setting it to not display this list fixes the problem.

#4 Adriano Faria

Adriano Faria

    ...a curious guy...

  • Modders
  • PipPipPipPipPipPipPipPipPipPip
  • 3,268 posts
  • Location:Brazil
  • Real Name:Adriano
  • IPB Version:v3.3.x
Contributor

Posted 27 June 2009 - 10:22 AM

Forum announcements ?

#5 Adriano Faria

Adriano Faria

    ...a curious guy...

  • Modders
  • PipPipPipPipPipPipPipPipPipPip
  • 3,268 posts
  • Location:Brazil
  • Real Name:Adriano
  • IPB Version:v3.3.x
Contributor

Posted 27 June 2009 - 10:34 AM

Yes, confirmed and fixed. Just download the new version and reinstall.

#6 Jamer

Jamer

    Coder

  • IM Supporters
  • PipPipPipPipPip
  • 182 posts
  • Location:UK
  • Real Name:Colin
  • IPB Version:v3.1.x

Posted 28 June 2009 - 08:41 AM

Brilliant thank you

#7 Adriano Faria

Adriano Faria

    ...a curious guy...

  • Modders
  • PipPipPipPipPipPipPipPipPipPip
  • 3,268 posts
  • Location:Brazil
  • Real Name:Adriano
  • IPB Version:v3.3.x
Contributor

Posted 01 August 2009 - 02:56 PM

Hook updated!

Change from 1.0.2 => 1.1.0:
  • Expand/Collapse added to the list


#8 andrews8602

andrews8602

    Member

  • Members
  • PipPipPip
  • 32 posts
  • IPB Version:v2.3.x

Posted 02 August 2009 - 05:13 AM

Have a weird bug where it displays my user more than once.

Attached File  Picture_5.png   14.75K   2 downloads

I have all user groups selected as well as all forums selected in the settings. Sorting is ASC by username.

My member ID is 1 and user group is ID 4 if that helps.

#9 Wolfie

Wolfie

    Novice

  • Members
  • PipPip
  • 8 posts
  • IPB Version:v3.0.x

Posted 02 August 2009 - 07:06 AM

Feature request:  Be able to click on the number of times the topic has been viewed (from the topic list page) to see a list of members who have read the topic.

#10 Adriano Faria

Adriano Faria

    ...a curious guy...

  • Modders
  • PipPipPipPipPipPipPipPipPipPip
  • 3,268 posts
  • Location:Brazil
  • Real Name:Adriano
  • IPB Version:v3.3.x
Contributor

Posted 02 August 2009 - 11:59 AM

View Postandrews8602, on Aug 2 2009, 02:13 AM, said:

Have a weird bug where it displays my user more than once.
I can't reproduce it... it's weird 'cause it updates the record if you've already read that topic.

Can you remove all records from table and test it a little longer ?

truncate ibf_topic_viewedby;


#11 Miracle

Miracle

    Coder

  • Members
  • PipPipPipPipPip
  • 140 posts
  • IPB Version:v2.3.x

Posted 03 August 2009 - 01:00 AM

How many extra queries does it add on each topic load?

#12 Adriano Faria

Adriano Faria

    ...a curious guy...

  • Modders
  • PipPipPipPipPipPipPipPipPipPip
  • 3,268 posts
  • Location:Brazil
  • Real Name:Adriano
  • IPB Version:v3.3.x
Contributor

Posted 03 August 2009 - 11:22 AM

One to see if you already read the topic and another one to list users.

#13 Magz

Magz

    n00b

  • Members
  • Pip
  • 4 posts
  • Real Name:Maggie
  • IPB Version:v3.0.x

Posted 05 August 2009 - 08:24 AM

Hi, this is one of my fav mods, as so many say but Ive not looked in there and now can say oh yes you have and use as a back up.

However having one wee problem, on ipb skin we get this message

Quote

Fatal error: Call to undefined method skin_topic_1::hooksos_tviewedby() in /home/tofnew/public_html/forum/hooks/tviewedby_437451e610d774fcf16b7b6f7632e291.php on line 83

all other skins are fine just ipb.

any ideas please?

Thank you in advnace

#14 Adriano Faria

Adriano Faria

    ...a curious guy...

  • Modders
  • PipPipPipPipPipPipPipPipPipPip
  • 3,268 posts
  • Location:Brazil
  • Real Name:Adriano
  • IPB Version:v3.3.x
Contributor

Posted 05 August 2009 - 09:45 AM

Probably the template wasn't created for some reason. Create it manually, on Look & Feel -> your skin -> Click on Add new bit:

Template Bit Name: hooksos_tviewedby
Add to Group: skin_topic
Data Variables: $userslist,$i, $data=array()

Click on Add button.

Content:

<script type='text/javascript'>
	 function toggleTVBUsers()
	 {
		 if ( $('tvbusers_body').hasClassName('collapsedTVBUsers') )
		 {
			 $('tvbusers_body').removeClassName('collapsedTVBUsers');
			 new Effect.BlindDown( $( $('tvbusers_body') ) );
			 ipb.Cookie.set( 'sos_tvbusers', 0, 1 );
			 $('tvbusers_expand').hide();
			 $('tvbusers_collapse').show();
		 }
		 else
		 {
			 $('tvbusers_body').addClassName('collapsedTVBUsers');
			 new Effect.BlindUp( $( $('tvbusers_body') ) );
			 ipb.Cookie.set( 'sos_tvbusers', 1, 1 );
			 $('tvbusers_expand').show();
			 $('tvbusers_collapse').hide();
		 }
 
 
	 }
 </script>
 <br /><br />
	 <div class='active_users' id='topic_viewedby'>
		 <h2>
		 {parse expression="str_replace( "{total}", $i, $this->lang->words['topic_viewedby'] )"} {$data['link']}
		 </h2>
		 <div id="tvbusers_body"{$data['class']}{$data['style']}>
			 {$userslist}
		 </div>
	 </div>
That's the template for v1.1.0.

#15 Magz

Magz

    n00b

  • Members
  • Pip
  • 4 posts
  • Real Name:Maggie
  • IPB Version:v3.0.x

Posted 05 August 2009 - 01:59 PM

Many thanks that worked

The template was there, wouldnt let me redo it, so had to go and find it lol

all that was missing was this bit

Quote

<![CDATA[      <script type='text/javascript'>

for some strange reason! But all sorted and many thanks for quick reply

#16 Adriano Faria

Adriano Faria

    ...a curious guy...

  • Modders
  • PipPipPipPipPipPipPipPipPipPip
  • 3,268 posts
  • Location:Brazil
  • Real Name:Adriano
  • IPB Version:v3.3.x
Contributor

Posted 05 August 2009 - 02:09 PM

Sorry, I edited the post above removing this while you're reading.

#17 mimapr

mimapr

    Advanced Member

  • Members
  • PipPipPipPip
  • 69 posts
  • Real Name:Eva
  • IPB Version:v3.0.x

Posted 12 August 2009 - 03:22 PM

Installed and does not show,  I have board 3.0.2

#18 Adriano Faria

Adriano Faria

    ...a curious guy...

  • Modders
  • PipPipPipPipPipPipPipPipPipPip
  • 3,268 posts
  • Location:Brazil
  • Real Name:Adriano
  • IPB Version:v3.3.x
Contributor

Posted 13 August 2009 - 12:42 AM

Works fine for me on my live board (3.0.2)!

Did you configured the mod on Tools & Settings, as asked on ReadMe.html ?

#19 mimapr

mimapr

    Advanced Member

  • Members
  • PipPipPipPip
  • 69 posts
  • Real Name:Eva
  • IPB Version:v3.0.x

Posted 13 August 2009 - 01:24 PM

Yes I did, and still not showing.

#20 Adriano Faria

Adriano Faria

    ...a curious guy...

  • Modders
  • PipPipPipPipPipPipPipPipPipPip
  • 3,268 posts
  • Location:Brazil
  • Real Name:Adriano
  • IPB Version:v3.3.x
Contributor

Posted 13 August 2009 - 02:39 PM

Tested again on Fresh Install of 3.0.2! And as happens on my live board (3.0.2), works.

Attached File  imagem.PNG   20K   3 downloads

I can't  imagine what you're doing there...




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users