Notifications
Clear all

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

4 Posts
2 Users
0 Likes
474 Views
PawelK
Posts: 14
Topic starter
(@pawelk)
Active Member
Joined: 3 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: 9912
Admin
(@robert)
Support Team
Joined: 7 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.

Reply
2 Replies
PawelK
(@pawelk)
Joined: 3 years ago

Active Member
Posts: 14
Robert
Admin
(@robert)
Joined: 7 years ago

Support Team
Posts: 9912

@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)

Reply