vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.8 Template Modifications (https://vborg.vbsupport.ru/forumdisplay.php?f=236)
-   -   Show Thread Enhancements - New Neater Signature Style (https://vborg.vbsupport.ru/showthread.php?t=229089)

christon26 11-28-2009 10:00 PM

New Neater Signature Style
 
1 Attachment(s)
This is my very first mod post so be gentle lol

I re-arranged how the signatures display on my forum as I don't like the default....and would like to give back to the community by sharing :)

**Please save your original template code before modifying**

In Postbit Templates

For postbit_legacy:

Find:

PHP Code:

<td class="alt2" width="175" style="border: $stylevar[cellspacing]px solid $stylevar[tborder_bgcolor]; border-top: 0px; border-bottom: 0px"

Replace with:

PHP Code:

<td class="alt2" width="175" style="border: $stylevar[cellspacing]px solid $stylevar[tborder_bgcolor]; border-top: 0px; border-bottom: 0px" rowspan="2"

Find:

PHP Code:

        $template_hook[postbit_signature_start]
        
$ad_location[ad_showthread_firstpost_sig]

        <if 
condition="$post['signature']">
        <!-- 
sig -->
            <
div>
                
__________________<br />
                
$post[signature]
            </
div>
        <!-- / 
sig -->
        </if>

        
$template_hook[postbit_signature_end]

        <if 
condition="$show['postedited']">
        <!-- 
edit note -->
            <
div class="smallfont">
                <
hr size="1" style="color:$stylevar[tborder_bgcolor]; background-color:$stylevar[tborder_bgcolor]/>
                <
em>
                    <if 
condition="$show['postedithistory']">
                        <
phrase 1="$post[edit_username]2="$post[edit_date]3="$post[edit_time]4="posthistory.php?$session[sessionurl]p=$post[postid]">$vbphrase[last_edited_link_by_x_on_y_at_z_postid]</phrase>
                    <else />
                        <
phrase 1="$post[edit_username]2="$post[edit_date]3="$post[edit_time]">$vbphrase[last_edited_by_x_on_y_at_z]</phrase>
                    </if>
                    <if 
condition="$post['edit_reason']">
                        
$vbphrase[reason]: $post[edit_reason]
                    </if>
                </
em>
            </
div>
        <!-- / 
edit note -->
        </if>

    </
td>
</
tr

Replace with:

PHP Code:

        <if condition="$show['postedited']">
        <!-- 
edit note -->
            <
div class="smallfont">
                <
hr size="1" style="color:$stylevar[tborder_bgcolor]; background-color:$stylevar[tborder_bgcolor]/>
                <
em>
                    <if 
condition="$show['postedithistory']">
                        <
phrase 1="$post[edit_username]2="$post[edit_date]3="$post[edit_time]4="posthistory.php?$session[sessionurl]p=$post[postid]">$vbphrase[last_edited_link_by_x_on_y_at_z_postid]</phrase>
                    <else />
                        <
phrase 1="$post[edit_username]2="$post[edit_date]3="$post[edit_time]">$vbphrase[last_edited_by_x_on_y_at_z]</phrase>
                    </if>
                    <if 
condition="$post['edit_reason']">
                        
$vbphrase[reason]: $post[edit_reason]
                    </if>
                </
em>
            </
div>
        <!-- / 
edit note -->
        </if>
</
td>
</
tr>
<
tr>
    <
td align="center" valign="bottom">
        
$template_hook[postbit_signature_start]
        
$ad_location[ad_showthread_firstpost_sig]

        <if 
condition="$post['signature']"><br />
        <!-- 
sig -->

            <
fieldset class="signature">
<
legend>Signature</legend>
                
                
$post[signature]
            </
fieldset>
        <!-- / 
sig -->
        </if>

        
$template_hook[postbit_signature_end]
    </
td>
</
tr

Save and enjoy

For postbit:

Find:
PHP Code:

        $template_hook[postbit_signature_start]
        
$ad_location[ad_showthread_firstpost_sig]

        <if 
condition="$post['signature']">
        <!-- 
sig -->
            <
div>
                
__________________<br />
                
$post[signature]
            </
div>
        <!-- / 
sig -->
        </if>

        
$template_hook[postbit_signature_end

Replace with:

PHP Code:

        $template_hook[postbit_signature_start]
        
$ad_location[ad_showthread_firstpost_sig]

        <if 
condition="$post['signature']"><br />
        <!-- 
sig -->

            <
fieldset class="signature">
<
legend>Signature</legend>
                
                
$post[signature]
            </
fieldset>
        <!-- / 
sig -->
        </if>

        
$template_hook[postbit_signature_end

Save and enjoy

The code contains the word signature which can be changed to your language if different, just find and edit:

PHP Code:

<legend>Signature</legend

Lastly, add some css in the Additional CSS Definitions in Style Manager to style the signature fieldset how you like

PHP Code:

.signature 
    
bordersolid 1px #bdbfdd; 
    
margin5px
    
padding10px
    
color#000000; 
    
background#ffffff;


For post previewing, New Posting Templates >> newpost_preview

Find:

PHP Code:

            <div>__________________<br />
            
$post[signature]</div

Replace with:

PHP Code:

            <fieldset class="signature">
<
legend>Signature</legend>
                
                
$post[signature]
            </
fieldset

Hopefully I have done this right and some can make nice use of it :D

***Revision 4th December: Removed unnecessary table cell code from postbit replacement plus border style from table cell in postbit_legacy
***Revision 4th December: Added code to change for newpost_preview template

***Revision 3rd January:

Thanx to ChopSuey and Warlord for this little change if you want to give your members a link to edit their signature in the legend title:

Change:

PHP Code:

<legend>Signature</legend

to:

PHP Code:

<legend>Signature <if condition="$bbuserinfo[userid] == $post[userid] "> - <a href="/profile.php?do=editsignature">Edit</a></if></legend


saadessa 11-29-2009 01:06 PM

nice thank you

christon26 11-29-2009 04:25 PM

You're welcome :)

ChopSuey 12-01-2009 10:17 PM

I think this stuff is already in some of the custom skins. Nice anyways.

christon26 12-02-2009 01:05 AM

Probably, I daresay I'm hardly the first person to think of putting the signature inside a fieldset and table cell LOL I've always skinned my own forums though and this is the way I changed it on mine...thanx for posting :)

Tanapangarap 12-03-2009 08:51 AM

I was wondering if you could help me out with this problem:

https://vborg.vbsupport.ru/external/2009/12/43.png

Using your CSS code, specifically by putting "#eaeadb" for background, I was able to make the color inside the Signature block/box match the color of the post area above it. However, the area directly around the outside of the signature block remains the same color. I do not know how to change that.

christon26 12-03-2009 09:53 AM

Hi, if that screenshot is from the url in your signature here, just add class="alt1" into this line of the code:

Code:

  <td style="border: $stylevar[cellspacing]px solid $stylevar[tborder_bgcolor]; border-top: 0px" align="center" valign="bottom">
like this:

Code:

<td style="border: $stylevar[cellspacing]px solid $stylevar[tborder_bgcolor]; border-top: 0px" class="alt1" align="center" valign="bottom">
That's the line right before:

Code:

        $template_hook[postbit_signature_start]
And that should take care of it for you :)

Tanapangarap 12-03-2009 10:38 AM

Thanks.

The screen shot was indeed from that URL.

Unfortunately, though the change you suggest helps, there are still some problems. Below are two screen shots, first with your modification, the second without:

https://vborg.vbsupport.ru/external/2009/12/41.png

https://vborg.vbsupport.ru/external/2009/12/42.png

Comparing the two, you can see two problems:

1. The greenish/brownish border outside and directly to the left and right of the signature block/box is thicker than the border around the rest of the post area.

2. Below the signature, the area is still darker than the rest of the post area.

Sorry my template is so troublesome. :o I assume you may need me to post some code from my template. Please let me know if that is so, and from what file.

Tanapangarap 12-03-2009 10:41 AM

Oh, and above the signature block/box, I notice another border separating the signature area from the post area. I was wondering if that could be removed, too.

christon26 12-03-2009 04:25 PM

Since you're using postbit and not postbit legacy, and your alt classes have borders styled into them that will make those borders show, try just adding the signature inside a fieldset without adding it into a new table cell as well:

Replace:

Code:

        $template_hook[postbit_signature_start]
        $ad_location[ad_showthread_firstpost_sig]

        <if condition="$post['signature']">
        <!-- sig -->
            <div>
                __________________<br />
                $post[signature]
            </div>
        <!-- / sig -->
        </if>

        $template_hook[postbit_signature_end]

With

Code:

        $ad_location[ad_showthread_firstpost_sig]

        <if condition="$post['signature']"><br />
        <!-- sig -->

            <fieldset class="signature">
<legend>Signature</legend>
               
                $post[signature]
            </fieldset>
        <!-- / sig -->
        </if>

        $template_hook[postbit_signature_end]

*crosses fingers* :)

Tanapangarap 12-03-2009 07:31 PM

That did the trick! Thank you.

christon26 12-03-2009 07:53 PM

My pleasure :D

worried 12-04-2009 05:44 AM

Installed! Thanks for the postbit fix. I'm glad someone else asked about it.

worried 12-04-2009 06:21 AM

The signature needs to be changed in the newpost_preview template as well. Could you show us the changes?

christon26 12-04-2009 06:50 AM

Oh yeah, I forgot I changed mine there as well LOL

Find:

PHP Code:

            <div>__________________<br />
            
$post[signature]</div

Replace with:

PHP Code:

            <fieldset class="signature">
<
legend>Signature</legend>
                
                
$post[signature]
            </
fieldset


Silencer Groans 12-06-2009 06:43 AM

nice thank you

christon26 12-06-2009 07:48 AM

You're welcome! Please mark Installed if you've implemented it :)

zapiy 12-07-2009 07:53 PM

I love the way the siggy's are forces width ways.. But can i make this work the same but minus the boarder..

Cheers

christon26 12-07-2009 08:07 PM

Yup, just remove the fieldset and legend and replace with a div so you can still style it...like so...

From:

Code:

            <fieldset class="signature">
<
legend>Signature</legend>
               
               
$post[signature]
            </
fieldset>



to:

Code:

            <div class="signature">$post[signature]
</div>
           


ChopSuey 01-02-2010 11:41 AM

HTML Code:

<fieldset class="signature">
<legend>Signature - <if condition="$show['member']"><a href="/profile.php?do=editsignature">Edit</a></if></legend>

A little something i did for my board, let them edit theirs also :) Shows to members only :D

christon26 01-02-2010 08:00 PM

Nice add, I like that :)

I'll edit your post into my first post!

Warlord 01-02-2010 11:20 PM

Nice little mod Christon. :)


Quote:

Originally Posted by ChopSuey (Post 1944872)
HTML Code:

<fieldset class="signature">
<legend>Signature - <if condition="$show['member']"><a href="/profile.php?do=editsignature">Edit</a></if></legend>

A little something i did for my board, let them edit theirs also :) Shows to members only :D


If you change it to this, then it will only show up for the author of the displayed signature. (Before it would show the edit signature link to all registered users in every signature as opposed to only appearing in their own signatures.)

HTML Code:

            <fieldset class="signature">
<legend>Signature <if condition="$bbuserinfo[userid] == $post[userid] "> - <a href="/profile.php?do=editsignature">Edit</a></if></legend> 
               
                $post[signature]
            </fieldset>

I also added a few line breaks above that to drop the signature down a bit in the posts.

wickedstangs 01-03-2010 11:30 AM

1 Attachment(s)
tried to install and it come out like this. Any assistance would greatly be appreciated....
https://vborg.vbsupport.ru/external/2010/01/113.jpg

Below is my original postbit...

Warlord 01-03-2010 05:08 PM

Quote:

Originally Posted by wickedstangs (Post 1945867)
tried to install and it come out like this. Any assistance would greatly be appreciated....
https://vborg.vbsupport.ru/external/2010/01/113.jpg

Below is my original postbit...

The postbit_legacy template you attached looks like the original template before any changes. Judging from the picture though, I think you have the modification installed correctly. I'm guessing you just don't like all the black after the message and you either didn't add the css to the additional css definitions or you made that color black.

Add this to your Additional CSS Definitions if you skipped this step before.

Code:

.signature {
    border: solid 1px #bdbfdd;
    margin: 5px;
    padding: 10px;
    color: #000000;
    background: transparent;
}

If you already added the CSS just change the background properties in the CSS for .signature to transparent. That will make the background transparent and remove all that black. The reason you have so much room in between your post and your signature is because you have so much in your postbit_legacy template (on the left side). I'm assuming that's how it was before you tried adding this modification too, but the signature just had a transparent background before.

christon26 01-06-2010 03:50 PM

Quote:

Originally Posted by Warlord (Post 1945420)
Nice little mod Christon. :)





If you change it to this, then it will only show up for the author of the displayed signature. (Before it would show the edit signature link to all registered users in every signature as opposed to only appearing in their own signatures.)

HTML Code:

            <fieldset class="signature">
<legend>Signature <if condition="$bbuserinfo[userid] == $post[userid] "> - <a href="/profile.php?do=editsignature">Edit</a></if></legend> 
               
                $post[signature]
            </fieldset>

I also added a few line breaks above that to drop the signature down a bit in the posts.

Thanx! I like that even better lol

christon26 01-06-2010 03:55 PM

Quote:

Originally Posted by wickedstangs (Post 1945867)
tried to install and it come out like this. Any assistance would greatly be appreciated....
https://vborg.vbsupport.ru/external/2010/01/113.jpg

Below is my original postbit...

Hi, your text file doesn't contain the changed code you added and without a link I cannot see what's happening via Firebug...but I would hazard a guess you need to add class="alt1" into the td code for the signature cell (the second set of code change) like so:

PHP Code:

    <td align="center" valign="bottom" class="alt1"

Hope that helps :)

**edit just spied your forum link in your signature lol it's really early here :P


All times are GMT. The time now is 11:08 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01651 seconds
  • Memory Usage 1,898KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (8)bbcode_code_printable
  • (4)bbcode_html_printable
  • (15)bbcode_php_printable
  • (4)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (26)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete