Dedecms collection remove a tag code-PHP source code

Source: Internet
Author: User
Dedecms collection remove a tag code

Script ec (2); script

DedeCMS collection rules-filter-replace-Tips 15: 491. Collection removal Link
[Copy to clipboard] CODE:
{Dede: trim}] *)> ([^ <] *) {/dede: trim}
--------------------------------

Let the field: title exceed the length of 30 and modify the code
Find./include/inc_arcpart_view.php
Row 291:
If ($ titlelen = "") $ titlelen = 30;
Change
If ($ titlelen = "") $ titlelen = 60;
Then, you can call
{Dede: channelArtlist typeid = '0' col = 1 tablewidth = '20170 '}
{Dede: arclist row = "10 "}
[Field: title function = "cn_substr ('@ me', 38)"/]


{/Dede: arclist}
{/Dede: channelArtlist}

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 all change the size of the template element you actually need.

2. How to remove the link and retain the text during collection consideration!

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

After many tests, I finally found the correct method! As follows:
{Dede: trim}] *)> {/dede: trim}
{Dede: trim} {/dede: trim}

Make two collection rules!
In actual use, it seems that ([^ <] *) ([^>] *) can be used together!

3. Filter p
{Dede: trim}] *)> {/dede: trim}
{Dede: trim}
{/Dede: trim}
Filter js
{Dede: trim}] *)> ([^ <] *) {/dede: trim}


Filter unknown variable characters
Fixed (. *) fixed


4. dede omnipotent filtering code
The following are common Regular Expression labels:
{Dede: trim} {/Dede: trim}
{Dede: trim}{/Dede: trim}
{Dede: trim} {/Dede: trim}
{Dede: trim}{/Dede: trim}
{Dede: trim} {/Dede: trim}
{Dede: trim}{/Dede: trim}
{Dede: trim} {/Dede: trim}
{Dede: trim}{/Dede: trim}
{Dede: trim} {/dede: trim}
{Dede: trim} {/dede: trim}
{Dede: trim} {/dede: trim}
{Dede: trim} {/dede: trim}
{Dede: trim} {/Dede: trim}
{Dede: trim} < embed> {/Dede: trim}
{Dede: trim} < object> {/Dede: trim}
{Dede: trim} {/dede: trim}
{Dede: trim} {/dede: trim}
{Dede: trim} {/Dede: trim}
{Dede: trim} < scrīpt> {/Dede: trim}
{Dede: trim} < style> {/Dede: trim}
{Dede: trim} {/Dede: trim} <> <> <> <>

The following are the tags of uncommon Regular Expressions:
{Dede: trim} {/Dede: trim}
{Dede: trim}

{/Dede: trim}
{Dede: trim} {/Dede: trim}
{Dede: trim}{/Dede: trim}
{Dede: trim} {/Dede: trim}
{Dede: trim}

{/Dede: trim}
{Dede: trim}
{Dede: trim}
{Dede: trim} {/dede: trim}

/////////////////////////////////////

5. The title of the Weaver dream is incomplete, and the mouse points to display all the code:
{Dede: arclist titlelen = '000000 '}

[Field: title function = '(strlen ("@ me")> 40? Cn_substr ("@ me", 40): "@ me") '/]
{/Dede: arclist}

6. dede/inc/inc_archives_functions.php row 100th (Remote flash Localization BUG for flash channels)
$ Pai_uploaddir = $ GLOBALS ['Media _ dir'];
Modify
$ Pai_uploaddir = $ GLOBALS ['cfg _ other_medias '];

6. the release time and source can be implemented by using the @ me function, for example, in the custom processing interface: enter @ me = "Azure [blog]" to indicate that the source is "Azure [blog ]"
7. content replacement: multimedia is included in the content of the collected articles, which uses relative paths and does not need to be downloaded during collection. The best way is to replace the address with the actual address of the media. You can do this by entering @ me = str_replace ('src = "str1', 'src =" str2', @ me) at the custom processing interface in the Content Rule section of the article );


Dedecms how to remove hyperjoin keywords
Go all
{Dede: trim} ^ * $ {/dede: trim}

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.