TranThanh.Name.Vn - Nơi lưu trữ những điều thú vị: Website
Hiển thị các bài đăng có nhãn Website. Hiển thị tất cả bài đăng
Hiển thị các bài đăng có nhãn Website. Hiển thị tất cả bài đăng

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ứ Năm, 18 tháng 2, 2021

4

Tạo trang chuyển hướng qua liên kết khác tự động trên BLOGSPOT

Confirmredirec link là một kiểu dạng chuyển hướng các liên kết bên ngoài blog thông dụng, phổ biến trên hầu hết trang web, diễn đàn. 

Hôm nay mình sẽ hướng dẫn các bạn tạo trang chuyển hướng liên kết cho blogspot. 

1, Các tính năng
  • Đơn giản, dễ sử dụng
  • Tự động nhận biết các link bên ngoài blog để chuyển hướng (có danh sách trắng)
  • Tự động chuyển hướng
  • Đếm ngược thời gian để chuyển hướng
2, Hướng dẫn
  • Tạo một trang trong blog /p/go.html
  • Xóa sạch nội dung và nhập CODE CHUYỂN HƯỚNG
<style> #button1 {     background-color: #4CAF50;     border: none;     border-radius: 4px;     color: white;     padding: 7px 14px;     text-align: center;     text-decoration: none;     display: inline-block;     font-size: 14px;     cursor: pointer; } #button2 {     background-color: #008CBA;     border: none;     border-radius: 4px;    color: white;     padding: 7px 14px;     text-align: center;     text-decoration: none;     display: inline-block;     font-size: 14px;     cursor: pointer; } .footer-credits{display:none;}
  .red {color: red;}   .right {
    float: right;
    width: 200px;
    border: 3px solid red;
    padding: 12px;
  }</style>

<script>  function getQueryVariable(variable) {        var query = window.location.search.substring(1);        var vars = query.split("&");        for (var i=0;i<vars.length;i++) {                var pair = vars[i].split("=");                if(pair[0] == variable){return pair[1];}        }        return(false); } var time = 30; var page = getQueryVariable("link"); function countDown(){ time--; gett("timecount").innerHTML = time; if(time == -1){ window.location = page; } } function gett(id){ if(document.getElementById) return document.getElementById(id); if(document.all) return document.all.id; if(document.layers) return document.layers.id; if(window.opera) return window.opera.id; } function init(){ if(gett('timecount')){ setInterval(countDown, 1000); gett("timecount").innerHTML = time; } else{ setTimeout(init, 50); } } document.onload = init(); $(document).ready(function(){  $('.link-out-btn').click(function(){     window.location = page;  });  $('#linkout').text(page); }); </script> 

<script> function closeWindow() {         window.open('','_parent','');         window.close();     } </script>

<h3>
Bạn vừa nhấp vào một liên kết không thuộc <b><a href="https://www.tranthanh.name.vn/">TRANTHANH.NAME.VN</a></b>   <br /> <div style="text-align: center;"> <button class="link-out-btn" id="button1">Đồng ý</button> <button id="button2" onclick="javascript:closeWindow();">Từ chối</button>
  <br /> Tự chuyển hướng sau <div class="red"><span id="timecount"></span></div> giây! <br />
  </div>
   Liên kết bạn muốn đến:<div class="red"><span id="linkout"></span></div>
  </h3>

  • Thay thế TÊN MIỀN TRANTHANH.NAME.VN bằng địa chỉ blog của bạn.
  • Tiếp theo truy cập vào Chủ đề => Chỉnh sửa HTML. Thêm đoạn này vào <head>:

<!--[CHUYEN HUONG URL]-->

  <b:if cond='data:view.isMultipleItems'>

<b:else/>

<script>

var redirect = &#39;int&#39;;

var exclude_domains = [&#39;tranthanh.name.vn&#39;, &#39;www.tranthanh.name.vn&#39;,&#39;bp.blogspot.com&#39;,];

//<![CDATA[

var DOMAssistant=function(){var G=function(){};var C=/*@cc_on!@*/false;var F=C&&parseFloat(navigator.appVersion)<6;var B={},K={},A=true;var J={accesskey:"accessKey","class":"className",colspan:"colSpan","for":"htmlFor",maxlength:"maxLength",readonly:"readOnly",rowspan:"rowSpan",tabindex:"tabIndex",valign:"vAlign",cellspacing:"cellSpacing",cellpadding:"cellPadding"};var I={rules:/\s*(,)\s*/g,selector:/^(\w+)?(#[\w\u00C0-\uFFFF\-\_]+|(\*))?((\.[\w\u00C0-\uFFFF\-_]+)*)?((\[\w+\s*(\^|\$|\*|\||~)?(=\s*([\w\u00C0-\uFFFF\s\-\_\.]+|"[^"]*"|'[^']*'))?\]+)*)?(((:\w+[\w\-]*)(\((odd|even|\-?\d*n?((\+|\-)\d+)?|[\w\u00C0-\uFFFF\-_\.]+|"[^"]*"|'[^']*'|((\w*\.[\w\u00C0-\uFFFF\-_]+)*)?|(\[#?\w+(\^|\$|\*|\||~)?=?[\w\u00C0-\uFFFF\s\-\_\.\'\"]+\]+)|(:\w+[\w\-]*))\))?)*)?(>|\+|~)?/,id:/^#([\w\u00C0-\uFFFF\-\_]+)$/,tag:/^(\w+)/,relation:/^(>|\+|~)$/,pseudo:/^:(\w[\w\-]*)(\((.+)\))?$/,pseudos:/:(\w[\w\-]*)(\(([^\)]+)\))?/g,attribs:/\[(\w+)\s*(\^|\$|\*|\||~)?=?\s*([\w\u00C0-\uFFFF\s\-_\.]+|"[^"]*"|'[^']*')?\]/g,classes:/\.([\w\u00C0-\uFFFF\-_]+)/g,quoted:/^["'](.*)["']$/,nth:/^((odd|even)|([1-9]\d*)|((([1-9]\d*)?)n([\+\-]\d+)?)|(\-(([1-9]\d*)?)n\+(\d+)))$/};var E=function(M,L){M.push.apply(M,[].slice.apply(L));return M};if(C){E=function(N,M){if(M.slice){return N.concat(M)}var L=0,O;while((O=M[L++])){N[N.length]=O}return N}}var D=function(O,N){if(O.indexOf){return O.indexOf(N)>=0}for(var M=0,L=O.length;M<L;M++){if(O[M]===N){return true}}return false};var H=function(N,L){var M=N.parentNode;return L===document||M===L||(M!==document&&H(M,L))};return{isIE:C,camel:J,allMethods:[],publicMethods:["cssSelect","elmsByClass","elmsByAttribute","elmsByTag"],initCore:function(){this.applyMethod.call(window,"$",this.$);this.applyMethod.call(window,"$$",this.$$);window.DOMAssistant=this;if(C){G=Array}G.prototype=[];G.prototype.each=function(N){for(var M=0,L=this.length;M<L;M++){N.call(this[M])}return this};G.prototype.first=function(){return(typeof this[0]!=="undefined")?DOMAssistant.addMethodsToElm(this[0]):null};G.prototype.end=function(){return this.previousSet};this.attach(this)},addMethods:function(L,M){if(typeof this.allMethods[L]==="undefined"){this.allMethods[L]=M;this.addHTMLArrayPrototype(L,M)}},addMethodsToElm:function(M){for(var L in this.allMethods){if(typeof this.allMethods[L]!=="undefined"){this.applyMethod.call(M,L,this.allMethods[L])}}return M},applyMethod:function(M,L){if(typeof this[M]!=="function"){this[M]=L}},attach:function(N){var L=N.publicMethods;if(typeof L==="undefined"){for(var P in N){if(P!=="init"&&typeof N[P]!=="undefined"){this.addMethods(P,N[P])}}}else{if(L.constructor===Array){for(var M=0,O;(O=L[M]);M++){this.addMethods(O,N[O])}}}if(typeof N.init==="function"){N.init()}},addHTMLArrayPrototype:function(L,M){G.prototype[L]=function(){var P=new G();P.previousSet=this;var Q;for(var O=0,N=this.length;O<N;O++){Q=M.apply(this[O],arguments);if(!!Q&&Q.constructor===Array){P=E(P,Q)}else{P.push(Q)}}return P}},clearHandlers:function(){var Q=this.all||this.getElementsByTagName("*");for(var P=0,R,L;(R=Q[P++]);){if((L=R.attributes)){for(var N=0,O=L.length,M;N<O;N++){M=L[N].nodeName.toLowerCase();if(typeof R[M]==="function"){R[M]=null}}}}},setCache:function(L){A=L},$:function(){var O=arguments[0];if(arguments.length===1&&(typeof O==="object"||(typeof O==="function"&&!!O.nodeName))){return DOMAssistant.$$(O)}var Q=new G();for(var M=0,L,P;(L=arguments[M]);M++){if(typeof L==="string"){L=L.replace(/^[^#]*(#)/,"$1");if(I.id.test(L)){if((P=DOMAssistant.$$(L.substr(1),false))){Q.push(P)}}else{var N=(document.all||document.getElementsByTagName("*")).length;Q=(!document.querySelectorAll&&A&&K.rule&&K.rule===L&&K.doc===N)?K.elms:E(Q,DOMAssistant.cssSelection.call(document,L));K={rule:L,elms:Q,doc:N}}}}return Q},$$:function(Q,N){var P=(typeof Q==="object"||(typeof Q==="function"&&!!Q.nodeName))?Q:document.getElementById(Q);var O=N||true;if(typeof Q==="string"&&P&&P.id!==Q){P=null;for(var L=0,M;(M=document.all[L]);L++){if(M.id===Q){P=M;break}}}if(P&&O){DOMAssistant.addMethodsToElm(P)}return P},getSequence:function(P){var Q,O=2,M=-1,L=-1,N=I.nth.exec(P.replace(/^0n\+/,"").replace(/^2n$/,"even").replace(/^2n+1$/,"odd"));if(!N){return null}if(N[2]){Q=(N[2]==="odd")?1:2;L=(Q===1)?1:0}else{if(N[3]){Q=parseInt(N[3],10);O=0;M=Q}else{if(N[4]){O=N[6]?parseInt(N[6],10):1;Q=N[7]?parseInt(N[7],10):0;while(Q<1){Q+=O}L=(Q>O)?(Q-O)%O:((Q===O)?0:Q)}else{if(N[8]){O=N[10]?parseInt(N[10],10):1;Q=M=parseInt(N[11],10);while(Q>O){Q-=O}L=(M>O)?(M-O)%O:((M===O)?0:M)}}}}return{start:Q,add:O,max:M,modVal:L}},cssByDOM:function(L){var AL=L.replace(I.rules,"$1").split(",");var AD=new G(),At=[],AI=[];var y,AU,X,T,d,Ax,N,Ak,Q,Z,M,Au,AO,O,AK;try{y=new RegExp("(?:\\[[^\\[]*\\]|\\(.*\\)|[^\\s\\+>~\\[\\(])+|[\\+>~]","g")}catch(Am){y=/[^\s]+/g}function AR(i){i=i||At;for(var e=0,a=i.length;e<a;e++){i[e].added=null}}function S(){for(var e=0,a=AU.length;e<a;e++){AU[e].childElms=null}}function Aq(k,a){for(var l=0,o;(o=k[l]);l++){var n=false;for(var e=0,m;(m=a[e]);e++){if(m===o){n=true;a.splice(e,1);break}}if(n){k.splice(l--,1)}}return k}function U(e,a){return C?e[J[a.toLowerCase()]||a]:e.getAttribute(a,2)}function g(a,e){a=a?a.replace(I.quoted,"$1").replace(/\./g,"\\."):null;switch(e){case"^":return"^"+a;case"$":return a+"$";case"*":return a;case"|":return"^"+a+"(\\-\\w+)*$";case"~":return"\\b"+a+"\\b";default:return a?"^"+a+"$":null}}function v(a,e){return F?((a==="*")?e.all:e.all.tags(a)):e.getElementsByTagName(a)}function AM(a,e){a=a||"*";e=e||document;return(e===document||e.lastModified)?B[a]||(B[a]=v(a,document)):v(a,e)}function Av(m,A5,j){AU=[];var k=A5.split("-"),r=[],AW=0,A4,AV;var l=(A4=/\-of\-type$/.test(A5))?"nodeName":"nodeType";function A6(A8){var A7=A4?A8.nodeName:1;while((A8=A8.previousSibling)&&A8[l]!==A7){}return A8}function q(A8){var A7=A4?A8.nodeName:1;while((A8=A8.nextSibling)&&A8[l]!==A7){}return A8}var o={first:function(A7){return !A6(A7)},last:function(A7){return !q(A7)},empty:function(A7){return !A7.childNodes.length},enabled:function(A7){return !Q.disabled&&Q.type!=="hidden"},disabled:function(A7){return Q.disabled},checked:function(A7){return Q.checked},contains:function(A7){return(Q.innerText||Q.textContent||"").indexOf(j.replace(I.quoted,"$1"))>-1},other:function(A7){return U(Q,A5)===j}};function i(A7){while((Q=m[AW++])){if(o[A7](Q)){r[r.length]=Q}}return r}var A1=k[0]||null;if(A1&&o[A1]){return i(A1)}switch(A1){case"only":var s;while((Q=m[AW++])){Z=Q.parentNode;if(Z!==s){if(!A6(Q)&&!q(Q)){r[r.length]=Q}s=Z}}break;case"nth":if(/^n$/.test(j)){r=m}else{var A3=(k[1]==="last")?["lastChild","previousSibling"]:["firstChild","nextSibling"];AK=DOMAssistant.getSequence.call(this,j);if(AK){while((Q=m[AW++])){Z=Q.parentNode;if(!Z.childElms){var A0=0,AX=Q.nodeName;AO=AK.start;O=Z[A3[0]];while(O&&(AK.max<0||AO<=AK.max)){var A2=O.nodeName;if((A4&&A2===AX)||(!A4&&O.nodeType===1)){if(++A0===AO){if(A2===AX){r[r.length]=O}AO+=AK.add}}O=O[A3[1]]}Z.childElms=true;AU[AU.length]=Z}}S()}}break;case"target":var e=document.location.hash.slice(1);if(e){while((Q=m[AW++])){if(U(Q,"name")===e||U(Q,"id")===e){r[r.length]=Q;break}}}break;case"not":if((AV=I.pseudo.exec(j))){r=Aq(m,Av(m,AV[1]?AV[1].toLowerCase():null,AV[3]||null))}else{for(var AY in I){if(I[AY].lastIndex){I[AY].lastIndex=0}}j=j.replace(I.id,"[id=$1]");var u=I.tag.exec(j);var n=I.classes.exec(j);var t=I.attribs.exec(j);var a=new RegExp(t?g(t[3],t[2]):"(^|\\s)"+(u?u[1]:n?n[1]:"")+"(\\s|$)","i");while((M=m[AW++])){Au=null;if(u&&!a.test(M.nodeName)){Au=M}else{if(n&&!a.test(M.className)){Au=M}else{if(t){var AZ=U(M,t[1]);if(!AZ||!a.test(AZ)){Au=M}}}}if(Au&&!Au.added){Au.added=true;r[r.length]=Au}}}break;default:return i("other")}return r}for(var Ao=0;(X=AL[Ao]);Ao++){if(Ao&&D(AL.slice(0,Ao),X)){continue}At=[this];T=X.match(y);for(var Al=0,V;(V=T[Al]);Al++){AI=[];if(Al>0&&I.relation.test(V)){if((d=I.relation.exec(V))){var Ar=null,AS=T[Al+1];if((Ax=I.tag.exec(AS))){Ax=Ax[1];N=new RegExp("(^|\\s)"+Ax+"(\\s|$)","i")}else{if(I.id.test(AS)){Ar=DOMAssistant.$(AS)||null}}for(var Aj=0,c;(c=At[Aj]);Aj++){switch(d[0]){case">":var AF=Ar||AM(Ax,c);for(var Ah=0,AA;(AA=AF[Ah]);Ah++){if(AA.parentNode===c){AI[AI.length]=AA}}break;case"+":while((c=c.nextSibling)&&c.nodeType!==1){}if(c){if((Ar&&Ar[0]===c)||(!Ar&&(!Ax||N.test(c.nodeName)))){AI[AI.length]=c}}break;case"~":while((c=c.nextSibling)&&!c.added){if((Ar&&Ar[0]===c)||(!Ar&&(!Ax||N.test(c.nodeName)))){c.added=true;AI[AI.length]=c}}break}}At=AI;AR();V=T[++Al];if(/^\w+$/.test(V)||I.id.test(V)){continue}At.skipTag=true}}var Aw=I.selector.exec(V);var AH={tag:(!Aw[1]||Aw[3]==="*")?"*":Aw[1],id:(Aw[3]!=="*")?Aw[2]:null,allClasses:Aw[4],allAttr:Aw[6],allPseudos:Aw[11]};if(AH.id){var f=0,Ap=document.getElementById(AH.id.replace(/#/,""));if(Ap){while(At[f]&&!H(Ap,At[f])){f++}AI=(f<At.length)?[Ap]:[]}At=AI}else{if(AH.tag&&!At.skipTag){if(Al===0&&!AI.length&&At.length===1){At=AI=E([],AM(AH.tag,At[0]))}else{for(var Ag=0,AP=At.length,AB,Ay;Ag<AP;Ag++){AB=AM(AH.tag,At[Ag]);for(var Ad=0;(Ay=AB[Ad]);Ad++){if(!Ay.added){Ay.added=true;AI[AI.length]=Ay}}}At=AI;AR()}}}if(!AI.length){break}At.skipTag=false;if(AH.allClasses){var Ac=0,Ae=[],Y=AH.allClasses.split(".").slice(1);while((Ak=At[Ac++])){var Ai=true,Az=Ak.className;if(Az&&Az.length){Az=Az.split(" ");for(var Aa=0,Ab=Y.length;Aa<Ab;Aa++){if(!D(Az,Y[Aa])){Ai=false;break}}if(Ai){Ae[Ae.length]=Ak}}}At=AI=Ae}if(AH.allAttr){var w=0,AE=[],Af=[],AJ=AH.allAttr.match(/\[[^\]]+\]/g);for(var z=0,P=AJ.length,x,AQ;z<P;z++){I.attribs.lastIndex=0;x=I.attribs.exec(AJ[z]);AQ=g(x[3],x[2]||null);AE[z]=[(AQ?new RegExp(AQ):null),x[1]]}while((Ak=AI[w++])){for(var p=0,AG=AE.length;p<AG;p++){var R=true,AC=AE[p][0],An=U(Ak,AE[p][1]);if(!AC&&An===true){continue}if((!AC&&(!An||typeof An!=="string"||!An.length))||(!!AC&&!AC.test(An))){R=false;break}}if(R){Af[Af.length]=Ak}}At=AI=Af}if(AH.allPseudos){var W=AH.allPseudos.match(I.pseudos);for(var h=0,As=W.length;h<As;h++){I.pseudos.lastIndex=0;var AT=I.pseudos.exec(W[h]);var b=AT[1]?AT[1].toLowerCase():null;var AN=AT[3]||null;AI=Av(AI,b,AN);AR(AI)}At=AI}}AD=E(AD,At)}return AD},cssByXpath:function(M){var N={xhtml:"http://www.w3.org/1999/xhtml"};var O=(document.documentElement.namespaceURI===N.xhtml)?"xhtml:":"";var L=function P(Q){return N[Q]||null};DOMAssistant.cssByXpath=function(l){if(/:checked/.test(l)){return DOMAssistant.cssByDOM.call(this,l)}var X=l.replace(I.rules,"$1").split(",");var W=new G();var p,r,f,U,V,Z;var q=new RegExp("(?:\\[[^\\[]*\\]|\\(.*\\)|[^\\s\\+>~\\[\\(])+|[\\+>~]","g");function h(i,t,k,j){j=j?j.replace(I.quoted,"$1"):j;switch(k){case"^":return"starts-with(@"+t+', "'+j+'")';case"$":return"substring(@"+t+", (string-length(@"+t+") - "+(j.length-1)+"), "+j.length+') = "'+j+'"';case"*":return'contains(concat(" ", @'+t+', " "), "'+j+'")';case"|":return"(@"+t+'="'+j+'" or starts-with(@'+t+', "'+j+'-"))';case"~":return'contains(concat(" ", @'+t+', " "), " '+j+' ")';default:return"@"+t+(j?'="'+j+'"':"")}}function T(i,t,k,j){return"["+h(i,t,k,j)+"]"}function n(y,x,k){y=/\-child$/.test(x)?"*":y;var t="",v=x.split("-"),u;switch(v[0]){case"nth":if(!/^n$/.test(k)){var j=((v[1]==="last")?"(count(following-sibling::":"(count(preceding-sibling::")+y+") + 1)";if((Z=DOMAssistant.getSequence.call(this,k))){t=(Z.start===Z.max)?j+" = "+Z.start:j+" mod "+Z.add+" = "+Z.modVal+((Z.start>1)?" and "+j+" >= "+Z.start:"")+((Z.max>0)?" and "+j+" <= "+Z.max:"")}}break;case"not":var w=(u=I.pseudo.exec(k))?n(y,u[1]?u[1].toLowerCase():null,u[3]||null):k.replace(I.id,"[id=$1]").replace(I.tag,"self::$1").replace(I.classes,'contains(concat(" ", @class, " "), " $1 ")').replace(I.attribs,h);t="not("+w+")";break;case"first":return"not(preceding-sibling::"+y+")";case"last":return"not(following-sibling::"+y+")";case"only":return"not(preceding-sibling::"+y+" or following-sibling::"+y+")";case"empty":return"count(child::*) = 0 and string-length(text()) = 0";case"contains":return'contains(., "'+k.replace(I.quoted,"$1")+'")';case"enabled":return'not(@disabled) and not(@type="hidden")';case"disabled":return"@disabled";case"target":var i=document.location.hash.slice(1);return'@name="'+i+'" or @id="'+i+'"';default:return"@"+x+'="'+k+'"'}return t}for(var m=0;(p=X[m]);m++){if(m&&D(X.slice(0,m),p)){continue}r=p.match(q);f=".";for(var g=0,o=r.length;g<o;g++){U=I.selector.exec(r[g]);V={tag:O+((!U[1]||U[3]==="*")?"*":U[1]),id:(U[3]!=="*")?U[2]:null,allClasses:U[4],allAttr:U[6],allPseudos:U[11],tagRelation:U[23]};if(V.tagRelation){var a={">":"/child::","+":"/following-sibling::*[1]/self::","~":"/following-sibling::"};f+=a[V.tagRelation]||""}else{f+=(g>0&&I.relation.test(r[g-1]))?V.tag:("/descendant::"+V.tag)}if(V.id){f+='[@id = "'+V.id.replace(/^#/,"")+'"]'}if(V.allClasses){f+=V.allClasses.replace(I.classes,'[contains(concat(" ", @class, " "), " $1 ")]')}if(V.allAttr){f+=V.allAttr.replace(I.attribs,T)}if(V.allPseudos){var Y=V.allPseudos.match(I.pseudos);for(var e=0,R=Y.length;e<R;e++){I.pseudos.lastIndex=0;var S=I.pseudos.exec(Y[e]);var s=S[1]?S[1].toLowerCase():null;var Q=S[3]||null;var b=n(V.tag,s,Q);if(b.length){f+="["+b+"]"}}}}var d=document.evaluate(f,this,L,0,null),c;while((c=d.iterateNext())){W.push(c)}}return W};return DOMAssistant.cssByXpath.call(this,M)},cssSelection:function(M){DOMAssistant.cssSelection=document.evaluate?DOMAssistant.cssByXpath:DOMAssistant.cssByDOM;if(document.querySelectorAll){var L=DOMAssistant.cssSelection;DOMAssistant.cssSelection=function(N){try{var P=new G();return E(P,this.querySelectorAll(N))}catch(O){return L.call(this,N)}}}return DOMAssistant.cssSelection.call(this,M)},cssSelect:function(L){return DOMAssistant.cssSelection.call(this,L)},elmsByClass:function(N,L){var M=(L||"")+"."+N;return DOMAssistant.cssSelection.call(this,M)},elmsByAttribute:function(M,N,L,P){var O=(L||"")+"["+M+((N&&N!=="*")?((P||"")+"="+N+"]"):"]");return DOMAssistant.cssSelection.call(this,O)},elmsByTag:function(L){return DOMAssistant.cssSelection.call(this,L)}}}();DOMAssistant.initCore();DOMAssistant.AJAX=function(){var globalXMLHttp=null;var readyState=0;var status=-1;var statusText="";var requestPool=[];var createAjaxObj=function(url,method,callback,addToContent){var params=null;if(/POST/i.test(method)){url=url.split("?");params=url[1];url=url[0]}return{url:url,method:method,callback:callback,params:params,headers:{},responseType:"text",addToContent:addToContent||false}};var inProgress=function(xhr){return(!!xhr&&xhr.readyState>=1&&xhr.readyState<=3)};return{publicMethods:["ajax","get","post","load"],initRequest:function(){var XMLHttp=null;if(!!window.XMLHttpRequest){XMLHttp=new XMLHttpRequest();DOMAssistant.AJAX.initRequest=function(){return requestPool.length?requestPool.pop():new XMLHttpRequest()}}else{if(!!window.ActiveXObject){var XMLHttpMS=["Msxml2.XMLHTTP.6.0","Msxml2.XMLHTTP.3.0","Msxml2.XMLHTTP","Microsoft.XMLHTTP"];for(var i=0;i<XMLHttpMS.length;i++){try{XMLHttp=new window.ActiveXObject(XMLHttpMS[i]);DOMAssistant.AJAX.initRequest=function(){return requestPool.length?requestPool.pop():new window.ActiveXObject(XMLHttpMS[i])};break}catch(e){XMLHttp=null}}}}return XMLHttp},ajax:function(ajaxObj){if(!ajaxObj.noParse&&ajaxObj.url&&/\?/.test(ajaxObj.url)&&ajaxObj.method&&/POST/i.test(ajaxObj.method)){var url=ajaxObj.url.split("?");ajaxObj.url=url[0];ajaxObj.params=url[1]+((url[1].length>0&&ajaxObj.params)?("&"+ajaxObj.params):"")}return DOMAssistant.AJAX.makeCall.call(this,ajaxObj)},get:function(url,callback,addToContent){var ajaxObj=createAjaxObj(url,"GET",callback,addToContent);return DOMAssistant.AJAX.makeCall.call(this,ajaxObj)},post:function(url,callback){var ajaxObj=createAjaxObj(url,"POST",callback);return DOMAssistant.AJAX.makeCall.call(this,ajaxObj)},load:function(url,addToContent){DOMAssistant.AJAX.get.call(this,url,DOMAssistant.AJAX.replaceWithAJAXContent,addToContent)},makeCall:function(ajaxObj){var XMLHttp=DOMAssistant.AJAX.initRequest();if(XMLHttp){globalXMLHttp=XMLHttp;(function(elm){var url=ajaxObj.url,method=ajaxObj.method||"GET",callback=ajaxObj.callback,params=ajaxObj.params,headers=ajaxObj.headers,responseType=ajaxObj.responseType||"text",addToContent=ajaxObj.addToContent,timeout=ajaxObj.timeout||null,ex=ajaxObj.exception,timeoutId=null;XMLHttp.open(method,url,true);XMLHttp.setRequestHeader("AJAX","true");XMLHttp.setRequestHeader("X-Requested-With","XMLHttpRequest");if(method==="POST"){var contentLength=params?params.length:0;XMLHttp.setRequestHeader("Content-type","application/x-www-form-urlencoded");XMLHttp.setRequestHeader("Content-length",contentLength);if(XMLHttp.overrideMimeType){XMLHttp.setRequestHeader("Connection","close")}}if(responseType==="json"){XMLHttp.setRequestHeader("Accept","application/json, text/javascript, */*")}for(var i in headers){if(typeof i==="string"){XMLHttp.setRequestHeader(i,headers[i])}}if(typeof callback==="function"){XMLHttp.onreadystatechange=function(){try{if(XMLHttp.readyState===4){window.clearTimeout(timeoutId);status=XMLHttp.status;statusText=XMLHttp.statusText;readyState=4;if(!status||status!==200){throw new Error(statusText)}var response=/xml/i.test(responseType)?XMLHttp.responseXML:XMLHttp.responseText;if(/json/i.test(responseType)){response=(typeof JSON==="object"&&typeof JSON.parse==="function")?JSON.parse(response):eval("("+response+")")}globalXMLHttp=null;XMLHttp.onreadystatechange=function(){};requestPool.push(XMLHttp);callback.call(elm,response,addToContent)}}catch(e){globalXMLHttp=XMLHttp=null;if(typeof ex==="function"){ex.call(elm,e);ex=null}}}}XMLHttp.send(params);if(timeout){timeoutId=window.setTimeout(function(){if(inProgress(XMLHttp)){XMLHttp.abort();if(typeof ex==="function"){readyState=0;status=408;statusText="Request timeout";globalXMLHttp=XMLHttp=null;ex.call(elm,new Error(statusText));ex=null}}},timeout)}})(this)}return this},replaceWithAJAXContent:function(content,add){if(add){this.innerHTML+=content}else{DOMAssistant.clearHandlers.apply(this);this.innerHTML=content}},getReadyState:function(){return(globalXMLHttp&&typeof globalXMLHttp.readyState!=="undefined")?globalXMLHttp.readyState:readyState},getStatus:function(){return status},getStatusText:function(){return statusText}}}();DOMAssistant.attach(DOMAssistant.AJAX);DOMAssistant.CSS=function(){return{addClass:function(B){if(!DOMAssistant.CSS.hasClass.call(this,B)){var A=this.className;this.className=A+(A.length?" ":"")+B}return this},removeClass:function(A){return DOMAssistant.CSS.replaceClass.call(this,A)},replaceClass:function(B,C){var A=new RegExp(("(^|\\s)"+B+"(\\s|$)"),"i");this.className=this.className.replace(A,function(D,G,F){var E=C?(G+C+F):"";if(/^\s+.*\s+$/.test(D)){E=D.replace(/(\s+).+/,"$1")}return E}).replace(/^\s+|\s+$/g,"");return this},hasClass:function(A){return new RegExp(("(^|\\s)"+A+"(\\s|$)"),"i").test(this.className)},setStyle:function(C,D){if(this.filters&&(typeof C==="string"?/opacity/i.test(C):C.opacity)){this.style.filter="alpha(opacity="+(D||C.opacity||1)*100+")"}if(typeof this.style.cssText!=="undefined"){var A=this.style.cssText;if(typeof C==="object"){for(var B in C){if(typeof B==="string"){A+=";"+B+":"+C[B]}}}else{A+=";"+C+":"+D}this.style.cssText=A}return this},getStyle:function(A){var C="";A=A.toLowerCase();if(document.defaultView&&document.defaultView.getComputedStyle){C=document.defaultView.getComputedStyle(this,"").getPropertyValue(A)}else{if(this.currentStyle){if(this.filters&&/^opacity$/.test(A)){var B=this.filters["DXImageTransform.Microsoft.Alpha"]||this.filters.alpha||{};C=(B.opacity||100)/100}else{A=A.replace(/^float$/,"styleFloat").replace(/\-(\w)/g,function(D,E){return E.toUpperCase()});C=this.currentStyle[A]}if(C==="auto"&&/^(width|height)$/.test(A)&&this.currentStyle.display!=="none"){C=this["offset"+A.charAt(0).toUpperCase()+A.substr(1)]+"px"}}}return C}}}();DOMAssistant.attach(DOMAssistant.CSS);DOMAssistant.Content=function(){var A=DOMAssistant.$;return{init:function(){DOMAssistant.setCache(false)},prev:function(){var B=this;while((B=B.previousSibling)&&B.nodeType!==1){}return A(B)},next:function(){var B=this;while((B=B.nextSibling)&&B.nodeType!==1){}return A(B)},create:function(D,C,B,E){var F=A(document.createElement(D));if(C){F=F.setAttributes(C)}if(typeof E!=="undefined"){F.addContent(E)}if(B){DOMAssistant.Content.addContent.call(this,F)}return F},setAttributes:function(B){if(DOMAssistant.isIE){var C=function(G,E,F){var D=E.toLowerCase();switch(D){case"name":case"type":return document.createElement(G.outerHTML.replace(new RegExp(D+"=[a-zA-Z]+")," ").replace(">"," "+D+"="+F+">"));case"style":G.style.cssText=F;return G;default:G[DOMAssistant.camel[D]||E]=F;return G}};DOMAssistant.Content.setAttributes=function(D){var H=this;var G=this.parentNode;for(var F in D){if(typeof D[F]==="string"||typeof D[F]==="number"){var E=C(H,F,D[F]);if(G&&/(name|type)/i.test(F)){if(H.innerHTML){E.innerHTML=H.innerHTML}G.replaceChild(E,H)}H=E}}return A(H)}}else{DOMAssistant.Content.setAttributes=function(D){for(var E in D){if(/class/i.test(E)){this.className=D[E]}else{this.setAttribute(E,D[E])}}return this}}return DOMAssistant.Content.setAttributes.call(this,B)},addContent:function(C){var B=typeof C;if(B==="string"||B==="number"){this.innerHTML+=C}else{if(B==="object"||(B==="function"&&!!C.nodeName)){this.appendChild(C)}}return this},replaceContent:function(B){DOMAssistant.clearHandlers.apply(this);this.innerHTML="";return DOMAssistant.Content.addContent.call(this,B)},replace:function(G,B){var F=typeof G;if(F==="string"||F==="number"){var E=this.parentNode;var D=A(E).create("div",null,false,G);for(var C=D.childNodes.length-1;C>=0;C--){E.insertBefore(D.childNodes[C],this.nextSibling)}G=this.nextSibling;E.removeChild(this)}else{if(F==="object"||(F==="function"&&!!G.nodeName)){this.parentNode.replaceChild(G,this)}}return B?G:this},remove:function(){this.parentNode.removeChild(this);return null}}}();DOMAssistant.attach(DOMAssistant.Content);DOMAssistant.Events=function(){var A=1;return{publicMethods:["triggerEvent","addEvent","removeEvent","preventDefault","cancelBubble"],init:function(){window.addEvent=this.addEvent;window.removeEvent=this.removeEvent;DOMAssistant.preventDefault=this.preventDefault;DOMAssistant.cancelBubble=this.cancelBubble},triggerEvent:function(C,F){if(this.events&&this.events[C]){var E={type:C,target:F||this,currentTarget:this,bubbles:false,cancelable:false,preventDefault:function(){},stopPropagation:function(){},timeStamp:+new Date()};for(var D=0,B=this.events[C].length;D<B;D++){this.events[C][D].call(this,E)}}else{if(typeof this["on"+C]==="function"){this["on"+C].call(this,E)}}return this},addEvent:function(B,D){if(/^DOM/.test(B)){if(this.addEventListener){this.addEventListener(B,D,false)}}else{if(!this.uniqueHandlerId){this.uniqueHandlerId=A++}if(!(D.attachedElements&&D.attachedElements[B+this.uniqueHandlerId])){if(!this.events){this.events={}}if(!this.events[B]){this.events[B]=[];var C=this["on"+B];if(C){this.events[B].push(C)}}this.events[B].push(D);this["on"+B]=DOMAssistant.Events.handleEvent;if(typeof this.window==="object"){this.window["on"+B]=DOMAssistant.Events.handleEvent}if(!D.attachedElements){D.attachedElements={}}D.attachedElements[B+this.uniqueHandlerId]=true}}return this},handleEvent:function(B){var G=B||event;var H=G.target||G.srcElement||document;while(H.nodeType!==1&&H.parentNode){H=H.parentNode}G.eventTarget=H;var C=this.events[G.type].slice(0),F,E;if((F=C.length)){for(var D=0;D<F;D++){if(typeof C[D]==="function"){E=C[D].call(this,G)}}return E}},removeEvent:function(B,F){if(this.events&&this.events[B]){var C=this.events[B];for(var E,D=C.length-1;D>=0;D--){E=F||C[D];if(C[D]===E){delete C[D];C.splice(D,1);if(E.attachedElements){E.attachedElements[B+this.uniqueHandlerId]=null}}}}else{if(this["on"+B]&&!F){this["on"+B]=null}}return this},preventDefault:function(B){if(B&&B.preventDefault){DOMAssistant.Events.preventDefault=function(C){C.preventDefault()}}else{DOMAssistant.Events.preventDefault=function(C){event.returnValue=false}}return DOMAssistant.Events.preventDefault(B)},cancelBubble:function(B){if(B&&B.stopPropagation){DOMAssistant.Events.cancelBubble=function(C){C.stopPropagation()}}else{DOMAssistant.Events.cancelBubble=function(C){event.cancelBubble=true}}return DOMAssistant.Events.cancelBubble(B)}}}();DOMAssistant.attach(DOMAssistant.Events);DOMAssistant.DOMLoad=function(){var DOMLoaded=false;var DOMLoadTimer=null;var functionsToCall=[];var addedStrings={};var errorHandling=null;var execFunctions=function(){for(var i=0,il=functionsToCall.length;i<il;i++){try{functionsToCall[i]()}catch(e){if(errorHandling&&typeof errorHandling==="function"){errorHandling(e)}}}functionsToCall=[]};var DOMHasLoaded=function(){if(DOMLoaded){return}DOMLoaded=true;execFunctions()};

/*@cc_on @if(@_win32||@_win64)if(document.getElementById){document.write("<script id="\&quot;ieScriptLoad\&quot;" defer="defer" src="\&quot;//:\&quot;" ><\/script>");document.getElementById("ieScriptLoad").onreadystatechange=function(){if(this.readyState==="complete"){DOMHasLoaded()}}}@end@*/

if(document.addEventListener){document.addEventListener("DOMContentLoaded",DOMHasLoaded,false)}if(/KHTML|WebKit|iCab/i.test(navigator.userAgent)){DOMLoadTimer=setInterval(function(){if(/loaded|complete/i.test(document.readyState)){DOMHasLoaded();clearInterval(DOMLoadTimer)}},10)}window.onload=DOMHasLoaded;return{DOMReady:function(){for(var i=0,il=arguments.length,funcRef;i<il;i++){funcRef=arguments[i];if(!funcRef.DOMReady&&!addedStrings[funcRef]){if(typeof funcRef==="string"){addedStrings[funcRef]=true;funcRef=new Function(funcRef)}funcRef.DOMReady=true;functionsToCall.push(funcRef)}}if(DOMLoaded){execFunctions()}},setErrorHandling:function(funcRef){errorHandling=funcRef}}}();DOMAssistant.DOMReady=DOMAssistant.DOMLoad.DOMReady;

if (redirect != 'int' && redirect != 'banner') {

    var redirect = 'int';

}

var url;

function checkLinks() {

    if (typeof(domains) == "object") {

        DOMAssistant.$("body a").each(function () {   

            if (in_object(domains, DOMAssistant.$(this).href)) {       

                if (DOMAssistant.$(this).href.toLowerCase().indexOf("https://www.tranthanh.name.vn/p/go.html") != 7) {

                    if (redirect == 'int') {

                        url = "https://www.tranthanh.name.vn/p/go.html?link="+DOMAssistant.$(this).href;

                    } else {

                        url = "https://www.tranthanh.name.vn/p/go.html?link="+DOMAssistant.$(this).href;

                    }

                    DOMAssistant.$(this).setAttributes({href : url});

                }           

            }

        });

    } else if (typeof(exclude_domains) == "object") {

        DOMAssistant.$("body a").each(function () { 

            if (!in_object(exclude_domains, DOMAssistant.$(this).href) && DOMAssistant.$(this).href.substr(0,10) != "javascript") {                   

                if (DOMAssistant.$(this).href.toLowerCase().indexOf("https://www.tranthanh.name.vn/p/go.html") != 7) {                           

                    if (redirect == 'int') {

                        url = "https://www.tranthanh.name.vn/p/go.html?link="+DOMAssistant.$(this).href;

                    } else {

                        url = "https://www.tranthanh.name.vn/p/go.html?link="+DOMAssistant.$(this).href;

                    }

                    DOMAssistant.$(this).setAttributes({href : url});               

                }

            }

        });

    }

}

function in_object(obj, val) {

 for(var i = 0, l = obj.length; i < l; i++) { 

        var re = new RegExp(obj[i],"i");     

        if(val.search(re) >0) {

            return true;

  }

 }

 return false;

}

DOMAssistant.DOMReady(checkLinks);

//]]>

</script></b:if>

  <!-- [ HETCHUYENHUONG ] -->

   

  • Chú ý đoạn 

var redirect = &#39;int&#39;;

  • var exclude_domains = [&#39;tranthanh.name.vn&#39;, &#39;www.tranthanh.name.vn&#39;,&#39;bp.blogspot.com&#39;,]; là các tên miền trong danh sách trắng (không ảnh hưởng bởi tự chuyển hướng.  https://www.tranthanh.name.vn/p/go.html là đường link tới trang đã tạo ở bên trên, các bạn có thể sửa theo ý thích của mình.

  • CHÚC CÁC BẠN THÀNH CÔNG


COPY VUI LÒNG GHI NGUỒN.  CÔNG SỨC GÀ MỜ CODE NÊN MÌNH ĐÃ TÌM CÁI NÀY RẤT LÂU MỚI LÀM ĐƯỢC. THANKS



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