This looks interesting ..
So, for clarity, if I create a plugin titled with some name and hooked at "postbit_display_start" with the code:
Quote:
$content = preg_replace('/\[URL\](http.*?\.png)\[\/URL\]/i', ' ', $post['pagetext']);
$content = preg_replace('/\[URL\](http.*?\.jpg)\[\/URL\]/i', ' ', $post['pagetext']);
if ($content != $post['pagetext'])
{
global $vbulletin;
$pagetext = $content;
require_once(DIR . '/includes/class_bbcode.php');
$bbcode_parser = new vB_BbCodeParser($vbulletin, fetch_tag_list());
$post['pagetext_html'] = $bbcode_parser->parse($pagetext, $post['forumid'], 1);
$post['pagetext_html'] = html_entity_decode($post['pagetext_html']);
}
|
Then the site will automatically display all links that were PNG and JPG as pictures?
Regards,
Doug