forum.coppermine-gallery.net
Support => cpg1.4.x Support => Older/other versions => cpg1.4 plugins => Topic started by: ryan on June 11, 2008, 08:19:56 am
-
somone made the imglnk plugin, but it only creates bb code to the image.
I'd like to show the image and have it link back to my displayimage page. Everyone just talks about linking it back directly to the image.
<?php
if (!defined('IN_COPPERMINE')) die('Not in Coppermine...');
// Add a filter
$thisplugin->add_filter('file_data','imglnk_add_data');
function imglnk_add_data($pic_data){ //$pic_data
global $CONFIG;
//$fullsize_url = get_pic_url($pic_data);
//you can grab intermediate and thumb URL to just comment out what you need and add the var below
//$thumb_url = get_pic_url($pic_data, 'thumb');
$normal_url = get_pic_url($pic_data, 'normal');
$pic_data['html'] = $pic_data['html'].'<br>[IMG]'.$CONFIG['ecards_more_pic_target'].$normal_url.'[/IMG]<br>';
return $pic_data;
}
?>
-
And which plugin is this exactly ? can't find it.
-
It's in the plugin pack zip file. It's called img_lnk
bbcode URL below intermediate image
this plugin adds the fullsize image url below the intermediate image in bbcode img tags
check the code... you can let it display bbcode for thumb/ intermediate too
http://coppermine-gallery.net/forum/index.php?topic=34354.0
-
Try:
<?php
if (!defined('IN_COPPERMINE')) die('Not in Coppermine...');
// Add a filter
$thisplugin->add_filter('file_data','imglnk_add_data');
function imglnk_add_data($pic_data){ //$pic_data
global $CONFIG;
//$fullsize_url = get_pic_url($pic_data);
//you can grab intermediate and thumb URL to just comment out what you need and add the var below
//$thumb_url = get_pic_url($pic_data, 'thumb');
$normal_url = get_pic_url($pic_data, 'normal');
$pic_data['html'] = $pic_data['html'].'<br>[URL='.$CONFIG['ecards_more_pic_target'].'displayimage.php?pos=-'.$pic_data['pid'].'][IMG]'.$CONFIG['ecards_more_pic_target'].$normal_url.'[/IMG][/URL]<br>';
return $pic_data;
}
?>
-
It's in the plugin pack zip file.
The plugin pack goes unsupported...
-
Hi,
Attached zip file is the modified bbcode plugin which expands to show the texarea with html thumbnail linking to intermediate page (thanks Nibbler).
It does appear to break the captcha plugin (verification image does not get generated) on my site http://sliderpix.com/displayimage-21.html (http://sliderpix.com/displayimage-21.html) (demo).
This is great plugin for getting traffic!!!
Any ideas for broken captcha are welcome!
-
Well, capcha issue solved, there was some empty lines at the end of codebase.php
This is the fixed version.