News:

Want to get involved in developing SMF, then why not lend a hand on our github!

Main Menu

SMF Display Signatures Only Once Per Page

Started by TrueSatan, August 07, 2007, 09:37:08 PM

Previous topic - Next topic

TrueSatan

Link to Mod

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.

scrawl

anyway to make this work in personal messages as well?

TrueSatan

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 would help?

Eliana Tamerin

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.
Do NOT PM me for support.

SimplePortal 2.3.6 is OUT!
SimplePortal Project Manager
Download | Docs
SimplePortal: Power of Simplicity!

TrueSatan

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.

rockinaway

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 :)
Have I helped you? Then please join AdminFuel - The forum for forum administrators.

If you need help managing your forum, or maybe launching it, then visit us and view the quality articles, downloads and posts.

TrueSatan

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.

Shaylanna

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?

rockinaway

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 ---
Have I helped you? Then please join AdminFuel - The forum for forum administrators.

If you need help managing your forum, or maybe launching it, then visit us and view the quality articles, downloads and posts.

Shaylanna

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 =)

FerociousSM

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

Sakae

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?
http://www.tigrelog.com.br
l: simple p: machines

Asshandler

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?
The only thing necessary for the triumph of evil is for good men to do nothing.

Asshandler

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.  :)
The only thing necessary for the triumph of evil is for good men to do nothing.

Advertisement: