Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 3.0 > vBulletin 3.0 Template Modifications
[SMF feature imitation] Personal text hack Details »»
[SMF feature imitation] Personal text hack
Version: 1.00, by Lea Verou Lea Verou is offline
Developer Last Online: Jul 2012 Show Printable Version Email this Page

Version: 3.0.7 Rating:
Released: 08-27-2005 Last Update: Never Installs: 1
Template Edits
 
No support by the author.

Hello, this is an easy and quick modification I made when I switched to vBbulletin from SMF cause I missed the personal text thing that SMF has.


What does it do?

It allows the user to type a small personal text in his options page and the text to be displayed under the avatar if he has one (if he doesn't have one then nothing is displayed) in both the postbit and the profile page.
Note that this is made only for the "classic" thread view and won't work with others as only the postbit_legacy template is modified.

How many file/template changes should I do? Is it difficult?


You won't have to edit any php file. Only 2 template modifications should be done and you will have to add a custom profile field via the vBulletin admin cp. normally i don't think it will take more than 5 minutes
The templates that will be edited are "postbit_legacy" and "MEMBERINFO".

Ok, tell me how to do it!


Lets start then!

Postbit_legacy:
Add
HTML Code:
<if condition="$post['field6']">
				 <div><font size="1">$post[field6] </font></div>
				</if>
under
HTML Code:
			<if condition="$show['avatar']">
				<div class="smallfont">
		 		&nbsp;<br /><a href="member.php?$session[sessionurl]u=$post[userid]"><img src="$avatarurl" alt="<phrase 1="$post[username]">$vbphrase[xs_avatar]</phrase>" border="0" /></a>
				</div>
MEMBERINFO:
Add
HTML Code:
<if condition="$post['field6']">
		 	 <font size="1"><br />$post[field6] </font>
				  </if>
under
HTML Code:
<tr valign="top">
			<if condition="$show['avatar']">
		 	<td><img src="$userinfo[avatarurl]" alt="<phrase 1="$userinfo[username]">$vbphrase[xs_avatar]</phrase>" border="0" style="border:1px solid $stylevar[tborder_bgcolor]; border-top:none" />
Before or after these changes create a single line textbox in the custom profile fields with name "field6" or if it gets another name change filed6 in the code to the field's name and in Which page displays this option? choose "Options: other" so that it's displayed in the options page and also not in the profile page like eg "Biography" Also set the maximum characters to a relatively small amount (I have it equal to 100 in my forum) so that the postbit doesn't get too large as there will always be somebody to post his whole life story in it! :P

I hope you like it cause it's my first mod. Any suggestions, bug report and questions are welcome!

Below I attach 2 screenshots so that you can see how it looks!

Sorry if such a mod has been posted before, I haven't come across any! However if you see a similar one I would appreciate it if you informed me!

Show Your Support

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

Comments
  #2  
Old 08-29-2005, 05:40 AM
Blind Guardian's Avatar
Blind Guardian Blind Guardian is offline
 
Join Date: Mar 2004
Location: South Carolina
Posts: 40
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

So, basically, all this does is make a second "custom title" field so it still displays their position (member/moderator/administrator)?

Not bad, but it could be done a lot easier, without having to bother making new profile fields and such.

I'm thinking you could improve it by doing the following;

Open postbit/postbit_legacy and find:
Code:
<if condition="$post['usertitle']"><div class="smallfont">$post[usertitle]</div></if>
Copy this somewhere, then replace it with the following:
Code:
        <font size=1 color=#XXXXXX><b> 
                      <if condition="$post[usergroupid] == X">Administrator</if> 
                      <if condition="$post[usergroupid] == X">Super Moderator</if> 
                      <if condition="$post[usergroupid] == X">Moderator</if>
                      <if condition="$post[usergroupid] == X">Registered User</if> 
        </b></font>
Replace the X's with the relevant color/usergroup information.

Find the following:
Code:
			<if condition="$show['avatar']">
				<div class="smallfont">
					&nbsp;<br /><a href="member.php?$session[sessionurl]u=$post[userid]"><img src="$avatarurl" alt="<phrase 1="$post[username]">$vbphrase[xs_avatar]</phrase>" border="0" /></a>
				</div>
			</if>
Paste the following code, which you copied earlier, after it:
Code:
<if condition="$post['usertitle']"><div class="smallfont">$post[usertitle]</div></if>
Of course, if your goal is to let the user have multiple custom-titles, then ignore what I just said.
Reply With Quote
  #3  
Old 08-29-2005, 06:05 AM
Lea Verou Lea Verou is offline
 
Join Date: Jul 2005
Location: Greece
Posts: 1,856
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

My goal is to imitate the SMF feature that some people like me that have switched to vBulletin may be missing
You'll undersand the goal of it better if you see a SMF forum

For instance in our forum we don't allow custom titles. Also this is useful so that the user can have a comment for his avatar or a sentence to comlete it's meaning. It's totally different from the usertitle. This has to do mostly with the avatar, not the user overall. This is also why the text is not displayed if the user doesn't have an avatar: there is no need to.

Also your code would get quite messy if a forum has many usergroups I think.

Thanks however for the alternative, maybe some people would need it
Reply With Quote
  #4  
Old 10-02-2005, 06:19 PM
Lea Verou Lea Verou is offline
 
Join Date: Jul 2005
Location: Greece
Posts: 1,856
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Just tested it and it works fine with 3.5 as well
Reply With Quote
  #5  
Old 10-03-2005, 12:54 AM
Reeve of shinra's Avatar
Reeve of shinra Reeve of shinra is offline
 
Join Date: Oct 2001
Location: NYC
Posts: 1,896
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thank you for sharing.
Reply With Quote
Reply

Thread Tools

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 10:34 AM.


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.03609 seconds
  • Memory Usage 2,245KB
  • Queries Executed 18 (?)
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_code
  • (4)bbcode_html
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (5)post_thanks_box
  • (5)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (5)post_thanks_postbit_info
  • (4)postbit
  • (5)postbit_onlinestatus
  • (5)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_display_complete
  • post_thanks_function_can_thank_this_post_start
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete