I can't see other members' posts. Why?
Quote from Livello 100 on September 23, 2018, 11:45 pmHello!
First of all, thanks for creating this nice plugin 🙂
I found it easy to use right from the beginning.That being said, there is something strange that I see once in a while.
For example, take a look at this.
Those are the first discussions started by members.
If I click the one I started, everything’s fine. But if I click other members’ discussions, I can’t see them.
It just shows me their account.
And I can’t even see their answers to my posts. Do you have any suggestions?
Hello!
First of all, thanks for creating this nice plugin 🙂
I found it easy to use right from the beginning.
That being said, there is something strange that I see once in a while.
For example, take a look at this.
Those are the first discussions started by members.
If I click the one I started, everything’s fine. But if I click other members’ discussions, I can’t see them.
It just shows me their account.
And I can’t even see their answers to my posts. Do you have any suggestions?
Quote from Asgaros on September 24, 2018, 5:39 amHello @livello-100
Have you modified your forum with custom code via hooks/filters? If so, please show me that code (I guess its in your themes functions.php file) so I can give you an updated version for it.
Hello @livello-100
Have you modified your forum with custom code via hooks/filters? If so, please show me that code (I guess its in your themes functions.php file) so I can give you an updated version for it.
Quote from Livello 100 on September 24, 2018, 7:40 amYes, I have. Since I don’t understand these codes very well, I don’t know where to start.
I’ll show you from where I can find the name of the plugin.
Is there anything wrong I’ve pasted in?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) { if (getUserRoles($author_id)=='administrator') { echo '<div class="icon-status-admin">'.__('Admin','rcl-asgaros').' <i class="fa fa-info-circle"></i></div>'; } else { if (AsgarosForumPermissions::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>';}; } } } } } add_filter('register_url', 'my_register_url'); function my_register_url($register_url) { return home_url('/registrati'); }
Yes, I have. Since I don’t understand these codes very well, I don’t know where to start.
I’ll show you from where I can find the name of the plugin.
Is there anything wrong I’ve pasted in?
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) { if (getUserRoles($author_id)=='administrator') { echo '<div class="icon-status-admin">'.__('Admin','rcl-asgaros').' <i class="fa fa-info-circle"></i></div>'; } else { if (AsgarosForumPermissions::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>';}; } } } } } add_filter('register_url', 'my_register_url'); function my_register_url($register_url) { return home_url('/registrati'); }
Quote from Asgaros on September 24, 2018, 11:27 amHello again @livello-100
Please replace it with the following code:
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>';}; } } } } } add_filter('register_url', 'my_register_url'); function my_register_url($register_url) { return home_url('/registrati'); }
Hello again @livello-100
Please replace it with the following code:
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>';}; } } } } } add_filter('register_url', 'my_register_url'); function my_register_url($register_url) { return home_url('/registrati'); }
Quote from Livello 100 on September 24, 2018, 11:32 pmIt works now! Thank you so much 😊
It works now! Thank you so much 😊