/** * Constructor. Initalise the read marker for guest (cookie and session) * or user (readmark table) * * @param $qsf - Quicksilver Forums module **/ function readmarker(&$qsf) { parent::forumutils($qsf); $this->time =& $qsf->time; // To initalise ourselves we need to look at the user if ($qsf->perms->is_guest) { // With a guest user we can try and read/set a cookie but that's all! if (isset($qsf->cookie[$this->sets['cookie_prefix'] . 'lastallread']) && $qsf->cookie[$this->sets['cookie_prefix'] . 'lastallread'] < $this->time - DAY_IN_SECONDS * 2) { $this->last_read_all = intval($qsf->cookie[$this->sets['cookie_prefix'] . 'lastallread']); } else { $this->last_read_all = $this->time - DAY_IN_SECONDS; setcookie($this->sets['cookie_prefix'] . 'lastallread', $this->last_read_all, $qsf->time + $this->sets['logintime'], $this->sets['cookie_path']); } if (!isset($_SESSION[$this->sets['cookie_prefix'] . 'read_topics'])) { $_SESSION[$this->sets['cookie_prefix'] . 'read_topics'] = array(); } $this->guest_mode = true; } else { // Get the user ID and the lastallread value and prepare to if ($qsf->user['user_lastallread']) { $this->last_read_all = $qsf->user['user_lastallread']; } elseif (isset($qsf->cookie[$this->sets['cookie_prefix'] . 'lastallread'])) { $this->last_read_all = intval($qsf->cookie[$this->sets['cookie_prefix'] . 'lastallread']); } else { $this->last_read_all = $this->time - DAY_IN_SECONDS; } $this->guest_mode = false; $this->user_id = intval($qsf->user['user_id']); } }
/** * Constructor * * @param $qsf - Quicksilver Forums module **/ function htmltools(&$qsf) { parent::forumutils($qsf); $this->modules =& $qsf->modules; $this->lang =& $qsf->lang; $this->self = $qsf->self; $this->skin = $qsf->skin; // Make the properties static (even on PHP 4) static $replaces_loaded = false; static $censor = array(); static $emotes = array('replacement' => array(), 'replacement_clickable' => array()); $this->replaces_loaded =& $replaces_loaded; $this->censor =& $censor; $this->emotes =& $emotes; }