i know this is a bit of a weird question but its a real time saver
so if you got any ideas (even partial) i would really apreacate them :)
Ok... so i am using wordpress built in interface to capture and disply
remote website images... here is the shortcode i am using..
/*********************************************************************
** SNAPSHOTS
*********************************************************************/
function wpr_snap($atts, $content = null) {
extract(shortcode_atts(array(
"snap" => 'http://s.wordpress.com/mshots/v1/',
"url" => 'http://www.sagive.co.il',
"alt" => 'My image',
"w" => '400', // width
"h" => '300' // height
), $atts));
$img = '<img src="' . $snap . '' . urlencode($url) . '?w=' . $w . '&h=' . $h . '" alt="' . $alt . '"/>';
return $img;
}
add_shortcode("snap", "wpr_snap");
(How to use this: http://wordpress.stackexchange.com/a/38293/7990) .
thats easy no problem.. but - what if i want to integrate it with lightbox.. since its not an image hosted on my website is ther any way to access that images or even write somthing that would upload the image and make it the feautred image of that specific post (a strech i know) or maybe store it elsewhere somehow? (without a plugin)..
to try and grab the image i have made a second shortcode that does the same snapshot but doesnt wrap inside image tag for the href with the lightbox class..
.
this is the line in the theme:
<a class="lightImages" href="<?php echo do_shortcode('[snapurl url="http://www.sagive.co.il"]'); ?>"><?php echo do_shortcode('[snap url="http://www.sagive.co.il" w="175px" h="125px" alt="'.get_the_title().'"]'); ?></a>
.
any ideas?
