Please or Register to create posts and topics.

Replace dash icons in topics posted by users

Hey, thank you for providing this fine forum! I’d like to know if it’s possible to replace the dash icons with the posting user’s profile picture instead. Thank you.

Hello @a1ex

It is not possible yet to replace the icon with the avatar, but you can add an additional column containing the avatar with the following code:

add_action('asgarosforum_custom_topic_column', 'custom_column');
function custom_column($topic_id) {
  global $asgarosforum;
  $author_id = $asgarosforum->db->get_var("SELECT (SELECT author_id FROM {$asgarosforum->tables->posts} WHERE parent_id = t.id ORDER BY id ASC LIMIT 1) AS author_id FROM {$asgarosforum->tables->topics} AS t WHERE t.id = {$topic_id};");
  echo '<div class="topic-status">';
  echo get_avatar($author_id, 40);
  echo '</div>';
}

Just add it to your themesĀ functions.php file.

If you want to support the development of Asgaros Forum, you can leave a good review or donate. Thank you very much!