We use cookies to improve your experience. No personal information is gathered and we don't serve ads. Cookies Policy.

ExpressionEngine Logo ExpressionEngine
Features Pricing Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University
Log In or Sign Up
Log In Sign Up
ExpressionEngine Logo
Features Pro new Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University Blog
  • Home
  • Forums

LG Image Manager

Development and Programming

sambo's avatar
sambo
80 posts
17 years ago
sambo's avatar sambo

Hi,

Anyone using the LG Image Manager field? I like to use it because I already have the ImageManager and the FileManager from TinyMCE but it is giving me problems.

One of the problems is that the output of the field is enclosed within P tags, and also has a linefeed on the end.

I think it comes from TinyMCE config because the config states root elements should be put into P tags. But it doesn’t make sense to have that happen to the Image / File fields. It does however with the normal TinyMCE field so it has to stay in the config.

Anyone else experienced this?

I am not sure if I should report this a bug - although it feels like a bug.

Best, Sammi

       
sambo's avatar
sambo
80 posts
17 years ago
sambo's avatar sambo

I would if that was an option for this type of field 😉

Once this field type is selected you can no longer set the formatting to none.

Best, Sammi

       
sambo's avatar
sambo
80 posts
17 years ago
sambo's avatar sambo

Very interesting! I just inserted the latest one and I do not get the option.

I am too using EE 1.6.1 and installed LG Image Manager (v.1.1.2)

I will have to look into this. Thank you for pointing this out though 😉

Best, Sammi

       
Nicolas Danhiez's avatar
Nicolas Danhiez
12 posts
17 years ago
Nicolas Danhiez's avatar Nicolas Danhiez

Hello, I’ve got the same problem here (EE 1.6.1, LG 1.1.2) Did you find something ?

       
sambo's avatar
sambo
80 posts
17 years ago
sambo's avatar sambo

Hi,

no I did not find anything out about this. But I used this ‘hack’ inside the plugin that uses the image.

$src = preg_replace("/\r\n|\n|\r/", "
", $src);
$src = strip_tags($src);
$src = str_replace(' ','',$src);

It just replaces newlines with html, then strips out all html and finally spaces.

Best, Sammi

       
sambo's avatar
sambo
80 posts
17 years ago
sambo's avatar sambo

I hope the author of this great plugin will be able to fix this 😉

Sammi

       
kstatham's avatar
kstatham
52 posts
17 years ago
kstatham's avatar kstatham

Sambo,

I’m having the same problem. Any chance you can tell me where in the file you added this hack? And, you mentioned plugin above… I’m guessing you meant extension? Or are you referring to one of the files in the tiny_mce folder?

Thanks, Ken

       
Leevi Graham's avatar
Leevi Graham
1,143 posts
17 years ago
Leevi Graham's avatar Leevi Graham
I hope the author of this great plugin will be able to fix this 😉 Sammi

Hey Guys,

I’m on it… I have actually updated all of extensions so they are faster and follow the same programming guidelines. Hopefully I will be able to release them (with fixes) before the weeks end.

Cheers

       
sambo's avatar
sambo
80 posts
17 years ago
sambo's avatar sambo

Leevi: Looking forward to you updates!

kstatham: I am using the imgsizer plugin. That is the plugin that uses the LG image manager field. I know it is a hack but I put it into that plugin. So the plugin just gets the field including P tags and a linebreak. Then just below:

$src = str_replace(SLASH, "/", $src); // clean up passed src param

I added my code to clean that up.

I would have to do that in all plugins that use the field so that is obviously a terrible solution but I need something quick. I just could not find where the contents of the field was saved. If I would have - I would have hardcoded some fix there.

While doing this I discovered how terribly simple it is to create plugins for EE ( I even released one: IMG tag modifier). Now I need to understand more about how to create extensions, then modules - and then it is just a matter of time when I take over the world 😉

Best, Sambo

       
kstatham's avatar
kstatham
52 posts
17 years ago
kstatham's avatar kstatham

Sambo, thanks for that. I’ve got it working now. And thanks for pointing out the Image Sizer plugin… I love the crop from center feature.

Leevi, thanks for the update… looking forward to the new version.

       
timkelty's avatar
timkelty
177 posts
16 years ago
timkelty's avatar timkelty

Did LG image manager ever get updated for this fix? I’m using v1.2.0 and still having this problem.

       
timkelty's avatar
timkelty
177 posts
16 years ago
timkelty's avatar timkelty

I got the same results if I used LG Image Manager or File Manager to place the image

       
timkelty's avatar
timkelty
177 posts
16 years ago
timkelty's avatar timkelty

Hey all, I figured this out, for me at least:

The only way I found to fix this was: * edit the field, changing the fieldtype to textinput * change the formatting to something other than none * check the “change all entries” checkbox * change the field back to “none”, check the checkbox again

Fixed! No hack to the imgsizer plugin needed.

       
Ryan M.'s avatar
Ryan M.
1,511 posts
16 years ago
Ryan M.'s avatar Ryan M.

This extension would be great if there were an option to show a thumbnail of the image next to the field. Perhaps a mashup of this extensions with the LG Image preview code for generating the thumbnails?

       
Andy Harris's avatar
Andy Harris
958 posts
16 years ago
Andy Harris's avatar Andy Harris

I’m getting this ‘inserting p tags’ problem since upgrading to 1.6.6 and it’s jolly annoying. Any known fix for it yet?

       
1 2

Reply

Sign In To Reply

ExpressionEngine Home Features Pro Contact Version Support
Learn Docs University Forums
Resources Support Add-Ons Partners Blog
Privacy Terms Trademark Use License

Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.