Parsing the content

If you have created a tag which has an opening and a closing part, for example:

<lb:if_adultuser>some porn pictures</lb:if_adultuser>

Then you have to parse the content again to display all the porn pictures (or the other Loudblog-tags that sits between our conditional tags. We can do like this:

function if_adultuser ($content) {
if ($adult == true) {
return fullparse (stripcontainer($content));
} else { return ""; }
}

You see: They key is the function “fullparse”, which takes a string and parses it with the clever Loudblog parsing engine.

Warning!

You HAVE TO use stripcontainer!!! If you forget about this, you’ll send the parsing engine into an infinite loop. That’s not what we want. And PHP will stop this loop after one minute or so.

Notice

Parsing the content is, of course, also necessary for link_ tags, area_ tags and loop_ tags!