Home > Article > Backend Development > Dede3.1 paging text collection filtering rules detailed (graphic tutorial)_PHP tutorial
This article aims to use a representative text paging sampling rule and filtering rule as a blueprint to solve the general text paging collection problem through simple modifications and changes [1][ var: paging area]{/dede:sppage} (.*)
1. Example part
Example paging area code:
Example paging area code:
Example paging area sampling code:
Paging area sampling (matching):
Example paging content filtering rules:
Paging content filtering rules:
Sample collection content preview:
Sample collection content preview:
Sample full code (Note: This code is a modified code based on the original code. The original code version is different and will be invalid after direct import. Therefore, many friends in the dede forum have said 'directly import others' None of the codes can be used', indeed):
Output result: http://wen.soudata.net/html/guizeceshi/caijibiji/20070327/2044_2.html
Compare with the original text: http:/ /www.xiaocao.com/text/class1/class1/200609/text_28623.html
This is all the code, you can import it and try it:
{!-- Basic node information --}
{dede:item name='Forum Example_Work Summary_Success (Change)'
imgurl='/upimg' imgdir ='../upimg' language='gb2312' typeid='1' macthtype='string'}
{/dede:item}
{!-- Collection list acquisition rules --}
{dede:list source='var' sourcetype='archives'
varstart='' varend=''}
{dede:url value='http://www.xiaocao.com /text/class1/class1/200609/text_28623.html'}{/dede:url}
{dede:need}{/dede:need}
{dede:cannot}{/dede:cannot}
{dede:linkarea}[var:area]{/dede:linkarea}
{/dede:list}
{!-- Web content acquisition rules --}
{ dede:art}
{dede:sppage sptype='full'}
{dede:note field='dede_archives.title' value='[var:content]' comment='article title'
isunit='' isdown=''}
{dede:match}
{dede: function}{/dede:function}
{/dede:note}
{dede:note field='dede_archives.sortrank' value='[var:content]' comment='sort Level'
isunit='' isdown=''}
{dede:match}{/dede:match}
{dede:function}@me = time();{ /dede:function}
{/dede:note}
{dede:note field='dede_archives.writer' value='[var:content]' comment='article author'
isunit='' isdown=''}
{dede:match}{/dede:match}
{dede:function}{/dede:function}
{/dede:note}
{dede:note field='dede_archives.litpic' value='[var:content]' comment='thumbnail'
isunit='' isdown='' }
{dede:match}{/dede:match}
{dede:function}@me = @litpic;{/dede:function}
{/dede :note}
{dede:note field='dede_archives.pubdate' value='[var:content]' comment='Publish time'
isunit='' isdown=''}
{dede:match}{/dede:match}
{dede:function}if(@me!="") @me = GetMkTime(@me);
else @me = time();{/dede:function}
{/dede:note}
{dede:note field='dede_archives.senddate' value='[var:content]' comment= 'Enter time'
isunit='' isdown=''}
{dede:match}{/dede:match}
{dede:function}@me = time() ;{/dede:function}
{/dede:note}
{dede:note field='dede_addonarticle.body' value='[var:content]' comment='Article content '
isunit='1' isdown=''}
{dede:match}[var:content]
{/dede:match}
{dede:trim}
{dede:function} {/dede:function}
{/dede:note}
{dede:note field='dede_archives.source' value='[var:content]' comment='article source'
isunit='' isdown=''}
{dede:match}{/dede:match}
{dede:function}{/dede:function}
{/dede:note}
{/dede:art}
Related articles
See more