Neler yeni

Foruma hoş geldin 👋, Ziyaretçi

Forum içeriğine ve tüm hizmetlerimize erişim sağlamak için foruma kayıt olmalı ya da giriş yapmalısınız. Foruma üye olmak tamamen ücretsizdir.

  • Forumdan daha fazla yararlanmak için, profilinizi telefon numaranız 📱 ile doğrulayın ve daha ayrıcalıklı olun 😉
    Daha fazla bilgi!

Nasıl yapılır ? Özel alan sorunu

Garfield

xFanatik
Aktif Lisans
SMS onaylı
Kullanıcı
Katılım
4 Nis 2020
Mesajlar
2,352
Çözümler
105

yeni bir kullanıcı özel alanı ekledım uzmanlık, ancak bunu postbitte konumun bir altında ıkonlu bir sekılde gostermek ıstıyorum bunu nasıl yapabılırım?

message_macros

Kod:
<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="$user" size="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="$user" rich="true" defaultname="{$fallbackName}" itemprop="name" /></h4>
<xf:usertitle user="$user" tag="h5" class="message-userTitle xgtUserTitlePc" banner="true" itemprop="jobTitle" />
<xf:userbanners user="$user" tag="div" class="message-userBanner" itemprop="jobTitle" />
<xf:usertitle user="$user" tag="h5" class="message-userTitle xgtUserTitleMobil" banner="true" itemprop="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">
                            <div class="post-row">
                              <div class="post-icon">
                               <i class="fas fa-calendar-alt"></i>
                              </div>
                              <div class="post-row-inner">
                                {{ phrase('joined') }}:<span class="ml-auto">{{ date($user.register_date) }}</span>
                              </div>
                            </div>
                        </dl>
                    </xf:if>           
                    <xf:if is="$extras.message_count">
                        <dl class="pairs pairs--justified">
                            <div class="post-row">
                              <div class="post-icon">
                                <i class="fas fa-comments"></i>
                              </div>
                              <div class="post-row-inner">
                                {{ phrase('messages') }}:<span class="ml-auto">{$user.message_count|number}</span>
                              </div>
                            </div>
                        </dl>
                    </xf:if>
                    <xf:if is="$extras.solutions AND $user.question_solution_count">
                        <dl class="pairs pairs--justified">
                            <div class="post-row">
                              <div class="post-icon">
                                <i class="fas fa-check-circle"></i>
                              </div>
                              <div class="post-row-inner">
                                {{ phrase('solutions') }}:<span class="ml-auto">{$user.question_solution_count|number}</span>
                              </div>
                            </div>
                        </dl>
                    </xf:if>       
                    <xf:if is="$extras.reaction_score">
                        <dl class="pairs pairs--justified">
                            <div class="post-row">
                              <div class="post-icon">
                                <i class="fas fa-thumbs-up"></i>
                              </div>
                              <div class="post-row-inner">
                                {{ phrase('reaction_score') }}:<span class="ml-auto">{$user.reaction_score|number}</span>
                              </div>
                            </div>
                        </dl>
                    </xf:if>
                    <xf:if is="$extras.trophy_points && $xf.options.enableTrophies">
                        <dl class="pairs pairs--justified">
                            <div class="post-row">
                              <div class="post-icon">
                                <i class="fas fa-medal"></i>
                              </div>
                              <div class="post-row-inner">
                                {{ phrase('points') }}:<span class="ml-auto">{$user.trophy_points|number}</span>
                              </div>
                            </div>
                        </dl>
                    </xf:if>           
                    <xf:if is="$extras.age && $user.Profile.age">
                        <dl class="pairs pairs--justified">
                            <div class="post-row">
                              <div class="post-icon">
                                <i class="fab fa-pagelines"></i>
                              </div>
                              <div class="post-row-inner">
                                {{ phrase('age') }}:<span class="ml-auto">{$user.Profile.age}</span>
                              </div>
                            </div>
                        </dl>
                    </xf:if>
                    <xf:if is="$extras.location && $user.Profile.location">
                        <dl class="pairs pairs--justified">
                            <div class="post-row">
                              <div class="post-icon">
                                <i class="fas fa-location"></i>
                              </div>
                              <div class="post-row-inner">
                                {{ phrase('location') }}:
                                  <span class="ml-auto">
                                      <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>
                                  </span>
                              </div>
                            </div>
                        </dl>
                    </xf:if>

                    <xf:if is="$extras.website && $user.Profile.website">
                        <dl class="pairs pairs--justified">
                            <div class="post-row">
                              <div class="post-icon">
                                <i class="fas fa-globe-europe"></i>
                              </div>
                              <div class="post-row-inner">
                                {{ phrase('website') }}:<span class="ml-auto"><a href="{$user.Profile.website}" rel="nofollow" target="_blank">{$user.Profile.website|url('host', phrase('visit_site'))}</a></span>
                              </div>
                            </div>
                        </dl>
                    </xf:if>
                    
                    <xf:if is="$extras.custom_fields">
<div class="post-row">
                              <div class="post-icon">
<i class="fas fa-map-marked"></i>                              </div>
                              <div class="post-row-inner">

                        <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" />
                                  </div>
                            </div>
                        </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>
 

Ekli dosyalar

  • Screenshot.png
    Screenshot.png
    93.1 KB · Görüntüleme: 32

Foruma hoş geldin 👋, Ziyaretçi

Forum içeriğine ve tüm hizmetlerimize erişim sağlamak için foruma kayıt olmalı ya da giriş yapmalısınız. Foruma üye olmak tamamen ücretsizdir.