Squazz
Forum Replies Created
-
Forum: Plugins
In reply to: [PDF Thumbnails] Thumbnail is created, but not added to PDF fileNoted, I will check op with them 🙂
And thank you for the feedback 😀
Thank you for the very long response. As I see why you have done it, I woul stille like to see something like it is seen with NextGen Galleries, where each action/menu can be set to a “lowest user”.
For each of the filters I have set up, one could set up a option where site admins with the click of a mouse could choose the lowest user who should have acces to say “ninja_forms_admin_submissions_capabilities”.
In the case with filters, I would have to create a function for each user roler that I wanted to edit.
The above is simple because it only is for editors and admins. But if I want to fine tune it even further I would have to create a new function.
If I have to choose between a option-menu inside the plugin, or the filter approach then there is no question for me.
Take into account that I had to search for some time to find the “right” solution to the problem. I have only been working with WordPress for 4 months, so A LOT has to be learned. And I am a developer.
What about small “admins” or private users who would like to do something like the above, but doesn’t know anything about code?They will have to hire a programmer to do this “simple” task for them.
Then again, I could follow your way of doing things, and just create a plugin for it, and then hope you guys would sell it for me at your site 😉 The question is, should people really need to pay for stuff like this?
Forum: Plugins
In reply to: [PDF Thumbnails] Thumbnail is created, but not added to PDF fileAlmost a week went by before i got the time to play around with it.
I am confident I have found some way to get around the problem, I, just don’t know how to implement it, maybe you can help me out here (been working with WP for 4 months now 🙂 )
Apparently, “PDF Thumbnail” is creating and applying the thumbnail after WPML Media is done duplicating the files. At least that what I think, I have to admit that I do not have data to support this theory.
WPML media has a function called synchronize_attachment_metadata which is set up the following way:
global $sitepress; //Update _wp_attachment_metadata to all translations (excluding the current one) $trid = $sitepress->get_element_trid( $attachment_id, 'post_attachment' ); if ( $trid ) { $translations = $sitepress->get_element_translations( $trid, 'post_attachment', true, true, true ); foreach ( $translations as $translation ) { if ( $translation->element_id != $attachment_id ) { update_post_meta( $translation->element_id, '_wp_attachment_metadata', $metadata ); } } }I am then trying to do this in within your function insertThumbnailAttachment:
if(function_exists('synchronize_attachment_metadata')) { synchronize_attachment_metadata($thumbnailMetadata, $attachmentId); }My thought here is, that we make your plugin compatible with WPML Media. we check if WPML Media is installed (with function_exists(‘synchronize_attachment_metadata’) ) and if it is, then call the function than WPML itself uses to “synchronize attachment metadata”
Does this make any sense for you?
If you need the WPML files to look at I am pretty sure that I am allowed to give you the files. They won’t work on an installed without the license key anyway. (We might have to find an another way to communicate then 😛 )
Forum: Plugins
In reply to: [The Events Calendar] Pr. post, specify what to have after metadataThank you so much 🙂
Is this something that at some point would be added natively?
Thank you so much for the kind words 🙂
I have studie computerscience for 2 years, so I do have an idea about what it is that I am doing. But much of the time I use on learning how WordPress handles different aspects, and also how plugin developers are thinking 🙂
And yeah, I have gotten myself into quite a few topics over the last few months 😛
I trust you, I have only been working with WordPress for 4 months 🙂
I hope that at one point the !important tags will be removed, or at least that the load order will be fixed 🙂
Thanks for your time to reply
From the WordPress codex:
“Array of the handles of all the registered scripts that this script depends on, that is the scripts that must be loaded before this script…”
Read more about it here: http://codex.wordpress.org/Function_Reference/wp_enqueue_script#ParametersAs I understand it, the style with the handle “nextgen_basic_thumbnails_style” has to be loaded, not just registered, before things dependend on this handle is being loaded?
With the dependency array(‘nextgen_basic_thumbnails_style’) I ensure just that 🙂 Maybe you should encoporate for when the plugin is looking for the custom styles?
For future readers, if the problem does not get resolved. The following code lets us load the styles after NextGen is done loading everything.
// NextGen gallery fix function NextGen_styles_fix() { wp_enqueue_style( 'NextGen-Responsive', get_stylesheet_directory_uri() . '/styles/nggallery.css', array('nextgen_basic_thumbnails_style') ); } add_action( 'wp_enqueue_scripts', 'NextGen_styles_fix' );Another way to do this that works with all future versions of NextGen Gallery is to style the backend of our wordpress install.
For this exact problem, I created a admin-styles.css file with the following content:
#import_folder { display: none; }And then added the following code to my functions.php file:
if(is_admin()) { /** * call in custom admin stylesheet - this will be global for admin and also login */ add_action( 'admin_print_styles', 'load_custom_admin_css' ); function load_custom_admin_css() { wp_enqueue_style( 'custom_admin_css', get_stylesheet_directory_uri() . '/admin-styles.css' ); } }I hope this will help future readers.
Se more at Jack Goldmans post on this subject
Forum: Plugins
In reply to: [PDF Thumbnails] Thumbnail is created, but not added to PDF fileThanks for your idea! 😀
I will check that out in about 8 hours (when I get to work). Will tell you if I find a solution 🙂
that would solve my problem, but for you as a developer it has to be a letdown that it is needed for other developers to develop plugins that fixes your sloppyness 😉
I will be loooking forward to the point where your plugin is optmized with out 3. party plugins.
Yes, no effect :/
Forum: Plugins
In reply to: [PDF Thumbnails] Thumbnail is created, but not added to PDF fileI’m having some trouble. You can follow the thread here: https://wpml.org/forums/topic/upload-creates-duplicate-in-database/
Will do 🙂