هيلبرنت | Helpernt

هيلبرنت | Helpernt (https://www.helpernt.com/vb/index.php)
-   ركن مشاكل وطلبات الزين فورو XENFORO (https://www.helpernt.com/vb/forumdisplay.php?f=97)
-   -   ممكن معرفة طريقة ان يكون التوقيع واحد في الصفحة (https://www.helpernt.com/vb/showthread.php?t=12362)

اقرا 08-08-2021 11:24 AM

ممكن معرفة طريقة ان يكون التوقيع واحد في الصفحة
 
السلام عليكم
مازلنا نبحر ونكتشف XENFORO
كيف اجعل التوقيع في الصفحة واحد لا يتكرر اليا
كما في vb عن طريق هاك عدم تكرار التوقيع
شاكرا ومقدرا مسبقا

هيلبرنت 08-08-2021 08:26 PM

رد: ممكن معرفة طريقة ان يكون التوقيع واحد في الصفحة
 
ابحث عن القالب message_macros بداخله ابحث عن هذا الكود
كود:

            <aside class="message-signature">
            <xf:contentcheck>
                {{ bb_code($user.Profile.signature, 'user:signature', $user) }}
            </xf:contentcheck>
            </aside>

استبدله بــ
كود PHP:

<xf:if is="$post.Thread && $post.post_id === $post.Thread.first_post_id">            
            <
aside class="message-signature">
            <
xf:contentcheck>
                {{ 
bb_code($user.Profile.signature'user:signature'$user) }}
            </
xf:contentcheck>
            </
aside>
</
xf:if> 

جرب وردلنا خبر

اقرا 08-08-2021 08:49 PM

رد: ممكن معرفة طريقة ان يكون التوقيع واحد في الصفحة
 
عذراً! واجهنا بعض المشاكل.

السطر 146: يجب أن تكون العلامة الشرطية صالحة باستخدام إحدى الصفات أو التحقق من المحتوى. - إسم القالب: public:message_macros

كود PHP:

<xf:macro name="user_info"
    
arg-user="!"
    
arg-fallbackName="">

    <
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="$usersize="m" defaultname="{$fallbackName}itemprop="image" />
                <
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:if>
            </
div>
        </
div>
        <
div class="message-userDetails">
            <
h4 class="message-name"><xf:username user="$userrich="true" defaultname="{$fallbackName}/></h4>
            <
xf:usertitle user="$usertag="h5" class="message-userTitle" banner="true" itemprop="jobTitle" />
            <
xf:userbanners user="$usertag="div" class="message-userBanner" itemprop="jobTitle" />
        </
div>
        <
xf:if is="$user.user_id">
            <
xf:set var="$extrasvalue="{{ 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('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="$usersize="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="$attachmentsvalue="$attachmentif="!$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


هيلبرنت 08-08-2021 09:27 PM

رد: ممكن معرفة طريقة ان يكون التوقيع واحد في الصفحة
 
جرب الان
كود PHP:

<xf:macro name="user_info"
    
arg-user="!"
    
arg-fallbackName="">

    <
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="$usersize="m" defaultname="{$fallbackName}itemprop="image" />
                <
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:if>
            </
div>
        </
div>
        <
div class="message-userDetails">
            <
h4 class="message-name"><xf:username user="$userrich="true" defaultname="{$fallbackName}/></h4>
            <
xf:usertitle user="$usertag="h5" class="message-userTitle" banner="true" itemprop="jobTitle" />
            <
xf:userbanners user="$usertag="div" class="message-userBanner" itemprop="jobTitle" />
        </
div>
        <
xf:if is="$user.user_id">
            <
xf:set var="$extrasvalue="{{ 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('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="$usersize="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="$attachmentsvalue="$attachmentif="!$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="$post.Thread && $post.post_id === $post.Thread.first_post_id">
    <
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:if>
</
xf:macro


اقرا 08-08-2021 09:54 PM

رد: ممكن معرفة طريقة ان يكون التوقيع واحد في الصفحة
 
للاسف اتلغى تماما
بدون تعديل
كود:

https://i.imgur.com/ER0qTzF.png
بعد التعديل
كود:

https://i.imgur.com/qkmAS16.png

هيلبرنت 08-08-2021 09:56 PM

رد: ممكن معرفة طريقة ان يكون التوقيع واحد في الصفحة
 
لا يوجد فرق بين الصورتين

اقرا 08-08-2021 10:07 PM

رد: ممكن معرفة طريقة ان يكون التوقيع واحد في الصفحة
 
الاولى قبل ماحط التعديل تظهر كل التواقيع في كل مشاركة
الصورة الثانية اختفت كلها والمطلوب الله يسعدك ان يظهر واحد فقط

هيلبرنت 08-08-2021 10:11 PM

رد: ممكن معرفة طريقة ان يكون التوقيع واحد في الصفحة
 
1 مرفق
بالمرفقات ستجد طلبك

اقرا 08-11-2021 01:11 AM

رد: ممكن معرفة طريقة ان يكون التوقيع واحد في الصفحة
 
للاسف مايعمل ويطلع لي اخطاء ام مااعرف اركبه!!
امل شرح الطريقة
شكرا لكم

shqawe 08-12-2021 01:45 AM

رد: ممكن معرفة طريقة ان يكون التوقيع واحد في الصفحة
 
اذا تقصد ان يعرض التوقيع مرة واحدة لكل عضو يرد على الموضوع حتى لو تعددت مشاركاته فاتوقع تحتاج الى اضافة

اما اذا اردت ان يكون التوقيع فقط في المشاركة الاولى للموضوع فقم بفتح قالب post_macros وابحث عن الكود التالي:

كود:


<xf:extension name="signature">
                                                                        <xf:macro template="message_macros" name="signature" arg-user="{$post.User}" />
                                                                </xf:extension>

واستبدله بهذا الكود:

كود:

<xf:extension name="signature">
                                                                        <xf:if is="$post.isFirstPost()">
                                                                                <xf:macro template="message_macros" name="signature" arg-user="{$post.User}" />
                                                                        </xf:if>
                                                                </xf:extension>

احترامي وتقديري
اخوك
شقاوي


الساعة الآن 07:36 AM

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd. TranZ By Almuhajir