Topic Type

For support and discussion related to templates and themes in phpBB 3.3.
Post Reply
User avatar
bennybernaer
Registered User
Posts: 599
Joined: Tue Mar 22, 2011 9:53 pm
Contact:

Topic Type

Post by bennybernaer »

I am trying to move the subject type icons.

This worked well for stickies, announcements, pulses, etc. But somehow this doesn't work for attachments.

Code: Select all

						<!-- IF topicrow.TOPIC_TYPE -->
                        	<span class="topic_type<!-- IF topicrow.S_POST_STICKY --> topic_type_sticky<!-- ELSEIF topicrow.S_POST_ANNOUNCE || topicrow.S_POST_GLOBAL --> topic_type_announce<!-- ELSEIF topicrow.S_HAS_POLL --> topic_type_poll<!-- ELSEIF topicrow.S_TOPIC_LOCKED --> topic_type_locked<!-- ENDIF -->">
                            	<i class="icon fa-<!-- IF topicrow.S_POST_STICKY -->thumb-tack<!-- ELSEIF topicrow.S_POST_ANNOUNCE || topicrow.S_POST_GLOBAL -->bullhorn<!-- ELSEIF topicrow.S_HAS_POLL -->bar-chart<!-- ELSEIF postrow.S_HAS_ATTACHMENTS -->paperclip<!-- ELSEIF topicrow.S_TOPIC_LOCKED -->lock<!-- ENDIF --> fa-fw"></i>
                            </span>
                        <!-- ENDIF -->

Code: Select all

<!-- ELSEIF postrow.S_HAS_ATTACHMENTS -->paperclip

Code: Select all

/* ------- Topic Types ------- */
.topic_type {
	display: inline-block;
	padding: 2px 2px 2px 4px;
	font-weight: 500;
	float: right;
	margin-right: 3px;
}

.topic_type span {
	display: inline-block;
	text-transform: lowercase;
}

.topic_type span::first-letter {
	text-transform: uppercase;
}

.topic_type {
	color: #87bdd8;
}
Image
User avatar
GTI
Registered User
Posts: 300
Joined: Mon Aug 24, 2020 4:59 pm
Location: West Sussex
Name: Laura

Re: Topic Type

Post by GTI »

All those ELSEIF statements mean only 1 icon will be displayed at a time. So if you have an announcement with an attachment - the viewers won't know the topic has an attachment because the bull horn symbol will be there instead.

Is that how you want it to be? or do you want the attachment icon to be at the side of the horn icon?
Most of us will enjoy Christmas in the comfort of our own homes this year, however, sadly, that can't be said for people in the Ukraine who are suffering day after day, due to the Russian invasion.

If you would like to make a small donation to help Ukrainians in their time of need, you can donate to help all Ukrainians via BritishRedCross or you can donate to help the Ukrainian children via Unicef. 🇺🇦 Thank You 🇺🇦
User avatar
bennybernaer
Registered User
Posts: 599
Joined: Tue Mar 22, 2011 9:53 pm
Contact:

Re: Topic Type

Post by bennybernaer »

No, do not overwrite. I would only show the attachment symbol if a normal topic contains an attachment.
User avatar
bennybernaer
Registered User
Posts: 599
Joined: Tue Mar 22, 2011 9:53 pm
Contact:

Re: Topic Type

Post by bennybernaer »

I've tried several possibilities, but still haven't found it.

Code: Select all

						<!-- IF topicrow.TOPIC_TYPE -->
                        	<span class="topic_type<!-- IF topicrow.S_POST_STICKY --> topic_type_sticky<!-- ELSEIF topicrow.S_POST_ANNOUNCE || topicrow.S_POST_GLOBAL --> topic_type_announce<!-- ELSEIF topicrow.S_HAS_POLL --> topic_type_poll<!-- ELSEIF topicrow.S_TOPIC_LOCKED --> topic_type_locked<!-- ENDIF -->">
                            	<i class="icon fa-<!-- IF topicrow.S_POST_STICKY -->thumb-tack<!-- ELSEIF topicrow.S_POST_ANNOUNCE || topicrow.S_POST_GLOBAL -->bullhorn<!-- ELSEIF topicrow.S_HAS_POLL -->bar-chart<!-- ELSEIF topicrow.S_TOPIC_LOCKED -->lock<!-- ENDIF --> fa-fw"></i>
								<span class="topic_type<!-- IF topicrow.ATTACH_ICON_IMG -->topic_type_attach_icon_img<!-- ENDIF -->">
                            	<i class="icon fa-<!-- IF topicrow.ATTACH_ICON_IMG -->paperclip<!-- ENDIF --> fa-fw"></i>
								</span>
                            </span>
                        <!-- ENDIF -->

Code: Select all

								<span class="topic_type<!-- IF topicrow.ATTACH_ICON_IMG -->topic_type_attach_icon_img<!-- ENDIF -->">
                            	<i class="icon fa-<!-- IF topicrow.ATTACH_ICON_IMG -->paperclip<!-- ENDIF --> fa-fw"></i>
								</span>
User avatar
halil16
Registered User
Posts: 1262
Joined: Fri Jul 24, 2020 11:30 pm
Location: Turkiye
Name: Halil
Contact:

Re: Topic Type

Post by halil16 »

image link not working.
* Hire me at fiverr for your phpBB board.
"The day we will need ideas more than possessions, we will find the secret to true wealth." - Peyami Safa
I'm learning English...
Contributions: #Hashtag, Elegance, Latte
User avatar
cabot
Registered User
Posts: 677
Joined: Sat Jan 07, 2012 4:16 pm
Contact:

Re: Topic Type

Post by cabot »

Hello,

Is there an topic_typetopic_type_attach_icon_img class used as selector in CSS?

If not, there is a blank space missing in the code:

Code: Select all

class="topic_type<!-- IF topicrow.ATTACH_ICON_IMG --> topic_type_attach_icon_img<!-- ENDIF -->"
User avatar
bennybernaer
Registered User
Posts: 599
Joined: Tue Mar 22, 2011 9:53 pm
Contact:

Re: Topic Type

Post by bennybernaer »

cabot wrote: Sat Dec 03, 2022 7:07 am Hello,

Is there an topic_typetopic_type_attach_icon_img class used as selector in CSS?

If not, there is a blank space missing in the code:

Code: Select all

class="topic_type<!-- IF topicrow.ATTACH_ICON_IMG --> topic_type_attach_icon_img<!-- ENDIF -->"
Thanks for your feedback. Unfortunately, this also gives no result.

Code: Select all

						<!-- IF topicrow.TOPIC_TYPE -->
                        	<span class="topic_type<!-- IF topicrow.S_POST_STICKY --> topic_type_sticky<!-- ELSEIF topicrow.S_POST_ANNOUNCE || topicrow.S_POST_GLOBAL --> topic_type_announce<!-- ELSEIF topicrow.S_HAS_POLL --> topic_type_poll<!-- ELSEIF topicrow.S_TOPIC_LOCKED --> topic_type_locked<!-- ENDIF -->">
                            	<i class="icon fa-<!-- IF topicrow.S_POST_STICKY -->thumb-tack<!-- ELSEIF topicrow.S_POST_ANNOUNCE || topicrow.S_POST_GLOBAL -->bullhorn<!-- ELSEIF topicrow.S_HAS_POLL -->bar-chart<!-- ELSEIF topicrow.S_TOPIC_LOCKED -->lock<!-- ENDIF --> fa-fw"></i>
				<span class="topic_type<!-- IF topicrow.ATTACH_ICON_IMG -->  topic_type_attach_icon_img<!-- ENDIF -->">
                            	<i class="icon fa-<!-- IF topicrow.ATTACH_ICON_IMG -->paperclip<!-- ENDIF --> fa-fw"></i>
								</span>
                            </span>
                        <!-- ENDIF -->

Code: Select all

/* ------- Topic Types ------- */
.topic_type {
	display: inline-block;
	padding: 2px 2px 2px 4px;
	font-weight: 500;
	float: right;
	margin-right: 3px;
}

.topic_type span {
	display: inline-block;
	text-transform: lowercase;
}

.topic_type span::first-letter {
	text-transform: uppercase;
}

.topic_type {
	color: #87bdd8;
}
User avatar
cabot
Registered User
Posts: 677
Joined: Sat Jan 07, 2012 4:16 pm
Contact:

Re: Topic Type

Post by cabot »

Did you modify the PHP to create this conditional statement that does not exist by default?

Code: Select all

<!-- IF topicrow.TOPIC_TYPE -->
If not, simply delete it from the html.

If you are still having problems, please post the entire <li class="row....
User avatar
bennybernaer
Registered User
Posts: 599
Joined: Tue Mar 22, 2011 9:53 pm
Contact:

Re: Topic Type

Post by bennybernaer »

No, I have not changed any php files.

OK, this is getting much better. Only it would be nicer, if everything is neatly arranged under each other, in the same row as the bullhorn.
And not to be difficult... But is it possible to show only the paperclip in normal subjects. So not with closed topics, stickies, announcements or polls. (otherwise two are next to each other).
Thank you very much for your effort and consideration.

Image

This is the full viewforum_body.html

Code: Select all

<!-- INCLUDE overall_header.html -->
<!-- EVENT viewforum_forum_title_before -->
<h2 class="forum-title"><!-- EVENT viewforum_forum_name_prepend --><a href="{U_VIEW_FORUM}">{FORUM_NAME}</a><!-- EVENT viewforum_forum_name_append --></h2>
<!-- EVENT viewforum_forum_title_after -->
<!-- IF FORUM_DESC or MODERATORS or U_MCP -->
<div>
	<!-- NOTE: remove the style="display: none" when you want to have the forum description on the forum body -->
	<!-- IF FORUM_DESC --><div style="display: none !important;">{FORUM_DESC}<br /></div><!-- ENDIF -->
	<!-- IF MODERATORS --><p><strong><!-- IF S_SINGLE_MODERATOR -->{L_MODERATOR}<!-- ELSE -->{L_MODERATORS}<!-- ENDIF -->{L_COLON}</strong> {MODERATORS}</p><!-- ENDIF -->
</div>
<!-- ENDIF -->

<!-- IF S_FORUM_RULES -->
	<div class="rules<!-- IF U_FORUM_RULES --> rules-link<!-- ENDIF -->">
		<div class="inner">

		<!-- IF U_FORUM_RULES -->
			<a href="{U_FORUM_RULES}">{L_FORUM_RULES}</a>
		<!-- ELSE -->
			<strong>{L_FORUM_RULES}</strong><br />
			{FORUM_RULES}
		<!-- ENDIF -->

		</div>
	</div>
<!-- ENDIF -->

<!-- IF S_HAS_SUBFORUM -->
<!-- IF not S_IS_BOT and U_MARK_FORUMS -->
	<div class="action-bar compact">
		<a href="{U_MARK_FORUMS}" class="mark-read rightside" data-ajax="mark_forums_read">{L_MARK_SUBFORUMS_READ}</a>
	</div>
<!-- ENDIF -->
	<!-- INCLUDE forumlist_body.html -->
<!-- ENDIF -->

<!-- IF S_DISPLAY_POST_INFO or .pagination or TOTAL_POSTS or TOTAL_TOPICS -->
	<div class="action-bar bar-top">

	<!-- IF not S_IS_BOT and S_DISPLAY_POST_INFO -->
			<!-- EVENT viewforum_buttons_top_before -->

		<a href="{U_POST_NEW_TOPIC}" class="button<!-- IF S_IS_LOCKED --> lock-btn<!-- ENDIF -->" title="<!-- IF S_IS_LOCKED -->{L_FORUM_LOCKED}<!-- ELSE -->{L_POST_TOPIC}<!-- ENDIF -->">
			<!-- IF S_IS_LOCKED -->
				<span>{L_BUTTON_FORUM_LOCKED}</span> <i class="icon fa-lock fa-fw" aria-hidden="true"></i>
			<!-- ELSE -->
				<span>{L_BUTTON_NEW_TOPIC}</span> <i class="icon fa-pencil fa-fw" aria-hidden="true"></i>
			<!-- ENDIF -->
		</a>
			<!-- EVENT viewforum_buttons_top_after -->
	<!-- ENDIF -->

	<!-- IF S_DISPLAY_SEARCHBOX -->
		<div class="search-box" role="search">
			<form method="get" id="forum-search" action="{S_SEARCHBOX_ACTION}">
			<fieldset>
				<input class="inputbox search tiny" type="search" name="keywords" id="search_keywords" size="20" placeholder="{L_SEARCH_FORUM}" />
				<button class="button button-search" type="submit" title="{L_SEARCH}">
					<i class="icon fa-search fa-fw" aria-hidden="true"></i><span class="sr-only">{L_SEARCH}</span>
				</button>
				<a href="{{ U_SEARCH_FORUM }}" class="button button-search-end" title="{L_SEARCH_ADV}">
					<i class="icon fa-cog fa-fw" aria-hidden="true"></i><span class="sr-only">{L_SEARCH_ADV}</span>
				</a>
				{S_SEARCH_LOCAL_HIDDEN_FIELDS}
			</fieldset>
			</form>
		</div>
	<!-- ENDIF -->

	<div class="pagination">
		<!-- IF not S_IS_BOT and U_MARK_TOPICS and .topicrow --><a href="{U_MARK_TOPICS}" class="mark" accesskey="m" data-ajax="mark_topics_read">{L_MARK_TOPICS_READ}</a> &bull; <!-- ENDIF -->
		{TOTAL_TOPICS}
		<!-- IF .pagination -->
			<!-- INCLUDE pagination.html -->
		<!-- ELSE -->
			&bull; {PAGE_NUMBER}
		<!-- ENDIF -->
	</div>

	</div>
<!-- ENDIF -->

<!-- IF S_NO_READ_ACCESS -->

	<div class="panel">
		<div class="inner">
		<strong>{L_NO_READ_ACCESS}</strong>
		</div>
	</div>

	<!-- IF not S_USER_LOGGED_IN and not S_IS_BOT -->

		<form action="{S_LOGIN_ACTION}" method="post">

		<div class="panel">
			<div class="inner">

			<div class="content">
				<h3><a href="{U_LOGIN_LOGOUT}">{L_LOGIN_LOGOUT}</a><!-- IF S_REGISTER_ENABLED -->&nbsp; &bull; &nbsp;<a href="{U_REGISTER}">{L_REGISTER}</a><!-- ENDIF --></h3>

				<fieldset class="fields1">
				<dl>
					<dt><label for="username">{L_USERNAME}{L_COLON}</label></dt>
					<dd><input type="text" tabindex="1" name="username" id="username" size="25" value="{USERNAME}" class="inputbox autowidth"></dd>
				</dl>
				<dl>
					<dt><label for="password">{L_PASSWORD}{L_COLON}</label></dt>
					<dd><input type="password" tabindex="2" id="password" name="password" size="25" class="inputbox autowidth" autocomplete="off"></dd>
					<!-- IF S_AUTOLOGIN_ENABLED --><dd><label for="autologin"><input type="checkbox" name="autologin" id="autologin" tabindex="3"> {L_LOG_ME_IN}</label></dd><!-- ENDIF -->
					<dd><label for="viewonline"><input type="checkbox" name="viewonline" id="viewonline" tabindex="4"> {L_HIDE_ME}</label></dd>
				</dl>
				<dl>
					<dt>&nbsp;</dt>
					<dd><input type="submit" name="login" tabindex="5" value="{L_LOGIN}" class="button1"></dd>
				</dl>
				{S_LOGIN_REDIRECT}
				{S_FORM_TOKEN_LOGIN}
				</fieldset>
			</div>

			</div>
		</div>

		</form>

	<!-- ENDIF -->

<!-- ENDIF -->

<!-- EVENT viewforum_body_topic_row_before -->

<!-- BEGIN topicrow -->

	<!-- IF not topicrow.S_TOPIC_TYPE_SWITCH and not topicrow.S_FIRST_ROW -->
		</ul>
		</div>
	</div>
	<!-- ENDIF -->

	<!-- IF topicrow.S_FIRST_ROW or not topicrow.S_TOPIC_TYPE_SWITCH -->
		<div class="forumbg<!-- IF topicrow.S_TOPIC_TYPE_SWITCH and (topicrow.S_POST_ANNOUNCE or topicrow.S_POST_GLOBAL) --> announcement<!-- ENDIF -->">
		<div class="inner">
		<ul class="topiclist">
			<li class="header">
				<dl class="row-item">
					<dt<!-- IF S_DISPLAY_ACTIVE --> id="active_topics"<!-- ENDIF -->><div class="list-inner"><!-- IF S_DISPLAY_ACTIVE -->{L_ACTIVE_TOPICS}<!-- ELSEIF topicrow.S_TOPIC_TYPE_SWITCH and (topicrow.S_POST_ANNOUNCE or topicrow.S_POST_GLOBAL) -->{L_ANNOUNCEMENTS}<!-- ELSE -->{L_TOPICS}<!-- ENDIF --></div></dt>
					<dd class="posts"><span class="icon fa-comments" title="{L_REPLIES}" aria-hidden="true"></span><span class="sr-only">{L_REPLIES}</span></dd>
					<dd class="views"><span class="icon fa-eye" title="{L_VIEWS}" aria-hidden="true"></span><span class="sr-only">{L_VIEWS}</span></dd>
					<dd class="lastpost"><span class="icon fa-clock-o" title="{L_LAST_POST}" aria-hidden="true"></span><span class="sr-only">{L_LAST_POST}</span></dd>
				</dl>
			</li>
		</ul>
		<ul class="topiclist topics">
	<!-- ENDIF -->

		<!-- EVENT viewforum_body_topicrow_row_before -->
		<li class="row<!-- IF topicrow.S_ROW_COUNT is even --> bg1<!-- ELSE --> bg2<!-- ENDIF --><!-- IF topicrow.S_POST_GLOBAL --> global-announce<!-- ENDIF --><!-- IF topicrow.S_POST_ANNOUNCE --> announce<!-- ENDIF --><!-- IF topicrow.S_POST_STICKY --> sticky<!-- ENDIF --><!-- IF topicrow.S_TOPIC_REPORTED --> reported<!-- ENDIF -->">
			<!-- EVENT viewforum_body_topic_row_prepend -->
			<dl class="row-item {topicrow.TOPIC_IMG_STYLE}">
				<dt<!-- IF topicrow.TOPIC_ICON_IMG and S_TOPIC_ICONS --> style="background-image: url('{T_ICONS_PATH}{topicrow.TOPIC_ICON_IMG}'); background-repeat: no-repeat;"<!-- ENDIF --> title="{topicrow.TOPIC_FOLDER_IMG_ALT}">
					<!-- IF topicrow.S_UNREAD_TOPIC and not S_IS_BOT --><a href="{topicrow.U_NEWEST_POST}" class="row-item-link"></a><!-- ENDIF -->
					<div class="list-inner">
						<!-- EVENT topiclist_row_prepend -->
						
					<div>

                        	<span class="topic_type<!-- IF topicrow.S_POST_STICKY --> topic_type_sticky<!-- ELSEIF topicrow.S_POST_ANNOUNCE || topicrow.S_POST_GLOBAL --> topic_type_announce<!-- ELSEIF topicrow.S_HAS_POLL --> topic_type_poll<!-- ELSEIF topicrow.S_TOPIC_LOCKED --> topic_type_locked<!-- ENDIF -->">
                            	<i class="icon fa-<!-- IF topicrow.S_POST_STICKY -->thumb-tack<!-- ELSEIF topicrow.S_POST_ANNOUNCE || topicrow.S_POST_GLOBAL -->bullhorn<!-- ELSEIF topicrow.S_HAS_POLL -->bar-chart<!-- ELSEIF topicrow.S_TOPIC_LOCKED -->lock<!-- ENDIF --> fa-fw"></i>
				<span class="topic_type<!-- IF topicrow.ATTACH_ICON_IMG -->topic_type_attach_icon_img<!-- ENDIF -->">
                            	<i class="icon fa-<!-- IF topicrow.ATTACH_ICON_IMG -->paperclip<!-- ENDIF --> fa-fw"></i>
								</span>
                            </span>
						<!-- IF topicrow.S_TOPIC_DELETED -->
                        	<span class="topic_type topic_type_deleted">
                                <a href="{topicrow.U_MCP_QUEUE}" title="{L_TOPIC_DELETED}">
                                    <i class="icon fa-trash fa-fw" aria-hidden="true"></i>
                                </a>
                            </span>
						<!-- ENDIF -->
						<!-- IF topicrow.S_TOPIC_REPORTED -->
                        	<span class="topic_type topic_type_reported">
                                <a href="{topicrow.U_MCP_REPORT}" title="{L_TOPIC_REPORTED}">
                                    <i class="icon fa-exclamation-triangle fa-fw" aria-hidden="true"></i>
                                </a>
                            </span>
						<!-- ENDIF -->
						<!-- IF topicrow.S_TOPIC_UNAPPROVED or topicrow.S_POSTS_UNAPPROVED -->
                        	<span class="topic_type topic_type_unapproved tooltip" title="{L_TOPIC_UNAPPROVED}">
                                <a href="{topicrow.U_MCP_QUEUE}" title="<!-- IF topicrow.S_TOPIC_UNAPPROVED -->{L_TOPIC_UNAPPROVED}<!-- ELSE -->{L_POSTS_UNAPPROVED}<!-- ENDIF -->">
                                                        <i class="icon fa-question fa-fw icon-circle" aria-hidden="true"></i><span class="sr-only"><!-- IF topicrow.S_TOPIC_UNAPPROVED -->{L_TOPIC_UNAPPROVED}<!-- ELSE -->{L_POSTS_UNAPPROVED}<!-- ENDIF --></span>
                                </a>
                            </span>
						<!-- ENDIF -->
						<!-- IF topicrow.S_UNREAD_TOPIC and not S_IS_BOT -->
							<a class="unread" href="{topicrow.U_NEWEST_POST}">
								<i class="icon fa-circle fa-fw icon-red icon-md" aria-hidden="true"></i>
							</a>
						<!-- ENDIF -->
						<!-- IF topicrow.U_VIEW_TOPIC --><a href="{topicrow.U_VIEW_TOPIC}" class="topictitle">{topicrow.TOPIC_TITLE}</a><!-- ELSE -->{topicrow.TOPIC_TITLE}<!-- ENDIF -->
					</div>
						
						<!-- EVENT topiclist_row_topic_title_after -->

						<!-- IF not S_IS_BOT -->
						<div class="responsive-show" style="display: none;">
							{L_LAST_POST} {L_POST_BY_AUTHOR} <!-- EVENT viewforum_body_last_post_author_username_prepend -->{topicrow.LAST_POST_AUTHOR_FULL}<!-- EVENT viewforum_body_last_post_author_username_append --> &laquo; <a href="{topicrow.U_LAST_POST}" title="{L_GOTO_LAST_POST}"><time datetime="{topicrow.LAST_POST_TIME_RFC3339}">{topicrow.LAST_POST_TIME}</time></a>
							<!-- IF topicrow.S_POST_GLOBAL and FORUM_ID != topicrow.FORUM_ID --><br />{L_POSTED} {L_IN} <a href="{topicrow.U_VIEW_FORUM}">{topicrow.FORUM_NAME}</a><!-- ENDIF -->
						</div>
							<!-- IF topicrow.REPLIES -->
							<span class="responsive-show left-box" style="display: none;">{L_REPLIES}{L_COLON} <strong>{topicrow.REPLIES}</strong></span>
							<!-- ENDIF -->
						<!-- ENDIF -->

						<div class="topic-poster responsive-hide left-box">


							{% EVENT topiclist_row_topic_by_author_before %}
							{L_POST_BY_AUTHOR} <!-- EVENT viewforum_body_topic_author_username_prepend -->{topicrow.TOPIC_AUTHOR_FULL}<!-- EVENT viewforum_body_topic_author_username_append --> &raquo; <time datetime="{topicrow.FIRST_POST_TIME_RFC3339}">{topicrow.FIRST_POST_TIME}</time>
							{% EVENT topiclist_row_topic_by_author_after %}
							<!-- IF topicrow.S_POST_GLOBAL and FORUM_ID != topicrow.FORUM_ID --> &raquo; {L_IN} <a href="{topicrow.U_VIEW_FORUM}">{topicrow.FORUM_NAME}</a><!-- ENDIF -->
						</div>

						<!-- IF .topicrow.pagination -->
						<div class="pagination">
							<span><i class="icon fa-clone fa-fw" aria-hidden="true"></i></span>
							<ul>
							<!-- BEGIN pagination -->
								<!-- IF topicrow.pagination.S_IS_PREV -->
								<!-- ELSEIF topicrow.pagination.S_IS_CURRENT --><li class="active"><span>{topicrow.pagination.PAGE_NUMBER}</span></li>
								<!-- ELSEIF topicrow.pagination.S_IS_ELLIPSIS --><li class="ellipsis"><span>{L_ELLIPSIS}</span></li>
								<!-- ELSEIF topicrow.pagination.S_IS_NEXT -->
								<!-- ELSE --><li><a class="button" href="{topicrow.pagination.PAGE_URL}">{topicrow.pagination.PAGE_NUMBER}</a></li>
								<!-- ENDIF -->
							<!-- END pagination -->
							</ul>
						</div>
						<!-- ENDIF -->

						<!-- EVENT topiclist_row_append -->
					</div>
				</dt>
				<dd class="posts">{topicrow.REPLIES} <dfn>{L_REPLIES}</dfn></dd>
				<dd class="views">{topicrow.VIEWS} <dfn>{L_VIEWS}</dfn></dd>
				<dd class="lastpost">
					<span><dfn>{L_LAST_POST} </dfn>{L_POST_BY_AUTHOR} <!-- EVENT viewforum_body_last_post_author_username_prepend -->{topicrow.LAST_POST_AUTHOR_FULL}<!-- EVENT viewforum_body_last_post_author_username_append -->
						<!-- IF not S_IS_BOT and topicrow.U_LAST_POST -->
							<a href="{topicrow.U_LAST_POST}" title="{L_GOTO_LAST_POST}">
								<i class="icon fa-external-link-square fa-fw {% if topicrow.S_UNREAD_TOPIC %}icon-red{% else %}icon-lightgray{% endif %} icon-md" aria-hidden="true"></i><span class="sr-only">{VIEW_LATEST_POST}</span>
							</a>
						<!-- ENDIF -->
						<br /><time datetime="{topicrow.LAST_POST_TIME_RFC3339}">{topicrow.LAST_POST_TIME}</time>
					</span>
				</dd>
			</dl>
			<!-- EVENT viewforum_body_topic_row_append -->
		</li>
		<!-- EVENT viewforum_body_topic_row_after -->

	<!-- IF topicrow.S_LAST_ROW -->
			</ul>
		</div>
	</div>
	<!-- ENDIF -->

<!-- BEGINELSE -->
	<!-- IF S_IS_POSTABLE -->
	<div class="panel">
		<div class="inner">
		<strong>{{ lang(S_SORT_DAYS ? 'NO_TOPICS_TIME_FRAME' : 'NO_TOPICS') }}</strong>
		</div>
	</div>
	<!-- ELSE IF not S_HAS_SUBFORUM -->
	<div class="panel">
		<div class="inner">
			<strong>{L_NO_FORUMS_IN_CATEGORY}</strong>
		</div>
	</div>
	<!-- ENDIF -->
<!-- END topicrow -->

<!-- IF .topicrow and not S_DISPLAY_ACTIVE -->
	<div class="action-bar bar-bottom">
		<!-- IF not S_IS_BOT and S_DISPLAY_POST_INFO -->
			<!-- EVENT viewforum_buttons_bottom_before -->

			<a href="{U_POST_NEW_TOPIC}" class="button<!-- IF S_IS_LOCKED --> lock-btn<!-- ENDIF -->" title="<!-- IF S_IS_LOCKED -->{L_FORUM_LOCKED}<!-- ELSE -->{L_POST_TOPIC}<!-- ENDIF -->">
			<!-- IF S_IS_LOCKED -->
				<span>{L_BUTTON_FORUM_LOCKED}</span> <i class="icon fa-lock fa-fw" aria-hidden="true"></i>
			<!-- ELSE -->
				<span>{L_BUTTON_NEW_TOPIC}</span> <i class="icon fa-pencil fa-fw" aria-hidden="true"></i>
			<!-- ENDIF -->
			</a>

			<!-- EVENT viewforum_buttons_bottom_after -->
		<!-- ENDIF -->

		<!-- IF S_SELECT_SORT_DAYS and not S_IS_BOT -->
			<form method="post" action="{S_FORUM_ACTION}">
			<!-- INCLUDE display_options.html -->
			</form>
		<!-- ENDIF -->

		<div class="pagination">
			<!-- IF not S_IS_BOT and U_MARK_TOPICS and .topicrow --><a href="{U_MARK_TOPICS}" data-ajax="mark_topics_read">{L_MARK_TOPICS_READ}</a> &bull; <!-- ENDIF -->
			{TOTAL_TOPICS}
			<!-- IF .pagination -->
				<!-- INCLUDE pagination.html -->
			<!-- ELSE -->
				 &bull; {PAGE_NUMBER}
			<!-- ENDIF -->
		</div>
	</div>
<!-- ENDIF -->

<!-- INCLUDE jumpbox.html -->

{% EVENT viewforum_body_online_list_before %}

<div class="forumbg alt_block" id="clutter_collapse">
    <div class="inner">
        <ul class="topiclist">
            <li class="header">
                <dl class="row-item">
                    <dt><div class="list-inner">{L_INFORMATION}</div></dt>
                </dl>
            </li>
        </ul>
	 <ul class="topiclist forums">	
<!-- IF S_DISPLAY_ONLINE_LIST and U_VIEWONLINE -->
 <li class="row">
	<div class="stat-block online-list">
		<h3><a href="{U_VIEWONLINE}">{L_WHO_IS_ONLINE}</a></h3>
		<p>{LOGGED_IN_USER_LIST}</p>
	</div>
</li>
<!-- ENDIF -->

<!-- IF S_IS_POSTABLE and rules|length -->
 <li class="row">
	<div class="stat-block permissions">
		<h3>{L_FORUM_PERMISSIONS}</h3>
		<p><!-- BEGIN rules -->{rules.RULE}<br /><!-- END rules --></p>
	</div>
 </li>
<!-- ENDIF -->
    	</ul>
    </div>
</div>

<!-- INCLUDE overall_footer.html -->
User avatar
cabot
Registered User
Posts: 677
Joined: Sat Jan 07, 2012 4:16 pm
Contact:

Re: Topic Type

Post by cabot »

If you want to display them vertically, you must not nest the tags.
Also you have to wrap the code with conditional statements otherwise there is an empty tag returned depending on the case.
And while you're at it, you can remove the <span> tags that don't add anything, just add the topic_type class on the <i> tags,
Keep in mind that the order of the statements is important, so it's up to you to rearrange them in the desired order

Code: Select all

					<!-- IF topicrow.S_POST_STICKY || topicrow.S_POST_ANNOUNCE || topicrow.S_POST_GLOBAL || topicrow.S_HAS_POLL || topicrow.S_TOPIC_LOCKED -->
						<i class="topic_type icon fa-<!-- IF topicrow.S_POST_STICKY -->thumb-tack<!-- ELSEIF topicrow.S_POST_ANNOUNCE || topicrow.S_POST_GLOBAL -->bullhorn<!-- ELSEIF topicrow.S_HAS_POLL -->bar-chart<!-- ELSEIF topicrow.S_TOPIC_LOCKED -->lock<!-- ENDIF --> fa-fw"></i>
					<!-- ENDIF -->

					<!-- IF topicrow.ATTACH_ICON_IMG -->
						<i class="topic_type icon fa-paperclip fa-fw"></i>
					<!-- ENDIF -->
Then add clear: both; on .topic_type in CSS.

In my opinion adding an icon for stickies and announcements is redundant because there is already an icon on the left that gives the information.

Either you add only one icon (poll, locked or attachment):

Code: Select all

					<!-- IF topicrow.S_HAS_POLL or topicrow.S_TOPIC_LOCKED or topicrow.ATTACH_ICON_IMG -->
						<i class="topic_type icon fa-<!-- IF topicrow.S_HAS_POLL -->bar-chart<!-- ELSEIF topicrow.S_TOPIC_LOCKED -->lock<!-- ELSEIF topicrow.ATTACH_ICON_IMG -->paperclip<!-- ENDIF --> fa-fw"></i>
					<!-- ENDIF -->
Either you accumulate the extra icons (more logical solution in my humble opinion):

Code: Select all

					<!-- IF topicrow.S_HAS_POLL or topicrow.S_TOPIC_LOCKED or topicrow.ATTACH_ICON_IMG -->
						<!-- IF topicrow.S_TOPIC_LOCKED -->
							<i class="topic_type icon fa-lock fa-fw"></i>
						<!-- ENDIF -->
						<!-- IF topicrow.S_HAS_POLL -->
							<i class="topic_type icon fa-bar-chart fa-fw"></i>
						<!-- ENDIF -->
						<!-- IF topicrow.ATTACH_ICON_IMG -->
							<i class="topic_type icon fa-paperclip fa-fw"></i>
						<!-- ENDIF -->
					<!-- ENDIF -->
Or, I don't know, actually there are different ways to do it depending on what you want. ^^
User avatar
bennybernaer
Registered User
Posts: 599
Joined: Tue Mar 22, 2011 9:53 pm
Contact:

Re: Topic Type

Post by bennybernaer »

Thank you very much Carbon! I used your first code.

Solved!
User avatar
cabot
Registered User
Posts: 677
Joined: Sat Jan 07, 2012 4:16 pm
Contact:

Re: Topic Type

Post by cabot »

Glad you found a solution that works for you. :)

cabot*
Post Reply

Return to “[3.3.x] Styles Support & Discussion”