Jump to content

Featured Replies

Posted

[BIM40] Forum Stats


Плагин отображает последние сообщения / темы из определенных разделов.

На скрине плагин русифицирован мною.


Версия 1.0.1

 (BIM40) Forums Stats 1.0.1.zip

Я сделал пользовательские обновления этого замечательного плагина. Откройте шаблон bim_forumStats_row (сделать резервную копию) и заменить все, что есть с этим:

<li id='{$row->tid}'class='ipsClearfix ipsDataItem{{if $row->unread()}} ipsDataItem_unread{{endif}}{{if $row->hidden()}} ipsModerated{{endif}}'>
	{{if $row->unread()}}
			<div class='ipsDataItem_icon ipsPos_top'>
				
					<span class='ipsItemStatus'><i class="fa fa-circle"></i></span>
			</div>
		{{else}}
				<div class='ipsDataItem_icon'><span class='read'><i class="fa fa-circle-o"></i></span></div>
			{{endif}}
  <div class='ipsDataItem_main'>
		{{if $row->prefix()}}{template="prefix" group="global" app="core" params="$row->prefix( TRUE ), $row->prefix()"}{{endif}}
		<a href="{$row->url()->setQueryString( 'do', 'getLastComment' )}" title='{lang="view_this_topic" sprintf="$row->title"}' class='ipsDataItem_title ipsType_break'>
			{wordbreak="$row->title"}
		</a>
		{{if $row->mapped('featured') || $row->hidden() === -1 || $row->hidden() === 1}}
			<span>
				{{if $row->hidden() === -1}}
					<span class="ipsBadge ipsBadge_icon ipsBadge_small ipsBadge_warning" data-ipsTooltip title='{$row->hiddenBlurb()}'><i class='fa fa-eye-slash'></i></span>
				{{elseif $row->hidden() === 1}}
					<span class="ipsBadge ipsBadge_icon ipsBadge_small ipsBadge_warning" data-ipsTooltip title='{lang="pending_approval"}'><i class='fa fa-warning'></i></span>
				{{endif}}
				{{if $row->mapped('featured')}}
					<span class="ipsBadge ipsBadge_icon ipsBadge_small ipsBadge_positive" data-ipsTooltip title='{lang="featured"}'><i class='fa fa-star'></i></span>
				{{endif}}
			</span>
    {{endif}}
    <p class='ipsType_reset ipsType_large ipsType_light'>
			{{if \IPS\Request::i()->controller != 'forums'}}
				{lang="in"} <a href="{$row->container()->url()}">{$row->container()->_title}</a>
			{{endif}}
		</p>
	</div>
	<ul class="ipsDataItem_lastPoster ipsClearfix ipsResponsive_hidePhone">
		<div class="elBimipsPos_right">
		<li>{{if $name=='fsNewTopics'}}
          {template="userPhoto" app="core" group="global" params="$row->author(), 'tiny'"}
			{template="userLinkFromData" group="global" app="core" params="$row->starter_id, $row->author()->name, $row->author()->seo_name, $row->author()->member_group_id"}
		{{else}}
			{{$mem = \IPS\Member::load( $row->last_poster_id );}}
          {template="userPhoto" app="core" group="global" params="$row->lastCommenter(), 'tiny'"}
			{template="userLinkFromData" group="global" app="core" params="$row->last_poster_id, $mem->name, $mem->seo_name, $mem->member_group_id"}		
          {{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>
		</div>
	</ul>
</li>

Затем, в bimforumstats.css добавить следующее:

.elBimipsPos_right{
  float:right;
  width: 55%;
    max-width: 60%;
    min-width: 170px;
    list-style: none;
    margin: 0;
    padding: 0;
}

Результат:

2015-08-28_191455.png.9718dfb5500fe290c1

  • 2 недели спустя...

А где найти шаблон bim_forumStats_row? Я только bim_forumStats вижу. При замене его - ошибка.

core > global > global > plugins > bim_forumStats_row

Сделал. Эффекта никакого. :( CSS обновил.

Уверены, что заменили все правильно? Кеш форума/браузера чистили?

Update of my modified code. Now it opens the last Unread post, instead of always the last post. Also, the name of the source forums is now in italics:

<li id='{$row->tid}'class='ipsClearfix ipsDataItem{{if $row->unread()}} ipsDataItem_unread{{endif}}{{if $row->hidden()}} ipsModerated{{endif}}'>
	{{if $row->unread()}}
			<div class='ipsDataItem_icon ipsPos_top'>
				
					<span class='ipsItemStatus'><i class="fa fa-circle"></i></span>
			</div>
		{{else}}
				<div class='ipsDataItem_icon'><span class='read'><i class="fa fa-circle-o"></i></span></div>
			{{endif}}
  <div class='ipsDataItem_main'>
		{{if $row->prefix()}}{template="prefix" group="global" app="core" params="$row->prefix( TRUE ), $row->prefix()"}{{endif}}
		<a href='{$row->url( 'getNewComment' )}' title='{lang="first_unread_post"}' class='ipsDataItem_title ipsType_break'>
			{wordbreak="$row->title"}
		</a>
		{{if $row->mapped('featured') || $row->hidden() === -1 || $row->hidden() === 1}}
			<span>
				{{if $row->hidden() === -1}}
					<span class="ipsBadge ipsBadge_icon ipsBadge_small ipsBadge_warning" data-ipsTooltip title='{$row->hiddenBlurb()}'><i class='fa fa-eye-slash'></i></span>
				{{elseif $row->hidden() === 1}}
					<span class="ipsBadge ipsBadge_icon ipsBadge_small ipsBadge_warning" data-ipsTooltip title='{lang="pending_approval"}'><i class='fa fa-warning'></i></span>
				{{endif}}
				{{if $row->mapped('featured')}}
					<span class="ipsBadge ipsBadge_icon ipsBadge_small ipsBadge_positive" data-ipsTooltip title='{lang="featured"}'><i class='fa fa-star'></i></span>
				{{endif}}
			</span>
    {{endif}}
    <p class='ipsType_reset ipsType_tiny ipsType_light'>
			{{if \IPS\Request::i()->controller != 'forums'}}
      {lang="in"} <a href="{$row->container()->url()}"><i>{$row->container()->_title}</i></a>
			{{endif}}
		</p>
	</div>
	<ul class="ipsDataItem_lastPoster ipsClearfix ipsResponsive_hidePhone">
		<div class="elBimipsPos_right">
		<li>{{if $name=='fsNewTopics'}}
          {template="userPhoto" app="core" group="global" params="$row->author(), 'tiny'"}
			{template="userLinkFromData" group="global" app="core" params="$row->starter_id, $row->author()->name, $row->author()->seo_name, $row->author()->member_group_id"}
		{{else}}
			{{$mem = \IPS\Member::load( $row->last_poster_id );}}
          {template="userPhoto" app="core" group="global" params="$row->lastCommenter(), 'tiny'"}
			{template="userLinkFromData" group="global" app="core" params="$row->last_poster_id, $mem->name, $mem->seo_name, $mem->member_group_id"}		
          {{endif}}</li>	
          <li class="ipsType_light">
            <a href='{$row->url( 'getNewComment' )}' 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>
		</div>
	</ul>
</li>

 

Update of my modified code. Now it opens the last Unread post, instead of always the last post. Also, the name of the source forums is now in italics:

Скрытый контент

Not bad :good:

Update of my modified code. Now it opens the last Unread post, instead of always the last post. Also, the name of the source forums is now in italics:

Скрытый контент

Can you please help me with the installation of your update? I installed the plugin itself, swapped the entire bim_forumStats_row content with the given code. Added that style snippet you provided in the end of the css. Though, the plugin does not seem to change at all. Everything stays the same.

Можешь пожалкцйста помочь с установкой твоего обновления? Я поставил сам плагин, заменил все содержимое  bim_forumStats_row на данный код. Добавил кусок кода в конец css. Ничего не изменяется.

It would not look good in the sidebar. The information to show is too much to fit in so little space.

I already made a Photoshop layout. Looks good for me. I only the need to show the avatar, topic name and the name of a user who left last message. Date is optional but it also fits quite good.

  • 1 месяц спустя...
  • 1 месяц спустя...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Ответить в этой теме...

Последние посетители 0

  • No registered users viewing this page.