[اسم الدرس ]: طريقة اضافة نجوم للرتب الاعضاء خاص للزين فورو اليل الثاني
[توافق الدرس] : زين فورو الجيل الثاني XF2.3 , XF2.2 , XF2.1 , XF2.0
الشرح
-ادخل الى لوحة التحكم المنتدى >>> المظهر >>>>>>>البحث في القوالب >>>>>>اسم القالب هو message_macros ابحث بداخله عن هذا الكود
PHP:
<div class="message-userDetails">
<h4 class="message-name"><xf:username user="$user" rich="true" defaultname="{$fallbackName}" itemprop="name" /></h4>
<xf:usertitle user="$user" tag="h5" class="message-userTitle" banner="true" itemprop="jobTitle" />
<xf:userbanners user="$user" tag="div" class="message-userBanner" itemprop="jobTitle" />
<xf:if is="{$dateHtml}"><div class="message-date">{$dateHtml}</div></xf:if>
</div>
لا تنسى تغيير قيمة المشاركات اللي بلون الازرق حسب مزاجك.
لا تنسى ان تضع الصورة حسب مسارها وهو.
- ثم قم بالحفظ
-ادخل الى لوحة التحكم المنتدى >>> المظهر >>>>>>>البحث فى القوالب >>>>>>اسم القالب هو extra.less ثم اضف هذا الكود
CSS:
.rankBlock {
text-align: center;
margin-top: -20px;
}
:: سُبْحَانَكَ اللَّهُمَّ وَبِحَمْدِكَ ، أَشْهَدُ أَنْ لا إِلهَ إِلَّا أَنْتَ أَسْتَغْفِرُكَ وَأَتْوبُ إِلَيْكَ ::
PHP:
<div class="star-ranks" style="padding-top: 8px;">
<xf:if is="{$user.reaction_score} >= 10000"> <img src="/upload/images/stars/complete-stars.png" data-xf-init="tooltip" title="Gold User">
<xf:elseif is="{$user.reaction_score} >= 9000" /> <img src="/upload/images/stars/fullstar-10.png" data-xf-init="tooltip" title="Više od ( 9000 +) Ocjena">
<xf:elseif is="{$user.reaction_score} >= 8500" /> <img src="/upload/images/stars/fullstar-10.png" data-xf-init="tooltip" title="Više od ( 8500 +) Ocjena">
<xf:elseif is="{$user.reaction_score} >= 7500" /> <img src="/upload/images/stars/halfstar-10.png" data-xf-init="tooltip" title="Više od ( 7500 +) Ocjena">
<xf:elseif is="{$user.reaction_score} >= 6500" /> <img src="/upload/images/stars/fullstar-9.png" data-xf-init="tooltip" title="Više od ( 65000 +) Ocjena">
<xf:elseif is="{$user.reaction_score} >= 6000" /> <img src="/upload/images/stars/halfstar-9.png" data-xf-init="tooltip" title="Više od ( 6000 + ) Ocjena">
<xf:elseif is="{$user.reaction_score} >= 5500" /> <img src="/upload/images/stars/fullstar-8.png" data-xf-init="tooltip"title="Više od ( 5500 +) Ocjena">
<xf:elseif is="{$user.reaction_score} >= 5000" /> <img src="/upload/images/stars/halfstar-8.png" data-xf-init="tooltip" title="Više od ( 5000 +) Ocjena">
<xf:elseif is="{$user.reaction_score} >= 4000" /> <img src="/upload/images/stars/fullstar-7.png" data-xf-init="tooltip" title="Više od ( 4000 +) Ocjena">
<xf:elseif is="{$user.reaction_score} >= 3000" /> <img src="/upload/images/stars/halfstar-7.png" data-xf-init="tooltip" title="Više od ( 3000 +) Ocjena">
<xf:elseif is="{$user.reaction_score} >= 2000" /> <img src="/upload/images/stars/fullstar-6.png" data-xf-init="tooltip" title="Više od ( 2000 +) Ocjena">
<xf:elseif is="{$user.reaction_score} >= 1400" /> <img src="/upload/images/stars/halfstar-6.png" data-xf-init="tooltip" title="Više od ( 1400 +) Ocjena">
<xf:elseif is="{$user.reaction_score} >= 1000" /> <img src="/upload/images/stars/fullstar-5.png" data-xf-init="tooltip" title="Više od ( 1000 +) Ocjena">
<xf:elseif is="{$user.reaction_score} >= 900" /> <img src="/upload/images/stars/halfstar-5.png" data-xf-init="tooltip" title="Više od ( 900 +) Ocjena">
<xf:elseif is="{$user.reaction_score} >= 800" /> <img src="/upload/images/stars/fullstar-4.png" data-xf-init="tooltip" title="Više od ( 800 +) Ocjena">
<xf:elseif is="{$user.reaction_score} >= 600" /> <img src="/upload/images/stars/halfstar-4.png" data-xf-init="tooltip" title="Više od ( 600 +) Ocjena">
<xf:elseif is="{$user.reaction_score} >= 500" /> <img src="/upload/images/stars/fullstar-3.png" data-xf-init="tooltip" title="Više od ( 500 +) Ocjena">
<xf:elseif is="{$user.reaction_score} >= 400" /> <img src="/upload/images/stars/halfstar-3.png" data-xf-init="tooltip" title="Više od ( 400 +) Ocjena">
<xf:elseif is="{$user.reaction_score} >= 300" /> <img src="/upload/images/stars/fullstar-2.png" data-xf-init="tooltip" title="Više od ( 300 +) Ocjena">
<xf:elseif is="{$user.reaction_score} >= 200" /> <img src="/upload/images/stars/halfstar-2.png" data-xf-init="tooltip" title="Više od ( 200 +) Ocjena">
<xf:elseif is="{$user.reaction_score} >= 100" /> <img src="/upload/images/stars/fullstar-1.png" data-xf-init="tooltip" title="Više od ( 100 +) Ocjena">
<xf:elseif is="{$user.reaction_score} >= 50" /> <img src="/upload/images/stars/halfstar-1.png" data-xf-init="tooltip" title="Više od ( 50 +) Ocjena">
<xf:elseif is="{$user.reaction_score} >= 20" /> <img src="/upload/images/stars/halfstar-1.png" data-xf-init="tooltip" title="Više od ( 20 +) Ocjena">
<xf:elseif is="{$user.reaction_score} < 10" /> <img src="/upload/images/stars/empty-star.png" data-xf-init="tooltip" title="Start ( 10 +) Ocjena">
</xf:if>
</div>
PHP:
<xf:macro name="user_info"
arg-user="!"
arg-fallbackName=""
arg-includeMicrodata="{{ true }}"
arg-itemProp="">
<section class="message-user"
{{ $includeMicrodata ? 'itemprop="' . $itemProp . '" itemscope itemtype="https://schema.org/Person" itemid="' . ($user ? link('canonical:members', $user) : '') . '"' : '' }}>
<h4 class="message-name"><xf:username user="$user" rich="true" defaultname="{$fallbackName}" itemprop="{{ $includeMicrodata ? 'name' : '' }}" /></h4>
<xf:if is="$includeMicrodata && $user">
<meta itemprop="url" content="{{ link('canonical:members', $user) }}" />
</xf:if>
<div class="message-avatar {{ ($xf.options.showMessageOnlineStatus && $user && $user.isOnline()) ? 'message-avatar--online' : '' }}">
<div class="message-avatar-wrapper">
<xf:avatar user="$user" size="m" defaultname="{$fallbackName}" itemprop="{{ $includeMicrodata ? 'image' : '' }}" />
<xf:if is="$user.isMemberOf([4])">
<div class="ribbon--VIP"><span>⚜️ EDITOR ⚜️ </span>
</div>
</xf:if>
<xf:if is="$user.isMemberOf([3])">
<div class="ribbon--VIP"><span>⚜️ STAFF ⚜️</span>
</div>
</xf:if>
<xf:if is="$user.isMemberOf([15])">
<div class="ribbon--VIP"><span>⚜️ GOLD ⚜️</span>
</div>
</xf:if>
<xf:if is="$user.isMemberOf([14])">
<div class="ribbon--VIP"><span>⚜️ SILVER ⚜️</span>
</div>
</xf:if>
<xf:if is="$user.isMemberOf([13])">
<div class="ribbon--VIP"><span>⚜️ BRONZE ⚜️</span>
</div>
</xf:if>
<xf:if is="$user.isMemberOf([12])">
<div class="ribbon--VIP"><span>⚜️ BASIC ⚜️</span>
</div>
</xf:if>
<xf:if is="$user.isMemberOf([6])">
<div class="ribbon--VIP"><span>USER ⚜️</span>
</div>
</xf:if>
<xf:if is="$xf.options.showMessageOnlineStatus && $user && $user.isOnline()">
<span class="message-avatar-online" tabindex="0" data-xf-init="tooltip" data-trigger="auto" title="{{ phrase('online_now')|for_attr }}"></span>
<xf:else /><span class="message-avatar-Offline"></span>
</xf:if>
</div>
</div>
<div class="message-userDetails">
<xf:usertitle user="$user" tag="h5" class="message-userTitle" banner="true" itemprop="{{ $includeMicrodata ? 'jobTitle' : '' }}" />
<xf:userbanners user="$user" tag="div" class="message-userBanner" itemprop="{{ $includeMicrodata ? 'jobTitle' : '' }}" />
</div>
<xf:if is="$user.user_id">
<xf:set var="$extras" value="{{ property('messageUserElements') }}" />
<xf:if contentcheck="true">
<div class="message-userExtras">
<xf:contentcheck>
<xf:if is="$extras.register_date">
<dl class="pairs pairs--justified">
<dt>{{ phrase('joined') }}</dt>
<dd>{{ date($user.register_date) }}</dd>
</dl>
</xf:if>
<xf:if is="$extras.message_count">
<dl class="pairs pairs--justified">
<dt>{{ phrase('messages') }}</dt>
<dd>{$user.message_count|number}</dd>
</dl>
</xf:if>
<xf:if is="$extras.solutions AND $user.question_solution_count">
<dl class="pairs pairs--justified">
<dt>{{ phrase('solutions') }}</dt>
<dd>{$user.question_solution_count|number}</dd>
</dl>
</xf:if>
<xf:if is="$extras.reaction_score">
<dl class="pairs pairs--justified">
<dt>{{ phrase('reaction_score') }}</dt>
<dd>{$user.reaction_score|number}</dd>
</dl>
</xf:if>
<xf:if is="$extras.trophy_points && $xf.options.enableTrophies">
<dl class="pairs pairs--justified">
<dt>{{ phrase('points') }}</dt>
<dd>{$user.trophy_points|number}</dd>
</dl>
</xf:if>
<xf:if is="$extras.age && $user.Profile.age">
<dl class="pairs pairs--justified">
<dt>{{ phrase('age') }}</dt>
<dd>{$user.Profile.age}</dd>
</dl>
</xf:if>
<xf:if is="$extras.location && $user.Profile.location">
<dl class="pairs pairs--justified">
<dt>{{ phrase('location') }}</dt>
<dd>
<xf:if is="$xf.options.geoLocationUrl">
<a href="{{ link('misc/location-info', '', {'location': $user.Profile.location}) }}" rel="nofollow noreferrer" target="_blank" class="u-concealed">{$user.Profile.location}</a>
<xf:else />
{$user.Profile.location}
</xf:if>
</dd>
</dl>
</xf:if>
<xf:if is="$extras.website && $user.Profile.website">
<dl class="pairs pairs--justified">
<dt>{{ phrase('website') }}</dt>
<dd><a href="{$user.Profile.website}" rel="nofollow" target="_blank">{$user.Profile.website|url_display('host', phrase('visit_site'))}</a></dd>
</dl>
</xf:if>
<xf:if is="$extras.custom_fields">
<xf:macro template="custom_fields_macros" name="custom_fields_values"
arg-type="users"
arg-group="personal"
arg-set="{$user.Profile.custom_fields}"
arg-additionalFilters="{{ ['message'] }}"
arg-valueClass="pairs pairs--justified" />
<xf:if is="$user.canViewIdentities()">
<xf:macro template="custom_fields_macros" name="custom_fields_view"
arg-type="users"
arg-group="contact"
arg-set="{$user.Profile.custom_fields}"
arg-additionalFilters="{{ ['message'] }}"
arg-valueClass="pairs pairs--justified" />
</xf:if>
</xf:if>
<div class="star-ranks" style="padding-top: 8px;">
<xf:if is="{$user.reaction_score} >= 10000"> <img src="/upload/images/stars/complete-stars.png" data-xf-init="tooltip" title="Gold User">
<xf:elseif is="{$user.reaction_score} >= 9000" /> <img src="/upload/images/stars/fullstar-10.png" data-xf-init="tooltip" title="Više od (9000 +) Ocjena">
<xf:elseif is="{$user.reaction_score} >= 8500" /> <img src="/upload/images/stars/fullstar-10.png" data-xf-init="tooltip" title="Više od (8500 +) Ocjena">
<xf:elseif is="{$user.reaction_score} >= 7500" /> <img src="/upload/images/stars/halfstar-10.png" data-xf-init="tooltip" title="Više od (7500 +) Ocjena">
<xf:elseif is="{$user.reaction_score} >= 6500" /> <img src="/upload/images/stars/fullstar-9.png" data-xf-init="tooltip" title="Više od (65000 +) Ocjena">
<xf:elseif is="{$user.reaction_score} >= 6000" /> <img src="/upload/images/stars/halfstar-9.png" data-xf-init="tooltip" title="Više od (6000 + ) Ocjena">
<xf:elseif is="{$user.reaction_score} >= 5500" /> <img src="/upload/images/stars/fullstar-8.png" data-xf-init="tooltip"title="Više od (5500 +) Ocjena">
<xf:elseif is="{$user.reaction_score} >= 5000" /> <img src="/upload/images/stars/halfstar-8.png" data-xf-init="tooltip" title="Više od (5000 +) Ocjena">
<xf:elseif is="{$user.reaction_score} >= 4000" /> <img src="/upload/images/stars/fullstar-7.png" data-xf-init="tooltip" title="Više od (4000 +) Ocjena">
<xf:elseif is="{$user.reaction_score} >= 3000" /> <img src="/upload/images/stars/halfstar-7.png" data-xf-init="tooltip" title="Više od (3000 +) Ocjena">
<xf:elseif is="{$user.reaction_score} >= 2000" /> <img src="/upload/images/stars/fullstar-6.png" data-xf-init="tooltip" title="Više od (2000 +) Ocjena">
<xf:elseif is="{$user.reaction_score} >= 1400" /> <img src="/upload/images/stars/halfstar-6.png" data-xf-init="tooltip" title="Više od (1400 +) Ocjena">
<xf:elseif is="{$user.reaction_score} >= 1000" /> <img src="/upload/images/stars/fullstar-5.png" data-xf-init="tooltip" title="Više od (1000 +) Ocjena">
<xf:elseif is="{$user.reaction_score} >= 900" /> <img src="/upload/images/stars/halfstar-5.png" data-xf-init="tooltip" title="Više od (900 +) Ocjena">
<xf:elseif is="{$user.reaction_score} >= 800" /> <img src="/upload/images/stars/fullstar-4.png" data-xf-init="tooltip" title="Više od (800 +) Ocjena">
<xf:elseif is="{$user.reaction_score} >= 600" /> <img src="/upload/images/stars/halfstar-4.png" data-xf-init="tooltip" title="Više od (600 +) Ocjena">
<xf:elseif is="{$user.reaction_score} >= 500" /> <img src="/upload/images/stars/fullstar-3.png" data-xf-init="tooltip" title="Više od (500 +) Ocjena">
<xf:elseif is="{$user.reaction_score} >= 400" /> <img src="/upload/images/stars/halfstar-3.png" data-xf-init="tooltip" title="Više od (400 +) Ocjena">
<xf:elseif is="{$user.reaction_score} >= 300" /> <img src="/upload/images/stars/fullstar-2.png" data-xf-init="tooltip" title="Više od (300 +) Ocjena">
<xf:elseif is="{$user.reaction_score} >= 200" /> <img src="/upload/images/stars/halfstar-2.png" data-xf-init="tooltip" title="Više od (200 +) Ocjena">
<xf:elseif is="{$user.reaction_score} >= 100" /> <img src="/upload/images/stars/fullstar-1.png" data-xf-init="tooltip" title="Više od (100 +) Ocjena">
<xf:elseif is="{$user.reaction_score} >= 50" /> <img src="/upload/images/stars/halfstar-1.png" data-xf-init="tooltip" title="Više od (50 +) Ocjena">
<xf:elseif is="{$user.reaction_score} >= 20" /> <img src="/upload/images/stars/halfstar-1.png" data-xf-init="tooltip" title="Više od (20 +) Ocjena">
<xf:elseif is="{$user.reaction_score} < 10" /> <img src="/upload/images/stars/empty-star.png" data-xf-init="tooltip" title="Prvih (10) Ocjena">
</xf:if>
</div>
</xf:contentcheck>
</div>
</xf:if>
</xf:if>
<span class="message-userArrow"></span>
</section>
</xf:macro>
<xf:macro name="user_info_simple" arg-user="!" arg-fallbackName="" arg-includeMicrodata="{{ true }}" arg-itemProp="">
<header class="message-user"
{{ $includeMicrodata ? 'itemprop="' . $itemProp . '" itemscope itemtype="https://schema.org/Person" itemid="' . ($user ? link('canonical:members', $user) : '') . '"' : '' }}>
<xf:if is="$includeMicrodata">
<meta itemprop="name" content="{{ $user.username ?: $fallbackName }}" />
<xf:if is="$user">
<meta itemprop="url" content="{{ link('canonical:members', $user) }}" />
</xf:if>
</xf:if>
<div class="message-avatar">
<div class="message-avatar-wrapper">
<xf:avatar user="$user" size="s" defaultname="{$fallbackName}" itemprop="{{ $includeMicrodata ? 'image' : '' }}" />
</div>
</div>
<span class="message-userArrow"></span>
</header>
</xf:macro>
<xf:macro name="attachments" arg-attachments="!" arg-message="!" arg-canView="!">
<xf:if contentcheck="true">
<xf:css src="attachments.less" />
<section class="message-attachments">
<h4 class="block-textHeader">{{ phrase('attachments') }}</h4>
<ul class="attachmentList">
<xf:contentcheck>
<xf:foreach loop="$attachments" value="$attachment" if="!$message.isAttachmentEmbedded($attachment)">
<xf:macro template="attachment_macros" name="attachment_list_item"
arg-attachment="{$attachment}"
arg-canView="{$canView}" />
</xf:foreach>
</xf:contentcheck>
</ul>
</section>
</xf:if>
</xf:macro>
<xf:macro name="signature" arg-user="!">
<xf:if is="$xf.visitor.Option.content_show_signature AND $user.Profile.signature">
<xf:if contentcheck="true">
<aside class="message-signature">
<xf:contentcheck>
{{ bb_code($user.Profile.signature, 'user:signature', $user) }}
</xf:contentcheck>
</aside>
</xf:if>
</xf:if>
</xf:macro>