Problem with Image Manipulation Plugin not appearing in my custom theme Problem with Image Manipulation Plugin not appearing in my custom theme
 

News:

cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.
[more]

Main Menu

Problem with Image Manipulation Plugin not appearing in my custom theme

Started by netb, August 18, 2014, 02:12:06 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

netb

At one point the Image Manipulation plugin buttons were visible below the intermediate image and then they disappeared, I've tried to introduce different parts of my changes gradually and failed miserably to debug it. I would really appreciate a little help, please.  :-\ Have been bangin my head over this more than 10 hours and I'm sure it will be something stupid but can't figure out what.

Link to my gallery http://www.greatmusclebodies.com , the plugin is currently enabled but it's not even in the code of the generated page for some reason. If I change the theme - everything is okay.

Attached the theme files and a file from the plugin in which I have modded just the style of the button and works okay with other themes.

Αndré

Works as expected with your theme in my test gallery. I assume either some other plugin(s) may cause the issue or your gallery has some specific settings different than my test gallery. Try to move your installed plugins around or uninstall them one by one temporary to find out if a plugin (and which) causes the issue.

netb

I have tried on a clean local install on my PC with only the Image Manipulation Plugin and still the same. I have tried to move around the plugins, will try again and also disable them but the last time there wasn't any change. :-\

Αndré

I used the version from the SVN repository. I'll check tomorrow if it differs from the download package (feel free to test yourself and report your results).

netb

I've installed locally 1.5.31 from the repository and again the plugin buttons are missing when I switch to my theme.
Extremely weird how it works normally for you and not for me. :(
I'll try to think of something else I haven't tried already.

Αndré

Which plugin version do you use? In our download section, there's only version 2.1. In the plugin announcement thread there are also version 2.2 and 2.3 attached to the initial post. Additionally, the plugin exists in our SVN repository (that's what I actually meant which version I used ;)). As it seems you're familiar with SVN, try to checkout https://svn.code.sf.net/p/coppermine/code/branches/cpg1.5.x/plugins/image_manipulation

netb

Okay some progress - I removed this section from my theme.php Section <<<theme_html_picture>>> and the buttons for the plugin appeared.

The only change in this section I've made is to replace the class to displayimg:

                $pic_title = $lang_display_image_php['view_fs'] . $LINEBREAK . '==============' . $LINEBREAK . $pic_title;
                $pic_html .= "<img src=\"" . $picture_url . "\" {$image_size['geom']} class=\"image\" border=\"0\" alt=\"{$lang_display_image_php['view_fs']}\" /><br />";


with


                $pic_title = $lang_display_image_php['view_fs'] . $LINEBREAK . '==============' . $LINEBREAK . $pic_title;
                $pic_html .= "<img src=\"" . $picture_url . "\" {$image_size['geom']} class=\"displayimg\" border=\"0\" alt=\"{$lang_display_image_php['view_fs']}\" /><br />";


for different styling purposes. Perhaps it's not rightly done this way? Do I have to change it also for the transparent overlay gif code above also (I haven't enabled it in the config) or in some other place I've missied?

The style adds opacity on hover over the image, could this conflict with the plugin?

netb

I'm using version 2.3 downloaded from the forum post, the one from the svn seems to be identical to 2.3 except for image_manipulation.js

The repository version has this line:


im_addLoad(im_init);


changed to this:


$(document).ready(function() { im_init(); } );

Αndré

I just enabled the transparent overlay in the config, which breaks the plugin even for the curve theme. After I disabled the overlay, the buttons re-appeared for both the curve and your evilslick theme. I'll also create a fresh testbed and try again.

Αndré

Installed cpg1.5.30, image_manipulation 2.3 and used your evilslick theme attached to initial post - works as expected (see screenshot).

netb

My problem seems to be with Section <<<theme_html_picture>>> in theme.php. If I edit it to change the class of the images - it breaks the plugin.

P.S. And transparent overlay is disabled, also enabled/disabled it to check what happened and to be sure.

Not sure why this happens and it's weird but I'll abstain from including theme_html_picture section and editing it.

Thanks for your time and help!

Αndré

As long as you don't rename/remove the class "display_media", it should work as expected:
Code (js/image_manipulation.js) Select
$('.display_media').append(im_btn);

netb

Well I sort of resolved it by removing the border from .image:hover in the css and the buttons started to appear again. I'm not sure why this happened only on my local and production setups. I wanted to make a new class just for styling the images in the theme_html_picture section in a different way but I got the result I wanted anyway, so you can mark this as resolved. Sorry for the late response and I still have no idea why it didn't work the other way. May have something to do with overriding the styles but haven't gotten this deep in it.