The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
User Ranks - (In)Famous Stars - [CENTER]?
Hello there,
I've recently stumbled onto a weird problem, well, it's not vBulletin' fault, it's just I want to customize this one simple thing within users' postbit area. Default settings: if you create a rank, make it a single .png and then set it to repeat itself, when it reaches the edge of the postbit area, it jumps onto next line, but aligns to the left. My goal: I want it to align to the center, when on the second line. Please, check out the attachment screenshot. Thanks, ~tEh'P?r4d0x |
#2
|
||||
|
||||
Have you tried editing the postbit_legacy template?
Find: Code:
<span class="rank">{vb:raw post.rank}</span> Code:
<div class="rank" style="text-align:center;">{vb:raw post.rank}</div> |
#3
|
|||
|
|||
Hi Iain,
thank, I've luckily figured this out just a couple of minute, before you posted this message, I used this code: Code:
<vb:if condition="$post['rank']"> <ul><span style="text-align: center;"><span class="rank">{vb:raw post.rank}</span></ul> </vb:if> Anyway, your solution is much cleaner, so I will stick with it next time. Also, I got 2 additional question, I hope you won't be mad. 1st - speaking of postbit_legacy, I did find it via admin CP, but in what file on the FTP is it actually integrated? 2nd - how center this within the user's area? And one more thing, but this one is really tough one: we got 3 sets of rank images, first one is a simple star.png, which repeats itself up to 10 stars, second one is just another star_2.png, which also repeats up to 10 images, that's why I wanted to center it and that's what the screenshot shows. But then we got 3rd set of images, which are set to not repeat, so 1 rank = only 1 image always and I want to keep those aligned to the left, just as it is by default. Any idea, would that even be possible? Or this is like an superb advanced vBulletin customization class, heh. My experience with vB are like 5 days. ;| Best Regards, ~tEh'P?r4d0x |
#4
|
||||
|
||||
1. Templates are stored in the database.
2. What do you mean by users area? 3. I've not got time to look into it, but you could maybe check if the rankid = non repeating rankid text-align: left, else text-align: center |
#5
|
|||
|
|||
Thank you for the quick reply Iain!
Thing with the templates actually explains, why it can be only accessed via ACP, anyway.. Here a couple of more attachments: And really, really the last thing: we got 10 stars over there, what if I wanted to limit the first row only to 7, just like it is in the postbit, I know, it's because in the postbit isn't enough space and it randomly (because of the size) cut it behind 7th star and placed the other 3 on the 2nd line, but what if we want to do the same in user's profile? Greatly appreciate your help, ~tEh'P?r4d0x |
#6
|
||||
|
||||
To fix it on the member profile, have a look in the MEMBERINFO template, and change the width of the block containing the username/title/rank etc.
|
#7
|
|||
|
|||
Hi again,
thanks for helping, I just hope, we can get over with it soon. ;| The MEMBERINFO area is still causing troubles, the "div" doesn't seem to have any affect on it, which is weird, in the postbit_legacy it worked as a charm. Let's forget for a while about adding the restriction for how many stars it should allow it per a line, etc. Just center it. Any ideas, why the parameter "prepared" doesn't accept it? Thanks, ~tEh'P?r4d0x |
#8
|
||||
|
||||
I'm not quite sure why it's not working in the memberinfo template, it could be inheriting the behavior from another surrounding div.
|
#9
|
|||
|
|||
Quote:
Thanks, ~tEh'P?r4d0x --------------- Added [DATE]1331739771[/DATE] at [TIME]1331739771[/TIME] --------------- Finally have figured it out! Great thanks again Iain. It was just like you said. I misread it and didn't realize, it was wrapped around in higher level tags. All I had to do was to move the <vb:if> out of it and it worked as intended. Code:
... code ... </h1> <vb:if condition="$prepared['rank']"> <br /> <span class="rank">{vb:raw prepared.rank}</span> </vb:if> <div id="userinfoblock" class="floatcontainer"> ... code continues ... ~tEh'P?r4d0x |
#10
|
||||
|
||||
Great! Glad you got it sorted =]
|
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|