create hotlink back to page not image create hotlink back to page not image
 

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

Main Menu

create hotlink back to page not image

Started by ryan, June 11, 2008, 08:19:56 AM

Previous topic - Next topic

0 Members and 2 Guests are viewing this topic.

ryan

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;
}
?>



Hein Traag

And which plugin is this exactly ? can't find it.

ryan

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

Nibbler

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;
}
?>


Joachim Müller

Quote from: ryan on June 13, 2008, 03:22:21 PM
It's in the plugin pack zip file.
The plugin pack goes unsupported...

sranje

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 (demo).
This is great plugin for getting traffic!!!

Any ideas for broken captcha are welcome!


sranje

Well, capcha issue solved, there was some empty lines at the end of codebase.php
This is the fixed version.