Danijel
Forum Replies Created
-
Forum: Plugins
In reply to: [Simple Wp Sitemap] Custom post typesMy bad, it is working. I spend some time trying to find the error because on one multisite installation was not working, but on other siglesite was working fine. So I thought it was only a multisite instalation problem. It turns out it was my fault, on multisite installation i have small plugin that disables other plugins on front pages where they are not needed, and since /sitemap.xml is generated on front ( not admin ) side, WooCommerce was disabled too.
Anyway, thanks for responseForum: Fixing WordPress
In reply to: Remove box from bannerRemove
.videobox { top: -260px; }
, this pushes videobox div to top of the page. Now you can use left or right properties for additional centering.Hi Jozsef!
Speaking of multisite support, i mean the possibility to use the galleries from the main site across all sites in a multisite WordPress installation.
My use of NextGen plugin is mainly focused to the backend capabilities ( as addition to the WP media library ) because it allows me a better way to manage galleries. On the front end I use my custom templates and scripts.
To avoid the need to duplicate all the galleries on all sites, prior to NextGen V1.9, it was enough to change the define_table() function in nggalery.php file:
$wpdb->nggpictures = $wpdb->base_prefix . 'ngg_pictures'; $wpdb->nggallery = $wpdb->base_prefix . 'ngg_gallery'; $wpdb->nggalbum = $wpdb->base_prefix . 'ngg_album';
That way, nggdb class in ngg-db.php file, whose purpose is to collect the information from database about the galleries and images, will always select the data from tables for the main site. It can be used in templates like:
global $nggdb; $images = $nggdb->get_gallery( $gallery_id ); foreach( $images as $image ) { // examples of how to fetch data $image->imageURL; $image->thumbURL; $image->description;
For the image descriptions on multilanguage sites I was using the NextGEN Custom Fields plugin.
Although this solution is far from perfect, it is enough for my purposes ( better than duplicate work with galleries on each site ).
From version 1.9 onwards things have become more complicated. Changing nggallery.php file will force the plugin to load data from main site, but, data will be incomplete. I was not able to trace the problem, here’s an ugly way how to fix URLs for images:
foreach ( $images as $image ) { $gallerypath = $image->_ngiw->_orig_image->path; $imageURL = !strpos( $image->imageURL, $gallerypath ) ? str_replace( site_url(), trailingslashit( site_url() ) . $gallerypath, $image->imageURL ) : $image->imageURL; $thumbURL = !strpos( $image->thumbURL, $gallerypath ) ? str_replace( site_url(), trailingslashit( site_url() ) . $gallerypath, $image->thumbURL ) : $image->thumbURL;
Another problem is that now the NGG Custom Fields plugin is broken ( it’s always been buggy ), so i must find another solution for image descriptions. There is also problems with NextGen V2.0.66 ( on clean install without modifications ) like, I can’t edit thumbnails, problems with shortcodes ( gallery not found messages ).
In the end, first plugin that will give the support for sharing the galleries across multisite network will get my interest. I hope that this is helpful, regards, Danijel.