transparencia
Forum Replies Created
-
Forum: Plugins
In reply to: [Simple Lightbox] [Plugin: Simple Lightbox] Lightbox Max Size ImageOk, here’s a solution (hack) to limit the images max size that uses the WordPress Media ‘Large’ size. (Note: You have to make sure that you go go Settings -> Media and set a width and a height on the large field. I use 750×500 and it works great!)
In /model.php insert this code in line 687 (before “Update Link in Content):
//Replace the Image URL with the 'large' sized one $image_src = $attr['href']; $wpdb->query( $wpdb->prepare(" SELECT ID FROM {$wpdb->posts} WHERE guid = %s ", $image_src ) ); $att_id = $wpdb->get_var($query); if ($att_id) { $image_large_attr = wp_get_attachment_image_src($att_id, 'large'); $attr['href'] = $image_large_attr[0]; }In line 1092 of /model.php add the text “large” inside the empty apostrophes:
$d = wp_get_attachment_image_src($att->ID, 'large');I’m not a coder and this code is probably not the best but it works!
Forum: Plugins
In reply to: [Simple Lightbox] [Plugin: Simple Lightbox] Lightbox Max Size ImageArchetyped, what about using SLB with the wordpress media sizes (the ones we choose at Settings -> Media), letting the user choose which one or automatically choose the ‘large’ one.
We could tell the script to use the ‘large’ by using this function:
<?php wp_get_attachment_image_src( $attachment_id, $size = 'large', $icon ); ?>http://codex.wordpress.org/Function_Reference/wp_get_attachment_image_src
This would return an array with the URL, width and height.
What do you think?
Forum: Plugins
In reply to: [Simple Lightbox] [Plugin: Simple Lightbox] Using with custom post typesOf course! Than you so much, Archetyped!!
Here’s the code in case if anyone needs it:
function gpp_gallery_images() { global $post_type; if ($post_type == 'gallery') { $content = $content.'[gallery]'; } return $content; } add_filter('the_content', 'gpp_gallery_images');PS: Now I just need one last thing to make it perfect…
Forum: Plugins
In reply to: [Simple Lightbox] [Plugin: Simple Lightbox] Using with custom post typesThis is what I’m doing:
function gpp_gallery_images($size='large') { global $post_type; if ( $post_type == 'gallery' ) echo do_shortcode('[gallery]');; // Returns the content. return $content; } add_filter( 'the_content', 'gpp_gallery_images', 20 );And it doesn’t work… Do you have any suggestions?
Forum: Plugins
In reply to: [Simple Lightbox] [Plugin: Simple Lightbox] Using with custom post typesThank you so much for the interest, Archetyped 🙂
Here you go:
This is a custom post type gallery that uses the regular wordpress gallery shortcode. The .php function behind this only has this:
echo do_shortcode('[gallery]');I figured this out. It’s just a matter of adding wp_cache_clear_cache() whenever the theme updates its options.
Just one question to Donncha, in WPMU (Multisite) using wp_cache_clear_cache() affects only a given website, not the entire network, right?
I figured it out. It is actually quite use, just using wp_cache_clear_cache() whenever the theme updates options.
But I have a question though, in WPMU (Multisite), wp_cache_clear_cache() affects only a given website, not the entire network, right?
GoodNewsDesign, does your plugin rebuilds the website’s complete cache when the theme is changed?
That’s exactly what I wanted to do!
Can you show me your code, please?
Forum: Fixing WordPress
In reply to: Flash uploader returns an attachment ID only, instead of thumbnailI really need to solve this. Anyone else has ideas?
Forum: Fixing WordPress
In reply to: Flash uploader returns an attachment ID only, instead of thumbnailI’m having the same exact problem.
Did you ever found a way around it?
Forum: Fixing WordPress
In reply to: WordPress 3 UTF-8 file names = trouble?I’ve got the exact same problem!
If I use for example a video file “Caça.MP4” in the filename and I upload it gets written to the files folder as “caça” (checking it using FTP). Checking the file name using SSH it reads “ca\303\247a.mp4”.
Now the strange part, if I access it directly through the browser using http://mywebsite.com/files/2011/04/Caça.mp4 it works! But if I try to play it using a flash player, it doesn’t work!
What can be wrong??