forum.coppermine-gallery.net
Support => cpg1.5.x Support => cpg1.5 plugins => Topic started by: Shane on February 11, 2011, 03:35:54 am
-
site: http://shaneandpamela.com/cpg
I'm looking for a plugin that will create a BB code snippet that can be copied from my CPG and pasted into forums. This snippet would be populated below the image on the output of displayimage.php. I would like the code to generate the thumbnail with a direct link to the full sized image. Something like:
[url=link to full size image][img]link to thumbnail image[/img][/url]
example from my site would be:
[url=http://shaneandpamela.com/cpg/albums/userpics/10001/2011_Caddo_Lake_Trip_20110129_024.JPG][img]http://shaneandpamela.com/cpg/albums/userpics/10001/thumb_2011_Caddo_Lake_Trip_20110129_024.JPG[/img][/url]
Is there anything like this out there already? I can't seem to find it. Thanks for any help!
Shane
-
Answered my own post...
Installed the BBCode Control (more bbcodes, buttons and adjustment) for cpg1.5.x (http://forum.coppermine-gallery.net/index.php/topic,57432.0.html) plugin
Enabled "Show pre-built BBCode in file info" on the plugin config
Edited codebase.php to the following:
function embed_code($info) {
global $CONFIG;
if ($CONFIG['bbcode_control_tag_img_embed_code'] == 1)
{
global $CURRENT_PIC_DATA;
//$url = $CONFIG['ecards_more_pic_target'].'displayimage.php?pid='.$CURRENT_PIC_DATA['pid'];
$url = $CONFIG['ecards_more_pic_target'].get_pic_url($CURRENT_PIC_DATA);
$thumb = '[img]'.$CONFIG['ecards_more_pic_target'].get_pic_url($CURRENT_PIC_DATA, 'thumb').'[/img]';
$info['BBCode'] = '<textarea onfocus="this.select();" onclick="this.select();" class="textinput" rows="1" cols="64" wrap="off" style="overflow:hidden; height:15px;">[url='.$url.']'.$thumb.'[/url]</textarea>';
}
return $info;
}
-
Thanks for this, but how do I have to change the code if I want the link to get to the intermediate page and not the full size image. Hope you get what I mean. Any help would be appreciated.
-
Just use the unmodified code.