[Snippet] One signature per user and page

Mods, snippets and styles postet and supported by the users
Forum rules
As the forum title says this is for User Contributions
Post a support request in this forum and you will be banned!
Locked
User avatar
doktornotor
BBCoder IV
BBCoder IV
Posts: 167
Joined: 14 Sep 2011, 23:20
BBCodes: 30
Favourite MOD: Thanks for Posts
Contact:

[Snippet] One signature per user and page

Post by doktornotor »

Putting it here before I lose the code again... :D

Open: viewtopic.php

Find:

Code: Select all

// Output the posts
Add after:

Code: Select all

$signat[$poster_id] = 0;
Find:

Code: Select all

		$user_cache[$poster_id]['sig'] = bbcode_nl2br($user_cache[$poster_id]['sig']);
		$user_cache[$poster_id]['sig'] = smiley_text($user_cache[$poster_id]['sig']);
		$user_cache[$poster_id]['sig_parsed'] = true;
	}
Add after:

Code: Select all

	$signat[$poster_id]++;
	if($signat[$poster_id] >= 2)
	{
	$user_cache[$poster_id]['sig'] = '';
	}
Support requests via PM go straight to /dev/null!
User avatar
Terr0r
BBCoder V
BBCoder V
Posts: 339
Joined: 04 May 2011, 00:47
BBCodes: 100
Location: The Netherlands
Contact:

[Snippet] One signature per user and page

Post by Terr0r »

What does this editing have you a screenshot before you editing and afther you editing
If you can't fix it with ducktape you ain't using enough
For my MODS and BBCodes or other things that I have made take a look here
User avatar
doktornotor
BBCoder IV
BBCoder IV
Posts: 167
Joined: 14 Sep 2011, 23:20
BBCodes: 30
Favourite MOD: Thanks for Posts
Contact:

[Snippet] One signature per user and page

Post by doktornotor »

Shockingly, it does exactly what the subject says - show users' signature once per page in topic view. :lol:
Support requests via PM go straight to /dev/null!
analyst_underscore
BBCoder I
BBCoder I
Posts: 1
Joined: 25 Jul 2012, 03:44
BBCodes: 0

[Snippet] One signature per user and page

Post by analyst_underscore »

Can this be made so that the last post the user has on the page gets the sig rather than the first?
Locked