Jump to content

Featured Replies

Posted
comment_91206

Добрый день

Есть один не большой вопрос , как можно сделать статистику в конце сайта как у вас? Реально ли это? Может кто не будь помочь , подсказать что и как сделать?

55b61674d63a8_.thumb.PNG.88ec17551c51e29

comment_91209

На мафии стоит ips 4.0, на скрине статистика от ips 4.0, судя по разделу у вас стоит ipb 3.x.x, отсюда вытекает вывод: либо забить, либо переписывать шаблон чтобы получить точно такую же статистику.

comment_91212

Просто берете скелет от 4-ки(css+html), прописываете вывод как он должен быть в 3.4.7 и вставляете его после основного контента.

comment_91213

Статстикa как на IPB 4.0

silence.thumb.png.1729f62f688cfa27f4be97

1.  Перейдите в Admin CP -> Look & Feel -> Select Template -> Board Index -> 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"}" title="<if test="reputationTypeTitle:|:$this->settings['reputation_point_types'] == 'like'">{$this->lang->words['most_rep_likes']}<else />{$this->lang->words['most_rep_rep']}</if>">
						<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"}' title='{$this->lang->words['online_link']}'>({$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>

 

2. Найти:

</div>
	<if test="sideBarEnabled2:|:$this->templateVars['sidebar_enabled']">
		<div id='index_stats' class='ipsLayout_right clearfix' <if test="sidebarclosed2:|:IPSCookie::get('hide_sidebar') == '1'">style='display: none'</if>>
			<foreach loop="side_blocks:$side_blocks as $block">
				{$block}
			</foreach>

 

3. Перед ним, вставить этот код:

<if test="$this->settings['forum_footer_statistics']=='yes'">
 <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 tooltip' title="{$stats['info']['most_time']}">
 <span class='value'>{$stats['info']['most_online']}</span>
 {$this->lang->words['online_at_once']}
 </li>
 </ul>
 </div>
 </if>
 </if>
 <div id='board_statistics' class='statistics clearfix'>
 
 <if test="showActive:|:$this->settings['show_active'] && $this->memberData['gbw_view_online_lists']">{parse expression="sprintf( $this->lang->words['online_right_now'], $stats['TOTAL'] )"} {$this->lang->words['active_users']}</if></h4>
 <if test="$this->settings['show_active']"><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 class="ipsWidget ipsWidget_horizontal" data-blockid="app_core_stats" data-blockconfig="true" data-controller="core.front.widgets.block">	<h3 class="ipsType_reset ipsWidget_title">Пользователей</h3>
 <div class="ipsWidget_inner">
 <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']['mem_count']}</span><br>
 {$this->lang->words['total_members']}
 </li>
 
 <li class='clear tooltip' title="{$stats['info']['most_time']}">
 <span class='value'>{$stats['info']['most_online']}</span><br>
 {$this->lang->words['online_at_once']}
 </li>
 
 <li class='clearbg'> 
 <div class='testbg'>
 <php>
 $member = IPSMember::load( $stats['info']['last_mem_id']);
 </php>
 <img src="http://ВАШ САЙТ/<if test="$member['pp_thumb_photo']">uploads/{$member['pp_thumb_photo']}<else />uploads/profile/default_large.png </if>" width='150' height='150' class="ipsUserPhoto ipsUserPhoto_medium"></div>
 <span class="ipsType_minorHeading">{$this->lang->words['newest_member']}</span><br>
 
 <span class="ipsType_normal">	
 {IPSMember::makeProfileLink( $stats['info']['last_mem_name'], $stats['info']['last_mem_id'], $stats['info']['last_mem_seo'], $member['pp_thumb_photo'],'value' )} </span><br>
 
 <span class="joinedbg">Регистрация:{parse date="$member['joined']" format="joined"}</span>
 
 
 </li>
 
 </ul>
 </div>
 
 </if></div></div>

 

Адрес ВАШ САЙТ заменить на свой.

4. Сохранить. 

5. Перейдите в Admin -> CPLook & Feel -> Manage Skin Sets & Templates -> Manage Templates in -> Select Template -> ipb_styles.css и добавить в нижней части этого кода:

.ipsWidget.ipsWidget_horizontal .ipsWidget_title {
font-size: 16px;
font-weight: 500;
margin-bottom: 10px;
}
ipsWidget.ipsWidget_horizontal + .ipsWidget {
margin-top: 10px;
}
.ipsWidget.ipsWidget_horizontal {
background: #fff;
border-width: 1px;
border-style: solid;
border-color: #ededed #e8e8e8 #dbdbdb #ededed;
border-radius: 3px;
padding: 15px;
margin-top:10px;
}
zend.ipsdevserver.com/media="all"
.ipsWidget {
position: relative;
padding: 0;
background: #fff;
}
.testbg{
width: 50px;
float: left;
line-height: 0;
border-left: 1px solid rgba(0,0,0,0.1);
padding-left: 15px;
display: block;
margin-left: -50%;
margin-top: -5px;
}
.clearbg{
padding-left: 10%;
}

 

6. Найти:

 

/* board stats */
#board_stats ul { text-align: center; }
	#board_stats li { margin-right: 20px; }
	#board_stats .value {
		display: inline-block;
		background: #e2e2e2;
		color: #4a4a4a;
		padding: 2px 6px;
		font-weight: bold;
		-moz-border-radius: 2px;
		-webkit-border-radius: 2px;
		border-radius: 2px;
		margin-right: 3px;
	}

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

	.statistics_head {
		font-size: 14px;
		font-weight: bold;
	}

 

7. Замените его с этим кодом ::

#board_stats ul { text-align: center; }
	#board_stats li { margin-right: 20px;width:20%; }
	#board_stats .value {
		display: inline-block;
		color: #222;
		text-shadow: rgba(255,255,255,0.6) 0px 1px 0px;
		padding: 3px 7px;
                font-size:30px;                    
		font-weight: 400;
		margin-right: 3px;
		
	}

.statistics {
background: #fff;
padding: 15px;
border-width: 1px;
border-style: solid;
border-color: #ededed #e8e8e8 #dbdbdb #ededed;
border-radius: 3px;
line-height: 20px;
}

	.statistics_head {
		border-top: 1px solid #d8d8d8;
		text-shadow: rgba(255,255,255,0.8) 0px 1px 0px;
		font-size: 13px;
		font-weight: 500;
		padding: 8px;
		margin: -8px -8px 8px -8px;
	}
	
	.statistics_head,
	.statistics_head a{
		color: #727272;
	}
	
	.statistics .statistics_head:first-of-type{
		border-top: 0;
	}
	
	.statistics .statistics_head:not(:first-of-type){
		margin-top: 0;
	}
	
#stat_links{ font-weight: normal; }
#stat_links a{ margin: 0 5px; }

 

8. Сохранить. 

Я искренне надеюсь, что вы сможете оценить мою работу 

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.