قالب بيانات أو معلومات العضو محدث للزين فورو

ناصر

طاقم الإدارة
مدير المنتدى
إنضم
2022/07/19
المشاركات
1,434
التفاعل
65
النقاط
66
الجنس
ذكر
الجنسية
السعودية
السلام عليكم ورحمه الله وبركاته
اليوم ساقوم باضافة تعديل بسيط على قالب معلومات العضو اللى تم طرحه من قبل ستجدوه هنا قالب معلومات العضو بشكله الجديد للجيل الثانى للزين فورو -Xenforo 2.0 انا فقط قمت بالتعديل عليه.

الخطوات
القالب يتوافق مع اخر اصدار للزين فورو xF 2.1
1- لوحة تحكم المنتدى >>> البحث فى القوالب >>> ابحث عن القالب message_macros >>> ثم استبدال محتواه بهذا الكود (يجب اخذ نسخة احتياطية من القالب قبل التعديل ربما تحتاج لها)
HTML:
<xf:macro name="user_info"
    arg-user="!"
    arg-fallbackName=""
    arg-dateHtml=""
    arg-linkHtml="">

    <section itemscope itemtype="https://schema.org/Person" class="message-user">
        <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="image" />
                <xf:if is="$xf.options.showMessageOnlineStatus && $user && $user.isOnline()">
                    <span class="message-avatar-online" data-xf-init="tooltip" title="{{ phrase('online_now')|for_attr }}"></span>
                </xf:if>
            </div>
        </div>
        <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>
        <xf:if is="{$linkHtml}"><div class="message-permalink">{$linkHtml}</div></xf:if>
        <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> <i class="fa fa-calendar"></i> {{ phrase('joined') }}</dt>
                            <dd>{{ date($user.register_date) }}</dd>
                        </dl>
                    </xf:if>
                    <xf:if is="$extras.message_count">
                        <dl class="pairs pairs--justified">
                            <dt> <i class="fa fa-comments"></i> {{ phrase('messages') }}</dt>
                            <dd>{$user.message_count|number}</dd>
                        </dl>
                    </xf:if>
                    <xf:if is="$extras.like_count">
                        <dl class="pairs pairs--justified">
                            <dt> <i class="fa fa-heart"></i>{{ phrase('likes') }}</dt>
                            <dd>{$user.like_count|number}</dd>
                        </dl>
                    </xf:if>
                    <xf:if is="$extras.trophy_points && $xf.options.enableTrophies">
                        <dl class="pairs pairs--justified">
                            <dt><i class="fa fa-star"></i> {{ 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><i class="fa fa-user"></i> {{ 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><i class="fa fa-map-marker"></i> {{ phrase('location') }}</dt>
                            <dd><a href="{{ link('misc/location-info', '', {'location': $user.Profile.location}) }}" rel="nofollow" target="_blank" class="u-concealed">{$user.Profile.location}</a></dd>
                        </dl>
                    </xf:if>
                    <xf:if is="$extras.website && $user.Profile.website">
                        <dl class="pairs pairs--justified">
                            <dt><i class="fa fa-sitemap"></i> {{ phrase('website') }}</dt>
                            <dd><a href="{$user.Profile.website}" rel="nofollow" target="_blank">{$user.Profile.website|url('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>
                </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="">
    <header itemscope itemtype="https://schema.org/Person" class="message-user">
        <meta itemprop="name" content="{{ $user.username ?: $fallbackName }}">
        <div class="message-avatar">
            <div class="message-avatar-wrapper">
                <xf:avatar user="$user" size="s" defaultname="{$fallbackName}" itemprop="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>

2- قم الان بوضع هذا الكود فى قالب اسمه extra.less
CSS:
message-userExtras dl {
    padding-left: 5px;
    padding-top: 5px;
    padding-right: 25px;
    background-color: #fff;
    margin: 0 0 3px;
    position: relative;
    font-size: 10px;
    height: 24px;
    border: 1px solid #e4e4e4;
}

.message-userExtras dl i {
    position: absolute;
    top: 0;
    right: 0;
    width: 24px;
    height: 24px;
    border-right: 3px solid #000;
    color: #0b0b0b;
    display: block;
    text-align: center;
    line-height: 20px;
    font-size: 13px;
    font-weight: lighter;
}
.pairs.pairs--justified > dt {
    color: #212121;
}

3- النتيجة

gTiZuhb.png
 
CSS:
/* Set the background color of body to tan */

.message--post .message-inner .avatar {
height: 160px;
width: 160px;
}

@media (max-width: 900px) {
.message--post .message-inner .avatar {
height: 36px;
width: 36px;
}
}

/* Set the background color of body to tan */

.message-userExtras dl {
    background: #333;
    padding: 6px 10px;
    border: 1px solid;
    border-radius: 4px;
    margin-bottom: 3px;
}

.message-userExtras dt {
    color: #e8e8e8;
}

.message-userExtras dd {
    color: #ddd;
}

.message-name{
 background: #fcfcfb;
         color:  #C1730E;
    
  border:1px solid #ccc;
    border-radius:5px;
    -webkit-border-radius:5px;
    -moz-border-radius:5px;
         padding: 4px;   
line-height: 1.4;
font-weight: 600;

margin:0px auto 8px;
box-shadow: 0 0 3px 0 rgba(159,152,152,0.75);

}

.message-userTitle{
  background: #E6C260;
         color:  #323232;

  border:1px solid #ccc;
    border-radius:5px;
    -webkit-border-radius:5px;
    -moz-border-radius:5px;
         padding: 4px;   
line-height: 1.4;
font-weight: 600;

margin:8px 0 8px;
box-shadow: 0 0 3px 0 rgba(159,152,152,0.75);
}


.message-user{
  background: #C5E2E6;
         color:  #323232;
    
  border:1px solid #ccc;
    border-radius:5px;
    -webkit-border-radius:5px;
    -moz-border-radius:5px;
         padding: 8px;   
line-height: 1.4;
font-weight: 600;

margin:8px 0 8px;
box-shadow: 0 0 3px 0 rgba(159,152,152,0.75);
}


/* Set the background color of body to tan */
 

المرفقات

  • Screenshot.webp
    Screenshot.webp
    9.4 KB · المشاهدات: 1
عودة
أعلى