Пример #1
0
 /**
  * The messages icon, no text
  * @return string
  */
 function memberMessagesFull()
 {
     if (count($this->newMessagesFrom)) {
         if (count($this->newMessagesFrom) == 1 && in_array('0', $this->newMessagesFrom)) {
             return libHTML::maybeReadMessages('board.php?gameID=' . $this->gameID . '#chatbox');
         } else {
             return libHTML::unreadMessages('board.php?gameID=' . $this->gameID . '#chatbox');
         }
     } else {
         return '';
     }
 }
Пример #2
0
    public function html()
    {
        global $User;
        $buf = '<div class="homeNotice ' . ($this->type == 'Game' ? '" gameID="' . $this->fromID . '"' : 'userID' . $this->fromID . '"') . '>
			<div class="homeForumGroup homeForumAlt' . libHTML::alternate() . '">
				<div class="homeForumSubject homeForumTopBorder">' . $this->fromLink() . '</div>
				<div class="homeForumPostAlt' . libHTML::alternate() . ' homeForumPost">
					<div class="homeForumPostTime">' . libTime::text($this->timeSent) . ' ';
        if (self::$recent) {
            $buf .= libHTML::unreadMessages();
        } elseif (self::$new) {
            $buf .= libHTML::maybeReadMessages();
        }
        $buf .= '</div>
					<div class="homeForumMessage">' . $this->text . '</div>
					<div style="clear:both"></div>
					</div>';
        if ($this->isRespondable()) {
            $buf .= '<div class="homeForumPostAlt' . libHTML::alternate() . ' homeForumPost">' . $this->replyBox() . '</div>';
        }
        $buf .= '	</div>';
        //<div class="homeForumMessage">'.$post['message'].'</div>
        /*
        			$buf .= '<div class="homeForumLink">
        					<div class="homeForumPostTime"><strong>'.$data['replies'].'</strong> replies</div>
        					<a href="forum.php?threadID='.$threadID.'#'.$threadID.'">Open</a>
        					</div>
        					</div>';*/
        $buf .= '<div class="hr"></div></div>';
        return $buf;
    }
Пример #3
0
 /**
  * Output the tabs which go on top of the chat-box, along with online notifications and message notifications
  * where applicable
  * @param string $msgCountryID The name of the countryID/tab which we have open
  * @return string The HTML for the chat-box tabs
  */
 protected function outputTabs($msgCountryID)
 {
     global $Member, $Game;
     $tabs = '<div id="chatboxtabs" class="gamelistings-tabs">';
     for ($countryID = 0; $countryID <= count($Game->Variant->countries); $countryID++) {
         // Do not allow country specific tabs for restricted press games.
         if ($Game->pressType != 'Regular' && $countryID != 0 && $countryID != $Member->countryID) {
             continue;
         }
         $tabs .= ' <a href="./board.php?gameID=' . $Game->id . '&amp;msgCountryID=' . $countryID . '&amp;rand=' . rand(1, 100000) . '#chatboxanchor" ' . 'class="country' . $countryID . ' ' . ($msgCountryID == $countryID ? 'current"' : '" title="' . l_t('Open %s chatbox tab"', $countryID == 0 ? 'the global' : $this->countryName($countryID) . "'s")) . '>';
         if ($countryID == $Member->countryID) {
             $tabs .= l_t('Notes');
         } elseif (isset($Game->Members->ByCountryID[$countryID])) {
             $tabs .= $Game->Members->ByCountryID[$countryID]->memberCountryName();
             if ($Game->Members->ByCountryID[$countryID]->online && !$Game->Members->ByCountryID[$countryID]->isNameHidden()) {
                 $tabs .= ' ' . libHTML::loggedOn($Game->Members->ByCountryID[$countryID]->userID);
             }
         } else {
             $tabs .= l_t('Global');
         }
         if ($msgCountryID != $countryID and in_array($countryID, $Member->newMessagesFrom)) {
             // This isn't the tab I am currently viewing, and it has sent me new messages
             $tabs .= ' ' . libHTML::unreadMessages();
         }
         // Mark as unread patch!
         if ($msgCountryID == $countryID and isset($_REQUEST['MarkAsUnread'])) {
             $tabs .= ' ' . libHTML::unreadMessages();
         }
         $tabs .= '</a>';
     }
     $tabs .= '</div>';
     return $tabs;
 }