PDA

View Full Version : Ranking Structure


Guardian Hope
05-14-2015, 03:18 AM
You might say that this is the one last piece to the puzzle. I've ran vBulletin forums for years but they all adhered to that climbing ladder for ranking based on post count. In this case however, certain usergroups need a different type of ranking not based on post count.

For example, let's say we want to apply a user rank of "Captain" with a pip icon denoting as such to a particular person in a usergroup. How do i do this? Is there a way to do it with the built in system or a modification or do we really have to edit each user individually and give them the title.

At the same time, I want to do this without disrupting a user's ability to choose an avatar or if that's not possible add the user's profile picture to postbit_legacy.

Bare in mind that this is for vBulletin 4.2.2 PL4.

SaN-DeeP
05-15-2015, 06:18 PM
?? Sorry but explain more not as per your understanding, but as a layman developer understands ?
You will get answers for sure..

Guardian Hope
05-15-2015, 08:31 PM
?? Sorry but explain more not as per your understanding, but as a layman developer understands ?
You will get answers for sure..

Let's see, here's the best I can explain it in layman terms:


There a ranking ladder in vBulletin based off of post count;
We also want to have a way to apply a ranking not based on post count


I know this can be done from the "User Title" field but I was hoping there was a modification that can do this.

MarkFL
05-15-2015, 09:13 PM
You can use vBulletin's "User Rank Manager" for just such a purpose. :D

You can either choose to use images or text (HTML is allowed). On the forum I help administrate, I used HTML to create custom badges for our various staff usergroups:

https://vborg.vbsupport.ru/attachment.php?attachmentid=152484&stc=1&d=1431731476

It is pretty straightforward to use this to define badges or emblems for various usergroups. :up:

Guardian Hope
05-16-2015, 04:18 AM
You can use vBulletin's "User Rank Manager" for just such a purpose. :D

You can either choose to use images or text (HTML is allowed). On the forum I help administrate, I used HTML to create custom badges for our various staff usergroups:

https://vborg.vbsupport.ru/attachment.php?attachmentid=152484&stc=1&d=1431731476

It is pretty straightforward to use this to define badges or emblems for various usergroups. :up:

The problem is that this is the usergroup which is in question needs to have a multitude of badges that aren't defined by user minimum post count.

Take for example, our current phpBB implementation:

https://vborg.vbsupport.ru/attachment.php?attachmentid=152486&stc=1&d=1431756816

And we want to do the same with vBulletin 4 which looks like this at the moment:
https://vborg.vbsupport.ru/attachment.php?attachmentid=152487&stc=1&d=1431756887

Now bare in mind that this rank chain applies to one singular usergroup. I know it can be done with Title HTML Markup but I was hoping there was a more automated process of applying this.

The User Rank Manager doesn't seem to have any adjustable options from within the User Settings itself though that might be because no Ranks have been defined yet.

MarkFL
05-16-2015, 02:13 PM
I will admit I am not very clear on what you're trying to do. What I do is assign each rank to a specific usergroup, and then certain users may be members of several usergroups so that they will have multiple badges.

Guardian Hope
05-16-2015, 03:28 PM
I will admit I am not very clear on what you're trying to do. What I do is assign each rank to a specific usergroup, and then certain users may be members of several usergroups so that they will have multiple badges.

Which would tell me that there is no way to apply a ranking ladder to a singular usergroup that didn't rely on post count. You had to create multiple usergroups which then resulted in allowing you to create multiple badges as you put them.

That would seem like it would get messy as there are 40 separate ranks that would apply to this usergroup and 42 total non-post based ranks.

It would mean the addition of 42 usergroups which I guess could be done by basing their permissions off of the parent group and then using the User Rank Manager to apply the appropriate rank badge.

That would make it a point and click process over having to edit the User Title Markup.

MarkFL
05-16-2015, 03:38 PM
What do you need this ranking system to based on, rather than post counts?

cellarius
05-16-2015, 07:32 PM
It would mean the addition of 42 usergroups which I guess could be done by basing their permissions off of the parent group and then using the User Rank Manager to apply the appropriate rank badge.

No. You need to learn how secondary usergroups work. No need to replicate permission sets. Set everything to no and assign the usergroup as secondary. Yes always overrules no, so the no works like a not specified in this case.

Guardian Hope
05-16-2015, 09:20 PM
What do you need this ranking system to based on, rather than post counts?

Our own whim actually. There's a two tiered membership system and while the general community membership is based on post counts the upper tier membership is not. It does seem that it's becoming more and more apparent that apply 42 secondary groups would allow for the upper tier to display the proper rank chain without having to mess with the HTML markup every time.

No. You need to learn how secondary usergroups work. No need to replicate permission sets. Set everything to no and assign the usergroup as secondary. Yes always overrules no, so the no works like a not specified in this case.


Your rudeness not withstanding it seems that you ironically need to read what you wrote. To have a secondary usergroup those usergroups have to exist which still means the addition of 42 usergroups; it doesn't matter if their permissions are set all to "no." It's still adding 42 usergroups and than making them members of the secondary group as well as the primary group that needed the chain to begin with.

This tells me that essentially vBulletin doesn't have such a function built in and there's likely no modification that can replicate that either.

42 Secondary Usergroups it is it seems. Which makes sense, I don't recall any such feature even in the vBulletin 3.x days.

MarkFL
05-16-2015, 09:33 PM
It may also be possible to accomplish what you want using a hidden custom profile field, and is editable only by certain groups (who along with the user are the only ones who can see the this field). Then, based on the value in that field, a conditional statement in the postbit template (or in a plugin) can be used to display the correct badge.

cellarius
05-17-2015, 05:55 AM
[B]Your rudeness not withstanding
So sorry you took my answer as rude. Can't be helped, though, be my guest.

Your answer now just tells me that you did not bother to read (or understand) my answer, and that indeed you have not fully understood how permissions work in vB. Of course, its entirely up to you to ignore my advice and replicate complete permission sets (see, that's what I was talking about). Of course you will have to create those 42 usergroups, I never said otherwise. If you replicate permission sets, I just hope you never decide to change anything with those permissions. Because then you'll realize that you may have to replicate that change in 42 secondary usergroups, too.

But since my advice is clearly not wanted, I'm out of here.

Lynne
05-17-2015, 04:37 PM
It sounds like you just want to be able to give individuals some 'ranks'/'titles' that you pick and that they really have nothing to do with 'ranks' themselves? If so, you may want to create a new Profile Field that is not editable by the user and is private. Then enter some image name - image.png - into the field for those that deserve this new image. Then just put in the postbit something like"
<vb:if condition="$post['fieldx']"><img src="path/to/images/{vb:raw post.field2}" alt="something" height="yyy" width="zzz" ></vb:if>

I've never tried this, so I don't know if it works. Try it on your test site before implementing it on your live site.

MarkFL
05-17-2015, 07:17 PM
It sounds like you just want to be able to give individuals some 'ranks'/'titles' that you pick and that they really have nothing to do with 'ranks' themselves? If so, you may want to create a new Profile Field that is not editable by the user and is private. Then enter some image name - image.png - into the field for those that deserve this new image. Then just put in the postbit something like"
<vb:if condition="$post['fieldx']"><img src="path/to/images/{vb:raw post.field2}" alt="something" height="yyy" width="zzz" ></vb:if>

I've never tried this, so I don't know if it works. Try it on your test site before implementing it on your live site.

We have been discussing it some and this is essentially what we are going to do (and it works well :D), although I am going to render a custom template at:

$template_hook['postbit_userinfo_left']

just so the OP won't have to edit the postbit template.

The custom profile field will only be editable in the AdminCP.

Guardian Hope
05-17-2015, 08:59 PM
Yes, Mark has been very helpful and we are working to get a solution to this. At first it seemed we were going to attempt it via numbers but since the images are actually named (and so we won't have to remember what number applies to what) it looks like we're going to go with the approach where it calls the image by name.

I was at the doctors as I told him but now that I'm back and will have a remarkable amount of free time being ill, I am going to start inserting what Mark has suggested so far.

42 ranks; it's a lot of typing but it seems it will be worth it in the end as it will ease the burden for people who need the administrate the ranks to this one usergroup.

MarkFL
05-19-2015, 03:28 AM
Okay, here's what I did:

1.) Edit the custom profile field so that its length can contain multiple file names (I like powers of 2 so I used 2^7 = 128)

https://vborg.vbsupport.ru/attachment.php?attachmentid=152509&stc=1&d=1432012724

2.) On my dev site, I went to a random user's profile in the User Manage within the AdminCP and entered the names of two image files I created for testing (separated by a comma):

https://vborg.vbsupport.ru/attachment.php?attachmentid=152510&stc=1&d=1432012724

Note: The add-on assumes the images have the extension "jpg" and are located off the root directory at "static/ranks". The images are stacked from top to bottom in the order in which they are entered into the profile field.

3.) Then I went to a thread where that user has posts, and made sure the images show up in the postbit:

https://vborg.vbsupport.ru/attachment.php?attachmentid=152511&stc=1&d=1432012724

So, please download the attached XML file and install it by following:

AdminCP ► Plugins & Products ► Manage Products ► Add/Import Product.

Click on "Choose File" and browse to the product xml file that you downloaded.

Click "Import"

Let me know about any changes you would like or if something doesn't work as expected. :D

Guardian Hope
05-19-2015, 08:13 AM
This appears accurate; allowing for the rank badge and the appropriate wings to appear.

To clarify one thing from our correspondences, you had me create a radio selection as opposed to a single line text box. I assume I should convert the radio selection to single line?

After that, all one will have to do is type "admiral,redwings" to get badge 1 as Admiral and Badge 2 as the Red Wings so as long as the images are in /static/ranks (with jpg extensions of course)

MarkFL
05-19-2015, 08:19 AM
This was what I originally sent:

Title: User Rank Level
Description: Used to determine which rank badge to display in user postbits.
Profile Field Category: Ranking (radio button option)
Default Value: 0
Max length of allowed user input: 2
Field Length: 2
Profile Field Type: Single-Line Text Box
Display Order: 5
Field Required: No
Field Editable by User: No
Private Field: Yes
Field Searchable on Members List: No
Show on Members List: No
Regular Expression: (leave blank)
Display Page: Options: Other

But, yes it should be:

Profile Field Type: Single-Line Text Box

And then change the following:

Max length of allowed user input: 128
Field Length: 128

Everything else is correct. :D

Guardian Hope
05-19-2015, 08:49 AM
Excellent. I will get this installed this evening and let you know if everything is working.

And again, I do appreciate the effort you've gone through to create this for me.

--------------- Added 1432094459 at 1432094459 ---------------

Hey Mark,

I got your plugin installed and working though I did have to make two modifications to the XML file:


The image source referenced it as /forums/static/ranks; easy fix - changed it to ../static/ranks
I had to change 'field6' to 'field7' since it is now a single line text box.


However, I was wondering if there was a way to get it to display directly under the username and above the user title. Right now it displays like this:

https://vborg.vbsupport.ru/external/2015/05/1.png?1

The only reason you don't see the wings yet is I didn't specify them as I haven't pulled them from the phpBB forums yet.

This however is an excellent modification and will make the lives of so many people on our board easier once we make the switch to vBulletin in June.

(Yes, I got to be that person who double posts; I feel so ashamed; that's always bad forum etiquette.

--------------- Added 1432106733 at 1432106733 ---------------

One final post which will be merged with the one above it.

Mark has been excellent in helping me get this setup. I even built on his extension to separate the wings since it looked nicer below the user title.

Here's the final result:

https://vborg.vbsupport.ru/external/2015/05/2.png?1

thetechgenius
05-21-2015, 10:47 AM
Do you mean something like this :

https://vborg.vbsupport.ru/


I setup my forum with custom ranks based on post count, but instead of ranks they are Levels. The first image is the Usergroup image, the image at the bottom is the user Rank Level. I custom coded my postbit legacy just for my forum though, so that feature its not in vBulletin by default. But if you need help with the code, I could help you. Just let me know.

In your case you could change the levels with your own images.

I am not sure what you mean by you don't want the ranks to be based on Post Count. How do you want them to work or increase in rank? If you just want only a few people in a usergroup to have a specific rank/badge image, I think the only way to do that is to edit the users rank yourself via AdminCP. As far as I know anyway, but I could be wrong.

Guardian Hope
05-21-2015, 09:33 PM
Do you mean something like this :

https://img.thetechgenius.net/di/W9HL/ttg_rank_levels.png


I setup my forum with custom ranks based on post count, but instead of ranks they are Levels. The first image is the Usergroup image, the image at the bottom is the user Rank Level. I custom coded my postbit legacy just for my forum though, so that feature its not in vBulletin by default. But if you need help with the code, I could help you. Just let me know.

In your case you could change the levels with your own images.

I am not sure what you mean by you don't want the ranks to be based on Post Count. How do you want them to work or increase in rank? If you just want only a few people in a usergroup to have a specific rank/badge image, I think the only way to do that is to edit the users rank yourself via AdminCP. As far as I know anyway, but I could be wrong.


Thank you for your kind offer but MarkFL was able to write an extension that I have been able to use to meet our needs.

To better explain to you what was going on is that with the change from phpBB to vBulletin planned for June an introduction of a two tiered membership system is being imposed:


Community Members - Ranked by post count; this is your traditional user
Fleet Members - this is the higher tier membership and its ranking is not based on post count but on earning your way up a ranking chain through actions they take within the community and other aspects that we participate in. We look at how people contributed over the course of a month and then make decisions on where they are to be placed; there are several echelons as well which is where the "wings" came in; a tradition held up since 2002.


vBulletin didn't have the function built in to accommodate something we had been doing since 2002 but Mark was able to build an extension to accommodate this which I later modified into two so that the Wings for each echelon displayed below the user title while the rank displayed above.

Community Members on the other hand will use the built in vBulletin ranking system because their rank is built in post count as part of the community.

thetechgenius
05-22-2015, 12:47 AM
Thank you for your kind offer but MarkFL was able to write an extension that I have been able to use to meet our needs.

To better explain to you what was going on is that with the change from phpBB to vBulletin planned for June an introduction of a two tiered membership system is being imposed:


Community Members - Ranked by post count; this is your traditional user
Fleet Members - this is the higher tier membership and its ranking is not based on post count but on earning your way up a ranking chain through actions they take within the community and other aspects that we participate in. We look at how people contributed over the course of a month and then make decisions on where they are to be placed; there are several echelons as well which is where the "wings" came in; a tradition held up since 2002.


vBulletin didn't have the function built in to accommodate something we had been doing since 2002 but Mark was able to build an extension to accommodate this which I later modified into two so that the Wings for each echelon displayed below the user title while the rank displayed above.

Community Members on the other hand will use the built in vBulletin ranking system because their rank is built in post count as part of the community.


Oh ok, I see. I am glad everything worked out for you!