Go Back   vb.org Archive > vBulletin Modifications > vBulletin 3.8 Modifications > vBulletin 3.8 Template Modifications
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Enable/Disable Signature per user Details »»
Enable/Disable Signature per user
Version: 1.00, by hoangminh hoangminh is offline
Developer Last Online: Aug 2011 Show Printable Version Email this Page

Category: Miscellaneous Hacks - Version: 3.8.x Rating:
Released: 05-06-2009 Last Update: Never Installs: 17
Template Edits
Re-useable Code Translations  
No support by the author.

This modification is a port of this from 3.5.

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:All done.

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

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #12  
Old 09-20-2009, 01:55 AM
Dingo14 Dingo14 is offline
 
Join Date: Dec 2007
Posts: 182
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

can't get it work in v3.8.3 when i disable sig it still shows for user
Reply With Quote
  #13  
Old 09-28-2010, 02:35 PM
ETDC ETDC is offline
 
Join Date: Aug 2007
Location: United Kingdom
Posts: 354
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Is there anything more up to date than this?
Reply With Quote
  #14  
Old 03-03-2012, 12:16 PM
Bulent Tekcan Bulent Tekcan is offline
 
Join Date: Oct 2003
Location: TURKEY - Istanbul
Posts: 437
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Any way to vb 4.1.x ?
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 01:05 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.03679 seconds
  • Memory Usage 2,273KB
  • Queries Executed 21 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (4)bbcode_php
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (4)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (4)post_thanks_box
  • (4)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (4)post_thanks_postbit_info
  • (3)postbit
  • (4)postbit_onlinestatus
  • (4)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete