function unread() {
		if(!me()) return;
		$uid = me()->id();
		
		$comments = core_unreadcomments(array());

		if(count($comments) == 0) {
			$hidden = "none";
		} else {
			$hidden = "block";
		} ?>
		
		<div id="unread" class="contentbox" style="display: <?= $hidden ?>;">
			<div class="blackbar"></div>
			<div class="heading">unread comments:</div>
			<div id="unread-container" class="bluebox">
				<? foreach ($comments as $comment) {
					$upload = $comment->upload();
					if($upload->squelched()) continue;

					$css = isset($css) && $css == "evenfile" ? "oddfile" : "evenfile";  ?>
					<div class="clipper"><a id="unread<?= $comment->upload()->id()?>" class="<?= $css ?>" href="<?= Link::comment($comment) ?>"><?= $upload->htmlFilename() ?></a></div>
				<? } ?>
			</div>
			<div class="heading" style="text-align:center">
				<a class="orange" href="markallread.php">mark all read</a>
			</div>
			<div class="blackbar"></div>
		</div>
	<? }
Beispiel #2
0
	/**
	 * @method unreadcomments
	 *
	 * Get a list of unchecked activity on subscribed threads.
	 *
	 * @param sort string optional {"comment_desc", "comment_asc", "file_asc", "file_desc"} Default:"file_asc" Sort order of results.
	 * @param limit limit optional Default and maximum is 200.
	 * @return Array of Comment objects containing the oldest unread comment for each thread with unread comments.
	 * @example limit=3&sort=file_asc
	 * @see getcomments
	 * @see subscribe
	 * @see resetsubscription
	 */
	function api_unreadcomments() {
		send(core_unreadcomments($_REQUEST));
	}