WordPress.org

Ready to get started?Download WordPress

Forums

WPJaipho Mobile Gallery
Note: check Yoast's WordPress SEO settings (13 posts)

5 stars
  1. Cormac Bracken
    Member
    Posted 1 year ago #

    Excellent support from developer.

    If you use Yoast's WordPress SEO plugin, you'll need to disable "Redirect attachment URL's to parent post URL." on the Permalink settings page of that plugin.

  2. tole.car
    Member
    Plugin Author

    Posted 1 year ago #

    What seems to be a problem? What are the symptoms? Are you using native or nextgen gallery? Do you have some other gallery plugin active too?
    And, btw, http://www.jaipho.com is working OK

  3. Cormac Bracken
    Member
    Posted 1 year ago #

    Clicking images goes directly to the file, or to the attachment page. There's no sign in html of the js being loaded.

    I'm using native gallery. Tested both file and attachment -type links.

    I'm using Genesis theme framework with fairly typical settings including wp-footer (I mention in case that's where the js should be called).

    No other gallery plugin.

    Other js calls are standard jquery, modernizr, the Admin bar, Simple Facebook Connect, Contact Form 7 and a few jquery addons used by Meteor Slides plugin. I've just tried disabling the last two plugins - same result.

    Apologies for the abrupt comment, when I saw the site down I figured it was another abandoned project.

  4. tole.car
    Member
    Plugin Author

    Posted 1 year ago #

    Quick one before I get hands on my pc (I'm on iPhone right now): how did you tested the wpjaipho (local or live installation, iphone or desktop browser)?

  5. tole.car
    Member
    Plugin Author

    Posted 1 year ago #

    Genius framework, well here is the answer. It is a heavy wp modification, it loads pages with an Ajax and god knows how much filters does it applies and blocks other ones.

    Technically speaking it should not be too much problem to have such framework and still run WpJaipho, but it is a premium framework and I can't see how does it works and how to disable it when user enters the gallery. You can ask them on their support forum how to do it and I'll gladly do a modifications.

    You can also try to use Mobile gallery. It is something like WpJaipho but it does not requires separate page load. It might work (please post back the result, I'm very interested in it)

  6. Cormac Bracken
    Member
    Posted 1 year ago #

    Ok I switched to Twenty Twelve theme and disabled all other plugins. Still no change.

    I'm running WP 3.5 on an online server at a test url. I've mostly tested through desktop Chrome and then viewing html to check all the javascript calls. But I've done some double-checking through mobile, Android 2.3 default browser, including the latest test above.

    Is the browser detection done in javascript? ie I should always see a js call in the html? Is it checking user-agent or screen size or something else?

    I'm also trying Mobile Gallery. It almost works. Looks fine on desktop, but on mobile Android it initially loads a black screen in the lightbox, until I change orientation at least once - then it works nicely. Same story with vtardia.com's plugin, so I assume it's an issue with Photoswipe.

  7. tole.car
    Member
    Plugin Author

    Posted 1 year ago #

    WpJaipho does detection in php. By default it will be activated on iPhone, iPad, iPod and Android devices. You can add others on settings page with "Custom user-agents" option (e.g. you can add Chrome to test it with your browser).
    If no matching device (User-Agent header actually) is detected, WpJaipho does nothing and it can not be detected with view source.
    If activated, you can not miss it - it has own template, from top to bottom.

    That issue with photoswipe, is it only with Genius or it is also with Twenty Twelve? Have you tried their official demo with your Android?

  8. Cormac Bracken
    Member
    Posted 1 year ago #

    Yeah I previously tried adding "*webkit*" as a UA but wasn't confident that it was right...

    I've now checked my mobile browser UA at http://whatsmyuseragent.com/ and no surprises, it includes both "Android" and "AppleWebKit" which it seems Jaipho tests for, as far as I understand it. Also tested with setting UA to "Chrome". No change.

    You mentioned a pageload, are you doing something with an unusual url structure? I'm on nginx, possibly something in that direction?

    Photoswipe - tried their official demo, it works. On my site, with Twenty Twelve it works but with a different bug - if you zoom in and out, the images "get stuck" at the bottom of the screen. Interesting!

  9. tole.car
    Member
    Plugin Author

    Posted 1 year ago #

    I have zero experience with a nginx and I do not know does the wpjaipho works with it.
    Please, go to your site config.php and turn the WP_DEBUG on true. If it is a live site with visitors, set the WP_DEBUG_DISPLAY to false and WP_DEBUG_LOG to true. Log file is at wp-content/debug.log and there should be an answer what is wrong. This should be a first step in debugging but it did not came on my mind until you mentioned nginx

  10. Cormac Bracken
    Member
    Posted 1 year ago #

    Ok I did this and there are no errors or notices in the log, nothing unusual there.

    Of course if the jaipho code tests for the presence of something before using it, eg IF(function_exists), then it would fail without an error message. Does it test for anything else apart from userAgent?

    I mention nginx because I had an earlier issue with url parameters not being passed (which I corrected in the nginx config.) So I don't see how nginx could influence this now, but perhaps you can give me an example of url structure used by jaipho.

  11. tole.car
    Member
    Plugin Author

    Posted 1 year ago #

    No, there are no explicit url parameters that plugin searches for.

    But in order to determine what's wrong, you can try to manually change few things in wpjaipho.
    - wpjaipho.php - remove if block in line 43 ($enabled variable should contain the result of user agent matching)
    - functions.php - change jaipho_is_wp_gallery_call() to always return true (this will use wpjaipho's gallery.php instead of theme attachment template)

  12. Cormac Bracken
    Member
    Posted 1 year ago #

    - wpjaipho.php - remove if block in line 43 ($enabled variable should contain the result of user agent matching)

    This had no effect. I wasn't sure what to expect, so I also inserted print_r ($enabled) before the if block - the result was 1.

    - functions.php - change jaipho_is_wp_gallery_call() to always return true (this will use wpjaipho's gallery.php instead of theme attachment template)

    This worked, I finally saw wpjaipho's output for the first time! But it's not showing images from the gallery, in fact it's showing unattached images.

    I went back to functions.php and realised that jaipho_is_wp_gallery_call is testing whether the post is of type "attachment". But it's not, it's a normal post! (ie print_r ($post->post_type); outputs "post") The post includes a gallery which is currently set to "file". I set it to "attachment" (tested this before) and clicked a gallery thumbnail - it reloads the same page, NOT an attachment page. Disabled Jaipho and tried again - same result.

    To describe it more clearly, when the gallery type is set to "attachment" and I'm on /blah/post-name/, I go to a thumbnail and the url behind it is /blah/post-name/attachment/image123/ . But when I click on that url, I'm redirected back to /blah/post-name/ .

    Why? This made me think of "WordPress SEO" plugin by Yoast/Joost. (Yes I disabled this before, but perhaps not while gallery type=attachment). I checked and found that I had indeed set "Redirect attachment URL's to parent post URL." (Not sure if this is a default setting.) I disabled that and.... it works!

    To sum up, native WordPress gallery needs to be of type "attachment", and if Yoast's WordPress SEO plugin is enabled, users should go to that plugin's settings, SEO -> Permalinks and uncheck the box "Redirect attachment URL's to parent post URL."

    You might want to add that to the documentation, as WordPress SEO is one of the most popular plugins.

  13. tole.car
    Member
    Plugin Author

    Posted 1 year ago #

    Great! And thanks, I'll make a notice on it and probably check how to override particular settings option (already done a similar thing with a nextgen gallery).

    I just installed Yoast's plugin (I'm still on all in one seo) and the option is off by default. That explains why nobody reported problem till now (regarding the extremely huge popularity).

    Thanks on a review update!

    I hope it will go well from now on with wpjaipho.
    Stay well.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.