Перейти к содержимому


Информация статьи

  • Дабавлена: 17 май 2013 00:35
  • Просмотров: 867
 


* * * * *
3 Рейтинг

Статистика как на ipb 3.1.4

Написано ๖ۣۣۜDesperate™ 17 май 2013 00:35

В данном примере будем делать статистику, как на форуме 3.1.4 которая всем понравилась. Пример будет приводиться для стандартного шаблона, так как под все писать не хватит сил и терпения ))) Статья только под форум ipb 3.4

Пройти в АЦ - Внешний вид - Ваш стиль - CSS - ipb_styles.css

 

Найти:

.statistics {
	margin: 20px 0 0 0;
	padding: 10px 0;
	border-top: 3px solid #d8d8d8;
	line-height: 1.3;
	overflow: hidden;
}

Заменить на:

.statistics {
	margin: 5px 5px 0 0;
	padding: 10px 10px;
	line-height: 1.3;
	overflow: hidden;
}

После добавить в самый конец ipb_styles.css

#stats { 
	border-left: 1px solid #e4ebf2;
	padding-left: 20px;
	width: 33%;
	float: right;
}

	#stats dl {
		margin-left: 10px;
	}

	#stats dt,
	#stats dd { 
		border-top: 1px solid #dedede;
		font-size: 0.85em;
		padding: 6px 2px;
		float: left;
		width: 45%;
	}

	#stats dt { 
		font-weight: bold;
		clear: both;
	}

	#stats .extra { 
		color: #a2a2a2;
		font-size: 0.9em;
	}

Сохраняем и переходим к АЦ - Внешний вид Ваш стиль - Список форумов - boardIndexTemplate

 

Найти:

 


<if test="showTotals:|:$this->settings['show_totals']">
	<div id='board_stats'>		
		<ul class='ipsType_small ipsList_inline'>
			<li class='clear'>
				<span class='value'>{$stats['info']['total_posts']}</span>
				{$this->lang->words['total_posts']}
			</li>
			<li class='clear'>
				<span class='value'>{$stats['info']['mem_count']}</span>
				{$this->lang->words['total_members']}
			</li>
			<li class='clear'>
				{IPSMember::makeProfileLink( $stats['info']['last_mem_name'], $stats['info']['last_mem_id'], $stats['info']['last_mem_seo'], 'value' )}
				{$this->lang->words['newest_member']}
			</li>
			<li class='clear' data-tooltip="{$stats['info']['most_time']}">
				<span class='value'>{$stats['info']['most_online']}</span>
				{$this->lang->words['online_at_once']}
			</li>
		</ul>
	</div>
</if>
<div id='board_statistics' class='statistics clearfix'>
	<ul id='stat_links' class='ipsList_inline right ipsType_small'>
		<if test="statsLinks:|:1==1"> <!-- Hook point -->
			<li><a href="{parse url="app=forums&amp;module=extras&amp;section=stats&amp;do=leaders" base="public"}" title="{$this->lang->words['sm_forum_leaders_title']}">{$this->lang->words['sm_forum_leaders']}</a></li>
			<li><a href="{parse url="app=forums&amp;module=extras&amp;section=stats" base="public"}" title="{$this->lang->words['sm_all_posters_title']}">{$this->lang->words['sm_today_posters']}</a></li>
			<li><a href="{parse url="app=members&amp;module=list&amp;max_results=20&amp;sort_key=posts&amp;sort_order=desc&amp;filter=ALL" base="public" seotitle="false"}" title="{$this->lang->words['sm_overall_posters_title']}">{$this->lang->words['sm_overall_posters']}</a></li>
			<if test="reputationEnabled:|:$this->settings['reputation_enabled']">
				<li>
					<a href="{parse url="app=members&amp;module=reputation&amp;section=most" base="public" template="most_liked" seotitle="most_liked"}">
						<if test="reputationType:|:$this->settings['reputation_point_types'] == 'like'">
							{$this->lang->words['most_rep_likes']}
						<else />
							{$this->lang->words['most_rep_rep']}
						</if>
					</a>
				</li>
			</if>
		</if>
	</ul>
	
	<if test="showActive:|:$this->settings['show_active'] && $this->memberData['gbw_view_online_lists']">
		<h4 class='statistics_head'>{parse expression="sprintf( $this->lang->words['online_right_now'], $stats['TOTAL'] )"} {$this->lang->words['active_users']}</h4>
		<p class='statistics_brief desc'>
			{parse expression="sprintf( $this->lang->words['active_users_detail'], $stats['MEMBERS'], $stats['GUESTS'], $stats['ANON'] )"}
			<if test="onlineListEnabled:|:$this->settings['allow_online_list']">&nbsp;&nbsp;<a href='{parse url="app=members&amp;module=online&amp;sort_order=desc" base="public"}'>({$this->lang->words['online_link']})</a></if>
		</p>
	</if>
	<if test="activeNames:|:count($stats['NAMES']) && $this->settings['show_active']">
		<br />
		<p>
			<span class='name'>{parse expression="implode( ",</span> <span class='name'>", $stats['NAMES'] )"}</span>
		</p>
	</if>
</div>

Заменить на:

<h3 class='maintitle'>&nbsp;
	<ul id='stat_links' class='ipsList_inline right ipsType_small'>
		<if test="statsLinks:|:1==1"> <!-- Hook point -->
			<li><a href="{parse url="app=forums&amp;module=extras&amp;section=stats&amp;do=leaders" base="public"}" title="{$this->lang->words['sm_forum_leaders_title']}">{$this->lang->words['sm_forum_leaders']}</a></li>
			<li><a href="{parse url="app=forums&amp;module=extras&amp;section=stats" base="public"}" title="{$this->lang->words['sm_all_posters_title']}">{$this->lang->words['sm_today_posters']}</a></li>
			<li><a href="{parse url="app=members&amp;module=list&amp;max_results=20&amp;sort_key=posts&amp;sort_order=desc&amp;filter=ALL" base="public" seotitle="false"}" title="{$this->lang->words['sm_overall_posters_title']}">{$this->lang->words['sm_overall_posters']}</a></li>
			<if test="reputationEnabled:|:$this->settings['reputation_enabled']">
				<li>
					<a href="{parse url="app=members&amp;module=reputation&amp;section=most" base="public" template="most_liked" seotitle="most_liked"}">
						<if test="reputationType:|:$this->settings['reputation_point_types'] == 'like'">
							{$this->lang->words['most_rep_likes']}
						<else />
							{$this->lang->words['most_rep_rep']}
						</if>
					</a>
				</li>
			</if>
		</if>
	</ul>
</h3>
	
<div class='ipsBox table_wrap'>
	<div class='ipsBox_container'>
		<div id='board_statistics' class='statistics general_box'>
			<if test="showTotals:|:$this->settings['show_totals']">
				<div id='stats'>
					<h4 class='statistics_head'>{$this->lang->words['board_stats']}</h4>
					<dl>
						<dt>{$this->lang->words['total_posts']}</dt>
						<dd>{$stats['info']['total_posts']}</dd>
						<dt>{$this->lang->words['total_members']}</dt>
						<dd>{$stats['info']['mem_count']}</dd>
						<dt>{$this->lang->words['newest_member']}</dt>
						<dd><a href='{$stats['info']['last_mem_link']}' title='{$this->lang->words['view_profile']}'>{$stats['info']['last_mem_name']}</a>{parse template="user_popup" group="global" params="$stats['info']['last_mem_id'],$stats['info']['last_mem_seo']"} </dd>
						<dt>{$this->lang->words['online_at_once']}</dt>
						<dd>{$stats['info']['most_online']}<br /><span class='extra'>{$stats['info']['most_time']}</span></dd>
					</dl>
				</div>
			</if>	

			<if test="showActive:|:$this->settings['show_active'] && $this->memberData['gbw_view_online_lists']">
				<h4 class='statistics_head'>{parse expression="sprintf( $this->lang->words['online_right_now'], $stats['TOTAL'] )"} {$this->lang->words['active_users']}</h4>
				<p class='statistics_brief desc'>
					{parse expression="sprintf( $this->lang->words['active_users_detail'], $stats['MEMBERS'], $stats['GUESTS'], $stats['ANON'] )"}
					<if test="onlineListEnabled:|:$this->settings['allow_online_list']">&nbsp;&nbsp;<a href='{parse url="app=members&amp;module=online&amp;sort_order=desc" base="public"}'>({$this->lang->words['online_link']})</a></if>
				</p>
			</if>
			<if test="activeNames:|:count($stats['NAMES']) && $this->settings['show_active']">
				<br />
				<p>
					<span class='name'>{parse expression="implode( ",</span> <span class='name'>", $stats['NAMES'] )"}</span>
				</p>
			</if>
		</div>
	</div>
</div>

Сохранить и проверяем что у нас получилось 

 

519542fd08984_2.png

  • 0

Powered by Tutorials 1.5.0 © 2016, by Michael McCune