Jump to content


- - - - -

I've created a 3.3 mod to only show signatures once.


  • Please log in to reply
2 replies to this topic

#1 woodshed

woodshed

    Novice

  • Members
  • PipPip
  • 5 posts
  • IPB Version:v3.3.x

Posted 17 May 2012 - 03:53 PM

ok its my first and it more of a hack than a mod and its hard coded so no admin options, but it works for me and other people might find it useful

Basically it only shows a users signature once (the first time) per page in any thread.

Edit

/admin/applications/forums/modules_public/forums/topics.php

Find
protected $registry;
protected $DB;
protected $settings;
protected $request;
protected $lang;
protected $member;
protected $memberData;
protected $cache;

Add

protected $sig_show = array();

Immediately after it. Then find

  if ( ! empty( $poster['signature'] ) )
  {
   if ( $post['use_sig'] == 1 )
   {
	if ( ! $this->memberData['view_sigs'] || ( $poster['author_id'] && $this->memberData['member_id'] && ! empty( $this->member->ignored_users[ $poster['author_id'] ]['ignore_signatures'] ) && IPSMember::isIgnorable( $poster['member_group_id'], $poster['mgroup_others'] ) ) )
	{
	 $post['signature'] = '<!--signature.hidden.' . $post['pid'] . '-->';
	}
	else
	{
	 $post['signature'] = $this->registry->output->getTemplate( 'global' )->signature_separator( $poster['signature'], $poster['author_id'], IPSMember::isIgnorable( $poster['member_group_id'], $poster['mgroup_others'] ) );
	}
   }
  }

and add this immediately after it

   if (in_array($poster['author_id'], $this->sig_show))
	 {
	  $post['signature'] = "";
	 }
   else{
	  $this->sig_show[] = $poster['author_id'];
	 }
	

Thats it - hope its of some use

#2 Bitter

Bitter

    Final Prestige, LLC Owner

  • Support Staff
  • PipPipPipPipPipPipPipPipPipPip
  • 2,671 posts
  • Location:Connecticut
  • Real Name:Dustin Schriffert
  • IPB Version:v3.3.x

Posted 17 May 2012 - 11:13 PM

You could definitely add this to the Tutorials page. I think people would get a lot of use out of this: http://invisionmodding.com/tutorials/

Posted Image


#3 Adriano Faria

Adriano Faria

    ...a curious guy...

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

Posted 18 May 2012 - 01:17 AM

http://invisionfocus...ignatures-once/




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users