Simple Machines Community Forum

Customizing SMF => Modifications and Packages => Topic started by: TrueSatan on August 07, 2007, 09:37:08 PM

Title: SMF Display Signatures Only Once Per Page
Post by: TrueSatan on August 07, 2007, 09:37:08 PM
Link to Mod (http://custom.simplemachines.org/mods/index.php?mod=857)

Original code by Wing; posted on the SMF Tips and Tricks Forum http://www.simplemachines.org/community/index.php?topic=54974.0 This modification is very simple; it modifies the Default theme to display signatures only once per page.
Title: Re: SMF Display Signatures Only Once Per Page
Post by: scrawl on August 17, 2007, 10:18:44 PM
anyway to make this work in personal messages as well?
Title: Re: SMF Display Signatures Only Once Per Page
Post by: TrueSatan on August 18, 2007, 04:37:42 AM
It could be done but I doubt there would be much call for it. If you have sufficiently high numbers of PMs that they are a problem perhaps archiving them via http://custom.simplemachines.org/mods/index.php?mod=627 (http://custom.simplemachines.org/mods/index.php?mod=627) would help?
Title: Re: SMF Display Signatures Only Once Per Page
Post by: Eliana Tamerin on August 28, 2007, 09:42:19 AM
Do you think an option could be included on a member by member basis, with the option to specify whether it's on or off in the Features and Options on the ACP? Just for members who want to see all the signatures, but allowing those who don't want to/can't load them all, to restrict them.
Title: Re: SMF Display Signatures Only Once Per Page
Post by: TrueSatan on August 28, 2007, 10:33:08 AM
The main point is to help other members by not showing unwanted content (especially useful to members on dial up connections) so what you suggest would run counter to any of that. This should be a decision made by the forum admin not individuals and the way you suggest making modifications would turn a small and simple mod into a complex mod that, IMHO, had lost its way. Turning it on and off is facilitated by installing or uninstalling...anything else overcomplicates matters to no useful benefit. The signatures aren't completely removed...they still show once per page...so members who want to see what is in them can still do so with utmost ease.

I'm a fan of keeping things simple, unless there is a real and pressing need to go for a more complex solution.
Title: Re: SMF Display Signatures Only Once Per Page
Post by: rockinaway on October 20, 2007, 10:37:27 AM
I updated this modification for 1.1.4,  download here : http://www.adminfuel.com/tpmod.html;dl=item6

I hope you don't mind TrueSatan. Gladly take the download and upload it here, no changes were made other than SMF version number :)
Title: Re: SMF Display Signatures Only Once Per Page
Post by: TrueSatan on October 20, 2007, 03:43:22 PM
Thanks rockinaway. I've uploaded a new version to the official mods site that now covers all version of SMF from 1.1.1 to 1.1.99 so there won't be a need for an update until SMF 2.0 comes into play.
Title: Re: SMF Display Signatures Only Once Per Page
Post by: Shaylanna on October 25, 2007, 07:00:26 AM
Any chance you could tell me what I need to do to add this to a custom theme such as Bloc's Helios-Multi on Tinyportal?
Title: Re: SMF Display Signatures Only Once Per Page
Post by: rockinaway on October 25, 2007, 08:04:34 AM
Open your theme's Display.template.php file an find:

if (!empty($message['member']['signature']) && empty($options['show_no_signatures']))
echo '
<hr width="100%" size="1" class="hrcolor" />
<div class="signature">', $message['member']['signature'], '</div>';


Replace it with

// --- Begin modification - Display Signatures only once per page ---

// Show signature only once
               $IDAlreadyDisplayed = 0;
               if (!empty($MemberIDList)) {
                 if (in_array($message['member']['id'], $MemberIDList))
                    $IDAlreadyDisplayed = 1;
               }
               
                // Show the member's signature?
               
                if (!empty($message['member']['signature']) && empty($options['show_no_signatures']) && !$IDAlreadyDisplayed) {
                        echo '
                            <hr width="100%" size="1" class="hrcolor" />
                            <div style="overflow: auto; width: 100%; padding-bottom: 3px;" class="signature">', $message['member']['signature'], '</div>';

                $MemberIDList[] = $message['member']['id'];
                } // endif I added the brackets
               
// --- End modification - Display Signatures only once per page ---
Title: Re: SMF Display Signatures Only Once Per Page
Post by: Shaylanna on October 25, 2007, 11:17:44 AM
Thanks Rock, worked like a charm. Hopefully some of my less fortunate members who are on dialup will appreciate it!

Would be nice if this was an option in SMF, where you could have a sig image show only once in a thread.  I can live with once per page tho =)
Title: Re: SMF Display Signatures Only Once Per Page
Post by: FerociousSM on May 08, 2008, 05:12:45 AM
Do you have an update for 1.1.5 or is there and option to turn it on? I'm using the Musicoica theme.

Thx
Title: Re: SMF Display Signatures Only Once Per Page
Post by: Sakae on March 28, 2009, 10:57:57 PM
Quote from: FerociousSM on May 08, 2008, 05:12:45 AM
Do you have an update for 1.1.5 or is there and option to turn it on? I'm using the Musicoica theme.

Thx

Kinda few months late, but this MOD works great on my SMF 1.1.8.

Just wonder if it's possible to inverse the procedure, so I could show signatures in the LAST message of users, not their FIRST?
Title: Re: SMF Display Signatures Only Once Per Page
Post by: Asshandler on May 20, 2009, 12:25:36 PM
Quote from: softcore on March 28, 2009, 10:57:57 PMKinda few months late, but this MOD works great on my SMF 1.1.8.

Just wonder if it's possible to inverse the procedure, so I could show signatures in the LAST message of users, not their FIRST?

I too am interested in making it the user's last post on a page instead of the first.  Anyone have any idea how to tweak this to do that?
Title: Re: SMF Display Signatures Only Once Per Page
Post by: Asshandler on May 20, 2009, 01:21:18 PM
No one knows how to make it the member's last post on a page instead of their first?

Looking it over, it seems like it would be a rather simple modification to the existing mod, but so far, I've been unable to get it to work.

Any help would be greatly appreciated.  :)