Anyway, when inserting media into an extended property field, s9y's default behavior is to insert the path to the media item like this: /uploads/folder/file.ext
The reality is that someone COULD insert a path that includes the site's full url, ie http://www.example.com/uploads/folder/file.ext.
So, we might, or might not have, the url, but I definitely NEED the url. Judebert suggested replacing the leading "/" with whatever I wanted, which would be $serendipityBaseURL:
Code: Select all
{$var|regex_replace:"^/":"$serendipityBaseURL"}Code: Select all
Warning: preg_replace() [<a href='function.preg-replace'>function.preg-replace</a>]: No ending delimiter '^' found in \full_path_to_server\bundled-libs\Smarty\libs\plugins\modifier.regex_replace.php</b> on line 32Is there a better way to accomplish my objective?