Viewing 3 replies - 16 through 18 (of 18 total)
  • Thread Starter god0fgod

    (@god0fgod)

    I fixed this by finding in nggallery.php:

    define(‘NGGALLERY_ABSPATH’, str_replace(“\\”,”/”, WP_PLUGIN_DIR . ‘/’ . plugin_basename( dirname(__FILE__) ) . ‘/’ ));

    And I replaced it with:

    define(‘NGGALLERY_ABSPATH’, str_replace(“\\”,”/”, WP_PLUGIN_DIR . ‘/nextgen-gallery/’ ));

    But now the slideshow fails and all the pictures are in one column.

    You have to modify how both NGGALLERY_ABSPATH and NGGALLERY_URLPATH are defined in order to solve this error. These are defined in nggallery.php around line 209 and 210.

    The following definitions work for me..

    define(‘NGGALLERY_ABSPATH’, dirname(__FILE__) . ‘/’ );
    define(‘NGGALLERY_URLPATH’, WP_PLUGIN_URL . ‘/nextgen-gallery/’ );

    I believe the problem is actually down to the function plugin_basename() not returning the expected response

    Waldo

    (@thepolarbear)

    this might help, got it from an earlier post,

    Let me note :

    if you add the gallery.php (form the plugin folder) to

    {wordpress dir}\wp-content\themes\your theme directory\nggallery\gallery.php

    then you can call it with [nggallery id=x]

    if you need another template use the tag [nggallery id=x template=mysample]

    and NextGEN Gallery look for a file in

    {wordpress dir}\wp-content\themes\your theme directory\nggallery\gallery-mysample.php

    There might also be other relevant discussion on gallery ID and templates read the whole thread for more.

Viewing 3 replies - 16 through 18 (of 18 total)
  • The topic ‘NextGen Gallery prroblem – Rendering of template gallery.php failed’ is closed to new replies.