Support Forum

Display One User Rank Instead of Multiple?

AA Acreo Aeneas
Acreo Aeneas
Member

With 4.4.5 users with special ranks only had their special ranks shown instead of both regular forum ranks and special ranks.  Is it possible in V5 to have special ranks take precedence over regular forum ranks?  So that if a user has a special rank assigned, their regular forum rank is hidden and only the special rank is shown?

10 Answers

New Answer

MP Mr Papa
Mr Papa
Member

of course. look in the theme you are using.  if using one of ours, you will see a call to display the special rank and one call to display the special rank…  remove the one you dont want…

if you want to make it conditional, the theme is simply php so you can do anything you can do in php wink  perhaps something like

if (empty($spThisPostUser->special_rank)) sp_PostIndexUserRank(‘tagClass=spPostUserRank spCenter’);

then it only outputs the forum rank if they dont have a special rank…

remember, we highly recommend you dont edit our themes, but instead copy it into your own theme or else you could lose any mods if you upgrade our themes…  our codex (http://codex.simple-press.com) shows you how to create your own theme…

AA Acreo Aeneas
Acreo Aeneas
Member

I don’t know PHP, so what would the call line I should look for look like?  Which line(s) should I replace with the line you wrote above?

MP Mr Papa
Mr Papa
Member

replace

sp_PostIndexUserRank('tagClass=spPostUserRank spCenter');

with

if (empty($spThisPostUser->special_rank)) sp_PostIndexUserRank('tagClass=spPostUserRank spCenter');

now, have to say this is untested, but think its right…

MP Mr Papa
Mr Papa
Member

ya know…  I think this should be another optional argument to the display forum rank template tag…  so ticket open and will get it added…

AA Acreo Aeneas
Acreo Aeneas
Member

Um, where do I go open a ticket for this?  Or are you telling me you already went ahead and opened a ticket?

MP Mr Papa
Mr Papa
Member

No, I already opened a ticket… and committed the changes… so if you are running from svn, you can svn up and get it… otherwise you can get if from the nightly builds later tonight or catch it in the next beta update…

MP Mr Papa
Mr Papa
Member

which method?

svn updates are instantly available…

nightly updates build every night but you have to manually apply the downloaded file…

updates through the wp updater are made when there are enough changes to warrant pushing out a new version…

If you are waiting for the wp updates, I would expect we would push out a new beta version next weekend…

AA Acreo Aeneas
Acreo Aeneas
Member

Mr Papa said

If you are waiting for the wp updates, I would expect we would push out a new beta version next weekend…

Yes, that’s the method I was thinking about.  Next weekend sounds good.  🙂

MP Mr Papa
Mr Papa
Member

you can see the change here (or is that can’t see?) as we now only show special ranks if one exists…