Home  >  Article  >  Backend Development  >  Dede3.1 paging text collection filtering rules detailed (graphic tutorial)_PHP tutorial

Dede3.1 paging text collection filtering rules detailed (graphic tutorial)_PHP tutorial

WBOY
WBOYOriginal
2016-07-21 15:55:31794browse

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. Example part
Example paging area code:
Example paging area code:
Dede3.1 paging text collection filtering rules detailed (graphic tutorial)_PHP tutorial
Example paging area sampling code:
Paging area sampling (matching):
Dede3.1 paging text collection filtering rules detailed (graphic tutorial)_PHP tutorial

Example paging content filtering rules:
Paging content filtering rules:
Dede3.1 paging text collection filtering rules detailed (graphic tutorial)_PHP tutorial
Sample collection content preview:
Sample collection content preview:
Dede3.1 paging text collection filtering rules detailed (graphic tutorial)_PHP tutorial

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:

Copy code The code is as follows:

{!-- 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'}

[1][ var: paging area]{/dede:sppage}

{dede:note field='dede_archives.title' value='[var:content]' comment='article title'
isunit='' isdown=''}

{dede:match}[var:content]{/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: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}

www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/318220.htmlTechArticleThis article aims to use a representative text paging sampling rule and filtering rule as a model, through simple modifications and changes to solve the general text paging collection problem 1. Example part...
Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn