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!

Çözüldü İçeriği Belirli Gruplara Göstermek (2.2.x)

Bu sorun verilen destek sayesinde çözüme ulaştırılmıştır.

htsumer

xFanatik
SMS onaylı
Kullanıcı
Katılım
2 May 2018
Mesajlar
1,931
Çözümler
40
Merhaba, bir çok yere açmış olmama rağmen henüz cevap alamadım. Aciliyetim olduğu için yardım bekliyorum.

2.2.0 Öncesinde post_macros içinde şu kodu kullanıyordum. Hem ziyaretçilere hemde gümüş üyelere 160 karaktere kadar okunabliyordu.

Kod:
<article class="message-body js-selectToQuote">
<xf:ad position="post_above_content" arg-post="{$post}" />
<xf:if is="{{$xf.visitor.isMemberOf([28,1])}}">
<xf:set var="$snippetPost" value="{{ snippet($post.message, 160) }}" />
{{  bb_code($snippetPost, 'post', $post)  }}
<xf:if is="$snippetPost != $post.message">
<div class="blockMessage blockMessage--important blockMessage--iconic">
İçeriğin tamamını görüntülemek için lütfen giriş yapın yada Üye olun.[/B]
</div>
</xf:if>


Güncelleme sonrası oylama sisteminin çalışmaması nedeniyle 2.2.0 ile gelen kodları geri yükledim. Şu an yeni post_makros içine bu kodu adapte etmek istiyorum. Yenisi eskisi gibi değil o nedenle yanlış kod silmek istemedim.
Yeni post_macros kodları aşağıdaki gibidir.

Kod:
<xf:macro name="post"
    arg-post="!"
    arg-thread="!"
    arg-highlightedPosts="{{ [] }}">

    <xf:css src="message.less" />

    <xf:extension name="before"></xf:extension>

    <xf:extension name="extra_classes" value="message--post" />
    <article class="message {{ extension_value('extra_classes') }} js-post js-inlineModContainer {{ $post.isIgnored() ? 'is-ignored' : '' }} {{ $post.isUnread() ? ' is-unread' : '' }}"
        data-author="{{ $post.User.username ?: $post.username }}"
        data-content="post-{$post.post_id}"
        id="js-post-{$post.post_id}">

        <span class="u-anchorTarget" id="post-{$post.post_id}"></span>

        <xf:extension name="full_body">
            <div class="message-inner">
                <xf:extension name="user_cell">
                    <div class="message-cell message-cell--user">
                        <xf:macro template="message_macros" name="user_info" arg-user="{$post.User}"
                            arg-fallbackName="{$post.username}"/>
                    </div>
                </xf:extension>

                <xf:extension name="main_cell">
                    <div class="message-cell message-cell--main">
                    <xf:extension name="main_cell_inner">
                        <div class="message-main js-quickEditTarget">

                            <xf:extension name="attribution">
                                <xf:macro name="post_attribution" arg-post="{$post}" arg-thread="{$thread}" />
                            </xf:extension>

                            <div class="message-content js-messageContent">
                            <xf:extension name="content">

                                <xf:extension name="notices">
                                    <xf:macro name="post_notices" arg-post="{$post}" arg-thread="{$thread}" />
                                </xf:extension>

                                <xf:extension name="user_content">
                                    <xf:macro name="post_user_content" arg-post="{$post}" arg-thread="{$thread}" />
                                </xf:extension>

                                <xf:extension name="after_content">
                                    <xf:macro name="post_last_edit" arg-post="{$post}" />
                                </xf:extension>

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

                            </xf:extension>
                            </div>

                            <xf:extension name="footer">
                                <xf:macro name="post_footer" arg-post="{$post}" arg-thread="{$thread}" />
                            </xf:extension>
                        </div>

                    </xf:extension>
                    </div>
                </xf:extension>
            </div>
        </xf:extension>
    </article>

    <xf:extension name="after"></xf:extension>
    <xf:ad position="post_below_container" arg-post="{$post}" />
</xf:macro>

<xf:macro name="post_attribution"
    arg-post="!"
    arg-thread="!"
    arg-showPosition="{{ true }}"
    arg-showUser="{{ false }}"
    arg-showThreadUnreadIndicator="{{ false }}"
    arg-showReplyCount="{{ false }}"
    arg-repliesPhrase="{{ phrase('replies:') }}"
    arg-showThreadStateIcons="{{ false }}"
    arg-mainClass=""
    arg-oppositeClass="">

    <header class="message-attribution message-attribution--split">
        <ul class="message-attribution-main listInline {$mainClass}">
            <xf:if is="$showThreadStateIcons">
                <xf:if is="{$xf.visitor.user_id} AND {$thread.Watch.{$xf.visitor.user_id}}">
                    <li>
                        <xf:fa icon="fa-bell" title="{{ phrase('thread_watched')|for_attr }}" />
                        <span class="u-srOnly">{{ phrase('thread_watched') }}</span>
                    </li>
                </xf:if>

                <xf:if is="$thread.sticky">
                    <li>
                        <xf:fa icon="fa-thumbtack" title="{{ phrase('sticky')|for_attr }}" />
                        <span class="u-srOnly">{{ phrase('sticky') }}</span>
                    </li>
                </xf:if>
            </xf:if>
            <xf:if is="$showUser">
                <xf:set var="$username"><xf:username user="{$post.User}" defaultname="{$post.username}" /></xf:set>
                <li class="u-concealed message-attribution-user--top">{{ phrase('by_user_x', {'name':$username}) }}</li>
            </xf:if>
            <li class="u-concealed">
                <a href="{{ link('threads/post', $thread, {'post_id': $post.post_id}) }}" rel="nofollow">
                    <xf:date time="{$post.post_date}" itemprop="datePublished" />
                </a>
            </li>
            <xf:if is="$showReplyCount && $thread.reply_count">
                <li class="u-concealed">
                    <a href="{{ link('threads', $thread) }}#posts">
                        <xf:fa icon="fa-comment" class="u-spaceAfter" />{$repliesPhrase|raw} {$thread.reply_count|number}
                    </a>
                </li>
            </xf:if>
        </ul>

        <ul class="message-attribution-opposite message-attribution-opposite--list {$oppositeClass}">
            <xf:if is="$post.isUnread()">
                <li><span class="message-newIndicator">{{ phrase('new') }}</span></li>
            <xf:elseif is="$thread.isUnread() && $showThreadUnreadIndicator" />
                <li><span class="message-newIndicator" title="{{ phrase('new_replies') }}">{{ phrase('new') }}</span></li>
            </xf:if>
            <li>
                <a href="{{ link('threads/post', $thread, {'post_id': $post.post_id}) }}"
                    class="message-attribution-gadget"
                    data-xf-init="share-tooltip"
                    data-href="{{ link('posts/share', $post) }}"
                    rel="nofollow">
                    <xf:fa icon="fa-share-alt"/>
                </a>
            </li>
            <xf:if contentcheck="true">
                <li>
                    <xf:contentcheck>
                        <xf:macro template="bookmark_macros" name="link"
                            arg-content="{$post}"
                            arg-class="message-attribution-gadget bookmarkLink--highlightable"
                            arg-confirmUrl="{{ link('posts/bookmark', $post) }}"
                            arg-showText="{{ false }}"/>
                    </xf:contentcheck>
                </li>
            </xf:if>
            <xf:if is="$showPosition">
                <li>
                    <a href="{{ link('threads/post', $thread, {'post_id': $post.post_id}) }}" rel="nofollow">
                        #{{ number($post.position + 1) }}
                    </a>
                </li>
            </xf:if>
        </ul>
    </header>
</xf:macro>

<xf:macro name="post_notices" arg-post="!" arg-thread="!">
    <xf:if is="$post.message_state == 'deleted'">
        <div class="messageNotice messageNotice--deleted">
            <xf:macro template="deletion_macros" name="notice" arg-log="{$post.DeletionLog}" />
        </div>
    <xf:elseif is="$post.message_state == 'moderated'" />
        <div class="messageNotice messageNotice--moderated">
            {{ phrase('this_message_is_awaiting_moderator_approval_and_is_invisible_to_normal') }}
        </div>
    </xf:if>
    <xf:if is="$post.warning_message">
        <div class="messageNotice messageNotice--warning">
            {$post.warning_message}
        </div>
    </xf:if>
    <xf:if is="$post.isIgnored()">
        <div class="messageNotice messageNotice--ignored">
            {{ phrase('you_are_ignoring_content_by_this_member') }}
            <xf:showignored />
        </div>
    </xf:if>
</xf:macro>

<xf:macro name="post_user_content" arg-post="!" arg-thread="!" arg-snippet="{{ false }}">

    <div class="message-userContent lbContainer js-lbContainer {{ $post.isIgnored() ? 'is-ignored' : '' }}"
        data-lb-id="post-{$post.post_id}"
        data-lb-caption-desc="{{ $post.User ? $post.User.username : $post.username }} &middot; {{ date_time($post.post_date) }}">

        <xf:if is="$post.isFirstPost()">
            <xf:macro template="custom_fields_macros" name="custom_fields_view"
                arg-type="threads"
                arg-group="before"
                arg-onlyInclude="{$thread.Forum.field_cache}"
                arg-set="{$thread.custom_fields}"
                arg-wrapperClass="message-fields message-fields--before" />
        </xf:if>

        <article class="message-body js-selectToQuote">
            <xf:ad position="post_above_content" arg-post="{$post}" />
            <xf:if is="$snippet">
                {{ bb_code_snippet($post.message, 'post', $post, $snippet) }}
            <xf:else />
                {{ bb_code($post.message, 'post', $post) }}
            </xf:if>
            <div class="js-selectToQuoteEnd">&nbsp;</div>
            <xf:ad position="post_below_content" arg-post="{$post}" />
        </article>

        <xf:if is="$post.isFirstPost()">
            <xf:macro template="custom_fields_macros" name="custom_fields_view"
                arg-type="threads"
                arg-group="after"
                arg-onlyInclude="{$thread.Forum.field_cache}"
                arg-set="{$thread.custom_fields}"
                arg-wrapperClass="message-fields message-fields--after" />
        </xf:if>

        <xf:if is="$post.attach_count">
            <xf:macro template="message_macros" name="attachments"
                arg-attachments="{$post.Attachments}"
                arg-message="{$post}"
                arg-canView="{{ $thread.canViewAttachments() }}" />
        </xf:if>
    </div>
</xf:macro>

<xf:macro name="post_last_edit" arg-post="!">
    <xf:if is="$post.last_edit_date">
        <div class="message-lastEdit">
            <xf:if is="$post.user_id == $post.last_edit_user_id">
                {{ phrase('last_edited:') }} <xf:date time="{$post.last_edit_date}" itemprop="dateModified" />
            <xf:else />
                {{ phrase('last_edited_by_moderator:') }} <xf:date time="{$post.last_edit_date}" itemprop="dateModified" />
            </xf:if>
        </div>
    </xf:if>
</xf:macro>

<xf:macro name="post_footer" arg-post="!" arg-thread="!">
    <footer class="message-footer">
        <xf:if contentcheck="true">
            <div class="message-actionBar actionBar">
                <xf:contentcheck>
                    <xf:macro name="post_action_bar" arg-post="{$post}" arg-thread="{$thread}" />
                </xf:contentcheck>
            </div>
        </xf:if>

        <div class="reactionsBar js-reactionsList {{ $post.reactions ? 'is-active' : '' }}">
            <xf:reactions content="{$post}" link="posts/reactions" />
        </div>

        <div class="js-historyTarget message-historyTarget toggleTarget" data-href="trigger-href"></div>
    </footer>
</xf:macro>

<xf:macro name="post_action_bar" arg-post="!" arg-thread="!">
    <xf:if contentcheck="true">
        <div class="actionBar-set actionBar-set--external">
        <xf:contentcheck>
            <xf:react content="{$post}" link="posts/react" list="< .js-post | .js-reactionsList" />

            <xf:if is="$thread.canReply() OR $thread.canReplyPreReg()">
                <xf:set var="$quoteLink">{{ link('threads/reply', $thread, {'quote': $post.post_id}) }}</xf:set>

                <xf:if is="$xf.options.multiQuote AND $xf.visitor.user_id">
                    <a href="{$quoteLink}"
                        class="actionBar-action actionBar-action--mq u-jsOnly js-multiQuote"
                        title="{{ phrase('toggle_multi_quote_tooltip')|for_attr }}"
                        data-message-id="{$post.post_id}"
                        data-mq-action="add">{{ phrase('quote') }}</a>
                </xf:if>

                <a href="{$quoteLink}"
                    class="actionBar-action actionBar-action--reply"
                    title="{{ phrase('reply_quoting_this_message')|for_attr }}"
                    data-xf-click="quote"
                    data-quote-href="{{ link('posts/quote', $post) }}">{{ phrase('reply') }}</a>
            </xf:if>
        </xf:contentcheck>
        </div>
    </xf:if>

    <xf:if contentcheck="true">
        <div class="actionBar-set actionBar-set--internal">
        <xf:contentcheck>
            <xf:if is="$post.canUseInlineModeration()">
                <span class="actionBar-action actionBar-action--inlineMod">
                    <xf:checkbox standalone="true">
                        <xf:option value="{$post.post_id}" class="js-inlineModToggle"
                            data-xf-init="tooltip"
                            title="{{ phrase('select_for_moderation') }}"
                            label="{{ phrase('select_for_moderation') }}"
                            hiddenlabel="true" />
                    </xf:checkbox>
                </span>
            </xf:if>

            <xf:if is="$post.canReport()">
                <a href="{{ link('posts/report', $post) }}"
                    class="actionBar-action actionBar-action--report"
                    data-xf-click="overlay">{{ phrase('report_verb') }}</a>
            </xf:if>

            <xf:set var="$hasActionBarMenu" value="{{ false }}" />
            <xf:if is="$post.canEdit()">
                <xf:js src="xf/message.js" min="1" />
                <a href="{{ link('posts/edit', $post) }}"
                    class="actionBar-action actionBar-action--edit actionBar-action--menuItem"
                    data-xf-click="quick-edit"
                    data-editor-target="#js-post-{$post.post_id} .js-quickEditTarget"
                    data-menu-closer="true">{{ phrase('edit') }}</a>

                <xf:set var="$hasActionBarMenu" value="{{ true }}" />
            </xf:if>
            <xf:if is="$post.edit_count && $post.canViewHistory()">
                <a href="{{ link('posts/history', $post) }}"
                    class="actionBar-action actionBar-action--history actionBar-action--menuItem"
                    data-xf-click="toggle"
                    data-target="#js-post-{$post.post_id} .js-historyTarget"
                    data-menu-closer="true">{{ phrase('history') }}</a>

                <xf:set var="$hasActionBarMenu" value="{{ true }}" />
            </xf:if>
            <xf:if is="$post.canDelete('soft')">
                <a href="{{ link('posts/delete', $post) }}"
                    class="actionBar-action actionBar-action--delete actionBar-action--menuItem"
                    data-xf-click="overlay">{{ phrase('delete') }}</a>

                <xf:set var="$hasActionBarMenu" value="{{ true }}" />
            </xf:if>
            <xf:if is="$post.message_state == 'deleted' AND $post.canUndelete()">
                <a href="{{ link('posts/undelete', $post) }}"
                    class="actionBar-action actionBar-action--undelete actionBar-action--menuItem"
                    data-xf-click="overlay">{{ phrase('undelete') }}</a>

                <xf:set var="$hasActionBarMenu" value="{{ true }}" />
            </xf:if>
            <xf:if is="$post.canCleanSpam()">
                <a href="{{ link('spam-cleaner', $post) }}"
                    class="actionBar-action actionBar-action--spam actionBar-action--menuItem"
                    data-xf-click="overlay">{{ phrase('spam') }}</a>

                <xf:set var="$hasActionBarMenu" value="{{ true }}" />
            </xf:if>
            <xf:if is="$xf.visitor.canViewIps() && $post.ip_id">
                <a href="{{ link('posts/ip', $post) }}"
                    class="actionBar-action actionBar-action--ip actionBar-action--menuItem"
                    data-xf-click="overlay">{{ phrase('ip') }}</a>

                <xf:set var="$hasActionBarMenu" value="{{ true }}" />
            </xf:if>
            <xf:if is="$post.canWarn()">

                <a href="{{ link('posts/warn', $post) }}"
                    class="actionBar-action actionBar-action--warn actionBar-action--menuItem">{{ phrase('warn') }}</a>

                <xf:set var="$hasActionBarMenu" value="{{ true }}" />
            <xf:elseif is="$post.warning_id && $xf.visitor.canViewWarnings()" />
                <a href="{{ link('warnings', {'warning_id': $post.warning_id}) }}"
                    class="actionBar-action actionBar-action--warn actionBar-action--menuItem"
                    data-xf-click="overlay">{{ phrase('view_warning') }}</a>
                <xf:set var="$hasActionBarMenu" value="{{ true }}" />
            </xf:if>

            <xf:if is="$hasActionBarMenu">
                <a class="actionBar-action actionBar-action--menuTrigger"
                    data-xf-click="menu"
                    title="{{ phrase('more_options')|for_attr }}"
                    role="button"
                    tabindex="0"
                    aria-expanded="false"
                    aria-haspopup="true">&#8226;&#8226;&#8226;</a>

                <div class="menu" data-menu="menu" aria-hidden="true" data-menu-builder="actionBar">
                    <div class="menu-content">
                        <h4 class="menu-header">{{ phrase('more_options') }}</h4>
                        <div class="js-menuBuilderTarget"></div>
                    </div>
                </div>
            </xf:if>
        </xf:contentcheck>
        </div>
    </xf:if>
</xf:macro>

<xf:macro name="post_deleted" arg-post="!" arg-thread="!">
    <xf:css src="message.less" />
    <div class="message message--deleted message--post{{ $post.isIgnored() ? ' is-ignored' : '' }}{{ $post.isUnread() ? ' is-unread' : '' }} js-post js-inlineModContainer"
        data-author="{{ $post.User.username ?: $post.username }}"
        data-content="post-{$post.post_id}">

        <span class="u-anchorTarget" id="post-{$post.post_id}"></span>
        <div class="message-inner">
            <div class="message-cell message-cell--user">
                <xf:macro template="message_macros" name="user_info_simple" arg-user="{$post.User}" arg-fallbackName="{$post.username}" />
            </div>
            <div class="message-cell message-cell--main">
                <div class="message-attribution">
                    <ul class="listInline listInline--bullet message-attribution-main">
                        <li><a href="{{ link('threads/post', $thread, {'post_id': $post.post_id}) }}" class="u-concealed" rel="nofollow"><xf:date time="{$post.post_date}" /></a></li>
                        <li><xf:username user="{$post.User}" defaultname="{$post.username}" class="u-concealed" /></li>
                    </ul>
                </div>

                <div class="messageNotice messageNotice--deleted">
                    <xf:macro template="deletion_macros" name="notice" arg-log="{$post.DeletionLog}" />

                    <a href="{{ link('posts/show', $post) }}" class="u-jsOnly" data-xf-click="inserter" data-replace="[data-content=post-{$post.post_id}]">{{ phrase('show...') }}</a>

                    <xf:if is="$post.canUseInlineModeration()">
                        <span style="display: none">
                            <!-- this can be actioned on the full post -->
                            <xf:checkbox standalone="true">
                                <xf:option value="{$post.post_id}" class="js-inlineModToggle"
                                    hiddenlabel="true" />
                            </xf:checkbox>
                        </span>
                    </xf:if>
                </div>
            </div>
        </div>
    </div>

    <xf:ad position="post_below_container" arg-post="{$post}" />
</xf:macro>
 

Çözüldü İçeriği Belirli Gruplara Göstermek (2.2.x)

post_macros şablonunuzu aşağıdaki ile değiştirin.

HTML:
<xf:macro name="post"
    arg-post="!"
    arg-thread="!"
    arg-highlightedPosts="{{ [] }}">

    <xf:css src="message.less" />

    <xf:extension name="before"></xf:extension>

    <xf:extension name="extra_classes" value="message--post" />
    <article class="message {{ extension_value('extra_classes') }} js-post js-inlineModContainer {{ $post.isIgnored() ? 'is-ignored' : '' }} {{ $post.isUnread() ? ' is-unread' : '' }}"
        data-author="{{ $post.User.username ?: $post.username }}"
        data-content="post-{$post.post_id}"
        id="js-post-{$post.post_id}">

        <span class="u-anchorTarget" id="post-{$post.post_id}"></span>

        <xf:extension name="full_body">...
Kod çalışmaktadır. Her hangi bir sorun görülmedi.


HTML:
<article class="message-body js-selectToQuote">
    <xf:ad position="post_above_content" arg-post="{$post}" />
    <xf:if is="{{$xf.visitor.isMemberOf([28,1])}}">
        <xf:set var="$snippetPost" value="{{ snippet($post.message, 100) }}" />
        {{ bb_code($snippetPost, 'post', $post) }}
        <xf:if is="$snippetPost != $post.message">
            <div class="blockMessage blockMessage--important blockMessage--iconic">
                İçeriğin tamamını görüntülemek için lütfen giriş yapın yada Üye olun.
            </div>
        </xf:if>
        <xf:else/>
        {{ bb_code($post.message, 'post', $post) }}
    </xf:if>
    <div class="js-selectToQuoteEnd">&nbsp;</div>
    <xf:ad position="post_below_content" arg-post="{$post}" />
</article>
Tamam hocam sorun yokmuş. Ben eski şablonları birleştirdiğimde yanlış bir işlem yapmışım. Şimdi geri al ile 2.2.2 versiyona ait post_macros'a sizin kodu ekledim. Sorun olmadı. Çok teşekkür ederim.

htsumer htsumer bu sistemde google botları metinleri %100'ünü okuyor mu acaba, okumuyorsa okuyacak şekilde düzenlenmesi çok faydalı olur.
Benim 300 karaktere kadar görüneni Google indexliyor. Buda bana yeterli. Misafirlere kısıtlasam tamamen o daha kötü Google için. Google bunu açık görüyor ama metnin kısıtlandığından haberi yok dombilinin :)
 
2.2.2 Versiyonu için post_macros son şekli kodlar (Arşiv)
PHP:
<xf:macro name="post"
    arg-post="!"
    arg-thread="!"
    arg-highlightedPosts="{{ [] }}">

    <xf:css src="message.less" />

    <xf:extension name="before"></xf:extension>

    <xf:extension name="extra_classes" value="message--post" />
    <article class="message {{ extension_value('extra_classes') }} js-post js-inlineModContainer {{ $post.isIgnored() ? 'is-ignored' : '' }} {{ $post.isUnread() ? ' is-unread' : '' }}"
        data-author="{{ $post.User.username ?: $post.username }}"
        data-content="post-{$post.post_id}"
        id="js-post-{$post.post_id}">

        <span class="u-anchorTarget" id="post-{$post.post_id}"></span>

        <xf:extension name="full_body">
            <div class="message-inner">
                <xf:extension name="user_cell">
                    <div class="message-cell message-cell--user">
                        <xf:macro template="message_macros" name="user_info" arg-user="{$post.User}"
                            arg-fallbackName="{$post.username}"/>
                    </div>
                </xf:extension>

                <xf:extension name="main_cell">
                    <div class="message-cell message-cell--main">
                    <xf:extension name="main_cell_inner">
                        <div class="message-main js-quickEditTarget">

                            <xf:extension name="attribution">
                                <xf:macro name="post_attribution" arg-post="{$post}" arg-thread="{$thread}" />
                            </xf:extension>

                            <div class="message-content js-messageContent">
                            <xf:extension name="content">

                                <xf:extension name="notices">
                                    <xf:macro name="post_notices" arg-post="{$post}" arg-thread="{$thread}" />
                                </xf:extension>

                                <xf:extension name="user_content">
                                    <xf:macro name="post_user_content" arg-post="{$post}" arg-thread="{$thread}" />
                                </xf:extension>

                                <xf:extension name="after_content">
                                    <xf:macro name="post_last_edit" arg-post="{$post}" />
                                </xf:extension>

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

                            </xf:extension>
                            </div>

                            <xf:extension name="footer">
                                <xf:macro name="post_footer" arg-post="{$post}" arg-thread="{$thread}" />
                            </xf:extension>
                        </div>

                    </xf:extension>
                    </div>
                </xf:extension>
            </div>
        </xf:extension>
    </article>

    <xf:extension name="after"></xf:extension>
    <xf:ad position="post_below_container" arg-post="{$post}" />
</xf:macro>

<xf:macro name="post_attribution"
    arg-post="!"
    arg-thread="!"
    arg-showPosition="{{ true }}"
    arg-showUser="{{ false }}"
    arg-showThreadUnreadIndicator="{{ false }}"
    arg-showReplyCount="{{ false }}"
    arg-repliesPhrase="{{ phrase('replies:') }}"
    arg-showThreadStateIcons="{{ false }}"
    arg-mainClass=""
    arg-oppositeClass="">

    <header class="message-attribution message-attribution--split">
        <ul class="message-attribution-main listInline {$mainClass}">
            <xf:if is="$showThreadStateIcons">
                <xf:if is="{$xf.visitor.user_id} AND {$thread.Watch.{$xf.visitor.user_id}}">
                    <li>
                        <xf:fa icon="fa-bell" title="{{ phrase('thread_watched')|for_attr }}" />
                        <span class="u-srOnly">{{ phrase('thread_watched') }}</span>
                    </li>
                </xf:if>

                <xf:if is="$thread.sticky">
                    <li>
                        <xf:fa icon="fa-thumbtack" title="{{ phrase('sticky')|for_attr }}" />
                        <span class="u-srOnly">{{ phrase('sticky') }}</span>
                    </li>
                </xf:if>
            </xf:if>
            <xf:if is="$showUser">
                <xf:set var="$username"><xf:username user="{$post.User}" defaultname="{$post.username}" /></xf:set>
                <li class="u-concealed message-attribution-user--top">{{ phrase('by_user_x', {'name':$username}) }}</li>
            </xf:if>
            <li class="u-concealed">
                <a href="{{ link('threads/post', $thread, {'post_id': $post.post_id}) }}" rel="nofollow">
                    <xf:date time="{$post.post_date}" itemprop="datePublished" />
                </a>
            </li>
            <xf:if is="$showReplyCount && $thread.reply_count">
                <li class="u-concealed">
                    <a href="{{ link('threads', $thread) }}#posts">
                        <xf:fa icon="fa-comment" class="u-spaceAfter" />{$repliesPhrase|raw} {$thread.reply_count|number}
                    </a>
                </li>
            </xf:if>
        </ul>

        <ul class="message-attribution-opposite message-attribution-opposite--list {$oppositeClass}">
            <xf:if is="$post.isUnread()">
                <li><span class="message-newIndicator">{{ phrase('new') }}</span></li>
            <xf:elseif is="$thread.isUnread() && $showThreadUnreadIndicator" />
                <li><span class="message-newIndicator" title="{{ phrase('new_replies') }}">{{ phrase('new') }}</span></li>
            </xf:if>
            <li>
                <a href="{{ link('threads/post', $thread, {'post_id': $post.post_id}) }}"
                    class="message-attribution-gadget"
                    data-xf-init="share-tooltip"
                    data-href="{{ link('posts/share', $post) }}"
                    rel="nofollow">
                    <xf:fa icon="fa-share-alt"/>
                </a>
            </li>
            <xf:if contentcheck="true">
                <li>
                    <xf:contentcheck>
                        <xf:macro template="bookmark_macros" name="link"
                            arg-content="{$post}"
                            arg-class="message-attribution-gadget bookmarkLink--highlightable"
                            arg-confirmUrl="{{ link('posts/bookmark', $post) }}"
                            arg-showText="{{ false }}"/>
                    </xf:contentcheck>
                </li>
            </xf:if>
            <xf:if is="$showPosition">
                <li>
                    <a href="{{ link('threads/post', $thread, {'post_id': $post.post_id}) }}" rel="nofollow">
                        #{{ number($post.position + 1) }}
                    </a>
                </li>
            </xf:if>
        </ul>
    </header>
</xf:macro>

<xf:macro name="post_notices" arg-post="!" arg-thread="!">
    <xf:if is="$post.message_state == 'deleted'">
        <div class="messageNotice messageNotice--deleted">
            <xf:macro template="deletion_macros" name="notice" arg-log="{$post.DeletionLog}" />
        </div>
    <xf:elseif is="$post.message_state == 'moderated'" />
        <div class="messageNotice messageNotice--moderated">
            {{ phrase('this_message_is_awaiting_moderator_approval_and_is_invisible_to_normal') }}
        </div>
    </xf:if>
    <xf:if is="$post.warning_message">
        <div class="messageNotice messageNotice--warning">
            {$post.warning_message}
        </div>
    </xf:if>
    <xf:if is="$post.isIgnored()">
        <div class="messageNotice messageNotice--ignored">
            {{ phrase('you_are_ignoring_content_by_this_member') }}
            <xf:showignored />
        </div>
    </xf:if>
</xf:macro>

<xf:macro name="post_user_content" arg-post="!" arg-thread="!" arg-snippet="{{ false }}" arg-displayAds="{{ true }}">

    <div class="message-userContent lbContainer js-lbContainer {{ $post.isIgnored() ? 'is-ignored' : '' }}"
        data-lb-id="post-{$post.post_id}"
        data-lb-caption-desc="{{ $post.User ? $post.User.username : $post.username }} &middot; {{ date_time($post.post_date) }}">

        <xf:if is="$post.isFirstPost()">
            <xf:macro template="custom_fields_macros" name="custom_fields_view"
                arg-type="threads"
                arg-group="before"
                arg-onlyInclude="{$thread.Forum.field_cache}"
                arg-set="{$thread.custom_fields}"
                arg-wrapperClass="message-fields message-fields--before" />
        </xf:if>
<!----3000 karakter başı--->
        <article class="message-body js-selectToQuote">
    <xf:ad position="post_above_content" arg-post="{$post}" />
    <xf:if is="{{$xf.visitor.isMemberOf([28,1])}}">
        <xf:set var="$snippetPost" value="{{ snippet($post.message, 150) }}" />
        {{ bb_code($snippetPost, 'post', $post) }}
        <xf:if is="$snippetPost != $post.message">
            <div class="blockMessage blockMessage--important blockMessage--iconic">
                &#304;&ccedil;eri&#287;in tamam&#305;n&#305; g&ouml;r&uuml;nt&uuml;lemek i&ccedil;in <a href="https://www.maasmutemetleri.net/forum/sayfa/altin_uyelik_premium/">&Ouml;zel &Uuml;ye</a> olman&#305;z gerekmektedir.
            </div>
        </xf:if>
        <xf:else/>
        {{ bb_code($post.message, 'post', $post) }}
    </xf:if>
    <div class="js-selectToQuoteEnd">&nbsp;</div>
    <xf:ad position="post_below_content" arg-post="{$post}" />
</article>
<!----3000 karakter sonu--->
        <xf:if is="$post.isFirstPost()">
            <xf:macro template="custom_fields_macros" name="custom_fields_view"
                arg-type="threads"
                arg-group="after"
                arg-onlyInclude="{$thread.Forum.field_cache}"
                arg-set="{$thread.custom_fields}"
                arg-wrapperClass="message-fields message-fields--after" />
        </xf:if>

        <xf:if is="$post.attach_count">
            <xf:macro template="message_macros" name="attachments"
                arg-attachments="{$post.Attachments}"
                arg-message="{$post}"
                arg-canView="{{ $thread.canViewAttachments() }}" />
        </xf:if>
    </div>
</xf:macro>

<xf:macro name="post_last_edit" arg-post="!">
    <xf:if is="$post.last_edit_date">
        <div class="message-lastEdit">
            <xf:if is="$post.user_id == $post.last_edit_user_id">
                {{ phrase('last_edited:') }} <xf:date time="{$post.last_edit_date}" itemprop="dateModified" />
            <xf:else />
                {{ phrase('last_edited_by_moderator:') }} <xf:date time="{$post.last_edit_date}" itemprop="dateModified" />
            </xf:if>
        </div>
    </xf:if>
</xf:macro>

<xf:macro name="post_footer" arg-post="!" arg-thread="!">
    <footer class="message-footer">
        <xf:if contentcheck="true">
            <div class="message-actionBar actionBar">
                <xf:contentcheck>
                    <xf:macro name="post_action_bar" arg-post="{$post}" arg-thread="{$thread}" />
                </xf:contentcheck>
            </div>
        </xf:if>

        <div class="reactionsBar js-reactionsList {{ $post.reactions ? 'is-active' : '' }}">
            <xf:reactions content="{$post}" link="posts/reactions" />
        </div>

        <div class="js-historyTarget message-historyTarget toggleTarget" data-href="trigger-href"></div>
    </footer>
</xf:macro>

<xf:macro name="post_action_bar" arg-post="!" arg-thread="!">
    <xf:if contentcheck="true">
        <div class="actionBar-set actionBar-set--external">
        <xf:contentcheck>
            <xf:react content="{$post}" link="posts/react" list="< .js-post | .js-reactionsList" />

            <xf:if is="$thread.canReply() OR $thread.canReplyPreReg()">
                <xf:set var="$quoteLink">{{ link('threads/reply', $thread, {'quote': $post.post_id}) }}</xf:set>

                <xf:if is="$xf.options.multiQuote AND $xf.visitor.user_id">
                    <a href="{$quoteLink}"
                        class="actionBar-action actionBar-action--mq u-jsOnly js-multiQuote"
                        title="{{ phrase('toggle_multi_quote_tooltip')|for_attr }}"
                        data-message-id="{$post.post_id}"
                        data-mq-action="add">{{ phrase('quote') }}</a>
                </xf:if>

                <a href="{$quoteLink}"
                    class="actionBar-action actionBar-action--reply"
                    title="{{ phrase('reply_quoting_this_message')|for_attr }}"
                    data-xf-click="quote"
                    data-quote-href="{{ link('posts/quote', $post) }}">{{ phrase('reply') }}</a>
            </xf:if>
        </xf:contentcheck>
        </div>
    </xf:if>

    <xf:if contentcheck="true">
        <div class="actionBar-set actionBar-set--internal">
        <xf:contentcheck>
            <xf:if is="$post.canUseInlineModeration()">
                <span class="actionBar-action actionBar-action--inlineMod">
                    <xf:checkbox standalone="true">
                        <xf:option value="{$post.post_id}" class="js-inlineModToggle"
                            data-xf-init="tooltip"
                            title="{{ phrase('select_for_moderation') }}"
                            label="{{ phrase('select_for_moderation') }}"
                            hiddenlabel="true" />
                    </xf:checkbox>
                </span>
            </xf:if>

            <xf:if is="$post.canReport()">
                <a href="{{ link('posts/report', $post) }}"
                    class="actionBar-action actionBar-action--report"
                    data-xf-click="overlay">{{ phrase('report_verb') }}</a>
            </xf:if>

            <xf:set var="$hasActionBarMenu" value="{{ false }}" />
            <xf:if is="$post.canEdit()">
                <xf:js src="xf/message.js" min="1" />
                <a href="{{ link('posts/edit', $post) }}"
                    class="actionBar-action actionBar-action--edit actionBar-action--menuItem"
                    data-xf-click="quick-edit"
                    data-editor-target="#js-post-{$post.post_id} .js-quickEditTarget"
                    data-menu-closer="true">{{ phrase('edit') }}</a>

                <xf:set var="$hasActionBarMenu" value="{{ true }}" />
            </xf:if>
            <xf:if is="$post.edit_count && $post.canViewHistory()">
                <a href="{{ link('posts/history', $post) }}"
                    class="actionBar-action actionBar-action--history actionBar-action--menuItem"
                    data-xf-click="toggle"
                    data-target="#js-post-{$post.post_id} .js-historyTarget"
                    data-menu-closer="true">{{ phrase('history') }}</a>

                <xf:set var="$hasActionBarMenu" value="{{ true }}" />
            </xf:if>
            <xf:if is="$post.canDelete('soft')">
                <a href="{{ link('posts/delete', $post) }}"
                    class="actionBar-action actionBar-action--delete actionBar-action--menuItem"
                    data-xf-click="overlay">{{ phrase('delete') }}</a>

                <xf:set var="$hasActionBarMenu" value="{{ true }}" />
            </xf:if>
            <xf:if is="$post.message_state == 'deleted' AND $post.canUndelete()">
                <a href="{{ link('posts/undelete', $post) }}"
                    class="actionBar-action actionBar-action--undelete actionBar-action--menuItem"
                    data-xf-click="overlay">{{ phrase('undelete') }}</a>

                <xf:set var="$hasActionBarMenu" value="{{ true }}" />
            </xf:if>
            <xf:if is="$post.canCleanSpam()">
                <a href="{{ link('spam-cleaner', $post) }}"
                    class="actionBar-action actionBar-action--spam actionBar-action--menuItem"
                    data-xf-click="overlay">{{ phrase('spam') }}</a>

                <xf:set var="$hasActionBarMenu" value="{{ true }}" />
            </xf:if>
            <xf:if is="$xf.visitor.canViewIps() && $post.ip_id">
                <a href="{{ link('posts/ip', $post) }}"
                    class="actionBar-action actionBar-action--ip actionBar-action--menuItem"
                    data-xf-click="overlay">{{ phrase('ip') }}</a>

                <xf:set var="$hasActionBarMenu" value="{{ true }}" />
            </xf:if>
            <xf:if is="$post.canWarn()">

                <a href="{{ link('posts/warn', $post) }}"
                    class="actionBar-action actionBar-action--warn actionBar-action--menuItem">{{ phrase('warn') }}</a>

                <xf:set var="$hasActionBarMenu" value="{{ true }}" />
            <xf:elseif is="$post.warning_id && $xf.visitor.canViewWarnings()" />
                <a href="{{ link('warnings', {'warning_id': $post.warning_id}) }}"
                    class="actionBar-action actionBar-action--warn actionBar-action--menuItem"
                    data-xf-click="overlay">{{ phrase('view_warning') }}</a>
                <xf:set var="$hasActionBarMenu" value="{{ true }}" />
            </xf:if>

            <xf:if is="$hasActionBarMenu">
                <a class="actionBar-action actionBar-action--menuTrigger"
                    data-xf-click="menu"
                    title="{{ phrase('more_options')|for_attr }}"
                    role="button"
                    tabindex="0"
                    aria-expanded="false"
                    aria-haspopup="true">&#8226;&#8226;&#8226;</a>

                <div class="menu" data-menu="menu" aria-hidden="true" data-menu-builder="actionBar">
                    <div class="menu-content">
                        <h4 class="menu-header">{{ phrase('more_options') }}</h4>
                        <div class="js-menuBuilderTarget"></div>
                    </div>
                </div>
            </xf:if>
        </xf:contentcheck>
        </div>
    </xf:if>
</xf:macro>

<xf:macro name="post_deleted" arg-post="!" arg-thread="!">
    <xf:css src="message.less" />
    <div class="message message--deleted message--post{{ $post.isIgnored() ? ' is-ignored' : '' }}{{ $post.isUnread() ? ' is-unread' : '' }} js-post js-inlineModContainer"
        data-author="{{ $post.User.username ?: $post.username }}"
        data-content="post-{$post.post_id}">

        <span class="u-anchorTarget" id="post-{$post.post_id}"></span>
        <div class="message-inner">
            <div class="message-cell message-cell--user">
                <xf:macro template="message_macros" name="user_info_simple" arg-user="{$post.User}" arg-fallbackName="{$post.username}" />
            </div>
            <div class="message-cell message-cell--main">
                <div class="message-attribution">
                    <ul class="listInline listInline--bullet message-attribution-main">
                        <li><a href="{{ link('threads/post', $thread, {'post_id': $post.post_id}) }}" class="u-concealed" rel="nofollow"><xf:date time="{$post.post_date}" /></a></li>
                        <li><xf:username user="{$post.User}" defaultname="{$post.username}" class="u-concealed" /></li>
                    </ul>
                </div>

                <div class="messageNotice messageNotice--deleted">
                    <xf:macro template="deletion_macros" name="notice" arg-log="{$post.DeletionLog}" />

                    <a href="{{ link('posts/show', $post) }}" class="u-jsOnly" data-xf-click="inserter" data-replace="[data-content=post-{$post.post_id}]">{{ phrase('show...') }}</a>

                    <xf:if is="$post.canUseInlineModeration()">
                        <span style="display: none">
                            <!-- this can be actioned on the full post -->
                            <xf:checkbox standalone="true">
                                <xf:option value="{$post.post_id}" class="js-inlineModToggle"
                                    hiddenlabel="true" />
                            </xf:checkbox>
                        </span>
                    </xf:if>
                </div>
            </div>
        </div>
    </div>

    <xf:ad position="post_below_container" arg-post="{$post}" />
</xf:macro>
 
htsumer htsumer tam olarak anlamadım :) hem haberi yok demişsiniz hem 300 e kadar görüyor demişsiniz :)

benim forumda da uzun makaleler var 5bin kelime. 10bin kelimeye kadar makale bile var :) şimdi bu kodu kullansam google makalenin tamamını okuyabilir mi. okuyabilmesi için kodda bir güncelleme yapılabilir mi
 
htsumer htsumer tam olarak anlamadım :) hem haberi yok demişsiniz hem 300 e kadar görüyor demişsiniz :)

benim forumda da uzun makaleler var 5bin kelime. 10bin kelimeye kadar makale bile var :) şimdi bu kodu kullansam google makalenin tamamını okuyabilir mi. okuyabilmesi için kodda bir güncelleme yapılabilir mi
Bu makaleler için uygun değil. Blur sistemini kullanın.
 
Kod çalışmaktadır. Her hangi bir sorun görülmedi.


HTML:
<article class="message-body js-selectToQuote">
    <xf:ad position="post_above_content" arg-post="{$post}" />
    <xf:if is="{{$xf.visitor.isMemberOf([28,1])}}">
        <xf:set var="$snippetPost" value="{{ snippet($post.message, 100) }}" />
        {{ bb_code($snippetPost, 'post', $post) }}
        <xf:if is="$snippetPost != $post.message">
            <div class="blockMessage blockMessage--important blockMessage--iconic">
                İçeriğin tamamını görüntülemek için lütfen giriş yapın yada Üye olun.
            </div>
        </xf:if>
        <xf:else/>
        {{ bb_code($post.message, 'post', $post) }}
    </xf:if>
    <div class="js-selectToQuoteEnd">&nbsp;</div>
    <xf:ad position="post_below_content" arg-post="{$post}" />
</article>
Hocam valla bu kod beni delirtecek. En son güncellemeden sonra bu kod için şöyle birleştirilmiş hali

Kod:
<!----300 karakter başı--->
        <article class="message-body js-selectToQuote">
    <xf:ad position="post_above_content" arg-post="{$post}" />
    <xf:if is="{{$xf.visitor.isMemberOf([28,1])}}">
        <xf:set var="$snippetPost" value="{{ snippet($post.message, 150) }}" />
        {{ bb_code($snippetPost, 'post', $post) }}
        <xf:if is="$snippetPost != $post.message">
            <div class="blockMessage blockMessage--important blockMessage--iconic">
                &#304;&ccedil;eri&#287;in tamam&#305;n&#305; g&ouml;r&uuml;nt&uuml;lemek i&ccedil;in <a href="https://www.maasmutemetleri.net/forum/sayfa/altin_uyelik_premium/">&Ouml;zel &Uuml;ye</a> olman&#305;z gerekmektedir.
            </div>
        </xf:if>
        <xf:else/>
        {{ bb_code($post.message, 'post', $post) }}
    </xf:if>
    <div class="js-selectToQuoteEnd">&nbsp;</div>
    <xf:ad position="post_below_content" arg-post="{$post}" />
</article>
<!----300 karakter sonu--->

Burda 150 karakteri sınırlıyorum, ama rezilliğe bak ya.

Tüm mesaj görünüyor

1612984497810.png

post_macros kodlarım ektedir..​

 
Dosya eklenmedi ekliyorum
 

Ekli dosyalar

  • post_macros.rar
    3.7 KB · Görüntüleme: 2

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.