• When I installed wp-greet, and went to my gallery to click an image that would (theoretically) take me to the e-card page, instead I received a blank page. That page had the headers an image file would have, and contained only the text:

    https://www.mykeamend.com/new/471/?gallery=1&steampunkimage=https://www.mykeamend.com/new/wp-content/gallery/engravings/myke_amend_descent.jpg

    I did some poking around and experimenting, until I was sure exactly where the plugin was failing – it turned out it really wasn’t getting to the plugin at all, because of the “&image=” part of the url, which was apparently being grabbed by another plugin and choked on.

    So, to test, I changed (in my browsers address bar) the url to “&theimage=” and it brought up the e-card page – with no image of course because the variable did not exist (yet) in the coding.

    I then changed the $_GET[‘image’] in lines 27 and 39 of wpg-form.php to $_GET[‘theimage’] – everything worked fine after that …*if* I typed that url in manually by hand.

    So I then went into the nextgen gallery’s view/gallery.php and (sloppily) made this bit of code to call the e-cards page:

    <div style="width: 90px; line-height: 0.8em; font-size: 0.7em; padding-bottom: 5px;"><a href="https://www.mykeamend.com/new/471/?gallery=<?php echo $gallery->ID ?>&theimage=<?php echo $image->imageURL ?>">Send as E-Card</a></div>

    I also went and (in the gallery settings) made it so the gallery just uses the shutter effect – since it no longer needs to point to a page. I also had to go into the settings for wp-greet set Gallery-Plugin: to “none” for the gallery to work again.

    Now users can view the images with the effect, or click a link to go to the gallery page.

    I still need to pick through and make it so these lines don’t need the absolute url in there, make it so the div is automatically the width of the thumbnail image, and class out that div in the code and my css page. But this is the duct-tape and glue version of the fix.

    Using “image” as a variable probably wasn’t the best idea, chances are there are many plugins which try to parse this same variable. I would ask that in the next version something more unique is used in its stead, but that would be required of nextgen and wp-greet. Still, I am sure someone can come up with a much better way to do this same fix – a hook for functions.php or at least cleaner and more in-depth coding – I plan to, but may never get around to it. For now though, there is this ad-hock ‘fix’ for others who might be having the same problem as I was.

  • The topic ‘[Plugin: wp-greet] Conflict with image perameter in url (a basic fix)’ is closed to new replies.