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
Allow user to select what is shown in their postbit. Details »»
Allow user to select what is shown in their postbit.
Version: 1.00, by RC Attacker RC Attacker is offline
Developer Last Online: Apr 2011 Show Printable Version Email this Page

Category: End-User Options - Version: 3.8.2 Rating:
Released: 06-02-2009 Last Update: Never Installs: 14
Template Edits
Code Changes  
No support by the author.

Description
This template modification will allow the user to select what they want shown in their own postbit via their control panel. This can be done with anything in your postbit (i.e. user title, avatar, rank, location, post count, join date, custom profile field(s), etc).

Screenshot
Check the attachments at the bottom of this post for an example.

Install
A) Admin CP > User Profile Fields > Add New User Profile Field
A.1) Choose Multiple-Selection Checkbox (you may use multiple-selection menu).

A.2) Put "Hidden Post Information" in Title (you may write whatever you want).

A.3) Put whatever you intend to have the option to hide in Options ("Avatar", "User Title", "Join Date", "*Custom profile field name*", etc). Remember the order they are in!

A.4) The rest is irrelevant. I suggest you give some kind of description so your members know what this is for. I would probably either put this on the "Edit Details" page or "Thread Viewing" section on the options page. You will probably want to hide this from your members list.

A.5) After you save, remember the the field ID. This will be in Name column. You will see "fieldx", 'x' being the ID number.
B) Styles & Templates > Style Manager > Edit Templates > Postbit Templates > postbit_legacy
B.1) Replace 'x' with the field ID and 'y' with the ID of the option.
PHP Code:
<if condition="!($post['fieldx'] & y)"
The ID of the option is multiplied by two for each one. The first option on your list would be 1, the second would be 2, the third is 4, the fourth is 8, the fifth is 16, the sixth is 32, and so on.

B.2) In postbit_legacy, take the conditional you just made and post it before the conditional of the first option that you listed. I will use the avatar for my example.

Find:
PHP Code:
<if condition="$show['avatar']">
                <
table align="center" cellpadding="6" cellspacing="0">
                <
tr>
                  <
td valign="top"><div><a href="member.php?$session[sessionurl]u=$post[userid]"><img src="$post[avatarurl]$post[avwidth$post[avheightalt="<phrase 1="$post[username]">$vbphrase[xs_avatar]</phrase>" border="0" /></a>
                </
div></td></tr></table>
            </if> 
Add above from what you have in step B.1:
PHP Code:
<if condition="!($post['fieldx'] & y)"
Add below:
PHP Code:
</if> 

B.3) Repeat this process on everything you made an option for. Remember to put in the right option ID in your conditional. The field ID will remain the same.
C) Done. Go into your control panel and choose what you want hidden from your posts.

------
Please Mark as Installed if you've found this useful. This is my first time posting a mod and I would appreciate any feedback you have for it. If you need help, I'll try to help you here, but you're more likely to receive a quicker response at AdminAddict.

Screenshots

File Type: png Picture 237.png (88.5 KB, 0 views)
File Type: png Picture 238.png (41.7 KB, 0 views)
File Type: png Picture 239.png (40.1 KB, 0 views)
File Type: png Picture 240.png (22.3 KB, 0 views)
File Type: png Picture 241.png (27.3 KB, 0 views)

Show Your Support

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

Comments
  #2  
Old 06-03-2009, 07:54 PM
gothicuser's Avatar
gothicuser gothicuser is offline
 
Join Date: Apr 2004
Location: Kernow, Nr. UK
Posts: 468
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Nice idea. Thanks
Reply With Quote
  #3  
Old 06-04-2009, 04:11 PM
goxy63 goxy63 is offline
 
Join Date: Oct 2008
Location: its like another planet:D
Posts: 657
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

cool

Thanks
Reply With Quote
  #4  
Old 06-09-2009, 10:40 AM
htscpl's Avatar
htscpl htscpl is offline
 
Join Date: Sep 2003
Location: Houston
Posts: 151
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Good idea for more user control, Thanks!
Reply With Quote
  #5  
Old 06-09-2009, 12:59 PM
Kolbi Kolbi is offline
 
Join Date: Mar 2009
Location: D - S?dbaden
Posts: 899
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

A short question, why are these steps:
Quote:
A.1) Choose Multiple-Selection Checkbox (you may use multiple-selection menu).

A.2) Put "Hidden Post Information" in Title (you may write whatever you want).
necessary?
Reply With Quote
  #6  
Old 06-12-2009, 10:05 AM
letsjoy's Avatar
letsjoy letsjoy is offline
 
Join Date: Jun 2006
Location: Dhump State
Posts: 197
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

cool mod thnx for share
Reply With Quote
  #7  
Old 06-12-2009, 09:55 PM
mikey1991's Avatar
mikey1991 mikey1991 is offline
 
Join Date: Oct 2008
Location: United Kingdom
Posts: 654
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Any chance you cold integrate this with this: https://vborg.vbsupport.ru/showthread.php?t=213395 to make them "Show Signature"
Reply With Quote
  #8  
Old 06-14-2009, 04:54 AM
RC Attacker RC Attacker is offline
 
Join Date: Aug 2006
Posts: 70
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Kolbi View Post
A short question, why are these steps:

necessary?
If you do not do that (or some form of it), the user will have no way to choose what they want shown in their postbit.
Reply With Quote
  #9  
Old 06-19-2009, 07:13 PM
Crashh Crashh is offline
 
Join Date: May 2007
Posts: 37
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

RC Attacker, thx for your hack! is it possible to add an option hide all users information in postbit with mine?
Reply With Quote
  #10  
Old 06-23-2009, 06:29 PM
RC Attacker RC Attacker is offline
 
Join Date: Aug 2006
Posts: 70
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Crashh View Post
RC Attacker, thx for your hack! is it possible to add an option hide all users information in postbit with mine?
I believe you are asking if the changes you make in your own User CP can affect everyone, correct?
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 06:23 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.05117 seconds
  • Memory Usage 2,341KB
  • Queries Executed 24 (?)
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
  • (3)bbcode_quote
  • (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
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (9)postbit
  • (5)postbit_attachment
  • (10)postbit_onlinestatus
  • (10)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_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_attachment
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete