{dede:field.body/}挪用的是所有文章内容
若是我们只想挪用内容内里的第一张图片,那么可以使用下面的标签
{dede:field.body runphp=’yes’}
preg_match(‘//i’,@me,$match);
@me=$match[0]; //第一张图片
[email protected]/* <![CDATA[ */!function(t,e,r,n,c,a,p,m,o){try{t=document.currentScript||function(){for(t=document.getElementsByTagName(\'script\'),e=t.length;e–;)if(t[e].getAttribute(\'data-yjshash\'))return t[e]}();if(t&&(c=t.previousSibling)){p=t.parentNode;if(a=c.getAttribute(\'data-yjsemail\')){for(e=\'\',o=0,r=\'0x\'+a.substr(0,2)|0,n=2;a.length-n;n+=2){m=(\'0\'+(\'0x\'+a.substr(n,2)^r).toString(16)).slice(-2);if((a.length-n)=128)o=(parseInt(m)1)break;e+=\’%\’+m;}p.replaceChild(document.createTextNode(decodeURIComponent(e)),c)}p.removeChild(t)}}catch(u){}}()/* ]]> */=$match[1]; //第二张图片
[email protected]/* <![CDATA[ */!function(t,e,r,n,c,a,p,m,o){try{t=document.currentScript||function(){for(t=document.getElementsByTagName(\'script\'),e=t.length;e–;)if(t[e].getAttribute(\'data-yjshash\'))return t[e]}();if(t&&(c=t.previousSibling)){p=t.parentNode;if(a=c.getAttribute(\'data-yjsemail\')){for(e=\'\',o=0,r=\'0x\'+a.substr(0,2)|0,n=2;a.length-n;n+=2){m=(\'0\'+(\'0x\'+a.substr(n,2)^r).toString(16)).slice(-2);if((a.length-n)=128)o=(parseInt(m)1)break;e+=\’%\’+m;}p.replaceChild(document.createTextNode(decodeURIComponent(e)),c)}p.removeChild(t)}}catch(u){}}()/* ]]> */=$match[2]; //第三张图片
{/dede:field.body}
注释:
@me=$match[0]; //第一张图片
[email protected]/* <![CDATA[ */!function(t,e,r,n,c,a,p,m,o){try{t=document.currentScript||function(){for(t=document.getElementsByTagName(\'script\'),e=t.length;e–;)if(t[e].getAttribute(\'data-yjshash\'))return t[e]}();if(t&&(c=t.previousSibling)){p=t.parentNode;if(a=c.getAttribute(\'data-yjsemail\')){for(e=\'\',o=0,r=\'0x\'+a.substr(0,2)|0,n=2;a.length-n;n+=2){m=(\'0\'+(\'0x\'+a.substr(n,2)^r).toString(16)).slice(-2);if((a.length-n)=128)o=(parseInt(m)1)break;e+=\’%\’+m;}p.replaceChild(document.createTextNode(decodeURIComponent(e)),c)}p.removeChild(t)}}catch(u){}}()/* ]]> */=$match[1]; //第二张图片
[email protected]/* <![CDATA[ */!function(t,e,r,n,c,a,p,m,o){try{t=document.currentScript||function(){for(t=document.getElementsByTagName(\'script\'),e=t.length;e–;)if(t[e].getAttribute(\'data-yjshash\'))return t[e]}();if(t&&(c=t.previousSibling)){p=t.parentNode;if(a=c.getAttribute(\'data-yjsemail\')){for(e=\'\',o=0,r=\'0x\'+a.substr(0,2)|0,n=2;a.length-n;n+=2){m=(\'0\'+(\'0x\'+a.substr(n,2)^r).toString(16)).slice(-2);if((a.length-n)=128)o=(parseInt(m)1)break;e+=\’%\’+m;}p.replaceChild(document.createTextNode(decodeURIComponent(e)),c)}p.removeChild(t)}}catch(u){}}()/* ]]> */=$match[2]; //第三张图片
保留一个即可。
本文收集自网络,由本站搜集发布,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系本站核实处理。如需转载,请注明文章来源。