umertin
Forum Replies Created
-
Forum: Plugins
In reply to: [NextGEN Gallery Image Chooser] Singlepic function missingSorry, but presently I don’t have the time to improve the plugin. I just try to keep it working with the latest versions of WordPress and NextGen Gallery.
But if you want to do the extension, you’re welcome. The plugin is in the public domain.Forum: Plugins
In reply to: [NextGEN Gallery Image Chooser] NGG Image Chooser Toolbar Button IssueOk, as I expected, the albums number 2 and 4 have strange gallery entries ([0] =>) meaning the album has a child object (album or gallery) but NextGen Gallery won’t tell anything about it. So the image chooser does not know what to do with it.
I expect either corrupted data in your database, a permission issue, or a bug in NextGen Gallery, as an entry without an id definitely is wrong. But this is out of my area of expertise, as I simply call a function of the gallery.Anyway, I have put an updated version of nextgen-ic.php here (zipped, so the web server does not attempt to interpret it). This new version simply ignores the empty entries, as this is the best I can do if the gallery doesn’t tell me anything about the object.
Can you please try this version and let me know if it cures the warnings and possibly also the error?
Forum: Plugins
In reply to: [NextGEN Gallery Image Chooser] NGG Image Chooser Toolbar Button IssueThere seems to be something unexpected in your album or gallery metadata. As this only is a warning, I don’t know if this is the reason for the failure, but it might be.
To further analyze this, I need the data structure that the NextGen Gallery delivers to my plugin. I have created a debug version of the plugin file. Please create a backup copy of nextgen-ic.php in wp-content/plugins/nextgen-gallery-image-chooser/, put the debug code below in the original file, open a post and press the image chooser button (with NextGen Gallery 2.x installed). In the pop up window you should see the array with the albums and galleries. You can edit the names and slugs to hide private information, but must leave the rest, so I might see what causes the problem.<?php /* Plugin Name: NextGEN Gallery Image Chooser Plugin URI: Description: Comfortable image chooser for the NextGEN Gallery. Based on g2image. Version: 1.0.0 Author: Ulrich Mertin Author URI: https://www.ulrich-mertin.de */ /* This plugin is based on g2image by Kirk Steffensen, see https://g2image.steffensenfamily.com/ for further contributors. Released under the GPL version 2. A copy of the license is in the root folder of this plugin. */ global $wpdb, $ngg, $wp_version, $nggdb; // ====( Version Info ) $nggic_version_text = '1.0.0'; // Is this a TinyMCE window? if(!isset($_REQUEST['nggic_tinymce']) && !isset($_SESSION['nggic_tinymce'])) { //Activate & Deactivate Plugin Functions register_activation_hook( __FILE__, 'nggic_pluginactivate' ); register_deactivation_hook( __FILE__, 'nggic_plugindeactivate' ); // Image Chooser Buttons - Visual Editor add_action('init', 'nggic_init'); add_action('init', 'nggic_addbuttons'); // Create admin menu if ( is_admin() ) { require_once (dirname (__FILE__) . '/admin/admin.php'); $nggicAdminPanel = new nggicAdminPanel(); } return; } // ====( Initialization Code ) require_once('../../../wp-load.php'); // ====( NextGEN Gallery validation ) if (!function_exists('nggShowGallery')) { die(__('Required NextGEN Gallery was not found!', 'nggic')); } // ====( Main HTML Generation Code ) echo nggic_make_html_header(); $debbugalbums = $nggdb->find_all_album('id'); echo "<h3>Data Structure</h3>\n<pre>\n"; print_r($debbugalbums); echo "</pre>\n"; echo '</body>' . "\n\n"; echo '</html>'; // $_SESSION['nggic_last_album_visited'] = $nggic_options['current_gallery']; // ====( Functions - Alphabetical by Function Name) /** * Adds nggic to the TinyMCE button Toolbar * * @param null * @return null */ function nggic_addbuttons() { // Don't bother doing this stuff if the current user lacks permissions if ( ! current_user_can('edit_posts') && ! current_user_can('edit_pages') ) return; // Add only in Rich Editor mode if ( get_user_option('rich_editing') == 'true') { add_filter("mce_external_plugins", "nggic_plugin"); add_filter('mce_buttons', 'nggic_wp_extended_editor_mce_buttons'); } } /** * Initializes NextGEN Gallery Image Chooser * * @param null * @return null */ function nggic_init() { // load translation load_plugin_textdomain( 'nggic', false, dirname( plugin_basename( __FILE__ ) ) . '/langs/' ); } /** * Make the header * * @return string $html The HTML for the header */ function nggic_make_html_header(){ global $nggic_options; $html = '<html xmlns="https://www.w3.org/1999/xhtml">' . "\n" . '<head>' . "\n" . ' <title>' . __('NextGEN Gallery Image Chooser', 'nggic') . '</title>' . "\n" . ' <link rel="stylesheet" href="css/nggic.css" type="text/css" />' . "\n" . ' <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />' . "\n" . '</head>' . "\n\n" . '<body id="nggic">' . "\n\n"; return $html; } /** * Adds nggic to the TinyMCE plugins list * * @param string $plugins the buttons string from the WP filter * @return string the appended plugins string */ function nggic_plugin($plugin_array) { $plugin_array['nggic'] = plugins_url( 'editor_plugin.js' , __FILE__ ); return $plugin_array; } /** * Sets up the NGGIC Plugin defaults * * @param NULL * @return NULL */ function nggic_pluginactivate() { global $nggic_options; if (!function_exists('nggShowGallery')) { die(__('Required NextGEN Gallery was not found!', 'nggic')); } // Get NGGIC Option Settings $nggic_options = get_option('nggic_options'); // Has NGGIC Plugin Not been correctly deactivated as Options should not yet exist. if ($nggic_options['sortby']) { // Add BTEV Event Message if (function_exists('btev_trigger_error')) { btev_trigger_error('NextGEN Gallery Image Chooser PLUGIN WAS NOT DEACTIVATED', E_USER_NOTICE, __FILE__); } nggic_plugindeactivate(); $nggic_options = ''; } include_once (dirname (__FILE__). '/init.php'); // default settings update_option('nggic_options', $nggic_options); // Add BTEV Event Message if (function_exists('btev_trigger_error')) { btev_trigger_error('NextGEN Gallery Image Chooser PLUGIN ACTIVATED', E_USER_NOTICE, __FILE__); } } /** * Removes all the NGGIC settings * * @param NULL * @return NULL */ function nggic_plugindeactivate() { // Delete NGGIC Option Settings delete_option('nggic_options'); // Add BTEV Event Message if (function_exists('btev_trigger_error')) { btev_trigger_error('NextGEN Gallery Image Chooser PLUGIN DEACTIVATED', E_USER_NOTICE, __FILE__); } } /** * Adds nggic to the TinyMCE button bar * * @param string $buttons the buttons string from the WP filter * @return string the appended buttons string */ function nggic_wp_extended_editor_mce_buttons($buttons) { array_push($buttons, 'separator', 'nggic'); return $buttons; } ?>
Forum: Plugins
In reply to: [NextGEN Gallery Image Chooser] NGG Image Chooser Toolbar Button IssueThanks for the additional information. I just created a fresh test installation, installed ngg 1.9.13, the image chooser plugin, and then upgraded ngg to 2.0.31, but still no problem ??
I even switchted to a language not supported by the image chooser, but it simply fell back to English.So there must be something to your specific constellation (which is common to both your production and test servers) that causes the image chooser to fail.
I only can recommend uninstalling the image chooser (not the gallery!) and reinstalling it.
If this doesn’t help, I’m at my wit’s end. Sorry.
Forum: Plugins
In reply to: [NextGEN Gallery Image Chooser] NGG Image Chooser Toolbar Button Issue@baspisa
I’m using exactly the same combination in my installation, and cannot reproduce your error. So, to have any chance to fix this, I need some more information.- Do you get the error in the main window, or the pop-up?
- Is this a fresh installation, or did the error occur after an update?
- Which other plugins do you use? Have you tried disabling all plugins except the gallery and the image chooser?
- Which language do you use?
Forum: Plugins
In reply to: [NextGEN Gallery Image Chooser] NGG Image Chooser Toolbar Button IssueAs my problems with the nextgen gallery persists, I have set up a test instance of WordPress 3.6 with NextGen Gallery 2.0.7 and NextGEN Gallery Image Chooser 1.0.0. In this instance the image chooser works without any issues. So it does not seem to be a general problem, but due to your specific installation.
Are you sure you have enabled the NextGen Gallery plugin and not just installed it? That’s the only cause I can think of.
Forum: Plugins
In reply to: [NextGEN Gallery Image Chooser] NGG Image Chooser Toolbar Button IssueIt seems that photocrati have renamed or changed the function that my plugin uses to determine the existence of the nextgen gallery plugin. So I will have to adjust my plugin to the new name and possibly changed functionality.
Unfortunately the new nextgen gallery versions (both 2.0.0 and 2.0.7) break my URL rewriting, so I cannot install them. Which means that it probably will be some time until I can do the modifications.
Sorry. ?? I promise that I will get to it as soon as possible.Forum: Plugins
In reply to: [BTEV] [Plugin: BTEV] Errors when activating plugin in WP 3.2.1Hi Michael,
Disabling all plugins did not help.
I also made sure the BTEV files were installed ok by copying the complete folder from the working instance over to the failing one, but without any success. So only the BTEV database entries could have caused the problem, or something in the main WordPress installation.But, as it seems that this problem is limited to me, and I did not want to spend more time on debugging, I copied over the text and media from the failing to the working instance and made the second one my main instance.
So now I have a working WordPress installation with BTEV and can start analyzing my issues with WPG2, which started the whole thing.Thanks for your support (and for the great plugin, of course)
Regards
Ulrich
Forum: Plugins
In reply to: [BTEV] [Plugin: BTEV] Errors when activating plugin in WP 3.2.1Hi Michael,
thanks for your answer.
I did not enable anything in BTEV, as I was not able to activate it without making WordPress completely unusable (I got the error messages above for all pages after enabling BTEV).
Strangely, when I set up a second WordPress instance and installed all plugins I have in my main instance, I did not get any errors. So I will investigate further.Regards
Ulrich