TranThanh.Name.Vn: Xenforo
Hiển thị các bài đăng có nhãn Xenforo. Hiển thị tất cả bài đăng
Hiển thị các bài đăng có nhãn Xenforo. Hiển thị tất cả bài đăng

Chủ Nhật, 12 tháng 12, 2021

0

Đưa bài viết mới ra trang chủ không cần Add-on cho Xenforo 2

 Như các bạn biết thì ở Xenforo đã có mục bài viết mới, nhưng thay vì xuất hiện bên tab Diễn đàn thì Bài viết mới xuất hiện ở chỗ Thống kê diễn đàn.

Hôm nay mình sẽ hướng dẫn các bạn đơn giản để đưa phần này ra thay vì cài các add-on Bài viết mới.

DEMO:


Hướng dẫn: Truy cập vào Bảng điều khiển => Hình thức => Widget (/admin.php?widgets/) => vào New post 
Đến đây ở mục Display in positions các bạn tích vào Forum list: Above nodes (Cái số trong ảnh mình cũng không biết là gì :v ) 
Cấu hình Display in positions




Maximum là số bài viết tối đa. Display chọn Full sẽ đẹp hơn giất nhiều. Lastest

Nhấn LƯU và tận hưởng thành quả thôi.


Nguồn: Tranthanh.name.vn (blog viết chơi bác nào chéo link ib mình)

Thứ Tư, 28 tháng 4, 2021

0

[Xenforo] Xóa toàn bộ bài viết Spam của 1 thành viên trong Xenforo

 Đầu tiên các bạn vào phần Home > Options > Spam Management.

Chỉnh các giá trị trong Spam Cleaner User Criteria:
Maximum message count: 0
Maximum Days Since Registration: 0
Maximum reaction score received: 0


Như vậy các bài viết của thành viên sẽ hiện thêm công cụ Spam click vào spam để tiến hành dọn dẹp.

Chủ Nhật, 25 tháng 4, 2021

Cách cài Favicon cho xenforo 2xx
0

Cách cài Favicon cho xenforo 2xx

 Đầu tiên bạn phải có cho mình một favicon, chi tiết cách tạo các bạn có thể lên google tham khảo.


Bước 1: Up favicon.ico lên host ngang hàng với web.

Bước 2: Truy cập vào bảng chỉnh sửa template của xenforo hoặc theo link /admin.php?templates/ cho nhanh. tìm 

PAGE_CONTAINER

sau đó dán code
HTML:
    <link rel="shortcut icon" href="/favicon.ico" />
vào sau <head>
Chú ý: /favicon.ico là link dẫn đến hình ảnh favicon của các bạn đã up lên host hoặc một nơi nào đó, ở đây link của mình là /favicon.ico vì mình đã up ngang hàng với web.
Sau khi thay đổi trình duyệt của bạn vẫn lưu cache của web nên lập tức không hiển thị ngay lúc đó được. Nên các bạn có thể bật ngay Tab Ẩn danh trên trình duyệt và vào xem thử.

Thứ Sáu, 2 tháng 10, 2020

Sửa lỗi ErrorException: Template error: Illegal string offset 'width' with SEO 2 Xenforo 2
0

Sửa lỗi ErrorException: Template error: Illegal string offset 'width' with SEO 2 Xenforo 2

 Hi all, today tuoitreit.vn will instruction how to fix ErrorException: Template error: Illegal string offset 'width' internal_data/code_cache/templates/l1/s1/public/lightbox_macros.php:88

Code:
#0 internal_data/code_cache/templates/l1/s1/public/lightbox_macros.php(88): XF\Template\Templater->handleTemplateError(2, 'Illegal string ...', '/home/admin/...', 88, Array)
#1 src/XF/Template/Templater.php(798): XF\Template\Templater->{closure}(Object(xenMade\SEo\XF\Template\Templater), Array, NULL)
#2 internal_data/code_cache/templates/l1/s1/public/bb_code_tag_attach.php(62): XF\Template\Templater->callMacro('lightbox_macros', 'single_image', Array, Array)
#3 src/XF/Template/Templater.php(1598): XF\Template\Templater->{closure}(Object(xenMade\SEo\XF\Template\Templater), Array, NULL)

Please go to public_html/src/addons/xenMade/SEO/_data/template_modifications.xml and replace all with

Code:
<?xml version="1.0" encoding="utf-8"?>
<template_modifications>
  <modification type="public" template="PAGE_CONTAINER" modification_key="seo_PAGE_CONTAINER_1" description="Change Title" execution_order="999999" enabled="1" action="preg_replace">
    <find><![CDATA[#(<title>.+?<\/title>)#is]]></find>
    <replace><![CDATA[<xf:if is="$template == 'thread_view'">
    <title><xf:title formatter="%s" fallback="" /></title>
<xf:else />
    $0
</xf:if>]]></replace>
  </modification>
  <modification type="public" template="attachment_macros" modification_key="seo_attachment_macros_1" description="Desc Tooltip" execution_order="10" enabled="1" action="str_replace">
    <find><![CDATA[<div class="attachment-icon"]]></find>
    <replace><![CDATA[$0 data-xf-init="tooltip" title="{$attachment.Data.seo_description|for_attr}"]]></replace>
  </modification>
  <modification type="public" template="bb_code_tag_attach" modification_key="seo_bb_code_tag_attach_1" description="Add Title/Alt" execution_order="1" enabled="1" action="preg_replace">
    <find><![CDATA[/\salt\=\"\{\$attachment\.filename\}\"/is]]></find>
    <replace><![CDATA[{{ seo_image_data($attachment, $src, $attachment.filename)|raw }}]]></replace>
  </modification>
  <modification type="public" template="bb_code_tag_attach" modification_key="seo_bb_code_tag_attach_2" description="Add Arg Attachment" execution_order="1" enabled="1" action="str_replace">
    <find><![CDATA[name="single_image"]]></find>
    <replace><![CDATA[$0 arg-attachment="{$attachment}"]]></replace>
  </modification>
  <modification type="public" template="bb_code_tag_attach" modification_key="seo_bb_code_tag_attach_3" description="Thumb height/Width" execution_order="10" enabled="1" action="str_replace">
    <find><![CDATA[src="{$attachment.thumbnail_url}" class="bbImage"]]></find>
    <replace><![CDATA[$0 height="{$attachment.Data.thumbnail_height}" width="{$attachment.Data.thumbnail_width}"]]></replace>
  </modification>
  <modification type="public" template="bb_code_tag_attach" modification_key="seo_bb_code_tag_attach_4" description="Image height/Width" execution_order="10" enabled="1" action="str_replace">
    <find><![CDATA[src="{{ link('full:attachments', $attachment, {'hash': $attachment.temp_hash}) }}" class="bbImage"]]></find>
    <replace><![CDATA[$0 height="{$attachment.Data.height}" width="{$attachment.Data.width}"]]></replace>
  </modification>
  <modification type="public" template="bb_code_tag_img" modification_key="seo_bb_code_tag_img_1" description="Add Arg Attachment" execution_order="10" enabled="1" action="str_replace">
    <find><![CDATA[name="single_image"]]></find>
    <replace><![CDATA[$0 arg-attachment="{{ (!empty($attachment) ? $attachment : $post) }}"]]></replace>
  </modification>
  <modification type="public" template="bb_code_tag_quote" modification_key="seo_bb_code_tag_quote_1" description="Remove QuoteLink #2" execution_order="10" enabled="1" action="str_replace">
    <find><![CDATA[<xf:if is="$source">]]></find>
    <replace><![CDATA[<xf:if is="($source && $xf.visitor.user_id) || 
           (!$xf.visitor.user_id &&
           ($xf.options.quoteLinks == 'default' || $xf.options.quoteLinks == 'noindex'))">]]></replace>
  </modification>
  <modification type="public" template="bb_code_tag_quote" modification_key="seo_bb_code_tag_quote_2" description="Remove QuoteLink #1" execution_order="10" enabled="1" action="str_replace">
    <find><![CDATA[class="bbCodeBlock-sourceJump"]]></find>
    <replace><![CDATA[$0

{{ ((!{$xf.visitor.user_id} && {$xf.options.quoteLinks} == 'noindex') ? ' rel="noindex" ' : '') }}]]></replace>
  </modification>
  <modification type="admin" template="category_edit" modification_key="seo_category_edit_1" description="Add Macro" execution_order="1" enabled="1" action="str_replace">
    <find><![CDATA[<xf:macro template="node_edit_macros" name="style" arg-node="{$node}" arg-styleTree="{$styleTree}" />]]></find>
    <replace><![CDATA[$0

<hr class="formRowSep" />
<xf:macro template="public:seo_macro" name="meta" arg-data="{$category}"
          arg-meta_title_explain="{{ phrase('seo_forum_meta_description_explain') }}"
          arg-meta_description_explain="{{ phrase('seo_forum_meta_description_explain') }}"
          />


<xf:if is="{$xf.options.categoryOwnPage}">
    <xf:macro template="seo_node_edit_macros" 
              name="seo_ogimage" 
              arg-node="{$node}" 
              arg-category="{$category}" />
</xf:if>]]></replace>
  </modification>
  <modification type="public" template="category_view" modification_key="seo_category_view_1" description="Add Macro" execution_order="1" enabled="1" action="str_replace">
    <find><![CDATA[<xf:macro template="metadata_macros" name="canonical_url" arg-canonicalUrl="{{ link('canonical:categories', $category) }}" />]]></find>
    <replace><![CDATA[$0

<xf:if is="{$xf.options.categoryOwnPage}">
    <xf:set var="$ogImagePath">{{ $category.Node.getSeoOgImageUrl($category.seo) }}</xf:set>
    <xf:if is="{$ogImagePath} != ''">
        <xf:macro template="metadata_macros" name="image_url" arg-imageUrl="{$ogImagePath}" />
    </xf:if>
</xf:if>]]></replace>
  </modification>
  <modification type="public" template="category_view" modification_key="seo_category_view_2" description="Meta" execution_order="1" enabled="1" action="preg_replace">
    <find><![CDATA[#(<xf:title.+?<\/xf:title>).+?(<xf:description>.+?<\/xf:description>)#is]]></find>
    <replace><![CDATA[<xf:if is="$category.seo.meta_title">
    <xf:title>{$category.seo.meta_title}</xf:title>
    <xf:else />
    $1
</xf:if>
<xf:if is="$category.seo.meta_description">
    <xf:description>{$category.seo.meta_description|raw}</xf:description>
    <xf:else />
    $2
</xf:if>]]></replace>
  </modification>
  <modification type="admin" template="forum_edit" modification_key="seo_forum_edit_1" description="Add Macro" execution_order="99999" enabled="1" action="preg_replace">
    <find><![CDATA[#<\/div>\s*?([\n\r?]?)\<xf\:submitrow icon\=\"save\" sticky\=\"true\" \/\>#is]]></find>
    <replace><![CDATA[<h3 class="block-formSectionHeader">
    <span class="collapseTrigger collapseTrigger--block" data-xf-click="toggle" data-target="< :up:next">
        <span class="block-formSectionHeader-aligner">{{ phrase('seo_set_seo_for_threads_in_this_node') }}</span>
    </span>
</h3>
<div class="block-body block-body--collapsible">
    <xf:macro template="seo_node_edit_macros" 
              name="seo_ogimage" arg-forum="{$forum}" arg-node="{$node}" />

    <xf:macro template="seo_node_edit_macros" 
              name="seo" arg-forum="{$forum}" />
</div>

<xf:macro template="seo_node_edit_macros" name="forum_seo" arg-forum="{$forum}" />

$0]]></replace>
  </modification>
  <modification type="public" template="forum_list" modification_key="seo_forum_list_1" description="Meta Title" execution_order="10" enabled="1" action="str_replace">
    <find><![CDATA[<xf:wrap]]></find>
    <replace><![CDATA[<xf:if is="$xf.options.seo_forumMetaTitle && {$xf.options.forumsDefaultPage} == 'forums'">
    <xf:title>{$xf.options.seo_forumMetaTitle}</xf:title>
</xf:if>
$0]]></replace>
  </modification>
  <modification type="public" template="forum_post_thread" modification_key="seo_forum_post_thread_1" description="Add SEO Fields" execution_order="10" enabled="1" action="str_replace">
    <find><![CDATA[<xf:submitrow]]></find>
    <replace><![CDATA[<xf:include template="seo_forum_post_thread" />

<xf:include template="seo_own_thread_edit" />
$0]]></replace>
  </modification>
  <modification type="public" template="forum_view" modification_key="seo_forum_view_1" description="Add Macro" execution_order="1" enabled="1" action="str_replace">
    <find><![CDATA[<xf:description>{$forum.Node.description|raw}</xf:description>
]]></find>
    <replace><![CDATA[$0

<xf:set var="$ogImagePath">{{ $forum.Node.getSeoOgImageUrl($forum.seo) }}</xf:set>
<xf:if is="{$ogImagePath} != ''">
    <xf:macro template="metadata_macros" name="image_url" arg-imageUrl="{$ogImagePath}" />
</xf:if>]]></replace>
  </modification>
  <modification type="public" template="forum_view" modification_key="seo_forum_view_2" description="Meta" execution_order="10" enabled="1" action="preg_replace">
    <find><![CDATA[#(<xf:title.+?<\/xf:title>)#is]]></find>
    <replace><![CDATA[<xf:if is="$forum.seo.meta_title">
    <xf:title page="{$page}">{$forum.seo.meta_title}</xf:title>
    <xf:else />
    $1
</xf:if>

<xf:if is="{$forum.seo.meta_description}">
    <xf:head option="meta_description">
        <meta name="description" content="{{ snippet($forum.seo.meta_description|strip_tags, 160)|for_attr }}" />
        <meta property="og:description" content="{{ snippet($forum.seo.meta_description|strip_tags, 300)|for_attr }}" />
        <meta property="twitter:description" content="{{ snippet($forum.seo.meta_description|strip_tags, 200)|for_attr }}" />
    </xf:head>
</xf:if>]]></replace>
  </modification>
  <modification type="public" template="forum_view" modification_key="seo_forum_view_3" description="Robots" execution_order="10" enabled="1" action="preg_replace">
    <find><![CDATA[/$/]]></find>
    <replace><![CDATA[$0
<xf:macro template="seo_macro" name="metaNoindex" arg-metaNoindex="{$meta_noindex}" />]]></replace>
  </modification>
  <modification type="public" template="google_analytics" modification_key="seo_google_analytics_1" description="Exclude Groups" execution_order="10" enabled="1" action="str_replace">
    <find><![CDATA[<xf:if is="$xf.options.googleAnalyticsWebPropertyId">]]></find>
    <replace><![CDATA[<xf:if is="$xf.options.googleAnalyticsWebPropertyId && !$xf.visitor.isMemberOf($xf.options.googleAnalyticsWebUserGroups)">]]></replace>
  </modification>
  <modification type="public" template="help_page" modification_key="seo_help_page_1" description="Robots" execution_order="10" enabled="1" action="preg_replace">
    <find><![CDATA[/$/]]></find>
    <replace><![CDATA[<xf:macro template="seo_macro" name="metaNoindex" arg-metaNoindex="{$meta_noindex}" />
]]></replace>
  </modification>
  <modification type="public" template="helper_attach_upload" modification_key="seo_helper_attach_upload_1" description="InputFields" execution_order="1" enabled="1" action="preg_replace">
    <find><![CDATA[/(<xf:if is="\(\$attachment\.has_thumbnail OR \$attachment\.is_video\) AND \!\$noJsFallback">)|(<xf:if is="\$attachment\.has_thumbnail AND \!\$noJsFallback">)/is]]></find>
    <replace><![CDATA[<xf:if is="$xf.visitor.canSetAltTitle() || $xf.visitor.canSetAttachmentDesc()">
    <xf:if is="{$attachment.content_type} == 'post'">
        <div class="contentRow-spaced">
            <ul style="list-style-type: none; padding-left: 0;">

                <xf:if is="$xf.visitor.canSetAltTitle() && $attachment.thumbnail_url">
                    <li>
                        <p>
                            <span>{{ phrase('seo_image_alt:') }}</span>
                            <span class="buttonGroup buttonGroup--aligned">
                                <xf:textbox name="seo_image_alt[{$attachment.attachment_id}]" value="{{ ($attachment.Data.seo_alt ? $attachment.Data.seo_alt : '') }}" />
                            </span>
                        </p>
                    </li>
                    <li>
                        <p>
                            <span>{{ phrase('seo_image_title:') }}</span>
                            <span class="buttonGroup buttonGroup--aligned">
                                <xf:textbox name="seo_image_title[{$attachment.attachment_id}]" value="{{ ($attachment.Data.seo_title ? $attachment.Data.seo_title : '') }}" />
                            </span>
                        </p>
                    </li>
                </xf:if>

                <xf:if is="$xf.visitor.canSetAttachmentDesc() && !$attachment.thumbnail_url">
                    <li>
                        <p>
                            <span>{{ phrase('seo_attachment_description:') }}</span>
                            <span class="buttonGroup buttonGroup--aligned">
                                <xf:textbox name="seo_description[{$attachment.attachment_id}]" value="{{ ($attachment.Data.seo_description ? $attachment.Data.seo_description : '') }}" />
                            </span>
                        </p>
                    </li>
                </xf:if>

                <li>
                    <p>
                        <span>{{ phrase('seo_new_filename:') }}</span>
                        <span class="buttonGroup buttonGroup--aligned">
                            <xf:textbox name="seo_new_filename[{$attachment.attachment_id}]" value="{{ ($attachment.Data.filename ? $attachment.Data.filename : '') }}" />
                        </span>
                    </p>
                </li>
            </ul>
        </div>
    </xf:if>
</xf:if>
$0]]></replace>
  </modification>
  <modification type="public" template="helper_attach_upload" modification_key="seo_helper_attach_upload_2" description="InputFields" execution_order="2" enabled="1" action="str_replace">
    <find><![CDATA[<xf:mustache name="^link">]]></find>
    <replace><![CDATA[<xf:if is="$xf.visitor.canSetAltTitle() || $xf.visitor.canSetAttachmentDesc()">
    <xf:mustache name="#content_post">
        <div class="contentRow-spaced">
            <ul style="list-style-type: none; padding-left: 0;">
                <xf:if is="$xf.visitor.canSetAttachmentDesc()">
                    <xf:mustache name="#thumbnail_url">
                        <li>
                            <p>
                                <span>{{ phrase('seo_image_alt:') }}</span>
                                <span class="buttonGroup buttonGroup--aligned">
                                    <xf:textbox name="seo_image_alt[{{ mustache('attachment_id') }}]" value="" />
                                </span>
                            </p>
                        </li>

                        <li>
                            <p>
                                <span>{{ phrase('seo_image_title:') }}</span>
                                <span class="buttonGroup buttonGroup--aligned">
                                    <xf:textbox name="seo_image_title[{{ mustache('attachment_id') }}]" value="" />
                                </span>
                            </p>
                        </li>
                    </xf:mustache>
                </xf:if>

                <xf:mustache name="^thumbnail_url">
                    <xf:if is="$xf.visitor.canSetAttachmentDesc()">
                        <li>
                            <p>
                                <span>{{ phrase('seo_attachment_description:') }}</span>
                                <span class="buttonGroup buttonGroup--aligned">
                                    <xf:textbox name="seo_description[{{ mustache('attachment_id') }}]" value="" />
                                </span>
                            </p>
                        </li>
                    </xf:if>
                </xf:mustache>

                <xf:mustache name="#filename">
                    <li>
                        <p>
                            <span>{{ phrase('seo_new_filename:') }}</span>
                            <span class="buttonGroup buttonGroup--aligned">
                                <xf:textbox name="seo_new_filename[{{ mustache('attachment_id') }}]" value="{{ mustache('filename') }}" />
                            </span>
                        </p>
                    </li>
                </xf:mustache>
            </ul>
        </div>
    </xf:mustache>
</xf:if>
$0]]></replace>
  </modification>
  <modification type="public" template="lightbox_macros" modification_key="seo_lightbox_macros_1" description="Add Title/Alt" execution_order="1" enabled="1" action="preg_replace">
    <find><![CDATA[/(alt="{\$alt\|for_attr\}")|(alt="{\$alt}")/is]]></find>
    <replace><![CDATA[{{ seo_image_data($attachment, $src, $alt)|raw }}]]></replace>
  </modification>
  <modification type="public" template="lightbox_macros" modification_key="seo_lightbox_macros_2" description="Add Arg Attachment" execution_order="1" enabled="1" action="str_replace">
    <find><![CDATA[name="single_image"]]></find>
    <replace><![CDATA[$0 arg-attachment=""]]></replace>
  </modification>
<modification type="public" template="lightbox_macros" modification_key="seo_lightbox_macros_3" description="height/Width" execution_order="10" enabled="1" action="str_replace">
    <find><![CDATA[class="bbImage"]]></find>
    <replace><![CDATA[$0 {{ ($attachment && $attachment.Data) ? 'height="' . $attachment.Data.height . '" width="' . $attachment.Data.width . '"']]></replace>
  </modification>
  <modification type="public" template="login" modification_key="seo_login_1" description="Robots" execution_order="10" enabled="1" action="preg_replace">
    <find><![CDATA[/$/]]></find>
    <replace><![CDATA[<xf:macro template="seo_macro" name="metaNoindex" arg-metaNoindex="{$meta_noindex}" />
<xf:if is="{$xf.options.seo_loginMetaDesc} is not empty">
    <xf:macro template="metadata_macros" name="description" arg-description="{$xf.options.seo_loginMetaDesc}" arg-output="{{ true }}" />
</xf:if>]]></replace>
  </modification>
  <modification type="public" template="login" modification_key="seo_login_2" description="Meta Desc" execution_order="10" enabled="1" action="preg_replace">
    <find><![CDATA[/$/]]></find>
    <replace><![CDATA[<xf:if is="{$xf.options.seo_loginregister_desc.login}">
    <xf:description>{$xf.options.seo_loginregister_desc.login}</xf:description>
</xf:if>]]></replace>
  </modification>
  <modification type="public" template="login_password_confirm" modification_key="seo_login_password_confirm_1" description="Robots" execution_order="10" enabled="1" action="preg_replace">
    <find><![CDATA[/$/]]></find>
    <replace><![CDATA[<xf:macro template="seo_macro" name="metaNoindex" arg-metaNoindex="{$meta_noindex}" />
<xf:if is="{$xf.options.seo_loginMetaDesc} is not empty">
    <xf:macro template="metadata_macros" name="description" arg-description="{$xf.options.seo_loginMetaDesc}" arg-output="{{ true }}" />
</xf:if>]]></replace>
  </modification>
  <modification type="public" template="login_password_confirm" modification_key="seo_login_password_confirm_2" description="Meta Desc" execution_order="10" enabled="1" action="preg_replace">
    <find><![CDATA[/$/]]></find>
    <replace><![CDATA[<xf:if is="{$xf.options.seo_loginregister_desc.login}">
    <xf:description>{$xf.options.seo_loginregister_desc.login}</xf:description>
</xf:if>]]></replace>
  </modification>
  <modification type="public" template="member_about" modification_key="seo_member_about_1" description="Robots" execution_order="10" enabled="1" action="preg_replace">
    <find><![CDATA[/$/]]></find>
    <replace><![CDATA[<xf:macro template="seo_macro" name="metaNoindex" arg-metaNoindex="{$meta_noindex}" />
]]></replace>
  </modification>
  <modification type="public" template="member_list" modification_key="seo_member_list_1" description="Robots" execution_order="10" enabled="1" action="preg_replace">
    <find><![CDATA[/$/]]></find>
    <replace><![CDATA[<xf:macro template="seo_macro" name="metaNoindex" arg-metaNoindex="{$meta_noindex}" />
]]></replace>
  </modification>
  <modification type="public" template="member_notable" modification_key="seo_member_notable_1" description="Robots" execution_order="10" enabled="1" action="preg_replace">
    <find><![CDATA[/$/]]></find>
    <replace><![CDATA[<xf:macro template="seo_macro" name="metaNoindex" arg-metaNoindex="{$meta_noindex}" />
]]></replace>
  </modification>
  <modification type="public" template="member_view" modification_key="seo_member_view_1" description="Robots" execution_order="10000" enabled="1" action="preg_replace">
    <find><![CDATA[/$/]]></find>
    <replace><![CDATA[<xf:macro template="seo_macro" name="metaNoindex" arg-metaNoindex="{$meta_noindex}" />
]]></replace>
  </modification>
  <modification type="public" template="metadata_macros" modification_key="seo_metadata_macros_1" description="MetaDesc length" execution_order="10" enabled="1" action="str_replace">
    <find><![CDATA[<meta name="description" content="{{ snippet($description|strip_tags, 160)|for_attr }}" />]]></find>
    <replace><![CDATA[<meta name="description" content="{{ snippet($description|strip_tags, $xf.options.seo_threadDescriptionLength)|for_attr }}" />]]></replace>
  </modification>
  <modification type="admin" template="node_edit_macros" modification_key="seo_node_edit_macros_1" description="Add Macro" execution_order="1" enabled="1" action="preg_replace">
    <find><![CDATA[/$/]]></find>
    <replace><![CDATA[$0
<xf:include template="seo_node_edit_macros" />]]></replace>
  </modification>
  <modification type="public" template="post_edit" modification_key="seo_post_edit_1" description="Owner SEO" execution_order="10" enabled="1" action="preg_replace">
    <find><![CDATA[#(<xf:submitrow.+?\/>)#is]]></find>
    <replace><![CDATA[<xf:if is="$post.isFirstPost()">
<xf:include template="public:seo_own_thread_edit" />
</xf:if>
$0]]></replace>
  </modification>
  <modification type="public" template="register_complete" modification_key="seo_register_complete_1" description="Robots" execution_order="10" enabled="1" action="preg_replace">
    <find><![CDATA[/$/]]></find>
    <replace><![CDATA[<xf:macro template="seo_macro" name="metaNoindex" arg-metaNoindex="{$meta_noindex}" />
<xf:if is="{$xf.options.seo_registerMetaDesc} is not empty">
    <xf:macro template="metadata_macros" name="description" arg-description="{$xf.options.seo_registerMetaDesc}" arg-output="{{ true }}" />
</xf:if>]]></replace>
  </modification>
  <modification type="public" template="register_complete" modification_key="seo_register_complete_2" description="Meta Desc" execution_order="10" enabled="1" action="preg_replace">
    <find><![CDATA[/$/]]></find>
    <replace><![CDATA[<xf:if is="{$xf.options.seo_loginregister_desc.register}">
    <xf:description>{$xf.options.seo_loginregister_desc.register}</xf:description>
</xf:if>]]></replace>
  </modification>
  <modification type="public" template="register_confirm" modification_key="seo_register_confirm_1" description="Robots" execution_order="10" enabled="1" action="preg_replace">
    <find><![CDATA[/$/]]></find>
    <replace><![CDATA[<xf:macro template="seo_macro" name="metaNoindex" arg-metaNoindex="{$meta_noindex}" />
<xf:if is="{$xf.options.seo_registerMetaDesc} is not empty">
    <xf:macro template="metadata_macros" name="description" arg-description="{$xf.options.seo_registerMetaDesc}" arg-output="{{ true }}" />
</xf:if>]]></replace>
  </modification>
  <modification type="public" template="register_confirm" modification_key="seo_register_confirm_2" description="Meta Desc" execution_order="10" enabled="1" action="preg_replace">
    <find><![CDATA[/$/]]></find>
    <replace><![CDATA[<xf:if is="{$xf.options.seo_loginregister_desc.register}">
    <xf:description>{$xf.options.seo_loginregister_desc.register}</xf:description>
</xf:if>]]></replace>
  </modification>
  <modification type="public" template="register_connected_account" modification_key="seo_register_connected_account_1" description="Robots" execution_order="10" enabled="1" action="preg_replace">
    <find><![CDATA[/$/]]></find>
    <replace><![CDATA[<xf:macro template="seo_macro" name="metaNoindex" arg-metaNoindex="{$meta_noindex}" />
<xf:if is="{$xf.options.seo_registerMetaDesc} is not empty">
    <xf:macro template="metadata_macros" name="description" arg-description="{$xf.options.seo_registerMetaDesc}" arg-output="{{ true }}" />
</xf:if>]]></replace>
  </modification>
  <modification type="public" template="register_form" modification_key="seo_register_form_1" description="Robots" execution_order="10" enabled="1" action="preg_replace">
    <find><![CDATA[/$/]]></find>
    <replace><![CDATA[<xf:macro template="seo_macro" name="metaNoindex" arg-metaNoindex="{$meta_noindex}" />

<xf:if is="{$xf.options.seo_registerMetaDesc} is not empty">
    <xf:macro template="metadata_macros" name="description" arg-description="{$xf.options.seo_registerMetaDesc}" arg-output="{{ true }}" />
</xf:if>]]></replace>
  </modification>
  <modification type="public" template="register_form" modification_key="seo_register_form_2" description="Meta Desc" execution_order="10" enabled="1" action="preg_replace">
    <find><![CDATA[/$/]]></find>
    <replace><![CDATA[<xf:if is="{$xf.options.seo_loginregister_desc.register}">
    <xf:description>{$xf.options.seo_loginregister_desc.register}</xf:description>
</xf:if>]]></replace>
  </modification>
  <modification type="public" template="thread_edit" modification_key="seo_thread_edit_1" description="Add Macro" execution_order="10" enabled="1" action="str_replace">
    <find><![CDATA[<xf:macro template="helper_thread_options" name="thread_status" arg-thread="{$thread}" />]]></find>
    <replace><![CDATA[$0
<xf:include template="seo_thread_edit" />]]></replace>
  </modification>
  <modification type="admin" template="thread_prefix_edit" modification_key="seo_thread_prefix_edit_1" description="SEO for Prefix" execution_order="1" enabled="1" action="str_replace">
    <find><![CDATA[<xf:set var="$extraOptions">]]></find>
    <replace><![CDATA[$0

<xf:macro template="public:seo_macro" name="robot" 
          arg-data="{$prefix}"
          arg-robot_index_explain="{{ phrase('seo_prefix_robot_index_explain') }}"
          arg-robot_follow_explain="{{ phrase('seo_prefix_robot_follow_explain') }}"
          />]]></replace>
  </modification>
  <modification type="public" template="thread_view" modification_key="seo_thread_view_1" description="Change Meta" execution_order="1" enabled="1" action="str_replace">
    <find><![CDATA[<xf:macro template="metadata_macros" name="metadata"]]></find>
    <replace><![CDATA[<xf:if is="{$thread.seo.og_image_link}">
    <xf:macro template="metadata_macros" name="image_url" arg-imageUrl="{$thread.seo.og_image_link}" arg-twitterCard="{$thread.seo.twitter_card}" />
</xf:if>

<xf:macro template="seo_macro" name="metaNoindex" arg-metaNoindex="{$meta_noindex}" />

$0
arg-twitterCard="{$thread.seo.twitter_card}"]]></replace>
  </modification>
  <modification type="public" template="thread_view" modification_key="seo_thread_view_2" description="Button" execution_order="1" enabled="1" action="str_replace">
    <find><![CDATA[<xf:if is="$canInlineMod">]]></find>
    <replace><![CDATA[<xf:include template="seo_thread_view_button" />
$0]]></replace>
  </modification>
  <modification type="public" template="thread_view" modification_key="seo_thread_view_3" description="Change Title" execution_order="1" enabled="1" action="preg_replace">
    <find><![CDATA[#(<xf:title.*xf:title>)#is]]></find>
    <replace><![CDATA[<xf:title>{{ change_thread_title($thread, $page)|raw }}</xf:title>]]></replace>
  </modification>
  <modification type="public" template="thread_view" modification_key="seo_thread_view_4" description="Change Description" execution_order="10" enabled="1" action="preg_replace">
    <find><![CDATA[(<xf:set\svar=\"\$fpSnippet\".+?\/>)]]></find>
    <replace><![CDATA[<xf:if is="$forum.seo.meta_description || $thread.seo.meta_description">
    <xf:set var="$newDesc" value="{{ ($thread.seo.meta_description ? $thread.seo.meta_description : $firstPost.message) }}" />
    <xf:set var="$fpSnippet" value="{{ snippet($newDesc, 0, {'stripBbCode': true}) }}" />
    <xf:else />
    $0
</xf:if>]]></replace>
  </modification>
  <modification type="public" template="thread_view" modification_key="seo_thread_view_5" description="canonicalUrl" execution_order="10" enabled="1" action="preg_replace">
    <find><![CDATA[#arg\-canonicalUrl\=\".+?\"#is]]></find>
    <replace><![CDATA[arg-canonicalUrl="{{ seoCanonical($thread, link('canonical:threads', $thread, {'page': $page})) }}"]]></replace>
  </modification>
  <modification type="public" template="thread_view" modification_key="seo_thread_view_6" description="AMP Link" execution_order="10" enabled="1" action="preg_replace">
    <find><![CDATA[/$/]]></find>
    <replace><![CDATA[<xf:if is="$xf.options.seo_AMP && !{$amp_noindex}">
    <xf:head option="seo_amp">
        <link rel="amphtml" href="{{ link('canonical:amp-threads', $thread) }}">
    </xf:head>
</xf:if>]]></replace>
  </modification>
  <modification type="public" template="whats_new_wrapper" modification_key="seo_whats_new_wrapper_1" description="Robots" execution_order="10" enabled="1" action="preg_replace">
    <find><![CDATA[/$/]]></find>
    <replace><![CDATA[<xf:macro template="seo_macro" name="metaNoindex" arg-metaNoindex="{$meta_noindex}" />
]]></replace>
  </modification>
  <modification type="admin" template="xfrm_category_edit" modification_key="seo_xfrm_category_edit_1" description="SEO for XFRM" execution_order="10" enabled="1" action="str_replace">
    <find><![CDATA[<xf:if is="$availableFields is not empty">]]></find>
    <replace><![CDATA[<xf:macro template="public:seo_macro" name="robot" arg-data="{$category}" />
$0]]></replace>
  </modification>
  <modification type="public" template="xfrm_resource_history" modification_key="seo_xfrm_resource_history_1" description="Change Title &amp;&amp; Meta" execution_order="10" enabled="1" action="preg_replace">
    <find><![CDATA[#(<xf:title.*xf:title>)#is]]></find>
    <replace><![CDATA[<xf:set var="$title">
    <xf:if is="{$resource.seo.meta_title}">{$resource.seo.meta_title} - {{ phrase('history') }}<xf:else />{{ prefix('resource', $resource, 'escaped') }}{$resource.title} - {{ phrase('history') }}</xf:if>
</xf:set>
<xf:title page="{$page}"><xf:trim>{$title}</xf:trim></xf:title>

<xf:if is="$resource.seo.meta_description">
    <xf:set var="$newDesc" value="{$resource.seo.meta_description}" />
    <xf:set var="$descSnippet" value="{{ snippet($newDesc, 0, {'stripBbCode': true}) }}" />    
</xf:if>

<xf:macro template="seo_macro" name="metaNoindex" arg-metaNoindex="{$meta_noindex}" />
]]></replace>
  </modification>
  <modification type="public" template="xfrm_resource_reviews" modification_key="seo_xfrm_resource_reviews_1" description="Change Title &amp;&amp; Meta" execution_order="10" enabled="1" action="preg_replace">
    <find><![CDATA[#(<xf:title.*xf:title>)#is]]></find>
    <replace><![CDATA[<xf:set var="$title">
    <xf:if is="{$resource.seo.meta_title}">{$resource.seo.meta_title} - {{ phrase('xfrm_reviews') }}<xf:else />{{ prefix('resource', $resource, 'escaped') }}{$resource.title} - {{ phrase('xfrm_reviews') }}</xf:if>
</xf:set>
<xf:title page="{$page}"><xf:trim>{$title}</xf:trim></xf:title>

<xf:macro template="seo_macro" name="metaNoindex" arg-metaNoindex="{$meta_noindex}" />
]]></replace>
  </modification>
  <modification type="public" template="xfrm_resource_updates" modification_key="seo_xfrm_resource_updates_1" description="Change Title &amp;&amp; Meta" execution_order="10" enabled="1" action="preg_replace">
    <find><![CDATA[#(<xf:title.*xf:title>)#is]]></find>
    <replace><![CDATA[<xf:set var="$title">
    <xf:if is="{$resource.seo.meta_title}">{$resource.seo.meta_title} - {{ phrase('xfrm_updates') }}<xf:else />{{ prefix('resource', $resource, 'escaped') }}{$resource.title} - {{ phrase('xfrm_updates') }}</xf:if>
</xf:set>
<xf:title page="{$page}"><xf:trim>{$title}</xf:trim></xf:title>

<xf:macro template="seo_macro" name="metaNoindex" arg-metaNoindex="{$meta_noindex}" />
]]></replace>
  </modification>
  <modification type="public" template="xfrm_resource_view" modification_key="seo_xfrm_resource_view_1" description="Meta" execution_order="10" enabled="1" action="str_replace">
    <find><![CDATA[<xf:set var="$descSnippet" value="{{ snippet($description.message, 250, {'stripBbCode': true}) }}" />
]]></find>
    <replace><![CDATA[<xf:if is="$resource.seo.meta_description">
    <xf:set var="$newDesc" value="{$resource.seo.meta_description}" />
    <xf:set var="$descSnippet" value="{{ snippet($newDesc, 0, {'stripBbCode': true}) }}" />
    <xf:else />
    <xf:set var="$descSnippet" value="{{ snippet($description.message, 250, {'stripBbCode': true}) }}" />
</xf:if>

<xf:macro template="seo_macro" name="metaNoindex" arg-metaNoindex="{$meta_noindex}" />
]]></replace>
  </modification>
  <modification type="public" template="xfrm_resource_view" modification_key="seo_xfrm_resource_view_2" description="Change Title" execution_order="10" enabled="1" action="preg_replace">
    <find><![CDATA[#(<xf:title.*xf:title>)#is]]></find>
    <replace><![CDATA[<xf:set var="$title">
    <xf:if is="{$resource.seo.meta_title}">{$resource.seo.meta_title}<xf:else />{{ prefix('resource', $resource, 'escaped') }}{$resource.title}</xf:if>
</xf:set>

<xf:title page="{$page}"><xf:trim>{$title}</xf:trim></xf:title>]]></replace>
  </modification>
  <modification type="public" template="xfrm_resource_view" modification_key="seo_xfrm_resource_view_3" description="canonicalUrl" execution_order="10" enabled="1" action="preg_replace">
    <find><![CDATA[#arg\-canonicalUrl\=\".+?\"#is]]></find>
    <replace><![CDATA[arg-canonicalUrl="{{ seoCanonical($resource, link('canonical:resources', $resource)) }}"]]></replace>
  </modification>
  <modification type="public" template="xfrm_resource_wrapper_macros" modification_key="seo_xfrm_resource_wrapper_macros_1" description="Button" execution_order="10" enabled="1" action="str_replace">
    <find><![CDATA[<xf:macro name="action_buttons" arg-resource="!">]]></find>
    <replace><![CDATA[$0

<xf:if is="$resource.canEdit() && $xf.visitor.canSetSeo()">
    <xf:include template="seo_button">
        <xf:set var="$link" value="{{ link('resources/seo', $resource) }}" />
    </xf:include>
</xf:if>]]></replace>
  </modification>
</template_modifications>
This error file health check, please go to
Code:
https://tuoitreit.vn/threads/how-to-disable-warning-file-health-check-results-xenforo-2-x.36691
Good luck for you!
Source by tuoitreit.vn

Thứ Tư, 30 tháng 9, 2020

0

[OzzModz] Text Logo 2.0.0 - Add-on Logo bằng chữ Cho Xenforo 2.1, 2.2

 [OzzModz] Text Logo 2.0.0 - Add-on Logo bằng chữ Cho Xenforo 2.1, 2.2

With this addon, you will have a text based logo instead of a image bases one. By default, the addon will use your board title you have set in the XF options as the text. The addon also comes with a option to use your own custom text.

Với addon này, bạn sẽ có một logo cho xenforo dựa trên văn bản thay vì một cơ sở hình ảnh. Theo mặc định, addon sẽ sử dụng tiêu đề bảng của bạn mà bạn đã đặt trong tùy chọn XenForo làm văn bản. Addon cũng đi kèm với một tùy chọn để sử dụng văn bản tùy chỉnh của riêng bạn.



Ngoài ra có thể sử dụng các biểu tượng vui cho addon này





Tải về: [OzzModz] Text Logo 2.0.0 - Add-on Logo bằng chữ Cho Xenforo 2.1, 2.2

Nguồn: tuoitreit.vn

Thứ Tư, 13 tháng 5, 2020

0

Thêm Bình Luận Facebook cho Xenforo 2

Chào các bạn, xin hướng dẫn các bạn cách chèn và quản lý bình luận Facebook cho Xenforo 2

1. Bạn vào Admin > Appearance > Template tìm đến thread_view
Xem thêm: [xf2] Mã nguồn tao dựng diễn đàn Xenforo 2.1.8 Patch 2 full nulled
Tìm
HTML:
<div class="blockMessage blockMessage--none">
Thay thành
HTML:
<!-- Facebook tranthanh.name.vn -->
<div class="block-container">
   <h3 class="block-header">
       Facebook Comments
   </h3>
   <div class="fb-comments" data-href="{{ link('full:threads/'.($thread.thread_id)) }}" data-width="100%" data-numposts="10" data-order-by="reverse_time" data-colorscheme="light"></div>
</div>
<!-- Facebook tranthanh.name.vn -->
<div class="blockMessage blockMessage--none">
2. Bạn vào developers.facebook.com tạo cho mình 1 app nhé, mình đã tạo cho mình 1 app với ID là 123456789
3. Vào template PAGE_CONTAINER
Tìm
HTML:
<div class="p-pageWrapper" id="top">
Thay thành
[CODE=html]<div id="fb-root"></div>
<script>(function(d, s, id) {
  var js, fjs = d.getElementsByTagName(s)[0];
  if (d.getElementById(id)) return;
  js = d.createElement(s); js.id = id;
  js.src = 'https://connect.facebook.net/vi_VN/sdk.js#xfbml=1&version=v3.2&appId=[B][COLOR=rgb(226, 80, 65)]123456789[/COLOR][/B]&autoLogAppEvents=1';
  fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));</script>
<div class="p-pageWrapper" id="top">
Thay 123456789 bằng ID mà bạn vừa tạo ở bước 2
Tìm
HTML:
<xf:include template="google_analytics" />
Thay thành
Rich (BB code):
<meta property="fb:app_id" content="123456789" />
    <meta property="fb:admins" content="012345678"/>
    <xf:include template="google_analytics" />
Thay 123456789 bằng id app của bạn vừa tạo ở bước 2
Thay 012345678 bằng id nick của bạn.
Bạn vào developers.facebook.com/tools/comments để quản lý bình luận nhé
Thêm người quản lý bạn vào đây developers.facebook.com/apps/123456789/roles/roles/
Thay 123456789 bằng ID app mà bạn đã tạo ở bước 2
Vậy là xong rồi
Chúc bạn thành công!