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, How to modify the code
Find ./include/inc_arcpart_view.php
Line 291:
if($titlelen=="") $titlelen = 30;
Change to
if($titlelen=="") $titlelen = 60;
That’s it, then you can call it like this
:title function= "cn_substr([email=]'@me',38[/email])" /]
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 element you actually need .
How to remove links and retain text during collection and filtering!
Boss’s method is {dede:trim}
]*)>([^<]*){ /dede:trim}
Doing this will remove the characters between
and ! In this way, the entire article will be missing some characters and incomplete!
Later I After many tests, I 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!
Currently 1 /2 pages 12 next page
The above introduces the dedecms tutorial. Page 1/2 of a good practical collection of dedecms modification, including the dedecms tutorial. I hope it will be helpful to friends who are interested in PHP tutorials.