forum.coppermine-gallery.net

Support => cpg1.4.x Support => Older/other versions => cpg1.4 plugins => Topic started by: Stramm on July 29, 2006, 01:17:11 pm

Title: bbcode URL below intermediate image
Post by: Stramm on July 29, 2006, 01:17:11 pm
this plugin adds the fullsize image url below the intermediate image in bbcode img tags (http://)
check the code... you can let it display bbcode for thumb/ intermediate too
Title: Re: bbcode URL below intermediate image
Post by: clothahump on August 11, 2006, 10:42:58 am
Where do I adjust the settings, unable to see anything in the admin panel?
Is there any way to create code such as this so members can just cut and paste the code into Forums?
Code: [Select]
[url=FULL SIZED IMAGE][img]THUMBNAIL[/img][/url]
Title: Re: bbcode URL below intermediate image
Post by: Stramm on August 11, 2006, 10:51:04 am
have a look at codebase.php
Title: Re: bbcode URL below intermediate image
Post by: clothahump on August 11, 2006, 11:28:02 am
404 Not Found???
Title: Re: bbcode URL below intermediate image
Post by: Stramm on August 11, 2006, 12:12:59 pm
you downloaded a zip, unpack it, have a look at the stuff you just unzipped, one of the two files in here's codebase.php... open/ edit with notepad
Title: Re: bbcode URL below intermediate image
Post by: clothahump on August 11, 2006, 12:59:02 pm
Is codebase.php supposed to be in Root or in Plugins?
Title: Re: bbcode URL below intermediate image
Post by: Stramm on August 11, 2006, 01:13:23 pm
as mentioned in the docs, plugins reside in their own folder within the plugins folder. To install this plugin you should extract it into the plugins dir

http://coppermine-gallery.net/demo/cpg14x/docs/index.htm#plugin
Title: Re: bbcode URL below intermediate image
Post by: clothahump on August 11, 2006, 01:20:20 pm
Installed via pluginmgr.php and it does not work, I can see the edited file in plugins/img_lnk/codebase.php but if you try to call this up you get Not in Coppermine...
Title: Re: bbcode URL below intermediate image
Post by: clothahump on August 11, 2006, 01:28:31 pm
http://www.digitalgalleryhosting.com/inebg/index.php
Uninstalled, deleted, reinstalled still does not show.
Title: Re: bbcode URL below intermediate image
Post by: Stramm on August 11, 2006, 01:37:56 pm
it's your theme... default text color is white and the image table bg is white too
you can change that to fit your needs in codebase.php. Depending on your needs eg
Code: [Select]
$pic_data['html'] = $pic_data['html'].'<br><span class="you decide_and_put_it_in_the_css">[IMG]'.$CONFIG['ecards_more_pic_target'].$fullsize_url.'[/IMG]</span><br>';
Title: Re: bbcode URL below intermediate image
Post by: clothahump on August 11, 2006, 01:47:53 pm
So you need a theme that will allow you to see the text, that sort of makes the others Themes obsolete?
I have reverted the default theme to Classic, it now shows in intermediate image but not in thumb or full image???
Title: Re: bbcode URL below intermediate image
Post by: Stramm on August 11, 2006, 01:52:26 pm
if you define a class for the text as suggested in my last post you can use it how and where you want

your last question... please have a look at the topic
Title: Re: bbcode URL below intermediate image
Post by: clothahump on August 11, 2006, 01:59:15 pm
This topic?
I have edited the codebase.php if that is what you mean?
Title: Re: bbcode URL below intermediate image
Post by: Stramm on August 11, 2006, 02:01:32 pm
topic: bbcode URL below intermediate image

and the edit... you replace class="you decide_and_put_it_in_the_css" with whatever class name you want and apply it to your css accordingly
Title: Re: bbcode URL below intermediate image
Post by: clothahump on August 11, 2006, 02:03:38 pm
if you define a class for the text as suggested in my last post you can use it how and where you want

your last question... please have a look at the topic


I am not a php programmer Stramm so do not know how to define a class.........
Title: Re: bbcode URL below intermediate image
Post by: Stramm on August 11, 2006, 02:09:21 pm
that hasn't to do much with programming. That's html and css
In your themes dir find style.css and add the following if the class name you refer to is some_class

Code: [Select]
.some_class
{
color: #000000;
font-size: 10px;
}


then you need to have in codbase.php class="some_class"
Title: Re: bbcode URL below intermediate image
Post by: clothahump on August 11, 2006, 02:26:54 pm
That did not work, I give up.
Let me know when this works please.
Title: Re: bbcode URL below intermediate image
Post by: clothahump on August 11, 2006, 02:40:50 pm
I have set the theme to igames with choice of themes disabled, is there any way we can implement this.

Code: [Select]
[url=FULL SIZED IMAGE][img]THUMBNAIL[/img][/url]
Title: Re: bbcode URL below intermediate image
Post by: Joachim Müller on August 11, 2006, 02:48:56 pm
Let me know when this works please.
It actually is working, you're just lacking the basic skills needed. Coppermine (and subsequently this plugin) is aimed at webmasters who know how to install a plugin, who are ready to read the docs and who have basic HTML and CSS skills.
If you need basic HTML and CSS teaching, please google for some tutorials on those fields - they aren't related to this plugin, but a pre-requisite. Please do not clutter plugin threads that actually discuss a plugin by asking for pretty basic HTML stuff.
Title: Re: bbcode URL below intermediate image
Post by: clothahump on August 11, 2006, 03:23:22 pm
It actually is working, you're just lacking the basic skills needed. Coppermine (and subsequently this plugin) is aimed at webmasters who know how to install a plugin, who are ready to read the docs and who have basic HTML and CSS skills.
If you need basic HTML and CSS teaching, please google for some tutorials on those fields - they aren't related to this plugin, but a pre-requisite. Please do not clutter plugin threads that actually discuss a plugin by asking for pretty basic HTML stuff.

So very sorry, I did not realise asking for help was against the Law.
Title: Re: bbcode URL below intermediate image
Post by: clothahump 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
}
?>
Title: Re: bbcode URL below intermediate image
Post by: Stramm on August 14, 2006, 08:37:41 am
Why not just add a linebreak </ br> between fullsized and thumb URL?
Title: Re: bbcode URL below intermediate image
Post by: clothahump 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?
Title: Re: bbcode URL below intermediate image
Post by: Stramm 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

Title: Re: bbcode URL below intermediate image
Post by: green4gfx 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 !!!
Title: Re: bbcode URL below intermediate image
Post by: MastiMasti on March 10, 2007, 07:49:29 am

(https://forum.coppermine-gallery.net/proxy.php?request=http%3A%2F%2Fwafakadard.com%2Fcopperminealbums%2Fuserpics%2F10001%2FHimesh-Reshammiya.jpg&hash=76e111f7f38431a4f980a618e193ad7fdd4b6a29)


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?????
Title: Re: bbcode URL below intermediate image
Post by: Stramm 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
Title: Re: bbcode URL below intermediate image
Post by: MastiMasti on March 10, 2007, 09:44:25 am
thanks for quick reply

problem fix now  :) with your help

thanks  :)
Title: Re: bbcode URL below intermediate image
Post by: ds 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. :)

Title: Re: bbcode URL below intermediate image
Post by: Deadfire on May 11, 2007, 09:22:04 pm
My questions are only about this screen shot here:

(https://forum.coppermine-gallery.net/proxy.php?request=http%3A%2F%2Fimg82.imageshack.us%2Fimg82%2F6232%2Funtitleddl4.png&hash=23e389cd07a66ff24c4f9016a5e829ebee271cb9)

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?
Title: Re: bbcode URL below intermediate image
Post by: ds 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.
Title: Re: bbcode URL below intermediate image
Post by: Deadfire 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
Title: Re: bbcode URL below intermediate image
Post by: Joachim Müller 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 (http://forum.coppermine-gallery.net/index.php?topic=36302.0) 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
Title: Re: bbcode URL below intermediate image
Post by: Stramm on July 20, 2007, 02:28:50 pm
Yes, you're absolutely right.