snookersky
Forum Replies Created
-
@all who are missing this feature:
I digged a little bit in this “last” knowing-as-good-version, and changed accordingly some lines in just 2 files in the last NGG version (2.1.10), so now I can use this feature again. Here is the solution:
Go to the directory:
nextgen-gallery/products/photocrati_nextgen/modules/ngglegacy
1. patch-file for
lib/post-thumbnail.php
:
--- post-thumbnail.php.ORG 2015-09-04 01:42:47.675002250 +0200 +++ post-thumbnail.php 2015-09-04 01:57:57.676001154 +0200 @@ -172,10 +172,16 @@ // delete the image if ( $thumbnail_id == '-1' ) { delete_post_meta( $post_ID, '_thumbnail_id' ); - die('0'); + die( $this->_wp_post_thumbnail_html() ); } - die(strval(C_Gallery_Storage::get_instance()->set_post_thumbnail($post_ID, $thumbnail_id))); + // for NGG we look for the image id + if ( $thumbnail_id && nggdb::find_image($thumbnail_id) ) { + // to know that we have a NGG image we add "ngg-" before the id + update_post_meta( $post_ID, '_thumbnail_id', 'ngg-' . $thumbnail_id ); + die( $this->_wp_post_thumbnail_html( $thumbnail_id ) ); + } + die( '0' ); } /**
2. patch-file for
admin/media-upload.php
--- media-upload.php.ORG 2015-09-04 01:42:17.199002240 +0200 +++ media-upload.php 2015-09-04 01:59:03.474002242 +0200 @@ -151,11 +151,10 @@ jQuery('a.ngg-post-thumbnail-standin').each(function() { jQuery(this).hide(); }); $link.hide(); - var $dummy = $link.next(); - $dummy.attr('id', 'wp-post-thumbnail-' + str); - $dummy.show(); - - WPSetAsThumbnail(str, nonce); + // set some id as meta input filed + win.WPSetThumbnailID('ngg-' + id); + // replace the meta box with the image + win.WPSetThumbnailHTML(str); } } );
You need just to apply the patches for each file above:
$ patch file < file.patch
V1.9.13 – 06.11.2013
WP’s own media management is still not strong enough for my needs – that’s why I choosed NGG in the first place. Not only the possibility of having the pictures grouped in galleries and albums, but also the nice thumb edit function was the reason, so one can choose only a part from the image as thumbnail. This was for years the featured image in my blog: adding media from NGG, selecting it as “featured image” and inserting it into the post (shortcode). Now after upgrading, not only that each image is copied (duplicated), but I am just able to get the featured image thumb from WP, cropped only from the middle of the picture. NGG’s thumb edit function seems to have no real usage anymore… May be I am wrong, not knowing in depth NGG, but for my used case, not. Furthermore, I am not willing to add any “Feature Request” for the Pro-version, as long as this behaviour was already implemented in previous versions for free.
Quite dissapointed,
snookerskyI’ve found only the root cause of “white screen of death” after reset – it was the other plugin. But this didn’t affect the thumbnail sort…
Sorry… You’re right… But no new topic, because I found already the topic and the solution: Cause was another plugin “WPtouch mobile plugin”
Only that it was frustrating, finding here a solution (reset) and after that, clicking the button, facing a “white screen of death”…Deactivating WPtouch helped in my case.
!!! AFTER RESET I HAD A WHITE SCREEN OF DEATH !!!
Forum: Fixing WordPress
In reply to: Update to 3.5 disables the visual editor for posts and pagesYou did exactly the same thing I did.
But, as other contributors here already mentioned, there could be also other causes for this problem.Forum: Fixing WordPress
In reply to: Update to 3.5 disables the visual editor for posts and pagesI didn’t install anything – just overwrote i18n stuff of tinymce. From the URL above, I’ve selected the corresponding language pack and downloaded the resulting file (Download button below all languages):
tinymce_language_pack.zip
Then, I’ve unziped it into the directory:
wp-includes/js/tinymce
Thought it is obvious… sorry.
snookersky
Forum: Fixing WordPress
In reply to: Update to 3.5 disables the visual editor for posts and pagesFinaly I found the reason: it was no WP core topic, as assumed, but the automatical WP-update procedure didn’t updated the tinymce i18n-stuff as well. Since tinymce is included in WP, this step has to be done manually.
https://www.tinymce.com/i18n/?ctrl=lang
In my first tries (see above, 3.), I’ve copied only tinymce core stuff, that’s why I didn’t solve the problem then. Sorry for the inconvenience.
Best regards,
snookerskyForum: Fixing WordPress
In reply to: Update to 3.5 disables the visual editor for posts and pagesMay be I didn’t mention everything I did, because it was no use for me (js-debugger didn’t had errors) And sorry not to mention, what I didn’t: I did not try to edit the .htaccess, because I have none. And I *really* have deactivated all plugins. Should I remove them? That would be very annoying – because I would lose my own settings in most of them. I have also changed to the TwentyEleven theme, but the editor in the administration panel didn’t changed at all – is obviously still broken. In the first place, I suspected my plugin “CKEditor”, but even removing this one, was w/o success… Any forum is pointing to the “master” list. But, believe me, even if it’s a closed topic there, they did NOT mention any failure! Not this one!
If no solution appears these days I will have to change the CMS. With no possibility to edit my stuf, WP is useless to me ?? I am really sorry for that!
snookersky
Forum: Fixing WordPress
In reply to: Site dissappears with IE9Sorry… I just found the bug. In the error.log was:
PHP Fatal error: Call to undefined function pl_detect_ie() in PATH_TO_SITE/wp-content/plugins/browser-css/browser-css.php on line 256
So I just had to remove the plugin that promissed to adjust CSS for all browsers ??snookersky