You are here

function advanced_forum_get_mark_read_link in Advanced Forum 6.2

Same name and namespace in other branches
  1. 7.2 includes/mark-read.inc \advanced_forum_get_mark_read_link()

Either fill a $links array or return a string version of the link to mark read.

2 calls to advanced_forum_get_mark_read_link()
advanced_forum_forum_mark_read_content_type_render in plugins/content_types/forum_mark_read.inc
Render the content.
advanced_forum_forum_tools in ./advanced_forum.module
Create a drop down list of forum actions.

File

includes/mark-read.inc, line 12
Holds functions relating to the Mark Forum/All Read functionality.

Code

function advanced_forum_get_mark_read_link($tid = 0, &$links = array()) {
  if (advanced_forum_markasread_access() && !in_array($tid, variable_get('forum_containers', array()))) {
    if ($tid) {
      $links['mark-read']['title'] = t('Mark all topics read');
      $links['mark-read']['href'] = "forum/markasread/{$tid}";
      return l(t('Mark all topics read') . '<span class="image-replace"></span>', "forum/markasread/{$tid}", array(
        'html' => TRUE,
      ));
    }
    else {
      $links['mark-read']['title'] = t('Mark all forums read');
      $links['mark-read']['href'] = "forum/markasread";
      return l(t('Mark all forums read') . '<span class="image-replace"></span>', "forum/markasread", array(
        'html' => TRUE,
      ));
    }
  }
}