Register Arama Bugünkü Mesajlar Tüm Forumu Okundu Say

Reply
 
Thread Tools
Style-Specific Rank Images
vB.Org Poster
vB.Org Poster has disabled reputation
Kayıt Tarihi: Jul 2018
Mesajlar: 298

Show Printable Version Email this Page
Makale: vBulletin 3 Makaleleri, yazan vB.Org Poster 10 Jul 2018, 18:34

As someone who used phpBB2 for the longest time, I was surprised to find that vBulletin 3x doesn't make the same accommodations for those who want to add style-specific rank images, or rank images that appear only for the style(s) you want. There was nothing in the "Mods" section that seemed to address the issue, and though there are plenty of requests to be found in the topics lists of vB org, vB com, and other vB sites, the most common answer is that it cannot be done (unless someone submitted a mod). A less frequent response, but the most promising one, is to use the Replacement Variable Manager in the AdminCP. Unfortunately, this method did not work for me. Also, some novice administrators may have trouble properly using replacement variables, as even seasoned vBulletin users acknowledge that it could be tricky.

That said, I discovered a method that I think is simpler, and I owe thanks to the user who submitted the helpful post I unexpectedly found in an only somewhat relevant topic from 2004. That post, "vBulletin.org Forum - View Single Post - Groupicons," informs the reader that, by inserting a certain code into the "postbit"—or "postbit_legacy", if user info is aligned to the left of each post— template, you can get any icon to appear based on what user group that member belongs to (e.g., Administrator, Moderator, Member, and etc).

Obviously, since the code is applied to the file ("postbit" or "postbit_legacy") of the one style, the image(s) you choose will only appear in that style. Anyways, here is that code:


Kod Blok Kilitli:      (Kayıt veya giriş yapmalısın)  
Engellenmiş, kayıtlı olmayan veya onay bekleyen kişiler kodlara erişemezler.

The person who provided this code said that "x" should be replaced by the user group ID (found in drop-down box in AdminCP > Usergroups). In addition, "IMG VAR HERE" should be replaced with the HTML for the image you want to display (more on that below).

Now, using the above code as my starting point, I took a look at the "postbit" template for my forum's default template, Enlighten. The point where the above code should be inserted is inline directly after this:


Kod Blok Kilitli:      (Kayıt veya giriş yapmalısın)  
Engellenmiş, kayıtlı olmayan veya onay bekleyen kişiler kodlara erişemezler.

As you know, that last line starting with "<if" and ending with "</div>" is what displays the text rank under your user name (and user title, if you have one). So here is how I modified the above code:


Kod Blok Kilitli:      (Kayıt veya giriş yapmalısın)  
Engellenmiş, kayıtlı olmayan veya onay bekleyen kişiler kodlara erişemezler.

That is taken from the Enlighten template. Here is how it looks on Greenfox, my other template, though:


Kod Blok Kilitli:      (Kayıt veya giriş yapmalısın)  
Engellenmiş, kayıtlı olmayan veya onay bekleyen kişiler kodlara erişemezler.

Don't worry about using a "<br />" tag or equivalent, as the rank image will automatically place itself below the text rank, and there will be no added line brakes no matter how many rank images you add. Also, if you closely inspect the code, you'll notice that I made some of the rank image files repeat. The reason is this: for members, I have ten text ranks, but my rank images are five stars that fill up the more you post, so I want regular members to be promoted two ranks before receiving another star.

For use at your forum, just replace the usergroup IDs with yours, and replace the directories with the ones you use for each of your templates.

There you go: style-specific rank images. I have not tried it, but I wouldn't be surprised if you can even add more than one rank image for a given user group by placing additional image variables inside the conditional for that user group. In any case, please note that the rank image will not display below the text rank in the view member profile page (that is another edit).

By Kevin Malone of The Infinity Program.
Views: 30
Reply With Quote
Reply

Thread Tools

Şunları Yapabilirsin
Yeni Konu Açmak
Konuya Cevap Yazmak
Eklenti Eklemek
Düzenleme Yapabilmek

Forum Atla


LD'de Yeni misin? Yardıma mı ihtiyacın var?

All times are GMT +3. The time now is 04:48.

Tasarım Özelliği | Genişlik: Geniş Renk: Style-Specific Rank Images Style-Specific Rank Images Style-Specific Rank Images Style-Specific Rank Images Style-Specific Rank Images