Hi @fixtronic,
Please note, that the addon you’ve mentioned doesn’t have any relation to the feature you want, this addon is designed to embed 3rd party content provider players and widgets like Youtube, SoundCloud, Instagram, etc…
You should purchase wpForo Advanced Attachment for an advanced attachment features. However if you just need to display attached images with thumbnail please use the instruction posted in this topic, we just updated the code, so it should work fine. Make sure the old code is deleted before inserting the new one.
https://wpforo.com/community/how-to-and-troubleshooting-2/uploading-and-embedding-images/#post-5212
Thanks for your reply, however I find it a little sneaky that you prevent features that work in wordpress as standard and your previous earlier versions of WPforo in order to charge for additional addons, Fine for new ones that bring extra features but for feature that come as standard in wordpress is disappointing to say the least 🙁
tried the code you updated below
`add_filter(‘wpforo_content_after’, ‘wpforo_default_attachment_image_embed’, 11);
function wpforo_default_attachment_image_embed( $content ){
if( preg_match_all(‘|<]*>.+?<\/a>|is’, $content, $data, PREG_SET_ORDER) ){
foreach($data as $array){
if(isset($array[1])){
$file = $array[1];
$e = strtolower(substr(strrchr($file, ‘.’), 1));
if( $e == ‘jpg’ || $e == ‘jpeg’ || $e == ‘png’ || $e == ‘gif’ ){
$filename = explode(‘/’, $file); $filename = end($filename);
$html = ‘
‘;
$content = str_replace($array[0], $html, $content);
}
}
}
}
return $content;
}
and got line error below (See Pic)
https://www.dropbox.com/s/pfdorpayqr69kxy/line%20code%20error.JPG?dl=0
You’ve put this code outside of PHP environment. This is not an error, this is the code you’ve entered as text. Please leave here a screenshot of your functions.php. You should put it within<?phptag and you should not put it after ?> tag.