Announcement

Collapse
No announcement yet.

making a plugin: replace custom bbcode with an image

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • making a plugin: replace custom bbcode with an image

    Hi i'm developing a small plugin who should insert an image taken from filesystem inserting a bbcode, but i can't get the image rendered, only

    [ img ]/url/of/img.png[ /img ] (without spaces in brackets)

    here there is the plugin code:
    PHP Code:
    $vbulletin->GPC['message'] = preg_replace('/\[1d20\]/i','<img src="images/dices/dice_20_faced_'.mt_rand(1,20).'.jpg" alt="" />',$vbulletin->GPC['message']); 
    what's wrong?
widgetinstance 262 (Related Topics) skipped due to lack of content & hide_module_if_empty option.
Working...
X