Jump to content
IPS Invision Community
Sign in to follow this  

Теги в списке тем


Description

Изменяем стандартный вид тегов в списке тем.

1.png.fbdb62b964ef68fafe9ca53a8f027326.png

Скрытый текст

2.png.b2820fbd48a2990b06663685d361d501.png

3.png.4c3689a250c19820c35041fa1f968172.png

4.png.99637c0f1926e256f643833369ee18cf.png

5.png.e25556d4d56f941e18246fe8ca11f7f2.png

При наведении будут выходить подсказка а так же у иконок тем.

  • открываем список стиле
  • редактирование HTML и CSS
  • нажимаем на вкладку с шаблонами и в окошке вписываем topicRow
  • заменяем всё на;
{{$rowIds = array();}}
{{foreach $rows as $row}}
	{{$idField = $row::$databaseColumnId;}}
	{{$rowIds[] = $row->$idField;}}
{{endforeach}}
{{if \count( $rows )}}
	{{$rowCount=0;}}
	{{foreach $rows as $row}}
		{{if $rowCount == 1 AND $advertisement = \IPS\core\Advertisement::loadByLocation( 'ad_forum_listing' )}}
			<li class="ipsDataItem">
				{$advertisement|raw}
			</li>
		{{endif}}
		{{$rowCount++;}}
		{{$idField = $row::$databaseColumnId;}}
		{{if $row->mapped('moved_to')}}
			{{if $movedTo = $row->movedTo() AND $movedTo->container()->can('view')}}
				<li class="ipsDataItem">
					<div class='ipsDataItem_icon ipsType_center ipsType_noBreak'>
						<i class="fa fa-arrow-left ipsType_large"></i>
					</div>
					<div class='ipsDataItem_main'>
						<h4 class='ipsDataItem_title ipsContained_container'>
							<span class='ipsType_break ipsContained'>
								<em><a href='{$movedTo->url()}' title='{lang="go_to_new_location"}'>{$row->mapped('title')}</a></em>
							</span>
						</h4>
						<div class='ipsDataItem_meta'>
							{{if isset( $row::$databaseColumnMap['status'] )}}
								{{$statusField = $row::$databaseColumnMap['status'];}}
								{{if $row->$statusField == 'merged'}}
									<p class='ipsType_reset ipsType_light ipsType_blendLinks'>{lang="topic_merged_to" sprintf="$movedTo->url(), $movedTo->mapped('title')"}</p>
								{{else}}
									<p class='ipsType_reset ipsType_light ipsType_blendLinks'>{lang="topic_moved_to" sprintf="$movedTo->container()->url(), $movedTo->container()->_title"}</p>
								{{endif}}
							{{else}}
								<p class='ipsType_reset ipsType_light ipsType_blendLinks'>{lang="topic_moved_to" sprintf="$movedTo->container()->url(), $movedTo->container()->_title"}</p>
							{{endif}}
						</div>
					</div>
					{{if $table->canModerate()}}
						<div class='ipsDataItem_modCheck'>
							<span class='ipsCustomInput'>
								<input type='checkbox' data-role='moderation' name="moderate[{$row->$idField}]" data-actions="{{if $row->mapped('featured')}}unfeature{{endif}} {{if $row->mapped('pinned')}}unpin{{endif}} delete" data-state='{{if $row->mapped('pinned')}}pinned{{endif}} {{if $row->mapped('featured')}}featured{{endif}}'>
								<span></span>
							</span>
						</div>
					{{endif}}
				</li>
			{{endif}}
		{{else}}
			<li class="ipsDataItem ipsDataItem_responsivePhoto {{if $row->unread()}}ipsDataItem_unread{{endif}} {{if method_exists( $row, 'tableClass' ) && $row->tableClass()}}ipsDataItem_{$row->tableClass()}{{endif}} {{if $row->hidden()}}ipsModerated{{endif}}" data-rowID='{$row->$idField}'>
				{{if member.member_id}}
					<div class='ipsDataItem_icon ipsPos_top endj'>
						{{if $row->unread()}}
							<a href='{$row->url( 'getNewComment' )}' title='{lang="first_unread_post"}' data-ipsTooltip>
								<span class=''><i class="fa {{if \in_array( $row->$idField, $table->contentPostedIn )}}fa-star{{else}}fa-eye{{endif}}"></i></span>
							</a>
						{{else}}
							{{if \in_array( $row->$idField, $table->contentPostedIn )}}
								<span class=' ipsItemStatus_read ipsItemStatus_posted' data-ipsTooltip title='Вы писали в этой теме'><i class="fa fa-commenting-o"></i></span>
							{{else}}
								<i class="fa fa-comments-o" data-ipsTooltip title='Вы не писали в этой теме'></i>&nbsp;
							{{endif}}
						{{endif}}
					</div>
				{{endif}}
				<div class='ipsDataItem_main'>
					<h4 class='ipsDataItem_title ipsContained_container'>
						{{if $row->locked()}}
                      <span><span class="TAGALL CLOSE_title" data-ipsTooltip title='Обсуждение закрыто, ответы больше не принимаются.' tabindex="0"><i class='ipsType_medium fa fa-lock'></i> Закрыто</span></span>							
                      {{if $row->topic_open_time && $row->topic_open_time > time()}}
								<span><strong class='TAGALL TIME_title' data-ipsTooltip title='{lang="topic_unlocks_at" sprintf="\IPS\DateTime::ts( $row->topic_open_time )->relative(), \IPS\DateTime::ts( $row->topic_open_time )->localeTime( FALSE )"}'>{lang="topic_unlocks_at_short" sprintf="\IPS\DateTime::ts($row->topic_open_time)->relative(1)"}</strong>&nbsp;&nbsp;</span>
							{{endif}}
						{{elseif !$row->locked() && $row->topic_close_time && $row->topic_close_time > time()}}
							<span><strong class='TAGALL TIME_title' data-ipsTooltip title='{lang="topic_locks_at" sprintf="\IPS\DateTime::ts( $row->topic_close_time )->relative(), \IPS\DateTime::ts( $row->topic_close_time )->localeTime( FALSE )"}'><i class='fa fa-clock-o'></i> {lang="topic_locks_at_short" sprintf="\IPS\DateTime::ts($row->topic_close_time)->relative(1)"}</strong>&nbsp;&nbsp;</span>
						{{endif}}

						{{if $row->mapped('poll')}}
							<span><span class="TAGALL POLL_title" data-ipsTooltip title='{lang="topic_has_poll"}'><i class='fa fa-question'></i> {lang="topic_has_poll"}</span></span>
						{{endif}}
						
						{{if $row->mapped('pinned') || $row->mapped('featured') || $row->hidden() === -1 || $row->hidden() === 1}}
							{{if $row->hidden() === -1}}
								<span><span class="TAGALL close_title" data-ipsTooltip title='{$row->hiddenBlurb()}'><i class='fa fa-eye-slash'></i> {$row->hiddenBlurb()}</span></span>
							{{elseif $row->hidden() === 1}}
								<span><span class="TAGALL close_title" data-ipsTooltip title='{lang="pending_approval"}'><i class='fa fa-warning'></i> {lang="pending_approval"}</span></span>
							{{endif}}							
							{{if $row->mapped('pinned')}}
								<span><span class="TAGALL PIN_title" data-ipsTooltip title='{lang="pinned"}'><i class='fa fa-thumb-tack'></i> {lang="pinned"}</span></span>
							{{endif}}
							{{if $row->mapped('featured')}}
								<span><span class="TAGALL TOPstar_title" data-ipsTooltip title='{lang="featured"}'><i class='fa fa-star'></i> {lang="featured"}</span></span>
							{{endif}}
						{{endif}}
										
						{{if $row->prefix()}}
							<span>{template="prefix" group="global" app="core" params="$row->prefix( TRUE ), $row->prefix()"}</span>
						{{endif}}						
						
						<span class='ipsType_break ipsContained'>
							<a href='{$row->url()}' class='' title='{{if $row->mapped('title')}}{$row->mapped('title')}{{else}}{lang="content_deleted"}{{endif}} {{if $row->canEdit()}}{lang="click_hold_edit"}{{endif}}' {{if $row->tableHoverUrl and $row->canView()}} data-ipsHover data-ipsHover-target='{$row->url()->setQueryString('preview', 1)}' data-ipsHover-timeout='1.5'{{endif}}{{if $row->canEdit()}} data-role="editableTitle"{{endif}}>
								<span>
									{{if $row->mapped('title') or $row->mapped('title') == 0}}{$row->mapped('title')}{{else}}<em class="ipsType_light">{lang="content_deleted"}</em>{{endif}}
								</span>
							</a>

							{{if $row->commentPageCount() > 1}}
								{$row->commentPagination( array(), 'miniPagination' )|raw}
							{{endif}}
						</span>
					</h4>
					<div class='ipsDataItem_meta ipsType_reset ipsType_light ipsType_blendLinks'>
						<span>
							{lang="byline_itemprop" htmlsprintf="$row->author()->link()"}
						</span>{datetime="$row->mapped('date')" lowercase="true"}
						{{if !\in_array( \IPS\Dispatcher::i()->controller, array( 'forums', 'index' ) )}}
							{lang="in"} <a href="{$row->container()->url()}">{$row->container()->_title}</a>
						{{endif}}
						{{if \count( $row->tags() )}}
							&nbsp;&nbsp;
							{template="tags" group="global" app="core" params="$row->tags(), true"}
						{{endif}}
					</div>
				</div>
				<ul class='ipsDataItem_stats'>
					{{foreach $row->stats(FALSE) as $k => $v}}
						<li {{if $k == 'num_views'}}class='ipsType_light'{{elseif \in_array( $k, $row->hotStats )}}class="ipsDataItem_stats_hot" data-text='{lang="hot_item"}' data-ipsTooltip title='{lang="hot_item_desc"}'{{endif}}>
							<span class='ipsDataItem_stats_number'>{number="$v"}</span>
							<span class='ipsDataItem_stats_type'>{lang="{$k}" pluralize="$v"}</span>
							{{if ( $k == 'forums_comments' OR $k == 'answers_no_number' ) && \IPS\forums\Topic::modPermission( 'unhide', NULL, $row->container() ) AND $unapprovedComments = $row->mapped('unapproved_comments')}}
								&nbsp;<a href='{$row->url()->setQueryString( 'queued_posts', 1 )}' class='ipsType_warning ipsType_small ipsPos_right ipsResponsive_noFloat' data-ipsTooltip title='{lang="queued_posts_badge" pluralize="$row->topic_queuedposts"}'><i class='fa fa-warning'></i> <strong>{$unapprovedComments}</strong></a>
							{{endif}}
						</li>
					{{endforeach}}
				</ul>
				<ul class='ipsDataItem_lastPoster ipsDataItem_withPhoto ipsType_blendLinks'>
					<li>
						{{if $row->mapped('num_comments')}}
							{template="userPhoto" app="core" group="global" params="$row->lastCommenter(), 'tiny'"}
						{{else}}
							{template="userPhoto" app="core" group="global" params="$row->author(), 'tiny'"}
						{{endif}}
					</li>
					<li>
						{{if $row->mapped('num_comments')}}
							{$row->lastCommenter()->link()|raw}
						{{else}}
							{$row->author()->link()|raw}
						{{endif}}
					</li>
					<li class="ipsType_light">
						<a href='{$row->url( 'getLastComment' )}' title='{lang="get_last_post"}' class='ipsType_blendLinks'>
							{{if $row->mapped('last_comment')}}{datetime="$row->mapped('last_comment')"}{{else}}{datetime="$row->mapped('date')"}{{endif}}
						</a>
					</li>
				</ul>
				{{if $table->canModerate()}}
					<div class='ipsDataItem_modCheck'>
						<span class='ipsCustomInput'>
							<input type='checkbox' data-role='moderation' name="moderate[{$row->$idField}]" data-actions="{expression="implode( ' ', $table->multimodActions( $row ) )"}" data-state='{{if $row->tableStates()}}{$row->tableStates()}{{endif}}'>
							<span></span>
						</span>
					</div>
				{{endif}}
			</li>
		{{endif}}
	{{endforeach}}
{{endif}}
  • открываем вкладку CSS
  • находим custom.css
  • в самый низ добавляем;
/** Теги в списке тем **/
.TAGALL {
    font-size: 11px;
    padding: 0 4px;
    font-weight: 500;
    text-align: center;
    white-space: nowrap;
    vertical-align: middle;
    border-radius: .25em;
    border: 1px solid;
}
.CLOSE_title {
    color: #b63f3f;
}
.PIN_title {
    color: #3b944a;
}
.TOPstar_title {
    color: #5d89d4;
}
.POLL_title {
    color: #009688;
}
.TIME_title {
    color: #009688;
}
/** Теги в списке тем конец **/

На этом всё.

  • Нравится 2
  • Спасибо 1
  • Поддержать 1


Recommended Comments

Ну ты красава! :beer2: Прикольные вещи делаешь СПАСИБО.

  • Поддержать 1

Share this comment


Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...
Вверх