Jump to content
View in the app

A better way to browse. Learn more.

IPBMafia.ru - поддержка Invision Community, релизы, темы, плагины и приложения

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Как сделать такую информацию о пользователе?

Featured Replies

Posted

Парни, кто знает как сделать такую информацию о пользователе и разделение? Я не шарю почти в программирование, но учусь, объясните понятным образом.

328816576_.thumb.png.186025f00ce57c7a6b683c19e970a487.png

Вот оригинал:

102758324_.thumb.png.0b73a85aa7e8d333ef9b7a7ce5458ec2.png

Edited by Offslig

  • Offslig changed the title to Как сделать такую информацию о пользователе?
В 19.12.2020 в 05:35, Offslig сказал:

Парни, кто знает как сделать такую информацию о пользователе и разделение? Я не шарю почти в программирование, но учусь, объясните понятным образом.

328816576_.thumb.png.186025f00ce57c7a6b683c19e970a487.png

Вот оригинал:

102758324_.thumb.png.0b73a85aa7e8d333ef9b7a7ce5458ec2.png

почитайте  пункты админки, как редактировать стиль форума. Далее за что отвечает каждый шаблон вашего стиля. И выф увидите что для каждой части сайта (грубо говоря) есть свой шаблон. Так вот вам надо искать в PostContainer (forums)

А поля вам надо добавить некоторые через стили, а некоторые через Профиль-Информация

Только что, ODLine сказал:

SlawkA  самое классное на скрине выглядит 42 лет :)

та лень плюрализацию писать. с этими обновами стиля и пертурбациями 🙄

5 минут назад, Offslig сказал:

не мог бы скинуть плагин?

🙂 это не плагин. это работа руками.

я вытаскивал это все. с разных плагинов и подгонял под себя

  • Author
8 минут назад, SlawkA сказал:

🙂 это не плагин. это работа руками.

я вытаскивал это все. с разных плагинов и подгонял под себя

понял, спасибо

кому если нужно.

лишнее наверно из кода вам придется удалить, или дополнять самим.

не забываем о бэкапе.

это в postContainer

Спойлер

{{$stats['follower'] = (int) \IPS\Db::i()->select( 'COUNT(*)', 'core_follow', array( 'follow_rel_id=?', $comment->author()->member_id ) )->first();}}
{{$TopicStarter = \IPS\Db::i()->select( "starter_id", "forums_topics", "tid = $comment->topic_id")->first();}}
{{$group = \IPS\Member::load( $comment->author()->member_id )->groups;}}
{{$now = time();}}
{{$joined = strtotime($comment->author()->joined);}}
{{$days =  floor(($now - $joined)/(60*60*24));}}
{{$days = ($days == '0' ? '1' : $days);}}
{{$stats['ratio'] =  number_format($comment->author()->member_posts/$days,2);}}
{{$lastUsedDevice = $comment->author()->lastUsedDevice();}}
{{$clubs = \IPS\Member\Club::clubs( $comment->author(), NULL, 'name', TRUE );}}

{{$idField = $comment::$databaseColumnId;}}
{{$itemClassSafe = str_replace( '\\', '_', mb_substr( $comment::$itemClass, 4 ) );}}
{{if $comment->isIgnored()}}
	<div class='ipsComment ipsComment_ignored ipsType_light' id='elIgnoreComment_{$comment->$idField}' data-ignoreCommentID='elComment_{$comment->$idField}' data-ignoreUserID='{$comment->author()->member_id}'>
		{lang="ignoring_content" sprintf="$comment->author()->name"} <a href='#elIgnoreComment_{$comment->$idField}_menu' data-ipsMenu data-ipsMenu-menuID='elIgnoreComment_{$comment->$idField}_menu' data-ipsMenu-appendTo='#elIgnoreComment_{$comment->$idField}' data-action="ignoreOptions" title='{lang="see_post_ignore_options"}' class='ipsType_blendLinks'>{lang="options"} <i class='fa fa-caret-down'></i></a>
		<ul class='ipsMenu ipsHide' id='elIgnoreComment_{$comment->$idField}_menu'>
			<li class='ipsMenu_item ipsJS_show' data-ipsMenuValue='showPost'><a href='#'>{lang="show_this_post"}</a></li>
			<li class='ipsMenu_sep ipsJS_show'><hr></li>
			<li class='ipsMenu_item' data-ipsMenuValue='stopIgnoring'><a href='{url="app=core&module=system&controller=ignore&do=remove&id={$comment->author()->member_id}" seoTemplate="ignore"}'>{lang="stop_ignoring_posts_by" sprintf="$comment->author()->name"}</a></li>
			<li class='ipsMenu_item'><a href='{url="app=core&module=system&controller=ignore" seoTemplate="ignore"}'>{lang="change_ignore_preferences"}</a></li>
		</ul>
	</div>
{{endif}}

<a id='comment-{$comment->$idField}'></a>
<article {{if $comment->author()->hasHighlightedReplies()}}data-memberGroup="{$comment->author()->member_group_id}" {{endif}} id='elComment_{$comment->$idField}' class='cPost ipsBox {{if $otherClasses}}{$otherClasses}{{endif}} ipsComment {{if ( settings.reputation_enabled and settings.reputation_highlight and $comment->reactionCount() >= settings.reputation_highlight ) OR $comment->isFeatured()}}ipsComment_popular{{endif}} ipsComment_parent ipsClearfix ipsClear ipsColumns ipsColumns_noSpacing ipsColumns_collapsePhone {{if $comment->author()->hasHighlightedReplies()}}ipsComment_highlighted{{endif}}{{if $comment->isIgnored()}}ipsHide{{endif}} {{if $comment->hidden() OR $item->hidden() === -2}}ipsModerated{{endif}}'>
{{if $item->isQuestion() and !$comment->new_topic}}
		{template="postRating" group="topics" app="forums" params="$item, $comment, $votes"}
	{{endif}}
<aside class='ipsComment_author cAuthorPane ipsColumn ipsColumn_medium'>
<h3 class='ipsType_sectionHead cAuthorPane_author ipsType_blendLinks ipsType_break' itemprop="creator" itemscope itemtype="http://schema.org/Person"><strong itemprop="name">{$comment->author()->link( $comment->warningRef() )|raw}</strong></h3>
<ul class='cAuthorPane_info ipsList_reset'>
{{if $comment->author()->member_title && $comment->author()->member_id}}
{$comment->author()->member_title}
{{endif}}
<span class='aupContent'>{{if $comment->author()->isOnline()}}
<span class='aupTitle'><img src="/uploads/imgs/online.gif" alt='ETS2ATSMODS.ru' /></span>
{{else}}
<span class='aupTitle'><img src="/uploads/imgs/offline.gif" alt='ETS2ATSMODS.ru' /></span>{{endif}}</span><br/>
{{if $comment->author()->reputationImage()}}
<img src='{file="$comment->author()->reputationImage()" extension="core_Theme"}' title='{{if $comment->author()->reputation()}}{$comment->author()->reputation()}{{endif}}' alt=''>
{{endif}}
<div class='author_info'>
<div class="ipsResponsive_hidePhone ipsResponsive_block">
{{$coverPhoto = $comment->author()->coverPhoto();}}
{{if $coverPhoto->file}}
<div class="wa_userinfo_bg" style="background-image: url('{$coverPhoto->file->url}') !important;margin-bottom: -60px !important;
background-color: #FFFFFF !important;
background-position: 50% 50%;
background-repeat: no-repeat;
-webkit-background-size: 100% 100%;
-moz-background-size: 100% 100%;
background-size: 100% 100% !important;
height: 120px;
width: 215px;
margin-left: -8px !important;
margin: -0px -9px 0 -9px;"></div></div>
{{else}}
<li class='cAuthorPane_photo'></li>
{{endif}}
<li class='cAuthorPane_photo'>
{template="userPhoto" app="core" group="global" params="$comment->author(), 'large', $comment->warningRef()"}
  {{if $comment->author()->modShowBadge()}}
			<span class="cAuthorPane_badge cAuthorPane_badge--moderator" data-ipsTooltip title="{lang="member_is_moderator" sprintf="$comment->author()->name"}"></span>
			{{elseif $comment->author()->joinedRecently()}}
			<span class="cAuthorPane_badge cAuthorPane_badge--new" data-ipsTooltip title="{lang="member_is_new_badge" sprintf="$comment->author()->name"}"></span>
			{{endif}}
</li>
</div> 
<hr class="style5">
<span class='aupTitle'><i class="fa fa-optin-monster fa-lg" aria-hidden="true"></i> {lang="Ранг на Форуме"}</span>
{{if \IPS\Member\Group::load( $comment->author()->member_group_id )->g_icon }}<br>
<img src='{file="$comment->author()->group['g_icon']" extension="core_Theme"}' alt='' class='cAuthorGroupIcon'>
{{endif}}
{{if $comment->author()->member_id}}
{{if $comment->author()->member_id and $item->author()->member_id == $comment->author()->member_id}}
{{endif}} 
<hr class="style5">
<span class='aupTitle'><i class="fa fa-thumbs-o-up fa-lg" aria-hidden="true"></i> {lang="Репутация"}</span><br/>
{template="reputationBadge" group="global" app="core" params="$comment->author()"}
<hr class="style5">
<span class='aupTitle'><i class="fa fa-pencil-square-o fa-lg" aria-hidden="true"></i> {lang="Всего сообщений"}</span>
<br/><strong><span class='aupContent'>{lang="member_post_count" pluralize="$comment->author()->member_posts"}</span></strong><br/>
{{if $comment->author()->rank['image'] && $comment->author()->member_id}}
{$comment->author()->rank['image']|raw}
{{endif}}
  <br/>
<a href="" class="spoiler_links ipsButton ipsButton_light ipsButton_verySmall ipsButton_narrow" style="padding: 0px 35px;margin-bottom: 5px;background:#2e81de;" data-ipstooltip="" _title="Нажмите для просмотра"><i class="fa fa-user-plus fa-lg" aria-hidden="true"></i> Вся информация</a>
<div class="spoiler_body">
<br/><hr class="style5">
<span class='aupTitle'><i class="fa fa-pencil-square-o fa-lg" aria-hidden="true"></i> {lang="Всего тем"}</span>
<br/><strong><span class='aupContent'>{{$where[] = "starter_id = " . $comment->author()->member_id;}}
{{$author_topics = \IPS\forums\Topic::getItemsWithPermission( $where, NULL, 0 );}}
{{$topics_count = count($author_topics);}} {$topics_count}</span></strong><br/>
<hr class="style5">
 <span class='aupTitleTitle'><i class="fa fa-signal fa-lg" aria-hidden="true"></i> Постов в день</span><br/>
<strong><span class='aupTitleTitle'>{$stats['ratio']}</span></strong>
<hr class="style5">
<span class='aupTitleTitle'><i class="fa fa-id-card-o fa-lg" aria-hidden="true"></i> {lang="ID Пользователя"}</span><br/>
<strong> <span class='aupTitle'>{$comment->author()->member_id}</span></strong>
<hr class="style5">
<span class='aupTitle'><i class="fa fa-line-chart fa-lg" aria-hidden="true"></i> Читателей</span><br/>
<strong><span class='aupTitle'>{$stats['follower']}</span></strong>
<hr class="style5">
<span class='aupTitle'><i class="fa fa-universal-access fa-lg" aria-hidden="true"></i> {lang="Активность на сайте"}</span><br/>
<strong><span class='aupContent'>{{if $comment->author()->last_activity}}{datetime="$comment->author()->last_activity"}{{else}}{lang="never"}{{endif}}</span></strong>
<div class="ipsResponsive_hidePhone ipsResponsive_block">
<hr class="style5">
<span class='aupTitle'><i class="fa fa-trophy fa-lg" aria-hidden="true"></i> {lang="members_days_won_count"}</span><br/>
<strong><span class='aupContent'>{number="$comment->author()->getReputationDaysWonCount()"}</span></strong>
<hr class="style5">
<span class='aupTitle'><i class="fa fa-calendar-o fa-lg" aria-hidden="true"></i> {lang="joined"}</span><br/>
<strong><span class='aupContent'>{datetime="$comment->author()->joined" dateonly="true"}</span></strong><br/>
{{$date_joined = floor((strtotime("now")-strtotime("{$comment->author()->joined}"))/86400) ;}}
{lang="На сайте"} <strong><span class='aupTitle'>{$date_joined} дней</span></strong>
<br/>
<hr class="style5">
<span class='aupTitle'><i class="fa fa-exclamation-triangle fa-lg"></i> Предупреждений</span><br/>
<strong><span class='aupTitle'>{number="$comment->author()->warn_level"}</span></strong>
<hr class="style5">
<span class='aupTitle'><i class="fa fa-clock-o fa-lg" aria-hidden="true"></i> {lang="Временная зона"}</span><br/>
<strong><span class='aupContent'>{$comment->author()->timezone}</span></strong>
<hr class="style5">    
<span class='aupTitle'><i class="fa fa-birthday-cake fa-lg" aria-hidden="true"></i> {lang="День рожденья"}</span><br/>
<strong><span class='aupContent'>{$comment->author()->birthday}</span></strong><br/>
<span class='euip_Title'> {lang="Исполнилось"}</span> <strong><span class='aupContent'>{$comment->author()->age()}</span></strong><span class='euip_Title'> {lang="лет"}</span>
<hr class="style5">
<span class='aupTitle'><i class="fa fa-truck fa-lg" aria-hidden="true"></i> {lang="Грузовик в игре"}</span><br/>
 {template="customFieldsDisplay" group="global" app="core" params="$comment->author()"}
{{endif}}
</div></div></ul>
<div class="ipsResponsive_hidePhone ipsResponsive_block"><hr class="style5"></div>
  {{if $comment->author()->member_team AND ( !\IPS\Settings::i()->membersTeams_groups OR \IPS\Member::loggedIn()->inGroup( explode( ',', \IPS\Settings::i()->membersTeams_groups ) ) )}}
    {{$myTeam = $comment->author()->myTeam();}}
    {{if $myTeam}}
<ul class="cAuthorPane_info ipsList_reset">
    	<li class="ipsType_light ipsSpacer_top" data-ipsTooltip title="{lang="member_team"}">    
            {{if $myTeam['badge']}}
                <span class='aupContent'><img src='{file="$myTeam['badge']" extension="core_Theme"}' alt='' class="ipsThumb ipsThumb_{setting="membersTeams_size"}"></span>
            {{endif}}  
            <span class='ipsType_normal ipsType_bold'>{$myTeam['name']}</span>
            <span class='ipsBadge ipsBadge_icon ipsBadge_small ipsBadge_positive' data-ipsTooltip title='{lang="block_topTeams_followers" pluralize="$myTeam['count']"}'>{number="$myTeam['count']"}</span>
    	</li></ul>
    {{endif}}
{{endif}}<br/>
</aside>
	<div class='ipsColumn ipsColumn_fluid'>
		{template="post" group="topics" app="forums" params="$item, $comment, $item::$formLangPrefix . 'comment', $item::$application, $item::$module, $itemClassSafe"}
	</div>
</article>

 

это в globalTemplate перед </head>

это для раскрывания полной информации и закрывания.

Спойлер

      <style type="text/css">
 .spoiler_body {display:none; cursor:pointer;}
</style>
<script type="text/javascript">
$(document).ready(function(){
 $('.spoiler_links').click(function(){
  $(this).parent().children('div.spoiler_body').toggle('normal');
  return false;
 });
});
</script>

 

это в custom.css разделительные полоски

Спойлер

hr.style5 {
	background-color: #fff;
	border-top: 2px dashed #8c8b8b;
}

 

удачи. если кому пригодиться 👀

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.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.