Ranks on the forum
Quote from Yworld on January 18, 2017, 6:52 amAdd the the rank to the forum:
- administrator
- moderator
- contributor
- author
- 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').' <i class="fa fa-info-circle"></i></div>'; } else { if ($asgarosforum->permissions->isModerator($author_id)) { echo '<div class="icon-status-moderator">'.__('Moderator','rcl-asgaros').' <i class="fa fa-info-circle"></i></div>'; } else { if(getUserRoles($author_id)=='contributor') { echo '<div class="icon-status-contributor">'.__('Contributor','rcl-asgaros').' <i class="fa fa-info-circle"></i></div>'; } else { if(getUserRoles($author_id)=='author') { echo '<div class="icon-status-author">'.__('Author','rcl-asgaros').' <i class="fa fa-info-circle"></i></div>'; } else { if(getUserRoles($author_id)=='editor') { echo '<div class="icon-status-editor">'.__('Editor','rcl-asgaros').' <i class="fa fa-info-circle"></i></div>';}; } } } } }Names can be changed 🙂
Add the the rank to the forum:
- administrator
- moderator
- contributor
- author
- 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').' <i class="fa fa-info-circle"></i></div>'; } else { if ($asgarosforum->permissions->isModerator($author_id)) { echo '<div class="icon-status-moderator">'.__('Moderator','rcl-asgaros').' <i class="fa fa-info-circle"></i></div>'; } else { if(getUserRoles($author_id)=='contributor') { echo '<div class="icon-status-contributor">'.__('Contributor','rcl-asgaros').' <i class="fa fa-info-circle"></i></div>'; } else { if(getUserRoles($author_id)=='author') { echo '<div class="icon-status-author">'.__('Author','rcl-asgaros').' <i class="fa fa-info-circle"></i></div>'; } else { if(getUserRoles($author_id)=='editor') { echo '<div class="icon-status-editor">'.__('Editor','rcl-asgaros').' <i class="fa fa-info-circle"></i></div>';}; } } } } }
Names can be changed 🙂
Quote from hillbillybonez on January 18, 2017, 6:54 pmGot it to work the second time around, thanks!
Got it to work the second time around, thanks!
Quote from Yworld on January 18, 2017, 7:11 pmI 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; }
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 hillbillybonez on January 18, 2017, 7:34 pmQuote from Yworld on January 18, 2017, 7:11 pmI 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; }
- /* 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;
- }
/* 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?
Quote from Yworld on January 18, 2017, 7:11 pmI 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; }
- /* 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;
- }
/* 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?
Quote from Asgaros on January 18, 2017, 7:51 pmQuote from Yworld on January 18, 2017, 7:41 pmHere 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.
Quote from Yworld on January 18, 2017, 7:41 pmHere 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.
Quote from hillbillybonez on January 18, 2017, 8:18 pmQuote from Asgaros on January 18, 2017, 7:51 pmQuote from Yworld on January 18, 2017, 7:41 pmHere 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/
Quote from Asgaros on January 18, 2017, 7:51 pmQuote from Yworld on January 18, 2017, 7:41 pmHere 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…
Quote from hillbillybonez on January 18, 2017, 8:27 pmQuote from Yworld on January 18, 2017, 8:22 pmCtrl + F5
got it, thanks!
Quote from Yworld on January 18, 2017, 8:22 pmCtrl + F5
got it, thanks!
Quote from arcadepunk on April 27, 2017, 11:24 pmHey 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 ?
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 ?