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

Reply
 
Thread Tools
Personal User Badges Details »»
Personal User Badges
Version: 1.00, by Jordan S Smith Jordan S Smith is offline
Developer Last Online: Jan 2014 Show Printable Version Email this Page

Category: Profile Enhancements - Version: 4.2.1 Rating:
Released: 07-29-2013 Last Update: Never Installs: 11
Template Edits
Re-useable Code Translations  
No support by the author.

This is something I came up with for a site I help manage. It gives users the option to set a custom badge that is displayed in the postbit_legacy. Sorry if I got the prefix wrong, I couldn't think which one this best belonged in.

Anyway, this is going to take advantage of template modification and profile field creation.

So, for starters, we're going to make the profile field that will be used for the badges. Open up your ACP and click on 'Add New User Profile Field'. Select 'Single-Line Text Box'. Title 'Personal User Badge'. Description can be whatever. Put it in the appropriate Profile Field Category.

Leave the default value blank. Make sure the field length is high, I use 100. That's for long image links. Set field length to 50. Don't mess with display order. Make sure field required is set to no. Field editable by user should be set to yes. Private field should be set to yes. This makes it so users can't see each others links. It makes the profile page look bad. Staff will still be able to see the links.

Field searchable on members list and show on members list should both be set to no. That's it, now click save. You should be redirected to the profile field manager.

When finished, it should look something like this when you click on edit:


Take note in the field manager of the 'name' column. This is important and will be needed later on. Find the 'name' for the newly created profile field.

Next your going to want to open your master style so this template edit will inherit. If it will not inherit you will have to add this manually to each individual style.

Find and open the template: postbit_legacy

Find this code:
Code:
<dl class="userinfo_extra">
You're going to want to place this before the closing tag:
Code:
<vb:if condition="$post['fieldxx']"><p style="text-align:center; margin-top:3px;"><img src="{vb:raw post.fieldxx}" alt="Badge" width="180" height="26"></p></vb:if>
So it will look like this:
Code:
<dl class="userinfo_extra">
    *stuff that's already here*
    <vb:if condition="$post['fieldxx']"><p style="text-align:center; margin-top:3px;"><img src="{vb:raw post.fieldxx}" alt="Badge" width="180" height="26"></p></vb:if>
</dl>
Now take the 'name' mentioned earlier. Replace the red text with that. Save your template and you're done!! Users can now add their own personal badges. Resolution is 180x26 by default. If you'd like to change that simply edit the green portions of the code.

If this receives enough attention I'll update with the personal links option. This allows users to set a link for their badges so that when users click on the image they'll be redirected.

EDIT: Here's a demo site.

I've directed you to a post by me. As you can see there are two badges. I used this feature to make one for staff only. That's how it will appear though.

EDIT2: Here's a screen capture of what it would look like for those of you who don't or can't view the demo site.

Screenshots

File Type: png Capture.PNG (136.7 KB, 0 views)

Show Your Support

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

Comments
  #2  
Old 07-30-2013, 06:49 AM
Jordan S Smith Jordan S Smith is offline
 
Join Date: Feb 2013
Posts: 16
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Reserved.
Reply With Quote
  #3  
Old 07-30-2013, 07:24 AM
K4GAP K4GAP is offline
 
Join Date: Mar 2008
Posts: 1,255
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Demo or images?
Reply With Quote
  #4  
Old 07-30-2013, 07:35 AM
Jordan S Smith Jordan S Smith is offline
 
Join Date: Feb 2013
Posts: 16
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by GaryT View Post
Demo or images?
Sorry about that. I've added the demo link.
Reply With Quote
Благодарность от:
stevieb
  #5  
Old 08-02-2013, 07:14 AM
Skyrider Skyrider is offline
 
Join Date: Feb 2006
Location: Netherlands
Posts: 1,392
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Demo's tend to go down in the future though (like the demo is down now), would be nice to show images in the main post uploaded on vbulletin.
Reply With Quote
  #6  
Old 08-02-2013, 04:49 PM
Amaury Amaury is offline
 
Join Date: Nov 2011
Location: Ellensburg, WA
Posts: 1,075
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by FF|Skyrider View Post
Demo's tend to go down in the future though (like the demo is down now), would be nice to show images in the main post uploaded on vbulletin.
The site's working fine.
Reply With Quote
  #7  
Old 08-02-2013, 06:08 PM
STR8H8TEx STR8H8TEx is offline
 
Join Date: Apr 2013
Posts: 10
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

down for me
Reply With Quote
  #8  
Old 08-02-2013, 06:30 PM
Amaury Amaury is offline
 
Join Date: Nov 2011
Location: Ellensburg, WA
Posts: 1,075
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by STR8H8TEx View Post
down for me
Well, it's working here.

It's most likely just you, so check and see what Down for Everyone or Just Me says.
Reply With Quote
2 благодарности(ей) от:
Jordan S Smith, megabink
  #9  
Old 08-06-2013, 10:59 PM
Jordan S Smith Jordan S Smith is offline
 
Join Date: Feb 2013
Posts: 16
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Once again, I have updated the OP. This time with a screen of how the modification would appear. Note, there are two in this screen because I used it twice. If you only want one, that's what this modification will give you. Lest you have the ingenuity to figure out how to place two within the postbit.

The link is not solely a demo site. It is an actual live forum. The site is currently working, I see no issues. As Amaury said, check to make sure that it's not something wrong on your end. I uploaded the image anyway for ease of access.

If you have any more issues viewing what this modification would look like, you'll have to try it out and see because I don't have any more options. I'm afraid anything short of a youtube video will not do any better.

Any further questions, please do not be afraid to PM me instead of flooding the thread with questions about what it looks like. If you do run into a problem using the modification, however, feel free to post in the thread.

Thank you.
Reply With Quote
  #10  
Old 08-09-2013, 03:45 PM
xFuZioNx xFuZioNx is offline
 
Join Date: Jul 2013
Posts: 1
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I know this may not be about this mod but can you tell me what size your avatars are for the unicorn? also can you tell me what mod you used for the online on that posts its pink and all that information, and what award system do you use?
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:25 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.07375 seconds
  • Memory Usage 2,326KB
  • Queries Executed 26 (?)
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
  • (3)bbcode_code
  • (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
  • (2)pagenav_pagelink
  • (10)post_thanks_box
  • (3)post_thanks_box_bit
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (2)post_thanks_postbit
  • (10)post_thanks_postbit_info
  • (9)postbit
  • (1)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_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
  • fetch_musername
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • 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
  • post_thanks_function_fetch_thanks_bit_start
  • post_thanks_function_show_thanks_date_start
  • post_thanks_function_show_thanks_date_end
  • post_thanks_function_fetch_thanks_bit_end
  • post_thanks_function_fetch_post_thanks_template_start
  • post_thanks_function_fetch_post_thanks_template_end
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete