Jump to content
Дизайн и модификация IPS Community IPBSkinsBETA
Search In
  • More options...
Find results that contain...
Find results in...
Sign in to follow this  
Strategius

Персонализация showCard

Recommended Posts

Сделал персонализацию профиля форумчанина во всплывающем окне. Остался косяк - при добавлении в код строки "background-size: cover;" - чтобы пропорции персонализации НЕ искажались, Никнейм форумчанина выравнивается по вертикально центру окна... Это в случае, если персонализация в профиле установлена. Если ее нет, то все отображается правильно, т.е. располагается внизу окна.

 

Как исправить этот косяк? Я так понимаю, это прописано где-то в свойствах заголовка H3, но располагает ник по центру строки именно "background-size: cover;", но без него нельзя, потому что картинка персонализации будет искажаться в пропорциях.

 

Вот полный код моего шаблона showCard:

 

 

<div class='vcard userpopup'>

<h3 class="wa_showcard"  style='

<if test="hasBackgroundColor:|:$member['customization']['bg_color']">
	background-color: #{$member['customization']['bg_color']} !important;
</if>
<if test="hasBackgroundImage:|:$member['customization']['_bgUrl']">
	background-image: url("{$member['customization']['_bgUrl']}?nc={$member['pp_profile_update']}") !important;

line-height: 160px !important;
background-position: 50% 50%;
background-repeat: no-repeat;
-webkit-background-size: 100% 100%;
-moz-background-size: 100% 100%;
background-size: cover;
</if>
</if>

background-image: url({$member['customization']['_bgUrl']}) !important;'>
<a href="{parse url="showuser={$member['member_id']}" seotitle="{$member['members_seo_name']}" template="showuser" base="public"}" class="fn nickname url">{$member['members_display_name']}</a></h3>

<div class='side left ipsPad'>
	<a href="{parse url="showuser={$member['member_id']}" seotitle="{$member['members_seo_name']}" template="showuser" base="public"}" class="ipsUserPhotoLink">
		<img src="{$member['pp_thumb_photo']}" alt="{$this->lang->words['get_photo']}" class='ipsUserPhoto ipsUserPhoto_large' />
	</a>
	<br />
	<if test="cardRep:|:$this->settings['reputation_enabled'] && $this->settings['reputation_show_profile']">
		<if test="cardRepPos:|:$member['pp_reputation_points'] > 0">
			<div class='reputation positive'>
		</if>
		<if test="cardRepNeg:|:$member['pp_reputation_points'] < 0">
			<div class='reputation negative'>
		</if>
		<if test="cardRepZero:|:$member['pp_reputation_points'] == 0">
			<div class='reputation zero'>
		</if>
				<span class='number'>{$member['pp_reputation_points']}</span>
			</div>
	</if>
	<a href='{parse url="app=core&module=search&do=user_activity&mid={$member['member_id']}" base="public"}' title='{$this->lang->words['gbl_find_my_content']}' class='ipsButton_secondary ipsType_smaller'>{$this->lang->words['gbl_find_my_content']}</a>
	<if test="cardSendPm:|:$this->memberData['member_id'] AND $this->memberData['member_id'] != $member['member_id'] AND $this->memberData['g_use_pm'] AND $this->memberData['members_disable_pm'] == 0 AND IPSLib::moduleIsEnabled( 'messaging', 'members' ) AND $member['members_disable_pm'] == 0">
		<a href='{parse url="app=members&module=messaging&section=send&do=form&fromMemberID={$member['member_id']}" base="public"}' title='{$this->lang->words['pm_this_member']}' id='pm_xxx_{$member['member_id']}' class='pm_button ipsButton_secondary ipsType_smaller'>{$this->lang->words['pm_this_member']}</a>
	</if>
</div>
<div class='ipsPad'>
	<if test="cardStatus:|:$member['_status']['status_content']">
		<p class='message user_status'>{$member['_status']['status_content']}</p>
	</if>
	<div class='info'>
		<dl>
			<dt>{$this->lang->words['m_group']}</dt>
			<dd>{$member['_group_formatted']}</dd>
			<dt>{$this->lang->words['m_posts']}</dt>
			<dd>{parse format_number="$member['posts']"}</dd>
			<dt>{$this->lang->words['m_member_since']}</dt>
			<dd>{parse date="$member['joined']" format="joined"}</dd>
			<dt>{$this->lang->words['m_last_active']}</dt>
			<dd><if test="cardOnline:|:$member['_online']"><span class='ipsBadge ipsBadge_green'>{$this->lang->words['online_online']}</span><else /><span class='ipsBadge ipsBadge_grey'>{$this->lang->words['online_offline']}</span></if> {$member['_last_active']}</dd>
			<if test="cardWhere:|:$member['_online'] && ($member['online_extra'] != $this->lang->words['not_online'])">
				<dt>{$this->lang->words['m_currently']}</dt>
				<dd>
					{$member['online_extra']}
				</dd>
			</if>
			<if test="isadmin:|:$this->memberData['g_access_cp'] == 1">
				<dt>{$this->lang->words['m_email']}</dt>
				<dd><a href='mailto:{$member['email']}'>{$member['email']}</a></dd>
			</if>
		</dl>
	</div>
	<ul class='user_controls clear'>
		<if test="authorspammer:|:$member['spamStatus'] !== NULL && $member['member_id'] != $this->memberData['member_id']">
			<if test="authorspammerinner:|:$member['spamStatus'] === TRUE">
				<li><a href='#' title='{$this->lang->words['spm_on']}' onclick="return ipb.global.toggleFlagSpammer({$member['member_id']}, false)">{parse replacement="spammer_on"}</a></li>
			<else />
				<li><a title='{$this->lang->words['spm_off']}' href='{$this->settings['base_url']}app=core&module=modcp&do=setAsSpammer&member_id={$member['member_id']}&auth_key={$this->member->form_hash}' onclick="return ipb.global.toggleFlagSpammer({$member['member_id']}, true)">{parse replacement="spammer_off"}</a></li>
			</if>
		</if>
		<if test="cardFriend:|:$this->memberData['member_id'] AND $this->memberData['member_id'] != $member['member_id'] && $this->settings['friends_enabled'] AND $this->memberData['g_can_add_friends']">
			<if test="cardIsFriend:|:IPSMember::checkFriendStatus( $member['member_id'] )">
				<li><a href='{parse url="app=members&module=profile&section=friends&do=remove&member_id={$member['member_id']}&secure_key={$this->member->form_hash}" base="public"}' title='{$this->lang->words['remove_friend']}'>{parse replacement="remove_friend"}</a></li>
			<else />
				<li><a href='{parse url="app=members&module=profile&section=friends&do=add&member_id={$member['member_id']}&secure_key={$this->member->form_hash}" base="public"}' title='{$this->lang->words['add_friend']}'>{parse replacement="add_friend"}</a></li>
			</if>
		</if>
		<if test="cardBlog:|:$member['has_blog'] AND IPSLib::appIsInstalled( 'blog' )">
			<li><a href='{parse url="app=blog&module=display&section=blog&show_members_blogs={$member['member_id']}" base="public"}' title='{$this->lang->words['view_blog']}'>{parse replacement="blog_link"}</a></li>
		</if>
		<if test="cardGallery:|:$member['has_gallery'] AND IPSLib::appIsInstalled( 'gallery' )">
			<li><a href='{parse url="app=gallery&user={$member['member_id']}" seotitle="{$member['members_seo_name']}" template="useralbum" base="public"}' title='{$this->lang->words['view_gallery']}'>{parse replacement="gallery_link"}</a></li>
		</if>
	</ul>
</div></div> 

 

 

Скриншот:

http://i79.fastpic.ru/big/2016/0421/d8/10ca749690e22225ac9b86edfe4c0dd8.png

 

Заранее огромное спасибо за помощь.

Share this post


Link to post
Share on other sites

Ребят, подскажете решение? unsure.gif

Share this post


Link to post
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
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...