Dedecms Collection rule-Filter-replace-tips 2009-01-14 15:491. Collect and remove links
[Copy to Clipboard] CODE:
{dede:trim}]*) > ([^<]*) {/dede:trim}
--------------------------------
Let the Field:title title break through the length of 30, modify the Code method
Find./include/inc_arcpart_view.php
Line 291:
if ($titlelen = = "") $titlelen = 30;
Amended to
if ($titlelen = = "") $titlelen = 60;
On it, then, you can call the
{dede:channelartlist typeid= ' 0 ' col=1 tablewidth= ' 100% '}
{dede:arclist row= "10"}
[Field:title function= "cn_substr (' @me ', 38)"/]
{/dede:arclist}
{/dede:channelartlist}
Stretch this out: 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 = "M", $arcid =0, $idlist = "")
The parameters here can change the size of the template element you actually need.
2. Get rid of the link to retain the text of the method!
The way to boss Cooper is {dede:trim}<a ([^>]*) > ([^<]*) </a>{/dede:trim}
Doing so will remove the characters between <a hf.......> and </a>! So the entire article is less than part of the character, incomplete!
Later I tested many times and finally found the right way to use it! as follows:
{dede:trim}<a ([^>]*) >{/dede:trim}
{Dede:trim}</a>{/dede:trim}
Make two collection rules on it!
In the actual use as if ([^<]*) ([^>]*) two together to use the line!
3. Filter div
{Dede:trim}] *) >{/dede:trim}
{Dede:trim}
{/dede:trim}
Filter JS
{Dede:trim}] *) > ([^<]*) {/dede:trim}
Filter unknown variable characters
Fixed (. *) fixed
4.dede Universal Filter Code
The following are common regular expression labels
{dede:trim}<tbody (. *) >{/dede:trim}
{Dede:trim}</tbody>{/dede:trim}
{dede:trim}<table (. *) >{/dede:trim}
{Dede:trim}</table>{/dede:trim}
{dede:trim}<tr (. *) >{/dede:trim}
{Dede:trim}</tr>{/dede:trim}
{DEDE:TRIM}<TD (. *) >{/dede:trim}
{Dede:trim}</td>{/dede:trim}
{Dede:trim}<font (. *) >{/dede:trim}
{Dede:trim}</font>{/dede:trim}
{dede:trim}<a (. *) >{/dede:trim}
{Dede:trim}</a>{/dede:trim}
{Dede:trim}<param (. *) >{/dede:trim}
{dede:trim}<embed (. *) </embed>{/dede:trim}
{dede:trim}<object (. *) </object>{/dede:trim}
{dede:trim}<iframe (. *) </iframe>{/dede:trim}
{dede:trim}<form (. *) </form>{/dede:trim}
{dede:trim}<input (. *) >{/dede:trim}
{dede:trim}<scrīpt (. *) </scrīpt>{/dede:trim}
{Dede:trim}<style (. *) </style>{/dede:trim}
{dede:trim}<!--(. *)-->{/dede:trim}
The following is a regular expression label that is not commonly used
{Dede:trim}<div (. *) >{/dede:trim}
{Dede:trim}</div>{/dede:trim}
{dede:trim}<center (. *) >{/dede:trim}
{Dede:trim}</center>{/dede:trim}
{dede:trim}<p (. *) >{/dede:trim}
{Dede:trim}</p>{/dede:trim}
{Dede:trim}<span (. *) >{dede:trim}
{Dede:trim}</span>{dede:trim}
{dede:trim}{/dede:trim}
/////////////////////////////////////
5. Dream The title is not full, the mouse point to show all the code:
{dede:arclist titlelen= ' 100 '}
[Field:title function= ' (strlen ("@me") >40 cn_substr ("@me"): "@me")
{/dede:arclist}
6.dede/inc/inc_archives_functions.php line 100th (Flash channel remote flash localization bug)
$cfg _uploaddir = $GLOBALS [' Media_dir '];
Modified into
$cfg _uploaddir = $GLOBALS [' Cfg_other_medias '];
6. Release time, source, the author can be implemented through the @me function, such as: in the custom processing interface: input @me = "Azure" "" on the source for the Azure "bo" "
7. Content replacement: In the collection of the content of the article has multimedia, the use of the relative path, collection of time and do not want to download, the best way is to replace the address into the actual media address. This can be done in the article Content Rule section of the custom processing interface: Input @me=str_replace (' src= ' str1 ', ' src= ' str2 ', @me);
How do I get rid of dedecms with super connection keywords
All go
{dede:trim}^<a* ' >*</a>${/dede:trim}