--------------- Added [DATE]1248376965[/DATE] at [TIME]1248376965[/TIME] ---------------
I'd like to Share a Solution I Found for the Previously Explained Problem; now the Images are Replaced by a Text and the Smilies and other Images on the image Folder are being Displayed. :up:
On the File /includes/
class_postbit.php
you should add at the End of it, right after the "}" of the Last Function:
PHP Code:
// #############################################################################
function check_img_src($tag, $src)
{
$whitelisted = array(
'website.com/forum/images',
'website.com/forum/location2',
'website.com/forum/location3',
);
foreach ($whitelisted as $bl)
{
if (strstr($src, $bl))
{
return stripslashes($tag);
}
}
return 'Text Or Code Displayed Instead Of The Images Inserted With IMG Tag';
}
You Should Create a Plugin as Follows:
Product: vBulletin
Hook Location: postbit_display_complete
Title: IMG BBCode Permissions For Usergroups - postbit_display_complete
(or the one you wish)
Execution Order: 5
Active Plugin: Yes
PHP Code:
PHP Code:
if (is_member_of($this->registry->userinfo, 1,3,4,8))
{
$this->post['message'] = preg_replace("#(<img[^>](.*)(</img>|\/>))#e", "check_img_src('\\1', '\\2')", $this->post['message']);
}
You can Replace the
1,3,4,8 with the Usergroup Numbers you wish the Images Not to be Displayed, but Yes the Smilies.
And Thats It... Enjoy.
My Best Regards.
--------------- Added [DATE]1248377122[/DATE] at [TIME]1248377122[/TIME] ---------------
I Appreciate the Help of
Deceptor for Providing the Code I Could Take as a Great Idea to Edit and Post my Solution, and to
Dismounted who gave me on his Post the Idea to Include the Function in the php File. :up:
Of course, if you could share a Better Way to do this I'd appreciate it a Lot.
My Best Regards to Both of You. :up:
