The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
Custom Postbit for Specific Members
Let me preface this by saying I don't know much at all about coding. So, please forgive me if my questions don't make sense, and I will appreciate any patience you can spare me. Apologies in advance if this gets a little long, but I want to be as clear and thorough as possible.
I want to customize the way an individual member's postbit looks like. I've got it setup currently so that reputation is displayed as the actual number underneath the post count, like so ― Instead of calling up the stored rep value for that particular member, I want the postbit to simply display to everyone some text of my choosing (the symbol for infinity, in this case). I was hoping I'd be able to stumble my way through the code and get what I wanted, but my efforts were met with frustration. I found the part of the postbit template for displaying rep, and it looked like this ― <span id="repdisplay_$post[postid]_$post[userid]"><b>Reputation:</b> $post[reputation]</span>My best guess to accomplish what I set out to do was to have two copies of that in an if/else deal, where the conditional was looking for the specific user and would display the infinity symbol if true or default to the original code if false. My attempt at that resulted in this code ― <if condition="$userid[14]">Nothing happened, hence this thread. If the above is laughable, remember that I don't know the first thing about coding and have pity. So, how can I get it to do what I want? |
#2
|
|||
|
|||
You have to use two conditional statements for each postbit you want displayed.
|
#3
|
|||
|
|||
Sorry, not quite sure what you mean. I think the best way to help me would be to just give me the code for what I want to do (if I've explained what I want to do clearly enough), because I'm not ready for understanding.
|
#4
|
||||
|
||||
That kind of makes me laugh...."I think the best way to help me would be to just give me the code for what I want to do". Anyway, you had half the code.
Code:
<if condition="$vbulletin->userinfo['userid'] == 14"> <span id="repdisplay_$post[postid]_$post[userid]"><b>Reputation:</b> ∞</span> <else /> <span id="repdisplay_$post[postid]_$post[userid]"><b>Reputation:</b> $post[reputation]</span> </if> |
#5
|
|||
|
|||
Heh, yeah. I wasn't in the mood for learning, and I was trying to express that delicately.
Anyways, thanks for responding, but I still can't get it working. I don't suppose it makes a difference if I'm using the legacy postbit (I am making the changes in the correct template). |
#6
|
||||
|
||||
Are you sure your userid is 14?
|
#7
|
|||
|
|||
$vbulletin->userinfo['userid'] == 14
should be $post[userid]==14 or: $bbuserinfo[userid]==14 cause it's a template. |
#8
|
|||
|
|||
That did the trick. Thank you very much, tehste, and thanks to Dismounted as well.
|
#9
|
|||
|
|||
Quote:
$vbulletin->userinfo[] and $bbuserinfo[] point to the same thing and both can be used in the templates without any problems. However both of them contain user data for the user currently viewing the page So in this case you'd want to use $post[]. |
Thread Tools | |
Display Modes | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|