Notifications
Clear all

wpForo 1.x.x [Solved] Problem with adding pictures to posts

4 Posts
2 Users
0 Reactions
831 Views
PawelK
Posts: 26
Topic starter
(@pawelk)
Eminent Member
Joined: 5 years ago

Since upgrade to 1.8x I've problem with adding pictures to posts. It is strange as old posts can display number of pictures in one post and if I copy source code of old posts to the new one I got view of the name of the picture but no picture at all. It looks like in the attachment.

 

3 Replies
Robert
Posts: 10590
Admin
(@robert)
Support Team
Joined: 9 years ago

Hi @pawelk,

Please update wpForo to latest 1.8.2 version.

And please leave some URL to that page. Also, make sure you don't use an old Advanced Attachments Addon.

2 Replies
PawelK
(@pawelk)
Joined: 5 years ago

Eminent Member
Posts: 26
Robert
Admin
(@robert)
Joined: 9 years ago

Support Team
Posts: 10590

@pawelk,

Ok, let's try this. Put this hook code in your current active WordPress theme's functions.php file:

function custom_wpforo_attachment_fixing( $content ){
if( strpos($content, '../') !== FALSE ){
$forum_home = home_url();
$content = preg_replace('|https*://[./]+|i', $forum_home, $content);
}
return $content;
}
add_filter('wpforo_content_after', 'custom_wpforo_attachment_fixing', 10);

How to Easily Add Custom Code in WordPress (without Breaking Your Site)