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 && 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 && 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 && 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>
Code:
https://tuoitreit.vn/threads/how-to-disable-warning-file-health-check-results-xenforo-2-x.36691
Source by tuoitreit.vn
إرسال تعليق