Advanced search  

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

Pages: [1]   Go Down

Author Topic: create hotlink back to page not image  (Read 8086 times)

0 Members and 1 Guest are viewing this topic.

ryan

  • Coppermine newbie
  • Offline Offline
  • Posts: 13
create hotlink back to page not image
« 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.

Code: [Select]
<?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;
}
?>


Logged

Hein Traag

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: nl
  • Offline Offline
  • Gender: Male
  • Posts: 2166
  • A, B, Cpg
    • Personal website - Spintires.nl
Re: create hotlink back to page not image
« Reply #1 on: June 11, 2008, 08:32:11 am »

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

ryan

  • Coppermine newbie
  • Offline Offline
  • Posts: 13
Re: create hotlink back to page not image
« Reply #2 on: June 13, 2008, 03:22:21 pm »

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
Logged

Nibbler

  • Guest
Re: create hotlink back to page not image
« Reply #3 on: June 13, 2008, 03:29:20 pm »

Try:

Code: [Select]
<?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;
}
?>

Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: create hotlink back to page not image
« Reply #4 on: June 13, 2008, 06:03:06 pm »

It's in the plugin pack zip file.
The plugin pack goes unsupported...
Logged

sranje

  • Coppermine newbie
  • Offline Offline
  • Posts: 7
Re: create hotlink back to page not image
« Reply #5 on: June 14, 2008, 08:49:44 am »

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!

Logged

sranje

  • Coppermine newbie
  • Offline Offline
  • Posts: 7
Re: create hotlink back to page not image
« Reply #6 on: June 14, 2008, 09:14:40 am »

Well, capcha issue solved, there was some empty lines at the end of codebase.php
This is the fixed version.
Logged
Pages: [1]   Go Up
 

Page created in 0.02 seconds with 23 queries.