WordPress.org

Ready to get started?Download WordPress

Forums

NextGEN Gallery
Share galleries on WP network (multisite) (7 posts)

  1. bondjack
    Member
    Posted 2 years ago #

    Hiya, I looked al over the lace but couldn't find a solution to the following problem

    I got a wordpress network with 5 sites.
    The sites are actually 5 different languages for the same website.
    The language is different but on the gallery page I want to show the same images. It is a bit waist of hosting space if I need to upload the same images to 5 network site.

    Is there a possibility to use I gallery folder for all the network sites?

    In the site admin menu you can set the default folder for the network but this doesn't seem to work. on the singel sites pages next gen give an other default folder path and this one seems to be greyed out.

    Anyone? thx

    http://wordpress.org/extend/plugins/nextgen-gallery/

  2. sushienet
    Member
    Posted 2 years ago #

    hi
    i'm trying the same... did u find a solution?

    right now i'm doing a dirty hack:

    1. change in "nggallery.php", line 229:

    function define_tables() {
    	global $wpdb;
    
    	// add database pointer
    	$wpdb->nggpictures = $wpdb->prefix . 'ngg_pictures';
    	$wpdb->nggallery = $wpdb->prefix . 'ngg_gallery';
    	$wpdb->nggalbum	 = $wpdb->prefix . 'ngg_album';
    }

    to

    function define_tables() {
    	global $wpdb;
    
    	// add database pointer
    	$wpdb->nggpictures = 'wp_ngg_pictures';
    	$wpdb->nggallery = 'wp_ngg_gallery';
    	$wpdb->nggalbum = 'wp_ngg_album';
    }

    so the plugin uses the same datebase-tables for all blogs

    2. then manually change the "path" settings in the db for every blog from "wp-content/blogs.dir/%BLOG_ID%/files/" to "wp-content/blogs.dir/galleries/" or so...

    *cheers

  3. sulliwane
    Member
    Posted 1 year ago #

    Thanks a lot !

    your "dirty hack" did the trick for me :o)

    I guess the plugin updates are not advisable from now...

  4. B_Dark
    Member
    Posted 1 year ago #

    with robot/txt what we add?

    the normal is
    User-agent: Googlebot-Image
    Allow: /wp-content/gallery/

    in multisite
    User-agent: Googlebot-Image
    Allow: wp-content/blogs.dir/%BLOG_ID%/files/ ?

  5. nadade
    Member
    Posted 1 year ago #

    hi!

    2. then manually change the "path" settings in the db for every blog from "wp-content/blogs.dir/%BLOG_ID%/files/" to "wp-content/blogs.dir/galleries/" or so...

    where did you change the path? I m trying to change it from every site but its blocked. (is a multi language site)

    thanks!

  6. sushienet
    Member
    Posted 1 year ago #

    @nadade

    yep, this is a little tricky, because u cannot change this value in the nng-settings (readonly)...

    you need:
    - basic knowledge of database-structures
    - access to a database-admin-tool (usually "phpmyadmin" for mysql-databases)

    you do (in the db-admin):

    1. TAKE CARE NOT TO DESTROY YOUR WHOLE WORDPRESS INSTALLATION !
    2. look for the "wp_options"-table
    3. edit the row "ngg_options"
    4. in field "option_value" look for something like "gallerypath";s:31:"wp-content/blogs.dir/%BLOG_ID%/files/"
      and change it to
      "gallerypath";s:31:"wp-content/blogs.dir/galleries/"
      (or whatever you like your galleries-folder to be)
    5. look for more tables like "wp_**_options" (where ** is the number of your blog, may be several depending of the amount of blog u set up), repeat step 2 + 3 for every wp_option table u find

    *goodluck

  7. sushienet
    Member
    Posted 1 year ago #

    @B_Dark

    in multisite
    User-agent: Googlebot-Image
    Allow: wp-content/blogs.dir/%BLOG_ID%/files/ ?

    will not work because the variable %BLOG_ID% will not be translated in robots.txt...

    try just

    User-agent: Googlebot-Image
    Allow: wp-content/blogs.dir/

    so the bot is allowd to index all subfolders of /blogs.dir/

    *s

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.