Home > Backend Development > PHP Tutorial > Good dedecms modification practical collection page 1/2_PHP tutorial

Good dedecms modification practical collection page 1/2_PHP tutorial

WBOY
Release: 2016-07-21 15:55:35
Original
808 people have browsed it

Collect and remove links

Copy code The code is as follows:

{dede:trim}]*)>([^<]*){/dede:trim}

———————————— ——————————————————————
Let the field:title title exceed the length of 30 and modify the code
Find ./include/inc_arcpart_view.php
Line 291:
if($titlelen=="") $titlelen = 30;
is changed to
if($titlelen=="") $titlelen = 60;
That's it, then You can call this way {dede: Channeltlist typeid = '0' color = 1 tablewidth = '100%'}
{dede: arclist row = "10"}
[Field: Title Function = "cn_substr([email=]'@me',38[/email])" /]
                                                                                                             list}
Let’s extend this: About inc_arcpart_view.php
function GetArcList($typeid=0,$row=10,$col=1,$titlelen=30,$infolen=160,
$imgwidth=120,$imgheight= 90,$listtype="all",$orderby="default",$keyword="",
$innertext="",$tablewidth="100",$arcid=0,$idlist="")
The parameters here can change the size of the template elements you actually need.


How to remove links and retain text during collection filtering!

Boss’s method is {dede:trim}]*)>([^<]*){/dede:trim} Doing this will remove and characters! In this way, the entire article is missing some characters and is incomplete!

Later, I tested many times and finally found the correct way to use it. !As follows:
{dede:trim}]*)>{/dede:trim}
{dede:trim}{/dede:trim}

Just make two collection rules!
In actual use, it seems that ([^<]*)([^>]*) two are used together!



http://www.bkjia.com/PHPjc/318273.html

www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/318273.htmlTechArticleCollect and remove link copy code. The code is as follows: {dede:trim}a([^]*)([^] *)/a{/dede:trim} ——————————————————————————————————...
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template