Register Members List Search Today's Posts Mark Forums Read

Reply
 
Mod Options
Individual Pseudo-Usergroup Icon in Postbit Details »
Individual Pseudo-Usergroup Icon in Postbit
Mod Version: 1.1, by TygerTyger (Member) TygerTyger is offline
Developer Last Online: Jul 2012 I like it Show Printable Version Email this Page

This modification is in the archives.
vB Version: 3.6.0 Beta 3 Rating: (0 vote - 0 average) Installs: 6
Released: 10 Jul 2006 Last Update: 13 Jul 2006 Downloads: 21
Not Supported Template Edits  

Requested by people who wanted to choose a small icon by their name like I gave to moderators and admins via Usergroup Markup code. Obviously if it's done by usergroup it can't be done for individuals (and frankly it looks like a minor disaster in WOL if every user has an icon). This way, with only template changes, it can.

Screenshot at the bottom of the post!

INSTRUCTIONS:
AdminCP > User Profile Fields > Add New User Profile Field

Single-Line Text Box

Title: Username Icon
Description: If you would like an icon to appear next to your username when you post on the forum, enter the URL ONLY in the text box below. Do NOT include the http:// part. Maximum permitted size is 16x16 pixels.
Obviously change the pixel dimensions to whatever dimensions you would like user to post, 16x16 looks right to me.
Default Value: imagename.gif

...A few settings here which are up to your own discretion...

Profile Field Type: Single-Line Text Box
Field Required: No.
Field Editable by User: Yes
Private Field: No.
Field Searchable on Members List: No
Show on Members List: No

Which page displays this option? Edit Profile

Save the page and make a note of the field number for this custom field which is shown in the list on the User Field Manager page. If it is your first custom field then it will be field6.

Now go to AdminCP > Styles & Templates > Style Manager > Edit Templates and edit your postbit(_legacy) template.

FIND:

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

REPLACE WITH:

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

Making sure you change fieldX to field6 or the correct field number appropriate for you.

Next go to AdminCP > Styles & Templates > Style Manager > Main CSS and copy and paste the following code into the custom CSS text box at the bottom of the page, again changing the width and height pixel numbers to match the maximum size of the icon you want your members to use.


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

And you're done! All your members now have to do is visit UserCP > Edit Profile and paste the URL of their chosen icon into the Username Icon text box.

Three things for you to note: There's no real restriction on the size of image people can use. The CSS ensures it won't show break your layout, since no matter how big a picture they choose only 16x16 pixels of it will show up. But it will show down page load times and waste your users bandwidth with large images, so be observant.

Secondly, this does not interfere with Usergroup Markup so you can specify an image there as well if you like.

Thirdly, this will only display to logged-in users. vBulletin does not allow Guests to pull custom user-field data so there won't be a fix as long as it remains a template mod.

Demo:


The Username Icon is the red rose on the left, the Usergroup Icon is the yellow rose on the right. If there is no Usergroup icon it will display where the yellow rose is.


Fix:
The http:// part of the URL is now set in the template code and not the user-defined text to stop the layout breaking if plain text is defined instead of an image URL. The default field text and description have been changed to reflect this. The alt text has been set to nothing for the same reason.
Fix:
CSS has been thoroughly kerjiggered so a block div will display inline next to the username. Or anything else for that matter.
Fix:
Changed the mod name to something terrible.
Fix:
IE Conditional to fix erratic IE rendering. Now aligns properly.
Fix:
AJAX posting will no longer makes the icon appear/disappear in new posts.


Current Issues
Mod name is something terrible but more accurately desciprtive.

Download Now

Only licensed members can download files, Click Here for more information.

Show Your Support

  • To receive notifications regarding updates -> Click to Mark as Installed.
  • This modification may not be copied, reproduced or published elsewhere without author's permission.
Comments
  #2  
Old 10 Jul 2006, 14:34
TygerTyger TygerTyger is offline
 
Join Date: Aug 2005
Hm, the CSS isn't quite right and I can't find a way to delete the modification. Odd.

Disregard this mod until I can fix it.

Edit: Fixed. Post reserved, I guess.

Last edited by TygerTyger; 11 Jul 2006 at 12:22.
Reply With Quote
  #3  
Old 10 Jul 2006, 18:42
Snake's Avatar
Snake Snake is offline
 
Join Date: Mar 2005
Location: Cleveland, OH
Real name: Josh
Please get over it ASAP. I can't wait to have this installed on my forums!
Reply With Quote
  #4  
Old 11 Jul 2006, 12:38
TygerTyger TygerTyger is offline
 
Join Date: Aug 2005
Mod updated to fix the major bugs. The CSS, Template code and Custom Field text have all been changed.
Reply With Quote
  #5  
Old 13 Jul 2006, 11:37
TygerTyger TygerTyger is offline
 
Join Date: Aug 2005
Updated again to fix erratic display in IE and funny little AJAX quirk.
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Mod Options

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


New To Site? Need Help?

All times are GMT. The time now is 18:22.

Layout Options | Width: Wide Color: