Notifications
Clear all

Script [Solved] Uploading and Embedding images

78 Posts
20 Users
19 Likes
71.1 K Views
Posts: 9
(@carsheadline)
Active Member
Joined: 6 years ago
Posted by: Robert

Also make sure you use correct functions.php file. Try other themes too...

I've tried child theme and parent theme functions file, a different theme, a whole different domain, disabling the plugin, and adding line breaks. None of it works.

Also, PHP code checker says your code has this error: "PHP Syntax Check: Parse error: syntax error, unexpected 'if' (T_IF) in your code on line 3

PHP Syntax Check: Errors parsing your code"

It looks like there's something wrong with the code.

Posts: 9
(@carsheadline)
Active Member
Joined: 6 years ago

I also just tried with ANOTHER site running wordpress 4.8. Crashed the site too.

Robert
Posts: 10503
Admin
(@robert)
Support Team
Joined: 8 years ago

If you don't familiar with PHP code please don't say "It looks like there's something wrong with the code". There is nothing wrong and the IF is not unexpected. Here is my check and there is no syntax problem:

I think when you copy this code some chars are being changed, something wrong with your copied version for sure. Please copy the code from this post again:

https://wpforo.com/community/how-to-and-troubleshooting-2/uploading-and-embedding-images/#post-5212

If it still doesn't work, just send admin login details to support[at]gvectors.com email address, we'll check and find why you have such strange problem.

Posts: 111
(@nando4)
Estimable Member
Joined: 7 years ago

@Robert, is there any way I can prevent wpforo automatically putting IMG tags around images (.png, .jpg)?

The reason is I'm using Blueimp lightbox which will firstly show the image in the post and add the images to a gallery. With the added IMG tag, the image is shown in the post but does not get added to the gallery.

It's definitely being done by within wpforo since TinyMCE editting a Wordpress post does not do this. I have the Embeds addon but have oEmbed disabled.

I currently have to hit CTRL-Z (undo) to remove the auto-IMG tag insert. While I know this, it's not so intuitive for the users.

Posts: 9
(@carsheadline)
Active Member
Joined: 6 years ago
Posted by: Robert

If you don't familiar with PHP code please don't say "It looks like there's something wrong with the code". There is nothing wrong and the IF is not unexpected. Here is my check and there is no syntax problem:

I think when you copy this code some chars are being changed, something wrong with your copied version for sure. Please copy the code from this post again:

https://wpforo.com/community/how-to-and-troubleshooting-2/uploading-and-embedding-images/#post-5212

If it still doesn't work, just send admin login details to support[at]gvectors.com email address, we'll check and find why you have such strange problem.

Still didn't work. I emailed you login details to see if you can fix it at the email you supplied.

Page 9 / 14