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 Absolute Path Support?

Development and Programming

onepanman's avatar
onepanman
44 posts
16 years ago
onepanman's avatar onepanman

I am two sites running on a MSM EE install. Among several plugin, I am using LG TinyMCE, LG Image Manager and LG File Manager. The two sites are on the same physical server (1.domain.com 2.domain.com/site2) I believe I have configured the config.php for imagemanager and filemanager (moxicode) files for two different folders, using the name=”“;name=”” as per the TinyMCE wiki. I have also configured the LG TinyMCE plugin to use document_base_ : “domain.com”,

This seems all good when I used the ImageManger within TinyMCE; however, there are several weblogs that I have a custom field using LG ImageManager. When used with the custom field, I cannot get it to pull the absolute url using the document_base_ as in TinyMCE. There does not seem to be any settings for LG Image Manager (other than the Scripts Path). The same problem applies to LG FileManager custom fields.

Currently when I used these plug-ins, the result path will be pulled from the site1 relative path = “/site2/images/image.jpg” This causes a problem since the site2.com domain is pointing to domain1.com/site2. Hopefully that makes sense.

Is there a way to make this work?

Thanks.

       
onepanman's avatar
onepanman
44 posts
16 years ago
onepanman's avatar onepanman

After extensive reading in the Moxiecode forums, what is stated is that I need to add the document_base_url within the JS mcImageManager.open command. Doing so however, breaks LG Image Manager.

Using double quotes (per their examples) the page fails with an error:

Warning: Division by zero in /extensions/ext.lg_image_manager.php on line 308

However using single quotes, the edit page loads; however, clicking the browse icon for Image Manger does not load.

Looking at the url link for the button, one might be able to see the problem

[removed]mcImageManager.open(“entryform”,”field_id_21”,”“,”“,{document_base_url:

The actual line within the LG Image Manager PHP file is [removed]mcImageManager.open("entryform","field_id_” . $row[‘field_id’] . “","","",{document_base_url:'/',remove_script_host:true,relative_urls: true});

Any help?

       
onepanman's avatar
onepanman
44 posts
16 years ago
onepanman's avatar onepanman

While this does not solve the document_base_url not working, changing the remove_script_host to FALSE fixed my problem. It now displays the full path.

Note to author (if you read this). It would be really neat if the js parameters can be handled through the actual plugin configuration. Currently the only option is the Script Path. When using the plugin as a stand alone (not within TinyMCE) these settings may need to be adjusted per situation.

Thanks for the great plugin.

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

I think it would be nice to actually get the image dimensions of the image you selected and return those. This is one area where EE’s built-in image placement beats Moxiecode - it supplies the client with height and width info. I’d even settle for hacking Moxiecode itself and showing image dimensions on the Thumbnail screen.

       

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.