Forum breadcrumbs – You are here:Asgaros Support ForumTips & TricksRanks on the forum
Please or Register to create posts and topics.

Ranks on the forum

Page 1 of 3Next

Add the the rank to the forum:

  1. administrator
  2. moderator
  3. contributor
  4. author
  5. editor

To do this you just have to add this code to your themes functions.php file:

add_action('asgarosforum_after_post_author', 'my_asgarosforum_after_post_administration', 10, 2);
function getUserRoles($id) { 
    $user = new WP_User((int)$id); 
    return implode(' and ', $user->roles); 
}
function my_asgarosforum_after_post_administration($author_id, $author_posts) {
global $asgarosforum;
if (getUserRoles($author_id)=='administrator') {
    echo '<div class="icon-status-admin">'.__('Admin','rcl-asgaros').'&nbsp;<i class="fa fa-info-circle"></i></div>';
  } else {
    if ($asgarosforum->permissions->isModerator($author_id)) {
    echo '<div class="icon-status-moderator">'.__('Moderator','rcl-asgaros').'&nbsp;<i class="fa fa-info-circle"></i></div>';
  } else {
  if(getUserRoles($author_id)=='contributor') {
  echo '<div class="icon-status-contributor">'.__('Contributor','rcl-asgaros').'&nbsp;<i class="fa fa-info-circle"></i></div>';
  } else {
  if(getUserRoles($author_id)=='author') {
  echo '<div class="icon-status-author">'.__('Author','rcl-asgaros').'&nbsp;<i class="fa fa-info-circle"></i></div>';
} else {
  if(getUserRoles($author_id)=='editor') {
  echo '<div class="icon-status-editor">'.__('Editor','rcl-asgaros').'&nbsp;<i class="fa fa-info-circle"></i></div>';};	
           }	
         }
      }
    }
  }

Names can be changed  🙂

 

Got it to work the second time around, thanks!

I forgot to add styles

/* rcl-af-integration */
#af-wrapper .icon-status-indent{
padding-left:5px;
}
#af-wrapper .icon-status-admin{
font-size: 13px;
font-weight:bold;
color: #F43D2A;
}
#af-wrapper .icon-status-moderator {
  font-size: 13px;
  font-weight:bold;
    color: #469AC6;    
}
#af-wrapper .icon-status-contributor{
font-size: 13px;
font-style: normal;
color: #E3BB24;
}
#af-wrapper .icon-status-author{
font-size: 13px;
font-style: normal;
color: #099922;
}
#af-wrapper .icon-status-editor{
font-size: 13px;
font-style: normal;
color: #099922;
}

 

Quote from Yworld on January 18, 2017, 7:11 pm

I forgot to add styles

/* rcl-af-integration */
#af-wrapper .icon-status-indent{
padding-left:5px;
}
#af-wrapper .icon-status-admin{
font-size: 13px;
font-weight:bold;
color: #F43D2A;
}
#af-wrapper .icon-status-moderator {
  font-size: 13px;
  font-weight:bold;
    color: #469AC6;    
}
#af-wrapper .icon-status-contributor{
font-size: 13px;
font-style: normal;
color: #E3BB24;
}
#af-wrapper .icon-status-author{
font-size: 13px;
font-style: normal;
color: #099922;
}
#af-wrapper .icon-status-editor{
font-size: 13px;
font-style: normal;
color: #099922;
}
  1. /* rcl-af-integration */
  2. #af-wrapper .icon-status-indent{
  3. padding-left:5px;
  4. }
  5. #af-wrapper .icon-status-admin{
  6. font-size: 13px;
  7. font-weight:bold;
  8. color: #F43D2A;
  9. }
  10. #af-wrapper .icon-status-moderator {
  11. font-size: 13px;
  12. font-weight:bold;
  13. color: #469AC6;
  14. }
  15. #af-wrapper .icon-status-contributor{
  16. font-size: 13px;
  17. font-style: normal;
  18. color: #E3BB24;
  19. }
  20. #af-wrapper .icon-status-author{
  21. font-size: 13px;
  22. font-style: normal;
  23. color: #099922;
  24. }
  25. #af-wrapper .icon-status-editor{
  26. font-size: 13px;
  27. font-style: normal;
  28. color: #099922;
  29. }
/* rcl-af-integration */
#af-wrapper .icon-status-indent{
padding-left:5px;
}
#af-wrapper .icon-status-admin{
font-size: 13px;
font-weight:bold;
color: #F43D2A;
}
#af-wrapper .icon-status-moderator {
  font-size: 13px;
  font-weight:bold;
    color: #469AC6;    
}
#af-wrapper .icon-status-contributor{
font-size: 13px;
font-style: normal;
color: #E3BB24;
}
#af-wrapper .icon-status-author{
font-size: 13px;
font-style: normal;
color: #099922;
}
#af-wrapper .icon-status-editor{
font-size: 13px;
font-style: normal;
color: #099922;
}

where do I add this?

Here wp-content/plugins/asgaros-forum/skin/style.css

Quote from Yworld on January 18, 2017, 7:41 pm

Here wp-content/plugins/asgaros-forum/skin/style.css

Or better you add this to your themes style.css file because all files inside the asgaros-forum folder will get replaced after each plugin-update.

If you want to support the development of Asgaros Forum, you can leave a good review or donate. Thank you very much!
Quote from Asgaros on January 18, 2017, 7:51 pm
Quote from Yworld on January 18, 2017, 7:41 pm

Here wp-content/plugins/asgaros-forum/skin/style.css

Or better you add this to your themes style.css file because all files inside the asgaros-forum folder will get replaced after each plugin-update.

 

 

Well I added it and did f5 clear and it didnt seem to do anything?  Have a look please…

http://www.hillbillybonez.org/hillbillybonez-forum/

Ctrl + F5

Uploaded files:
  • Screenshot_6.jpg
Quote from Yworld on January 18, 2017, 8:22 pm

Ctrl + F5

got it, thanks!

Hey guys , I sort of have this working see forum at Arcade Punks but it only works for admin (showing as moderator) and moderators (showing as moderators)
I have user roles “subscribers” which I would like to show as “n00bs” and I have user role “members” which I would like to show as “Arcade Punk” , what edits do I need to make ?

Page 1 of 3Next