Back to vBulletin 3.8 Template Modifications

Enable/Disable Signature per user
Mod Version: 1.00, by hoangminh

vB Version: 3.8.x Rating: (1 vote - 5.00 average) Installs: 17
Released: 07 May 2009 Last Update: Never Downloads: 1
Not Supported Template Edits Re-usable Code Translations  

This modification is a port of this from 3.5

Spoiler (click to open)


Easy Disable/Enable Signature per user

I'm looking for this hack for long time but not found. So I decide to edit myself.

Now, I share with all of you.

NOTE: For 3.8.x version, see this post.

What this does ?

This hack mod will allow administrator enable/disable signature for each user.

Difficulty: Easy with 2 step.

Let's begin.

1. First, you need to create a new user profile as follow:

Profile Field type: Single-Selection Radio Buttons

Title: Enable Signature
Description: write whatever you like
Option - enter 2 values, each value seperated by Enter, notice the order of each:
Code:
 
Yes 
No
Set Default : Yes
Order : (leave)
Required field: No
Field Editable by User: No (This option will only allow administrator to edit)
Private Field: Yes
Other field: No

Which page displays this option?: Option

Click Save, it will return to User profile field manager page

You will see new user profile field, view the name of it, for example in my board is: field17

Remember this

2. In postbit or postbit_legacy template,

Find:

find:
Code:
<if condition="$post['signature']">
<!-- sig -->
<div>
    __________________<br />
    $post[signature]
</div>
<!-- / sig -->
</if>
Replace with:
Code:
<if condition="$post['field17']!='No'">
<if condition="$post['signature']">
<!-- sig -->
<div>
    __________________<br />
    $post[signature]
</div>
<!-- / sig -->
</if>
</if>
Note: change $post['field17'] the fieldname as in your board

All done.

How to use this ?

If you want to disable signature for any user, just go to the User Profile in AdminCP and at the option: Enable Signature, select No

You like this hack? to receive update of this hack when available
Enjoy.
Attached Images
File Type: jpg disable_signature_avatar.JPG (61.0 KB, 427 views)
File Type: jpg disable_signature_avatar_field.JPG (53.2 KB, 391 views)
Attached Files
File Type: txt disable_signature_per_user.txt (1.8 KB, 109 views)

Close
.

I don't have time to learn how to create the plugin/product package xml to add this, so just modify the template only.

Any one know how to make this become product or plugin, feel free do it!.

What it is used for?
As title, allow admin to disable or enable signature of each user.

This modification based on User Profile Field.

Step to do:

1. First, you need to create a new user profile as follow:

Profile Field type: Single-Selection Radio Buttons

Title: Enable Signature
Description: write whatever you like
Option - enter 2 values, each value seperated by Enter, notice the order of each:
Code:

Yes
No
Set Default : Yes
Order : (leave)
Required field: No
Field Editable by User: No (This option will only allow administrator to edit)
Private Field: Yes
Other field: No

Which page displays this option?: Option

Click Save, it will return to User profile field manager page

You will see new user profile field, view the name of it, for example in my board is: field17

Remember this

2. In postbit or postbit_legacy template, (this will disable/enable signature in post of target user)

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:
 <if condition="$post['field17']!='No'">

        
$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> 
3. In memberinfo_block_aboutmetemplate, (this will disable/enable signature in member profile page)

Find:

PHP Code:
  <if condition="$prepared['signature']">
        <
li class="profilefield_category">
            
$vbphrase[signature]
            <
dl class="list_no_decoration profilefield_list"><dd id="signature">$prepared[signature]</dd></dl>
        </
li>
    </if> 
Replace with:
PHP Code:
 <if condition="$userinfo[field17]!='No'">
    <if 
condition="$prepared['signature']">
        <
li class="profilefield_category">
            
$vbphrase[signature]
            <
dl class="list_no_decoration profilefield_list"><dd id="signature">$prepared[signature]</dd></dl>
        </
li>
    </if>
</if> 
If you want this option is affected on other area (such as Private messagE), do the same as above, but because 2 templates are public, so do this is enough.

Note: changefield17 the fieldname as in your board

To enable/disable signature of any user, just enter user option and click on No.

See screenshot:
  • http://www.vbulletin.org/forum/#
  • http://www.vbulletin.org/forum/#
All done.

I'm not online frequently, so, please try help each other if you can.

Download

No files for download.

Similar Mods

Easy Disable/Enable Signature per user vBulletin 3.5 Template Modifications
Miscellaneous Hacks Disable User Signature Modification Graveyard

vblts.ru supports vBulletin®, 2022-2024