Page 1 of 3

Coloured Unread Forums and Topics

Posted: 24 Apr 2010, 19:36
by Stoker
Coloured Unread Forums and Topics
Written by Stoker & Steve

Lets color the Forum and Topic links when they are unread. This makes it easier for the user to see if the Forum or Topic is unread.
It will work when viewing forum index, forum and search (like active topics)
Prosilver only!

Moved here: viewtopic.php?f=45&t=1257

Re: Coloured Unread Forums and Topics

Posted: 24 Apr 2010, 19:46
by cisco007
Another nice one fellas, you are making Oliver very happy!

Re: Coloured Unread Forums and Topics

Posted: 24 Apr 2010, 19:46
by neptune
thx again, nice

Re: Coloured Unread Forums and Topics

Posted: 27 Apr 2010, 00:29
by heredia21
They all work fine except when I try a search. I posted this earlier. But here is the code i have/added.

Code: Select all

<a href="{searchresults.U_VIEW_TOPIC}" class="topictitle"><!-- IF topicrow.S_UNREAD_TOPIC --> style="color:#FF0000;"<!-- ENDIF -->{searchresults.TOPIC_TITLE}</a> {searchresults.ATTACH_ICON_IMG}
Did I do something wrong?

Re: Coloured Unread Forums and Topics

Posted: 27 Apr 2010, 06:27
by Stoker
Please post a screenshot.

Re: Coloured Unread Forums and Topics

Posted: 27 Apr 2010, 14:55
by heredia21
Of "View New Topics" not turning red when unread?

Re: Coloured Unread Forums and Topics

Posted: 27 Apr 2010, 15:13
by Stoker
PhpBB has no "View New Topics" function??

It has a "View New Posts" function and it is working fine with this mod, as you can see on this board.

Re: Coloured Unread Forums and Topics

Posted: 27 Apr 2010, 15:29
by heredia21
View new posts i meant. I see it is working fine here. I psoted the code. Did I do anything wrong?

Re: Coloured Unread Forums and Topics

Posted: 27 Apr 2010, 15:35
by heredia21
I may see where i did wrong. But not so sure. class="topictitle"><!-- IF. I noticed i put your code after "topictitle"> but it says to insert it after the " instead of >??

Meaning <!-- ENDIF -->> should look like that? With two ">". Correct me if Im wrong.

Heres my search_results.html:

Code: Select all

<!-- INCLUDE overall_header.html -->

<h2><!-- IF SEARCH_TITLE -->{SEARCH_TITLE}<!-- ELSE -->{SEARCH_MATCHES}<!-- ENDIF --><!-- IF SEARCH_WORDS -->: <a href="{U_SEARCH_WORDS}">{SEARCH_WORDS}</a><!-- ENDIF --></h2>
<!-- IF IGNORED_WORDS --> <p>{L_IGNORED_TERMS}: <strong>{IGNORED_WORDS}</strong></p><!-- ENDIF -->

<!-- IF SEARCH_TOPIC -->
	<p><a class="{S_CONTENT_FLOW_BEGIN}" href="{U_SEARCH_TOPIC}">{L_RETURN_TO}: {SEARCH_TOPIC}</a></p>
<!-- ELSE -->
	<p><a class="{S_CONTENT_FLOW_BEGIN}" href="{U_SEARCH}" title="{L_SEARCH_ADV}">{L_RETURN_TO_SEARCH_ADV}</a></p>
<!-- ENDIF -->

<!-- IF PAGINATION or SEARCH_MATCHES or PAGE_NUMBER -->
	<form method="post" action="{S_SEARCH_ACTION}">

	<div class="topic-actions">

	<!-- IF SEARCH_MATCHES -->
		<div class="search-box">
			<!-- IF SEARCH_IN_RESULTS -->
				<label for="add_keywords">{L_SEARCH_IN_RESULTS}: <input type="text" name="add_keywords" id="add_keywords" value="" class="inputbox narrow" /></label>
				<input class="button2" type="submit" name="submit" value="{L_SEARCH}" />
			<!-- ENDIF -->
		</div>
	<!-- ENDIF -->

		<div class="rightside pagination">
			{SEARCH_MATCHES}<!-- IF PAGINATION --> &bull; <a href="#" onclick="jumpto(); return false;" title="{L_JUMP_TO_PAGE}">{PAGE_NUMBER}</a> &bull; <span>{PAGINATION}</span><!-- ELSE --> &bull; {PAGE_NUMBER}<!-- ENDIF -->
		</div>
	</div>

	</form>
<!-- ENDIF -->

<!-- IF S_SHOW_TOPICS -->

	<!-- IF .searchresults -->
	<div class="forumbg">

		<div class="inner"><span class="corners-top"><span></span></span>
		<ul class="topiclist">
			<li class="header">
				<dl class="icon">
					<dt>{L_TOPICS}</dt>
					<dd class="posts">{L_REPLIES}</dd>
					<dd class="views">{L_VIEWS}</dd>
					<dd class="lastpost"><span>{L_LAST_POST}</span></dd>
				</dl>
			</li>
		</ul>
		<ul class="topiclist topics">

		<!-- BEGIN searchresults -->
			<li class="row<!-- IF searchresults.S_ROW_COUNT is even --> bg1<!-- ELSE --> bg2<!-- ENDIF -->">
				<dl class="icon" style="background-image: url({searchresults.TOPIC_FOLDER_IMG_SRC}); background-repeat: no-repeat;">
					<dt <!-- IF searchresults.TOPIC_ICON_IMG -->style="background-image: url({T_ICONS_PATH}{searchresults.TOPIC_ICON_IMG}); background-repeat: no-repeat;"<!-- ENDIF --><!-- IF searchresults.TOPIC_PREVIEW_TEXT --> title="{searchresults.TOPIC_PREVIEW_TEXT}"<!-- ENDIF -->>
						<!-- IF searchresults.S_UNREAD_TOPIC --><a href="{searchresults.U_NEWEST_POST}">{NEWEST_POST_IMG}</a> <!-- ENDIF -->
						<a href="{searchresults.U_VIEW_TOPIC}" class="topictitle"><!-- IF topicrow.S_UNREAD_TOPIC --> style="color:#FF0000;"<!-- ENDIF -->{searchresults.TOPIC_TITLE}</a> {searchresults.ATTACH_ICON_IMG}
						<!-- IF searchresults.S_TOPIC_UNAPPROVED or searchresults.S_POSTS_UNAPPROVED --><a href="{searchresults.U_MCP_QUEUE}">{searchresults.UNAPPROVED_IMG}</a> <!-- ENDIF -->
						<!-- IF searchresults.S_TOPIC_REPORTED --><a href="{searchresults.U_MCP_REPORT}">{REPORTED_IMG}</a><!-- ENDIF --><br />
						<!-- IF searchresults.PAGINATION --><strong class="pagination"><span>{searchresults.PAGINATION}</span></strong><!-- ENDIF -->
						{L_POST_BY_AUTHOR} {searchresults.TOPIC_AUTHOR_FULL} &raquo; {searchresults.FIRST_POST_TIME}
						<!-- IF not searchresults.S_TOPIC_GLOBAL -->{L_IN} <a href="{searchresults.U_VIEW_FORUM}">{searchresults.FORUM_TITLE}</a><!-- ELSE --> ({L_GLOBAL})<!-- ENDIF -->
					</dt>
					<dd class="posts">{searchresults.TOPIC_REPLIES}</dd>
					<dd class="views">{searchresults.TOPIC_VIEWS}</dd>
					<dd class="lastpost"><span>
						{L_POST_BY_AUTHOR} {searchresults.LAST_POST_AUTHOR_FULL}
						<!-- IF not S_IS_BOT --><a href="{searchresults.U_LAST_POST}">{LAST_POST_IMG}</a> <!-- ENDIF --><br />{searchresults.LAST_POST_TIME}<br /> </span>
					</dd>
				</dl>
			</li>
		<!-- END searchresults -->
		</ul>

		<span class="corners-bottom"><span></span></span></div>
	</div>
	<!-- ELSE -->
		<div class="panel">
			<div class="inner"><span class="corners-top"><span></span></span>
			<strong>{L_NO_SEARCH_RESULTS}</strong>
			<span class="corners-bottom"><span></span></span></div>
		</div>
	<!-- ENDIF -->

<!-- ELSE -->

	<!-- BEGIN searchresults -->
		<div class="search post <!-- IF searchresults.S_ROW_COUNT is odd -->bg1<!-- ELSE -->bg2<!-- ENDIF --><!-- IF searchresults.S_POST_REPORTED --> reported<!-- ENDIF -->">
			<div class="inner"><span class="corners-top"><span></span></span>

	<!-- IF searchresults.S_IGNORE_POST -->
		<div class="postbody">
			{searchresults.L_IGNORE_POST}
		</div>
	<!-- ELSE -->
		<div class="postbody">
			<h3><a href="{searchresults.U_VIEW_POST}">{searchresults.POST_SUBJECT}</a></h3>
			<div class="content">{searchresults.MESSAGE}</div>
		</div>

		<dl class="postprofile">
			<dt class="author">{L_POST_BY_AUTHOR} {searchresults.POST_AUTHOR_FULL}</dt>
			<dd>{searchresults.POST_DATE}</dd>
			<dd>&nbsp;</dd>
			<!-- IF searchresults.FORUM_TITLE -->
				<dd>{L_FORUM}: <a href="{searchresults.U_VIEW_FORUM}">{searchresults.FORUM_TITLE}</a></dd>
				<dd>{L_TOPIC}: <a href="{searchresults.U_VIEW_TOPIC}">{searchresults.TOPIC_TITLE}</a></dd>
			<!-- ELSE -->
				<dd>{L_GLOBAL}: <a href="{searchresults.U_VIEW_TOPIC}">{searchresults.TOPIC_TITLE}</a></dd>
			<!-- ENDIF -->
			<dd>{L_REPLIES}: <strong>{searchresults.TOPIC_REPLIES}</strong></dd>
			<dd>{L_VIEWS}: <strong>{searchresults.TOPIC_VIEWS}</strong></dd>
		</dl>
	<!-- ENDIF -->

	<!-- IF not searchresults.S_IGNORE_POST -->
		<ul class="searchresults">
			<li ><a href="{searchresults.U_VIEW_POST}" class="{S_CONTENT_FLOW_END}">{L_JUMP_TO_POST}</a></li>
		</ul>
	<!-- ENDIF -->

			<span class="corners-bottom"><span></span></span></div>
		</div>
	<!-- BEGINELSE -->
		<div class="panel">
			<div class="inner"><span class="corners-top"><span></span></span>
			<strong>{L_NO_SEARCH_RESULTS}</strong>
			<span class="corners-bottom"><span></span></span></div>
		</div>
	<!-- END searchresults -->
<!-- ENDIF -->

<!-- IF PAGINATION or .searchresults or S_SELECT_SORT_KEY or S_SELECT_SORT_DAYS -->
	<form method="post" action="{S_SEARCH_ACTION}">

	<fieldset class="display-options">
		<!-- IF PREVIOUS_PAGE --><a href="{PREVIOUS_PAGE}" class="left-box {S_CONTENT_FLOW_BEGIN}">{L_PREVIOUS}</a><!-- ENDIF -->
		<!-- IF NEXT_PAGE --><a href="{NEXT_PAGE}" class="right-box {S_CONTENT_FLOW_END}">{L_NEXT}</a><!-- ENDIF -->
		<!-- IF S_SELECT_SORT_DAYS or S_SELECT_SORT_KEY -->
			<label><!-- IF S_SHOW_TOPICS -->{L_DISPLAY_POSTS}<!-- ELSE -->{L_SORT_BY}</label><label><!-- ENDIF --> {S_SELECT_SORT_DAYS}<!-- IF S_SELECT_SORT_KEY --></label> <label>{S_SELECT_SORT_KEY}</label>
			<label>{S_SELECT_SORT_DIR}<!-- ENDIF --> <input type="submit" name="sort" value="{L_GO}" class="button2" /></label>
		<!-- ENDIF -->
	</fieldset>

	</form>

	<hr />
<!-- ENDIF -->

<!-- IF PAGINATION or .searchresults or PAGE_NUMBER -->
	<ul class="linklist">
		<li class="rightside pagination">
			{SEARCH_MATCHES}<!-- IF PAGINATION --> &bull; <a href="#" onclick="jumpto(); return false;" title="{L_JUMP_TO_PAGE}">{PAGE_NUMBER}</a> &bull; <span>{PAGINATION}</span><!-- ELSE --> &bull; {PAGE_NUMBER}<!-- ENDIF -->
		</li>
	</ul>
<!-- ENDIF -->

<!-- INCLUDE jumpbox.html -->

<!-- INCLUDE overall_footer.html -->

Re: Coloured Unread Forums and Topics

Posted: 27 Apr 2010, 15:57
by Stoker
Looks like you have messed that edit up.
All 3 edits are basicly the same and should be done the same way.

Use a fresh copy of the search_results.html and do the edit again.
Follow the instruction.