Simple Machines Community Forum

Customizing SMF => Modifications and Packages => Topic started by: live627 on May 02, 2010, 03:00:39 AM

Title: Default signature
Post by: live627 on May 02, 2010, 03:00:39 AM
Link to Mod (http://custom.simplemachines.org/mods/index.php?mod=2516)

Default Signature
by 130860  (http://oharascans.com)




Introduction
This mod allows the admin to add a custom code (you can use bbc) that will appear on the signature only if the user has not been set a signature.

settings for this mod can be found in

- Admin->Configuration->Modifications for 2.0


For  2.0 RC3 only


Supported Languages
o English/utf8
o Spanish_es/utf8
o Spanish_latin/utf8

I welcome translations, please post it on the support post ;)


$txt['def_sig_user_code'] = 'Place your code for default signature here:(you can use bbc code) ';


Installation
Simply install the package to install on the SMF Default Theme AND any other theme which does NOT have a custom Display.template.php


if you have a custom Display.template.php   do this:


Code (find) Select


// Show the member's signature?
      if (!empty($message['member']['signature']) && empty($options['show_no_signatures']) && $context['signature_enabled'])
         echo '
                     <div class="signature" id="msg_', $message['id'], '_signature">', $message['member']['signature'], '</div>';




Code ( add after) Select


elseif   (empty($message['member']['signature']) && empty($options['show_no_signatures']) &&!empty($modSettings['def_sig_user_code']) )
{
 
echo '
                     <div class="signature" id="msg_', $message['id'], '_signature">', parse_bbc($modSettings['def_sig_user_code']) , '</div>';

}   




Changelog


1.0 - April 05, 2010
Initial release
Title: Re: Default signature
Post by: Aportadordelmix on May 02, 2010, 03:28:47 AM
Thank you very much
Title: Re: Default signature
Post by: ~DS~ on May 02, 2010, 03:50:54 AM
"Slap me for having no signature"
:P
Title: Re: Default signature
Post by: edi67 on May 02, 2010, 04:10:12 AM
intersting thx
Title: Re: Default signature
Post by: Arantor on May 02, 2010, 06:15:04 AM
Interesting, you could use http://custom.simplemachines.org/mods/index.php?mod=2327 for the same purpose without doing any theme edits though ;)
Title: Re: Default signature
Post by: mirahalo on May 02, 2010, 06:03:59 PM
Quote from: Arantor on May 02, 2010, 06:15:04 AM
Interesting, you could use http://custom.simplemachines.org/mods/index.php?mod=2327 for the same purpose without doing any theme edits though ;)

LOL   I didn't even know about that mod :P
Title: Re: Default signature
Post by: Arantor on May 02, 2010, 06:09:48 PM
It's so easily done though, and this version works on 2.0 RC3 - I don't know if the other works on RC3 without changes, it'll need emulation as a minimum though.
Title: Re: Default signature
Post by: iPhoneDestek on September 17, 2010, 06:46:44 AM
translation in german and german-utf8



<file name="$languagedir/Modifications.german.php">
<operation>
  <search position="end" />
   <add><![CDATA[
// Default Signatur Mod translation by SirtLanVadisi.net
    $txt['def_sig_user_code'] = 'Platzieren Sie Ihren Code für die Standard-Unterschrift hier: (Sie können BBC-Code verwenden) ';
// End Default Signatur Mod translation by SirtLanVadisi.net
   ]]></add>
</operation>
</file>
<file name="$languagedir/Modifications.german-utf8.php">
<operation>
  <search position="end" />
   <add><![CDATA[
// Default Signatur Mod translation by SirtLanVadisi.net
    $txt['def_sig_user_code'] = 'Platzieren Sie Ihren Code für die Standard-Unterschrift hier: (Sie können BBC-Code verwenden) ';
// End Default Signatur Mod translation by SirtLanVadisi.net
   ]]></add>
</operation>
</file>



tranlation in turkish and turkish-utf8



<file name="$languagedir/Modifications.turkish.php">
<operation>
  <search position="end" />
   <add><![CDATA[
// Default Signatur Mod translation by SirtLanVadisi.net
    $txt['def_sig_user_code'] = 'Buraya varsayılan imza için kodunuzu veriniz: ( BBC kodu kullanabilirsiniz) ';
// End Default Signatur Mod translation by SirtLanVadisi.net
   ]]></add>
</operation>
</file>
<file name="$languagedir/Modifications.turkish-utf8.php">
<operation>
  <search position="end" />
   <add><![CDATA[
// Default Signatur Mod translation by SirtLanVadisi.net
    $txt['def_sig_user_code'] = 'Buraya varsayılan imza için kodunuzu veriniz: ( BBC kodu kullanabilirsiniz)  ';
// End Default Signatur Mod translation by SirtLanVadisi.net
   ]]></add>
</operation>
</file>