I start this thread becasue of some recent interest in V8+PHP.
Please, post any php snippets and how to use them briefly in this thread.
i'll start us off:
in actinic_main.php
in your v8:
this example uses FragmentText. It will strip out line breaks and create links automagically, when you type them in your input, saving you the time of creating them manually.
Please, post any php snippets and how to use them briefly in this thread.
i'll start us off:
in actinic_main.php
PHP Code:
function AutoLink($txt){
return preg_replace( '/(http|ftp)+(s)?:(\/\/)((\w|\.)+)(\/)?(\S+)?/i', '<a href="\0">\4</a>', $txt );
}
PHP Code:
<actinic:block php="true" >
$thistext = '<actinic:variable encoding="perl" name="FragmentText"/>';
$thistext = str_replace('!!<','',$thistext);
$thistext = str_replace('>!!','',$thistext);
echo AutoLink($thistext);
</actinic:block>
Comment