The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
Comments |
#52
|
|||
|
|||
Well I don't personally use this mod but was asked if I'd look at converting the template code.
I can't say if this will work for converting the whole mod as I haven't looked at the zip files, but the template code would need to be this: PHP Code:
However, the issue you're going to have by doing that, is that, while the above will work, it will stop the default memberinfo dropdowns from appearing at all. To sort that, the conversion needs to go into the memberaction_dropdown template, but that's going to be more complicated since that template is used in various places and uses different variables. In short, it's a more complicated conversion than it looks due to the substantial changes in the way vB4 displays usernames in the postbit compared to vb3. My solution for this would be the same as what I did for a similar mod that I do use...and that's the make a copy of the relevant code from the memberaction_dropdown template, add this mod to it, and stick it into the postbit template in place of {vb:raw memberaction_dropdown}. I hope that makes sense, and I hope it points people in the right direction. |
#53
|
|||
|
|||
Quote:
I've attached a screenshot. As for the ZIP file, it only contains the changes: Code:
Hi folks, if you're reading this you want to change the username to an image, well follow the simple steps below to do this. Don't forget to mark as installed on the modification thread. First of all you need to create a new profile field, so in your AdminCP scroll down to User Profile Fields, and select Add New User Profile Field. Then select Sing line text box. Then fill out the details as follows: Title: Username Image Description: Have your username displayed as an image. Enter the full URL to the image location (including the http://) Profile Field Category: (If you have created categories you can select whatever, if not it's not important) Default Value: THIS MUST BE LEFT BLANK Max length of allowed user input: You can leave this as the default. Field length: You can leave this as default Profile Field Type: Make sure single line text box is selected Display order: (Anything you like) Field required: No Field Editable by user: ( I would highly reccommend setting this to no as this is in beta, this way only admins will be able to add an image for someone) Private Field: No Field Searchable on Members List: No Show on Members List: No Regular Expression: Leave blank Which page displays this option: Edit Your Details Then press Save. It will then take you to a list of profile fields, where you should now see Username Image. Make sure you make a note of the field name (field#). Next go to: AdminCP > Styles & Templates > Style Manager > Click on the dropdown box for the style you want to apply this to, and selct Edit Templates. Scroll down the list to Postbit Templates and double click on this The scroll down to Postbit (or Posbit Legacy if you use vertical postbits) *******FIND:******* <div id="postmenu_$post[postid]"> <if condition="$show['profile']"> <a class="bigusername" href="member.php?$session[sessionurl]u=$post[userid]">$post[musername]</a> $post[onlinestatus] <script type="text/javascript"> vbmenu_register("postmenu_$post[postid]", true); </script> <else /> $post[musername] </if> </div> ********AND REPLACE WITH******* <div id="postmenu_$post[postid]"> <if condition="$show['profile']"> <a class="bigusername" href="member.php?$session[sessionurl]u=$post[userid]"><if condition="$post['field11']"><img src="$post[field5]" width="120" height="30" /> <else />$post[musername]</a></if> $post[onlinestatus] <script type="text/javascript"> vbmenu_register("postmenu_$post[postid]", true); </script> <else /> $post[musername] </if> </div> --- WHERE YOU SEE FIELD5 REPLACE THIS WITH THE FIELD NAME OF YOUR USERNAME IMAGE PROFILE FIELD. WHERE YOU SEE width="120" height="30", change the values to the size you want to display. --- ############################################Further Locations you can replace username text with the username image################################################# -------On Member's profile:------- *********Open template Member info templates > MEMBERINFO ******* *******FIND:******* $prepared[musername] *******AND REPLACE WITH:******* <if condition="$bbuserinfo['field5']"><img src="$bbuserinfo[field5]" width="120" height="30"/> <else />$prepared[musername] </if> -------In Who's online------- *******Open template Who's online templates > whosonlinebit******* *******FIND:******* <a href="member.php?$session[sessionurl]u=$userinfo[userid]">$userinfo[musername] *******AND REPLACE WITH:******* <a href="member.php?$session[sessionurl]u=$userinfo[userid]"><if condition="$bbuserinfo['field5']"><img src="$bbuserinfo[field5]" width="120" height="30" /> <else />$userinfo[musername]</if> ###################################################################################################################################################################### That's it! |
#54
|
||||
|
||||
Great job, SPANK! I like it !! DL'ed - installed and voted for MOTM
|
#55
|
|||
|
|||
I guess no one is able to convert it to vb4 properly.
|
#56
|
|||
|
|||
Can someone please convert this to vB4?
|
#57
|
|||
|
|||
I'll be willing to pay 10usd for it
|
#58
|
|||
|
|||
I'v made this mod work for vbulletin 4.1.5
Find "Postbit" in styles, find: Code:
<div class="username_container"> <vb:if condition="$post['userid']"> {vb:raw memberaction_dropdown} {vb:raw post.onlinestatus} Code:
<div class="username_container"> <vb:if condition="$post['userid']"> <div id="postmenu_{vb:raw post.postid}"> <vb:if condition="$show['profile']"> <a href="member.php?{vb:raw session.sessionurl}u={vb:raw post.userid}"> <vb:if condition="$post['field5']"> <img src="{vb:raw post.field5}" border="0" /></a> <vb:else />{vb:raw memberaction_dropdown}</a> </vb:if></vb:if> {vb:raw post.onlinestatus} </div> if you have any questions, or need some help, add me on skype: theflash178 Thanks, Loaep |
#59
|
|||
|
|||
Quote:
This would solve a lot of complexity |
#60
|
|||
|
|||
is this work for 4.2?. Please
|
Thread Tools | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|