رفتن به مطلب

آموزش : مرتب (راست چین) نمودن بخش اطلاعات کاربری در تاپیک ها


ارسال‌های توصیه شده

  • مدیر کل بازنشسته سایت

 

علی جان من کدهایی ک بعد از <li class='post_count desc lighter'> بودن تا پایین رو پاک کردم یعنی از این <if test="postCount:|:$author['member_id']">

به بعد و پاک کردم و کدهایی که گفتی و جایگزین کردم اما ارور میده میگه ی تگی بسته نشده انگار جایی من اشتباه کردم ؟ میشه زحمت بکشی کد ها رو جایگزین کنی ؟

<if test="$this->settings['horizontalTopicView']='no'"></if>
<!-- -->
<div itemscope itemtype="http://schema.org/Person" class='user_details <if test="$this->settings['horizontalTopicView']=='yes'">clearfix</if>'>

<if test="($this->settings['horizontalTopicView']=='yes') AND $this->request['section'] == 'topics'">

	<div class='horizontalAvatar left'>

    <if test="avatar:|:$author['member_id']">
            <if test="canSeeProfiles:|:$this->memberData['g_is_supmod'] OR ( $this->memberData['g_mem_info'] && ! IPSMember::isInactive( $author ) )">
            <a itemprop="url" href="{parse url="showuser={$author['member_id']}" template="showuser" seotitle="{$author['members_seo_name']}" base="public"}" title="{$this->lang->words['view_profile']}: {$author['members_display_name']}" class='ipsUserPhotoLink'>
            </if>
            <if test="hasVariable:|:$this->settings['member_topic_avatar_max']">	
                <img itemprop="image" src='{$author['pp_main_photo']}' class='ipsUserPhoto ipsUserPhoto_variable' />
            <else />
                <img itemprop="image" src='{$author['pp_thumb_photo']}' class='ipsUserPhoto ipsUserPhoto_large' />
            </if>
            <if test="canSeeProfiles2:|:$this->memberData['g_is_supmod'] OR ( $this->memberData['g_mem_info'] && ! IPSMember::isInactive( $author ) )">
            </a>
            </if>
    <else />
            <img itemprop="image" src='{$author['pp_thumb_photo']}' class='ipsUserPhoto ipsUserPhoto_large' />
    </if>
    
    </div>
    
    <div class='horizontalUserInfo'>

	<div class='horizontalUsername'>
       
        <if test="$author['member_id']">
            <span itemprop="creator name" class="author vcard">{parse template="userHoverCard" group="global" params="$author"}</span>
        <else />
            {$author['members_display_name']}
        </if>
    
    </div>

    <ul class='horizontalInfoList' style='width: 140px;'>
    	<li class='group_title'>
			{$author['_group_formatted']}
		</li>
        <if test="postCount:|:$author['member_id']">
		<li class='post_count desc lighter'>
			{parse expression="$this->registry->getClass('class_localization')->formatNumber( intval( $author['posts'] ) )"} {$this->lang->words['m_posts']}
		</li>
		</if>
    </ul>
    
    <ul class='horizontalInfoList' style='width: 140px;'>
		<if test="rankimage:|:$author['member_rank_img']">
			<li class='group_icon'>
			<if test="rankimageimage:|:$author['member_rank_img_i'] == 'img'">
				<img src='{$author['member_rank_img']}' alt='' />
			<else />
				{$author['member_rank_img']}
			</if>
			</li>
		</if>
        <if test="membertitle:|:$author['member_title']">
			<li>{$author['member_title']}</li>
		</if>
		<if test="authorwarn:|:$author['show_warn']">
			<li>
				<if test="hasWarningId:|:$options['wl_id']">
					<img src='{$this->settings['img_url']}/warn.png' class='clickable' onclick='warningPopup( this, {$options['wl_id']} )' title='{$this->lang->words['warnings_issued']}' />
				</if>
				<a class='desc lighter blend_links' href='{parse url="app=members&module=profile&section=warnings&member={$author['member_id']}&from_app={$this->request['app']}&from_id1={$contentid}&from_id2={$options['id2']}" base="public"}' id='warn_link_{$contentid}_{$author['member_id']}' title='{$this->lang->words['warn_view_history']}'>{parse expression="sprintf( $this->lang->words['warn_status'], $author['warn_level'] )"}</a>
			</li>
		</if>
	</ul>
	
	<if test="authorcfields:|:$author['custom_fields'] != """>
		<ul class='horizontalInfoList custom_fields IPBFarsi_Button'>
			<foreach loop="customFieldsOuter:$author['custom_fields'] as $group => $data">
				<foreach loop="customFields:$author['custom_fields'][ $group ] as $field">
					<if test="$field != ''">
						<li>
							{$field}
						</li>
					</if>
				</foreach>
			</foreach>
		</ul>
	</if>
    
    <ul class='horizontalInfoList' style='float: right; width: 190px;'>
    	<li><if test="$author['_online']"><img src="{style_images_url}/post_online.png" alt="" class='post_online' data-tooltip="Online" /><else /><img src="{style_images_url}/post_offline.png" alt="" class='post_online' data-tooltip="Offline" /></if> Last active: {$author['_last_active']}</li>
		<li style='padding-left: 15px;'>Joined: {parse date="$author['joined']" format="DATE"}</li>
    </ul>
    
    </div>

<else />

<span class='hide' itemprop="name">{$author['members_display_name']}</span>

	<ul class='basic_info'>
		<if test="membertitle:|:$author['member_title']">
			<p class='desc member_title desc member_title IPBFarsi_Button'>{$author['member_title']}</p>
		</if>
		<if test="avatar:|:$author['member_id']">
			<li class='avatar'>
				<if test="canSeeProfiles:|:$this->memberData['g_is_supmod'] OR ( $this->memberData['g_mem_info'] && ! IPSMember::isInactive( $author ) )">
				<a itemprop="url" href="{parse url="showuser={$author['member_id']}" template="showuser" seotitle="{$author['members_seo_name']}" base="public"}" title="{$this->lang->words['view_profile']}: {$author['members_display_name']}" class='ipsUserPhotoLink'>
				</if>
				<if test="hasVariable:|:$this->settings['member_topic_avatar_max']">	
					<img itemprop="image" src='{$author['pp_main_photo']}' class='ipsUserPhoto ipsUserPhoto_variable' />
				<else />
					<img itemprop="image" src='{$author['pp_thumb_photo']}' class='ipsUserPhoto ipsUserPhoto_large' />
				</if>
				<if test="canSeeProfiles2:|:$this->memberData['g_is_supmod'] OR ( $this->memberData['g_mem_info'] && ! IPSMember::isInactive( $author ) )">
				</a>
				</if>
			</li>
		<else />
			<li class='avatar'>
				<img itemprop="image" src='{$author['pp_thumb_photo']}' class='ipsUserPhoto ipsUserPhoto_large' />
			</li>
		</if>
		<li class='group_title'>
			{$author['_group_formatted']}
		</li>
		<if test="rankimage:|:$author['member_rank_img']">
			<li class='group_icon'>
			<if test="rankimageimage:|:$author['member_rank_img_i'] == 'img'">
				<img src='{$author['member_rank_img']}' alt='' />
			<else />
				{$author['member_rank_img']}
			</if>
			</li>
		</if>
		<if test="postCount:|:$author['member_id']">
		<li class='post_count desc lighter IPBFarsi_Button'>
			{parse expression="$this->registry->getClass('class_localization')->formatNumber( intval( $author['posts'] ) )"} {$this->lang->words['m_posts']}
		</li>
		</if>
		<if test="authorwarn:|:$author['show_warn']">
			<li>
				<if test="$options['wl_id']">
					<img src='{$this->settings['img_url']}/warn.png' class='clickable' onclick='warningPopup( this, {$options['wl_id']} )' title='{$this->lang->words['warnings_issued']}' />
				</if>
				<a class='desc lighter blend_links IPBFarsi_Button' href='{parse url="app=members&module=profile&section=warnings&member={$author['member_id']}&from_app={$this->request['app']}&from_id1={$contentid}&from_id2={$options['id2']}" base="public"}' id='warn_link_{$contentid}_{$author['member_id']}' title='{$this->lang->words['warn_view_history']}'>{parse expression="sprintf( $this->lang->words['warn_status'], $author['warn_level'] )"}</a>
			</li>
		</if>
	</ul>
	
	<if test="authorcfields:|:$author['custom_fields'] != """>
		<ul class='custom_fields IPBFarsi_Button'>
			<foreach loop="customFieldsOuter:$author['custom_fields'] as $group => $data">
				<foreach loop="customFields:$author['custom_fields'][ $group ] as $field">
					<if test="$field != ''">
						<li>
							{$field}
						</li>
					</if>
				</foreach>
			</foreach>
		</ul>
	</if>

</if>
	
</div>

شما این کد تست کن 

<if test="$this->settings['horizontalTopicView']='no'"></if>
<!-- -->
<div itemscope itemtype="http://schema.org/Person" class='user_details <if test="$this->settings['horizontalTopicView']=='yes'">clearfix</if>'>

<if test="($this->settings['horizontalTopicView']=='yes') AND $this->request['section'] == 'topics'">

	<div class='horizontalAvatar left'>

    <if test="avatar:|:$author['member_id']">
            <if test="canSeeProfiles:|:$this->memberData['g_is_supmod'] OR ( $this->memberData['g_mem_info'] && ! IPSMember::isInactive( $author ) )">
            <a itemprop="url" href="{parse url="showuser={$author['member_id']}" template="showuser" seotitle="{$author['members_seo_name']}" base="public"}" title="{$this->lang->words['view_profile']}: {$author['members_display_name']}" class='ipsUserPhotoLink'>
            </if>
            <if test="hasVariable:|:$this->settings['member_topic_avatar_max']">	
                <img itemprop="image" src='{$author['pp_main_photo']}' class='ipsUserPhoto ipsUserPhoto_variable' />
            <else />
                <img itemprop="image" src='{$author['pp_thumb_photo']}' class='ipsUserPhoto ipsUserPhoto_large' />
            </if>
            <if test="canSeeProfiles2:|:$this->memberData['g_is_supmod'] OR ( $this->memberData['g_mem_info'] && ! IPSMember::isInactive( $author ) )">
            </a>
            </if>
    <else />
            <img itemprop="image" src='{$author['pp_thumb_photo']}' class='ipsUserPhoto ipsUserPhoto_large' />
    </if>
    
    </div>
    
    <div class='horizontalUserInfo'>

	<div class='horizontalUsername'>
       
        <if test="$author['member_id']">
            <span itemprop="creator name" class="author vcard">{parse template="userHoverCard" group="global" params="$author"}</span>
        <else />
            {$author['members_display_name']}
        </if>
    
    </div>

    <ul class='horizontalInfoList' style='width: 140px;'>
    	<li class='group_title'>
			{$author['_group_formatted']}
		</li>
        <if test="postCount:|:$author['member_id']">
		<li class='post_count desc lighter'>
			{parse expression="$this->registry->getClass('class_localization')->formatNumber( intval( $author['posts'] ) )"} {$this->lang->words['m_posts']}
		</li>
		</if>
    </ul>
    
    <ul class='horizontalInfoList' style='width: 140px;'>
		<if test="rankimage:|:$author['member_rank_img']">
			<li class='group_icon'>
			<if test="rankimageimage:|:$author['member_rank_img_i'] == 'img'">
				<img src='{$author['member_rank_img']}' alt='' />
			<else />
				{$author['member_rank_img']}
			</if>
			</li>
		</if>
        <if test="membertitle:|:$author['member_title']">
			<li>{$author['member_title']}</li>
		</if>
		<if test="authorwarn:|:$author['show_warn']">
			<li>
				<if test="hasWarningId:|:$options['wl_id']">
					<img src='{$this->settings['img_url']}/warn.png' class='clickable' onclick='warningPopup( this, {$options['wl_id']} )' title='{$this->lang->words['warnings_issued']}' />
				</if>
				<a class='desc lighter blend_links' href='{parse url="app=members&module=profile&section=warnings&member={$author['member_id']}&from_app={$this->request['app']}&from_id1={$contentid}&from_id2={$options['id2']}" base="public"}' id='warn_link_{$contentid}_{$author['member_id']}' title='{$this->lang->words['warn_view_history']}'>{parse expression="sprintf( $this->lang->words['warn_status'], $author['warn_level'] )"}</a>
			</li>
		</if>
	</ul>
	
	<if test="authorcfields:|:$author['custom_fields'] != """>
		<ul class='horizontalInfoList custom_fields IPBFarsi_Button'>
			<foreach loop="customFieldsOuter:$author['custom_fields'] as $group => $data">
				<foreach loop="customFields:$author['custom_fields'][ $group ] as $field">
					<if test="$field != ''">
						<li>
							{$field}
						</li>
					</if>
				</foreach>
			</foreach>
		</ul>
	</if>
    
    <ul class='horizontalInfoList' style='float: right; width: 190px;'>
    	<li><if test="$author['_online']"><img src="{style_images_url}/post_online.png" alt="" class='post_online' data-tooltip="Online" /><else /><img src="{style_images_url}/post_offline.png" alt="" class='post_online' data-tooltip="Offline" /></if> Last active: {$author['_last_active']}</li>
		<li style='padding-left: 15px;'>Joined: {parse date="$author['joined']" format="DATE"}</li>
    </ul>
    
    </div>

<else />

<span class='hide' itemprop="name">{$author['members_display_name']}</span>

	<ul class='basic_info'>
		<if test="membertitle:|:$author['member_title']">
			<p class='desc member_title desc member_title IPBFarsi_Button'>{$author['member_title']}</p>
		</if>
		<if test="avatar:|:$author['member_id']">
			<li class='avatar'>
				<if test="canSeeProfiles:|:$this->memberData['g_is_supmod'] OR ( $this->memberData['g_mem_info'] && ! IPSMember::isInactive( $author ) )">
				<a itemprop="url" href="{parse url="showuser={$author['member_id']}" template="showuser" seotitle="{$author['members_seo_name']}" base="public"}" title="{$this->lang->words['view_profile']}: {$author['members_display_name']}" class='ipsUserPhotoLink'>
				</if>
				<if test="hasVariable:|:$this->settings['member_topic_avatar_max']">	
					<img itemprop="image" src='{$author['pp_main_photo']}' class='ipsUserPhoto ipsUserPhoto_variable' />
				<else />
					<img itemprop="image" src='{$author['pp_thumb_photo']}' class='ipsUserPhoto ipsUserPhoto_large' />
				</if>
				<if test="canSeeProfiles2:|:$this->memberData['g_is_supmod'] OR ( $this->memberData['g_mem_info'] && ! IPSMember::isInactive( $author ) )">
				</a>
				</if>
			</li>
		<else />
			<li class='avatar'>
				<img itemprop="image" src='{$author['pp_thumb_photo']}' class='ipsUserPhoto ipsUserPhoto_large' />
			</li>
		</if>
		<li class='group_title'>
			{$author['_group_formatted']}
		</li>
		<if test="rankimage:|:$author['member_rank_img']">
			<li class='group_icon'>
			<if test="rankimageimage:|:$author['member_rank_img_i'] == 'img'">
				<img src='{$author['member_rank_img']}' alt='' />
			<else />
				{$author['member_rank_img']}
			</if>
			</li>
		</if>
		<!--  *************** -- UserInfo -- ***************  -->

<!--  *************** -- قسمت تعداد پست های ارسالی -- ***************  -->
  <div class="UserInfo">
		<if test="postCount:|:$author['member_id']">		
		   <dl class="Justified">
			<dt>ارسال</dt>
<dd>{parse expression="$this->registry->getClass('class_localization')->formatNumber( intval( $author['posts'] ) )"}</dd>
		</dl>
		</if>
<!--  *************** -- تاریخ عضویت -- ***************  -->
        <dl class="Justified">
<dt>{$this->lang->words['m_joined']}</dt>
<dd>{parse date="$author['joined']" format="joined"}</dd>
        </dl>
<!--  *************** -- امتیاز هشدار -- ***************  -->

<if test="authorwarn:|:$author['show_warn']">
	<dl class="Justified">
		<dt>امتیاز هشدار</dt>
			<dd><a href='{parse url="app=members&module=profile&section=warnings&member={$author['member_id']}&from_app={$this->request['app']}&from_id1={$contentid}&from_id2={$options['id2']}" base="public"}' id='warn_link_{$contentid}_{$author['member_id']}' title='{$this->lang->words['warn_view_history']}'>{parse expression="sprintf( $this->lang->words['warn_statuss'], $author['warn_level'] )"}</a></dd>
	</dl>
   </if>
<!--  *************** -- بخش فیلدهای تعریف شده -- ***************  -->
	<if test="authorcfields:|:$author['custom_fields'] != """>
                        <foreach loop="customFieldsOuter:$author['custom_fields'] as $group => $data">
				<foreach loop="customFields:$author['custom_fields'][ $group ] as $field">
                                               <if test="$field != ''">
                                            <dl class="Justified">
							{$field}
                                             </dl>
					  </if> 
				</foreach>
			</foreach>
	          </if> 

		</div>
	</ul>
    </if>
</div> 
 
لینک ارسال
به اشتراک گذاری در سایت های دیگر

  • پاسخ 26
  • عمر موضوع
  • آخرین پاسخ
  • مدیر کل بازنشسته سایت

ای کاش یه جستجوی کوچیک انجام می دادید این تاپیک آموزشی است و این سوال شما هم بارها جواب داده شده.... :)

 

داخل استایل قالب این کد را پیدا کنید و به سایز دلخواه تغییر دهید 

.author_info {
width: 167px;

برای سایز اون کادر IPBFarsi_Button  کد زیرا تغییر دهید.

.IPBFarsi_Button {
width: 165px;
لینک ارسال
به اشتراک گذاری در سایت های دیگر

  • 3 هفته بعد...

هر دو عالی بودند علی جان. خسته نباشی

 

فقط در مورد این هوک نمایش لایک/امتیاز هم اگر بشود با همین حالت dd و dt هماهنگ کرد واقعا عالی می‌شود.

 

 

سلام 

برای نمایش امتیاز(محبوبیت) در بخش اطلاعات کاربری ، کد زیر را در بیت userInfoPane  بین یکی از کدها جایگیزین کنید مثلا بعد از کدهای "امتیاز هشدار" اضافه کنید یعنی بعد از <if/> 

 

 

سلام. تشکر دوست عزیز. آموش بسیار جالبی و کارامدی بود.

فقط یه سوال داشتم . طبق صحبت هایی که شما با اون دوستمون داشتید @@Rez

و در مورد تشکر ها صحبت کرید. میخواستم بدونم که آیا راهی هست که بشه کادر مربوط به تشکرها رو آخر از همه قرار داد ؟ منظورم این کدی که شما قرار دادید نیست . توی این اسکرین شات:

http://8pic.ir/images/t0s2c6a2fox25h7rde4t.png

 

کادر سبز رنگ رو آخر از همه قرار داد. خیلی عالی میشه در این صورت

لینک ارسال
به اشتراک گذاری در سایت های دیگر

  • مدیر کل بازنشسته سایت

سلام. تشکر دوست عزیز. آموش بسیار جالبی و کارامدی بود.

فقط یه سوال داشتم . طبق صحبت هایی که شما با اون دوستمون داشتید @@Rez

و در مورد تشکر ها صحبت کرید. میخواستم بدونم که آیا راهی هست که بشه کادر مربوط به تشکرها رو آخر از همه قرار داد ؟ منظورم این کدی که شما قرار دادید نیست . توی این اسکرین شات:

http://8pic.ir/images/t0s2c6a2fox25h7rde4t.png

 

کادر سبز رنگ رو آخر از همه قرار داد. خیلی عالی میشه در این صورت

سلام

بله شدنی است و همون کد که در پست دهم گفتم فقط باید کدشو جابجا کنید و در انتهای کدها قرار دهید تا در آخرین قسمت بخش کاربری نمایش داده شود.

لینک ارسال
به اشتراک گذاری در سایت های دیگر

سلام

بله شدنی است و همون کد که در پست دهم گفتم فقط باید کدشو جابجا کنید و در انتهای کدها قرار دهید تا در آخرین قسمت بخش کاربری نمایش داده شود.

منظورم کادر سبز LIKE که با هوک نصب میشه !؟

اونو میخواستم آخر از همه بذارم که توی اسکرین هم نشون دادم. اون کدی که شما میفرمایید که فقط بخش امتیاز رو اضافه میکنه .

من like سبز رنگ که در کادر قرار گرفته در نظرم بود . اگه کد مربوط به اونو بدونید کجا هست . شاید بشه با جابجا کردن اونو در آخر از همه قرار داد.

لینک ارسال
به اشتراک گذاری در سایت های دیگر

  • مدیر کل بازنشسته سایت

منظورم کادر سبز LIKE که با هوک نصب میشه !؟

اونو میخواستم آخر از همه بذارم که توی اسکرین هم نشون دادم. اون کدی که شما میفرمایید که فقط بخش امتیاز رو اضافه میکنه .

من like سبز رنگ که در کادر قرار گرفته در نظرم بود . اگه کد مربوط به اونو بدونید کجا هست . شاید بشه با جابجا کردن اونو در آخر از همه قرار داد.

منم کد همون قسمت در پست دهم دادم و اگر از اون کد استتفاده کنید همون کار هوک برای شما انجام میده ، غیراینصورت باید اون هوک ویرایش کنید.

 

---------------------

لطفا کنید برای سوال های خودتون که خارج از موضوع آموزش تاپیک ها است و بیشتر به شخصی سازی قالب برمیگردد تاپیک جداگانه بزنید...ممنون....

لینک ارسال
به اشتراک گذاری در سایت های دیگر

بایگانی شده

این موضوع بایگانی و قفل شده و دیگر امکان ارسال پاسخ نیست.

  • کاربران آنلاین در این صفحه   0 کاربر

    • هیچ کاربر عضوی،در حال مشاهده این صفحه نیست.
×
×
  • اضافه کردن...