DEDECMS secondary development source code, please help DEDE & nbsp; the official forum does not allow new registered users to post & nbsp ;... & nbsp;, & nbsp; such a string & nbsp; HTML & nbsp; Code {dede: arclist & nbsp; flagh & nbsp; limit0, 1 & nbsp; infolen230} & nbsp; DEDECMS secondary development source code. please help
The DEDE official forum does not allow the posting of newly registered users...
In this case, such a string of HTML code
{Dede: arclist flag = 'h' limit = '0, 1' infolen = '20170 '}
[Field: title/]
[Field: info/]... [View Full Text]
{/Dede: arclist}
Such a piece of code corresponds to taglib/arclist. lib. php
I see the solution
[Field: title/]
[Field: info/]... [View Full Text]
The solution for such a piece of code, that is, the InnerText of the arclist tag, is like this.
Arclist. lib. php line 472-474
$ Dtp2 = new DedeTagParse ();
$ Dtp2-> SetNameSpace ('field', '[', ']');
$ Dtp2-> LoadString ($ innertext );
I can understand this DedeTagParse (). it first sets the TagStartWord and EndWord according to SetNameSpace, and then uses the FOR loop to the entire string based on these things, in which the tag is matched by STRPOS comparison, and save all the labels in the class array CTags.
Then, call the MakeOneTag method to obtain the TagValue from the methods with files under the taglib.
Then, use the GetResult method to insert the value into HTML according to the position of the analytical STRPOS, and then return the complete string.
This process is easy to understand, but hard to understand.
$ Dtp2-> SetNameSpace ('field', '[', ']');
In MakeOneTag, there is no filed. lib. php under taglib, and assign1_ag does not have field parsing.
Besides, this will not go to MakeOneTag. what I want to ask is, how does it parse the value? Thank you very much !!!!
------ Solution --------------------
$ Dtp2-> SetNameSpace ('field', '[', ']');
Field
[Open arc
] Arc closure
Replace the [] Template variables in the template with the data table field content