Advanced search  

News:

cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.
[more]

Pages: 1 [2]   Go Down

Author Topic: bbcode URL below intermediate image  (Read 22767 times)

0 Members and 1 Guest are viewing this topic.

clothahump

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 42
Re: bbcode URL below intermediate image
« Reply #20 on: August 11, 2006, 08:38:20 pm »

Stramm, this is for you, took me a while to sort it out but it works, Just need to find some way to shorten the resulting code as it spreads the page.

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);
      
$thumb_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'].$fullsize_url.'][IMG]'.$CONFIG['ecards_more_pic_target'].$thumb_url.'[/IMG][/url]<br>'
return $pic_data
}
?>
Logged

Stramm

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: 00
  • Offline Offline
  • Gender: Male
  • Posts: 6006
    • Bettis Wollwelt
Re: bbcode URL below intermediate image
« Reply #21 on: August 14, 2006, 08:37:41 am »

Why not just add a linebreak </ br> between fullsized and thumb URL?

clothahump

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 42
Re: bbcode URL below intermediate image
« Reply #22 on: August 14, 2006, 08:48:03 am »

That results with the thumb showing but the link code to the full sized image remains as viewable code on the page.
Had we better discuss this in another thread before we get told off again?
Logged

Stramm

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: 00
  • Offline Offline
  • Gender: Male
  • Posts: 6006
    • Bettis Wollwelt
Re: bbcode URL below intermediate image
« Reply #23 on: August 14, 2006, 08:53:19 am »

you always can ask questions on the plugins board http://forum.coppermine-gallery.net/index.php?board=53.0

green4gfx

  • Coppermine newbie
  • Offline Offline
  • Gender: Male
  • Posts: 14
    • green4gfx
Re: bbcode URL below intermediate image
« Reply #24 on: September 11, 2006, 02:32:17 pm »

it is posible to get the thumb whit the filepath ?
i mean the position link in the gallery

// wenn ich das link plug in instaliere wird die code abfrage von Captcha nich mehr angezeigt !!!
« Last Edit: September 11, 2006, 03:23:10 pm by green4gfx »
Logged
[

MastiMasti

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 23
Re: bbcode URL below intermediate image
« Reply #25 on: March 10, 2007, 07:49:29 am »


(http://wafakadard.com/copperminealbums/userpics/10001/Himesh-Reshammiya.jpg)


Hey I just send to you PM  about this

I am having a problem

I am getting this link


 http://wafakadard.com/copperminealbums/userpics/10001/Himesh-Reshammiya.jpg
I am gettign IMG code right but  not "/"

 http://wafakadard.com/coppermine/albums/userpics/10001/Himesh-Reshammiya.jpg

I am missing this "/" between gallery name and ALBUM

so how can I fix that?????
Logged

Stramm

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: 00
  • Offline Offline
  • Gender: Male
  • Posts: 6006
    • Bettis Wollwelt
Re: bbcode URL below intermediate image
« Reply #26 on: March 10, 2007, 08:13:03 am »

no PMs unless requested

your problem isn't a plugin prblem. You just need to properly setup your gallery. Eg. mail confirmations / links in mails shouldn't work also

-> config - general - URL of your coppermine gallery folder
as suggested in the instructions a slash needs to follow the path

MastiMasti

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 23
Re: bbcode URL below intermediate image
« Reply #27 on: March 10, 2007, 09:44:25 am »

thanks for quick reply

problem fix now  :) with your help

thanks  :)
Logged

ds

  • Coppermine newbie
  • Offline Offline
  • Posts: 7
Re: bbcode URL below intermediate image
« Reply #28 on: May 09, 2007, 05:10:24 am »

Hi there,

I've slightly modified this plugin to fit my needs and I thought I should post my findings here for anyone that may have a similar problem aswell as for Stramm to have a look at it and maybe give me some pointers.

Before I post my code, let me talk you through my scenario:

- I only wish to display the url of the intermediate picture below it. (that's no problem at all by editing the codebase.php)


Once I had done that I noticed something:

- If an image was too small to have an intermediate image created, the link wouldn't work!


So here is my updated solution. I check if the intermediate image exists and if it doesn't it shows the image path to the original image (which is the fullsize_url). On top of that I put the code into a text field to avoid lengthy urls to break the page layout and added a little javascript to autohighlight the whole code once clicked so it can easily be copied to the clipboard.

I've added info to the code to it's simple to see what I've done. I hope this comes in helpful to some users.


Here is the codebase.php code:


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;

//you can grab intermediate and thumb URL to just comment out what you need and add the var below

// this is the fullsize image url
$fullsize_url get_pic_url($pic_data); 

// this is the thumbnail URL 
// Edited out as not needed in standard
//$thumb_url = get_pic_url($pic_data, 'thumb'); 

// this is the intermediate picture
$normal_url get_pic_url($pic_data'normal'); 

//
// start check for small images (if no intermediate created)
// if intermediate pic exists, show it
if (file_exists($normal_url)) { 

$pic_data['html'] = $pic_data['html'].'<div align="center"><form name="links"><br /><b>To post this image in forums, please click and copy the code below:</b><br /><br /><input name="normal" class="textinput" value="[IMG]'.$CONFIG['ecards_more_pic_target'].$normal_url.'[/IMG]" size="80" type="text" onClick="javascript:this.form.normal.focus();this.form.normal.select();"><br /></form></div>'

} else { // if the image was too small for intermediate picture to have been created, show original full url

$pic_data['html'] = $pic_data['html'].'<div align="center"><form name="links"><br /><b>To post this image in forums, please click and copy the code below:</b><br /><br /><input name="normal" class="textinput" value="[IMG]'.$CONFIG['ecards_more_pic_target'].$fullsize_url.'[/IMG]" size="80" type="text" onClick="javascript:this.form.normal.focus();this.form.normal.select();"><br /></form></div>';

}

// end check
//

return $pic_data//page output
}
?>



Many thanks to Stramm for his work on all these great plugins. :)

Logged

Deadfire

  • Coppermine newbie
  • Offline Offline
  • Posts: 3
Re: bbcode URL below intermediate image
« Reply #29 on: May 11, 2007, 09:22:04 pm »

My questions are only about this screen shot here:

(http://img82.imageshack.us/img82/6232/untitleddl4.png)

1. Why would this pop up happen when I have used a copy button many times before on firefox and nothing of this sort appeared.

2. It seems to have "security" spelt wrong

3. Where in the world can I remove this and/or change it?
Logged

ds

  • Coppermine newbie
  • Offline Offline
  • Posts: 7
Re: bbcode URL below intermediate image
« Reply #30 on: May 11, 2007, 10:11:04 pm »

Hi Deadfire,

I think this is the wrong topic for your plugin. The one you mean is this one: http://forum.coppermine-gallery.net/index.php?topic=36302.0
The one here doesn't use the copy buttons ;-)

The first post  in the above topic explains the security settings for Firefox.
Logged

Deadfire

  • Coppermine newbie
  • Offline Offline
  • Posts: 3
Re: bbcode URL below intermediate image
« Reply #31 on: May 11, 2007, 10:23:16 pm »

Heh, it appears that I am in the wrong thread thanks for the notice DS

Disregard as well then
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: bbcode URL below intermediate image
« Reply #32 on: July 20, 2007, 08:36:39 am »

@Stramm: as far as I can see, copy/ paste bbcode img URL below intermediate image v1.1 is an update to this plugin.
If this is correct, this thread should be moved from the contributions board to the regular plugin board imo, as it doesn't make sense to keep outdated plugins in the contrib folder - chances are high that the older version will be used simply because users are not aware that the is a newer version available.

Joachim
Logged

Stramm

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: 00
  • Offline Offline
  • Gender: Male
  • Posts: 6006
    • Bettis Wollwelt
Re: bbcode URL below intermediate image
« Reply #33 on: July 20, 2007, 02:28:50 pm »

Yes, you're absolutely right.
Pages: 1 [2]   Go Up
 

Page created in 0.021 seconds with 19 queries.