Is there a way that when I upload a picture that there is a http link under the picture?
So I can copy paste the link in the webbrowser so I can see the picture?
It must go automaticly! I don't want to use the right mouse button and copy the link there.
[size=24]NOTE: this is NOT tested! Back up your files first![/size]
{search for}
// Create the absolute URL for display in info
$info['URL'] = '<a href=' . $CONFIG["ecards_more_pic_target"] . '/' . basename($_SERVER['PHP_SELF']) . "?pos=-$CURRENT_PIC_DATA[pid]" . ' >' . $CONFIG["ecards_more_pic_target"] . '/' . basename($_SERVER['PHP_SELF']) . "?pos=-$CURRENT_PIC_DATA[pid]" . '</a>';
// with subdomains the variable is $_SERVER["SERVER_NAME"] does not return the right value instead of using a new config variable I reused $CONFIG["ecards_more_pic_target"] no trailing slash in the configure
{add under}
// Create the image link for display in info
$info['link'] = $picture_url;
Let me know if it worked by posting here :)
/m_aTh!bUs
I'm a bit confused: I always thought that there is a link underneath each picture with the actual url in the pic info section.
Please enlighten me.
GauGau
I think he doesn't mean this url (http://coppermine.sourceforge.net/demo/displayimage.php?pos=-1) but this url:
http://coppermine.sourceforge.net/demo/albums/food/fruit/761_O.jpg
..so the direct link to the image file actually.
/m_aTh!bUs
I wanted to allow people posting pictures to hotlink their images on bulletin boards and forums, so i added the following code where Mathibus suggested:
// Create the image link for display in info
$info['Link'] = "http://".($_SERVER['SERVER_NAME'])."/".$path_to_pic;
This would make a good feature in the next version.
-Kev
Santa Barbara, CA
usually people don't want their pics to be hotlinked at all and request features to make hotlinking impossible.
Will definitely not go into a future version - most users would hate us for such a feature... :wink:
GauGau
:) indeed!
You might want to use the bbCode mod (http://forum.coppermine-gallery.net/index.php?topic=431) to 'put images on bulletin boards and forums' though, which outputs bbCode and is preferably used with the thumbnail...
Quote from: "MaThIbUs":) indeed!
You might want to use the bbCode mod (http://forum.coppermine-gallery.net/index.php?topic=431) to 'put images on bulletin boards and forums' though, which outputs bbCode and is preferably used with the thumbnail...
I use this and it works great. The images that I have are meant to be used on forums so it's amusing to look through the logs and see all of the places that people are using my images.
Quote{add under}
Code:
// Create the image link for display in info
$info['link'] = $picture_url;
This didn't work for me however the second mod code posted
Quote// Create the image link for display in info
$info['Link'] = "http://".($_SERVER['SERVER_NAME'])."/".$path_to_pic;
But I had to change the
NAME'])."/".$path_to_pic;
to
NAME'])."/gallery/".$path_to_pic;
to get the link correct because I have my coppermine in it own folder named /gallery/ and it woudn't show up in the link at all unless I added the /gallery/ to the code ..
However I am wondering if there a code to make the whole path clickable link to image?
Thanks
Bill
// Create the image link for display in info
$info['Link'] = <a href=\".http://".($_SERVER['SERVER_NAME'])."/gallery/".$path_to_pic\">http://".($_SERVER['SERVER_NAME'])."/gallery/".$path_to_pic."</a>";
[size=24]not tested[/size]
How do I make;
// Create the image link for display in info
$info['Link'] = "http://".($_SERVER['SERVER_NAME'])."/".$path_to_pic;
Into a link as well as a text output?
I can't get this to work. Is there a PHPmyAdmin query I need to run?
When I click on an individual photo in an album ( http://www.inxplicable.org/gallery/thumbnails.php?album=1 ), I get this error:
Parse error: parse error in /home/inxplic/public_html/gallery/displayimage.php on line 280
Help? ???
parse error means you haven't applied the modifications properly (it's a most basic php syntax error). Undo all your changes (start with a fresh copy of the file you modified) and make sure to carefully apply the modifications, or copy'n paste lines 270 to 290 of your displayimage.php into your posting.
There's no database query to be run anyway...
GauGau
Still not working. Now it says the error is on line 279 though. Heh. ??? Here is roughly the section you asked for (actually lines 267 to 293, if it matters). I'm using the bit of code from MaThIbUs from reply #9 above.
if (isset($exif) && is_array($exif)) {
if (isset($exif['Camera'])) $info[$lang_picinfo['Camera']] = $exif['Camera'];
if (isset($exif['DateTaken'])) $info[$lang_picinfo['Date taken']] = $exif['DateTaken'];
if (isset($exif['Aperture'])) $info[$lang_picinfo['Aperture']] = $exif['Aperture'];
if (isset($exif['ExposureTime'])) $info[$lang_picinfo['Exposure time']] = $exif['ExposureTime'];
if (isset($exif['FocalLength'])) $info[$lang_picinfo['Focal length']] = $exif['FocalLength'];
if (isset($exif['Comment'])) $info[$lang_picinfo['Comment']] = $exif['Comment'];
}
// Create the absolute URL for display in info
$info['URL'] = '<a href=' . $CONFIG["ecards_more_pic_target"] . '/' . basename($_SERVER['PHP_SELF']) . "?pos=-$CURRENT_PIC_DATA[pid]" . ' >' . $CONFIG["ecards_more_pic_target"] . '/' . basename($_SERVER['PHP_SELF']) . "?pos=-$CURRENT_PIC_DATA[pid]" . '</a>';
// with subdomains the variable is $_SERVER["SERVER_NAME"] does not return the right value instead of using a new config variable I reused $CONFIG["ecards_more_pic_target"] no trailing slash in the configure
// Create the image link for display in info
$info['Link'] = <a href=\".http://".($_SERVER['SERVER_NAME'])."/gallery/".$path_to_pic\">http://".($_SERVER['SERVER_NAME'])."/gallery/".$path_to_pic."</a>";
// Create the add to fav link
if (!in_array($CURRENT_PIC_DATA['pid'], $FAVPICS)) {
$info[$lang_picinfo['addFavPhrase']] = "<a href=addfav.php?pid=" . $CURRENT_PIC_DATA['pid'] . " >" . $lang_picinfo['addFav'] . '</a>';
} else {
$info[$lang_picinfo['addFavPhrase']] = "<a href=addfav.php?pid=" . $CURRENT_PIC_DATA['pid'] . " >" . $lang_picinfo['remFav'] . '</a>';
}
return theme_html_picinfo($info);
}
// Displays comments for a specific picture
function html_comments($pid)
{
global $CONFIG, $USER, $CURRENT_ALBUM_DATA, $comment_date_fmt, $HTML_SUBST;
global $template_image_comments, $template_add_your_comment, $lang_display_comments;
$info['Link'] = <a href=\".http://".($_SERVER['SERVER_NAME'])."/gallery/".$path_to_pic\">http://".($_SERVER['SERVER_NAME'])."/gallery/".$path_to_pic."</a>";
is of course causing a parse error - in fact the whole line is crap (since it doesn't respect any coppermine or coding conventions at all), but without further looking into if obviously the double quote at the beginning of the string is missing:$info['Link'] = "<a href=\".http://".($_SERVER['SERVER_NAME'])."/gallery/".$path_to_pic\">http://".($_SERVER['SERVER_NAME'])."/gallery/".$path_to_pic."</a>";
I think MaThIbUs' code should have been put here in the first place, since hard-coding the path "gallery" into the script is bull.
If you want my opinion: forget about this hack...
GauGau
Do you have an alternative? It's actually rather important. The gallery will be for Live Journal icons, and having the direct URL to the image allows you to easily load them into your LJ user pics section. LJ has an "upload from URL" feature for the user pics, which - if there's a way to include the direct URLs in Coppermine - would mean people would never have to save the icons to their hard drive, making it faster and less of a hassle.
Please tell me there's a way to do this... :-\
This seems pretty simple to do. However, what file do I have to edit?
Quote from: MaThIbUs on January 14, 2004, 08:28:15 PM
{search for}
// Create the absolute URL for display in info
$info['URL'] = '<a href=' . $CONFIG["ecards_more_pic_target"] . '/' . basename($_SERVER['PHP_SELF']) . "?pos=-$CURRENT_PIC_DATA[pid]" . ' >' . $CONFIG["ecards_more_pic_target"] . '/' . basename($_SERVER['PHP_SELF']) . "?pos=-$CURRENT_PIC_DATA[pid]" . '</a>';
// with subdomains the variable is $_SERVER["SERVER_NAME"] does not return the right value instead of using a new config variable I reused $CONFIG["ecards_more_pic_target"] no trailing slash in the configure
{add under}
// Create the image link for display in info
$info['link'] = $picture_url;
Can anyone help me with this? I just need the name of the file that needs editing for me to have this feature.
- thanx
Still waiting for a reply. I really need this.
What is the name of the file I have to edit?
Does anybody know?
You could do a search for text in the files in the coppermine folder.
Okay I think this is what I want, but can some one please simplify the process for me.
I have coppermine 1.3.2
Display URL link as *.jpg instead of postion=-2
And copying of the URL to clipboard function
Thanks for you help in avdance, please be gentle I am new.
Thanks
Wayne
Using b2evolution for family blog, needed a media library. Played around with a few, tried Coppermine, found it really good. Thanks to the developers.
Anyway, don't know much about intergrating with b2evo but all I needed was a way to copy-and-paste the thumbnail with a link to the pic in the album, read this post, grepped a few of the php files so this is what I have done. It puts a (non-hyperlinked) "Post to Weblog'" row under the URL row in the picture info spot. The file edited was displayimage.php
.. the mod is the part commented with 'create an absolute image link for the pic'
-------
// Create the absolute URL for display in info
$info['URL'] = '<a href="' . $CONFIG["ecards_more_pic_target"] . (substr($CONFIG["ecards_more_pic_target"], -1) == '/' ? '' : '/') .basename($_SERVER['PHP_SELF']) . "?pos=-$CURRENT_PIC_DATA[pid]" . '" >' . $CONFIG["ecards_more_pic_target"] . (substr($CONFIG["ecards_more_pic_target"], -1) == '/' ? '' : '/') . basename($_SERVER['PHP_SELF']) . "?pos=-$CURRENT_PIC_DATA[pid]" . '</a>';
// with subdomains the variable is $_SERVER["SERVER_NAME"] does not return the right value instead of using a new config variable I reused $CONFIG["ecards_more_pic_target"] no trailing slash in the configure
// create an absolute image link for the pic
$info['Paste to Weblog'] = '<a href="' . $CONFIG["ecards_more_pic_target"] . (substr($CONFIG["ecards_more_pic_target"], -1) == '/' ? '' : '/') . basename($_SERVER['PHP_SELF']) . "?pos=-$CURRENT_PIC_DATA[pid]" . '" ><img src="'. $CONFIG["ecards_more_pic_target"] . (substr($CONFIG["ecards_more_pic_target"], -1) == '/' ? '' : '/') . get_pic_url($CURRENT_PIC_DATA,'thumb') . '" height="' . $CONFIG['thumb_width'] . '" alt="' . $CURRENT_PIC_DATA['title'] . '" align="left" /></a>';
// Create the add to fav link
if (!in_array($CURRENT_PIC_DATA['pid'], $FAVPICS)) {
$info[$lang_picinfo['addFavPhrase']] = "<a href=addfav.php?pid=" . $CURRENT_PIC_DATA['pid'] . " >" . $lang_picinfo['addFav'] . '</a>';
} else {
$info[$lang_picinfo['addFavPhrase']] = "<a href=addfav.php?pid=" . $CURRENT_PIC_DATA['pid'] . " >" . $lang_picinfo['remFav'] . '</a>';
}
-----
the only part I'm not a 100% sure about is using $CONFIG['thumb_width'] as the pic height. Will this always be correct?
Hope this helps - Dan
The dimensions of the thumbnail are not stored by coppermine, so you'd have to read them from the file directly.
Quote from: GauGau on January 20, 2004, 05:47:41 AM
usually people don't want their pics to be hotlinked at all and request features to make hotlinking impossible.
Will definitely not go into a future version - most users would hate us for such a feature... :wink:
GauGau
What about an option for admins to choose which way the gallery displays the URLs? That would solve both problems since the admins could choose how the links would be displayed.
Quote from: CBiLL on January 23, 2004, 11:16:05 PM
Quote{add under}
Code:
// Create the image link for display in info
$info['link'] = $picture_url;
This didn't work for me however the second mod code posted
Quote
// Create the image link for display in info
$info['Link'] = "http://".($_SERVER['SERVER_NAME'])."/".$path_to_pic;
But I had to change the
NAME'])."/".$path_to_pic;
to
NAME'])."/gallery/".$path_to_pic;
to get the link correct because I have my coppermine in it own folder named /gallery/ and it woudn't show up in the link at all unless I added the /gallery/ to the code ..
However I am wondering if there a code to make the whole path clickable link to image?
Thanks
Bill
What file is this modification made in?
Help please, I always get a parser error on line 334. I've tried all the different scripts above, it just won't work.
Why don't you post the exact error and line 334, plus a few lines above and below.
Here's a modified version of the suggestions. It includes a conditional so that it only displays while in admin mode; regular users won't see it. If you want regular users to see, remove the conditional. This includes variations for bbc and html coding, with and without linking. It would be placed in the same place as advised in other posts.
Adjust to suit your needs:
if (GALLERY_ADMIN_MODE) {
$info['HTML without link'] = '<img src="'. $CONFIG["ecards_more_pic_target"] . (substr($CONFIG["ecards_more_pic_target"], -1) == '/' ? '' : '/') . get_pic_url($CURRENT_PIC_DATA,'thumb') . '" height="' . $CONFIG['thumb_width'] . '" alt="' . $CURRENT_PIC_DATA['title'] . '" align="left" border="0" />';
$info['HTML with link'] = '<a href="' . $CONFIG["ecards_more_pic_target"] . (substr($CONFIG["ecards_more_pic_target"], -1) == '/' ? '' : '/') . basename($_SERVER['PHP_SELF']) . "?pos=-$CURRENT_PIC_DATA[pid]" . '" ><img src="'. $CONFIG["ecards_more_pic_target"] . (substr($CONFIG["ecards_more_pic_target"], -1) == '/' ? '' : '/') . get_pic_url($CURRENT_PIC_DATA,'thumb') . '" height="' . $CONFIG['thumb_width'] . '" alt="' . $CURRENT_PIC_DATA['title'] . '" align="left" border="0" /></a>';
$info['BBC without link'] = '[img]<br />'. $CONFIG["ecards_more_pic_target"] . (substr($CONFIG["ecards_more_pic_target"], -1) == '/' ? '' : '/') . get_pic_url($CURRENT_PIC_DATA,'thumb') . '<br />[/img]';
$info['BBC with link'] = '[url=' . $CONFIG["ecards_more_pic_target"] . (substr($CONFIG["ecards_more_pic_target"], -1) == '/' ? '' : '/') . basename($_SERVER['PHP_SELF']) . "?pos=-$CURRENT_PIC_DATA[pid]" . '][img]<br />'. $CONFIG["ecards_more_pic_target"] . (substr($CONFIG["ecards_more_pic_target"], -1) == '/' ? '' : '/') . get_pic_url($CURRENT_PIC_DATA,'thumb') . '<br />[/img][/url]';
}
Quote from: Nibbler on January 06, 2005, 05:39:24 AM
Why don't you post the exact error and line 334, plus a few lines above and below.
He might not, but I will! :)
I get this error:
Parse error: parse error, unexpected T_STRING in /home/[HOMEDIRECTORY]/public_html/copperminetest/displayimage.php on line 338
and have this: (lines 337-339)
// Create the absolute URL for display in info
$info['URL'] = '<a href="' . $CONFIG["ecards_more_pic_target"] . (substr($CONFIG["ecards_more_pic_target"], -1) == '/' ? '' : '/') .basename($_SERVER['PHP_SELF']) . "?pos=-$CURRENT_PIC_DATA[pid]" . '" >' . $CONFIG["ecards_more_pic_target"] . (substr($CONFIG["ecards_more_pic_target"], -1) == '/' ? '' : '/') . basename($_SERVER['PHP_SELF']) . "?pos=-$CURRENT_PIC_DATA[pid]" . '</a>';
// with subdomains the variable is $_SERVER["SERVER_NAME"] does not return the right value instead of using a new config variable I reused $CONFIG["ecards_more_pic_target"] no trailing slash in the configure
Sorry, I'm a complete newbie and understand very little of this. ;D
I haven't checked what that code's doing so don't blame me if it doesn't work as you expect. It's just error corrected.
$info['URL'] = "<a href='" . $CONFIG['ecards_more_pic_target'] . (substr($CONFIG['ecards_more_pic_target'], -1) == '/' ? '' : '/') .basename($_SERVER['PHP_SELF']) . "?pos=".(-$CURRENT_PIC_DATA['pid']) . "'>" . $CONFIG['ecards_more_pic_target'] . (substr($CONFIG['ecards_more_pic_target'], -1) == '/' ? '' : '/') . basename($_SERVER['PHP_SELF']) . "?pos=". (-$CURRENT_PIC_DATA['pid']) . "</a>";
Is it possible to create the link so it shows the full path to the normal_pic.jpg instead of pic.jpg
WHY? Because i don't want to post huge images into forums and i dont want to right click the pic, properties, copy paste.
This works great for me
// Create the image link for display in info
$info['Direct Link'] = "http://".($_SERVER['SERVER_NAME'])."/gallery/".$path_to_pic;
this didnt work
// Create the image link for display in info
$info['Direct Link'] = "http://".($_SERVER['SERVER_NAME'])."/gallery/".$path_to_normal; ...etc...??/
Please help!!
www.sonikempire.com is the site, /gallery is the gallery.
bambule@gmail.com
s0nikempire on AIM
Please feel free to contact me!
THANK YOU VERY MUCH!
I have been trying to show the BB-Code for my Images, like in some of these sites, but can't make it to work, with my theme or classic theme.
I do have the BB Help on in the Admin Config! Not sure what i'm doing wrong! ???
http://www.s0ber.net/displayimage.php?album=lastcom&cat=0&pos=5
Never mind I got it to work, but Thanks.
it would have been nice if you posted what you did to make it work for you, so others may benefit from your insight.
Quote from: GauGau on May 20, 2005, 08:07:49 AM
it would have been nice if you posted what you did to make it work for you, so others may benefit from your insight.
I could'nt make this one work, how I wanted it too, so I made one!But if any body is interested, I could placed the code here at coppermine. I have it confire for the users/public mode can only see the thumb version, with HTML Code and BB-Code on it. And for Members a lot of diffrent ones.
Check it out:http://sandbox.fastefx.com/cpg1.3.3/cpg133/displayimage.php?album=random&cat=0&pos=-1
User/Public Mode:(https://coppermine-gallery.com/forum/proxy.php?request=http%3A%2F%2Fsandbox.fastefx.com%2Fuser.jpg&hash=87fecc7706d57e74998d1b25c67d23055b55a1c5)
Admin MODE:(https://coppermine-gallery.com/forum/proxy.php?request=http%3A%2F%2Fsandbox.fastefx.com%2Fadmin.jpg&hash=c86b04d8a62f43310d0e1349bbc91d3c333e72ba)
Quote from: Crash_Sys on May 22, 2005, 08:12:50 AM
Quote from: GauGau on May 20, 2005, 08:07:49 AM
it would have been nice if you posted what you did to make it work for you, so others may benefit from your insight.
I could'nt make this one work, how I wanted it too, so I made one!
But if any body is interested, I could placed the code here at coppermine.
I have it confire for the users/public mode can only see the thumb version, with HTML Code and BB-Code on it. And for Members a lot of diffrent ones.
Check it out:
http://sandbox.fastefx.com/cpg1.3.3/cpg133/displayimage.php?album=random&cat=0&pos=-1
User/Public Mode:
(https://coppermine-gallery.com/forum/proxy.php?request=http%3A%2F%2Fsandbox.fastefx.com%2Fuser.jpg&hash=87fecc7706d57e74998d1b25c67d23055b55a1c5)
Admin MODE:
(https://coppermine-gallery.com/forum/proxy.php?request=http%3A%2F%2Fsandbox.fastefx.com%2Fadmin.jpg&hash=c86b04d8a62f43310d0e1349bbc91d3c333e72ba)
Hy,
the link yuo suggest dosn't work.
Anyone can help me??
FedericaSanta, Its not active, If you need to see I could upload it, and re-install it!
Oh yes, i just need it.
Thank, with the hope of being able to reciprocate your courtesy!!
Thanks!!!!!!
Quote from: FedericaSanta on June 10, 2005, 01:41:55 PM
Oh yes, i just need it.
Thank, with the hope of being able to reciprocate your courtesy!!
Thanks!!!!!!
Here is the URL:
http://sandbox.fastefx.com/cpg133/index.php
Please Note, It will be there for a week.
User Account to View all of them;
UserID: test
PassWD: test
Thanks Crash_Sys,
I have tested it on my gallery.
I have only one problem.When i try to upload a new image a get this:
Notice: Array to string conversion in ..../include/init.inc.php on line 135
Thanks a lot!!!
Quote from: FedericaSanta on June 13, 2005, 02:41:24 PM
Thanks Crash_Sys,
I have tested it on my gallery.
I have only one problem.When i try to upload a new image a get this:
Notice: Array to string conversion in ..../include/init.inc.php on line 135
Thanks a lot!!!
Most likelyy the problem is with the <form name="formA"> and No Problem
Thanks Crash_Sys!
I' ve tested it all day but i can't find a solution: it's impossible to upload images :\'(
Anyone has got an idea or a solution??
It's a sin lose all the job made from Crash_Sys...
Quote from: FedericaSanta on June 14, 2005, 10:22:22 PM
Thanks Crash_Sys!
I' ve tested it all day but i can't find a solution: it's impossible to upload images :\'(
Anyone has got an idea or a solution??
It's a sin lose all the job made from Crash_Sys...
You could rename the forum to the same name of the upload forum. PS: I working on a Fix!
Quote from: Crash_Sys on June 16, 2005, 12:54:03 AM
You could rename the forum to the same name of the upload forum. PS: I working on a Fix!
I don'y understand what do you mean...can you explane it?? Thanks!!!!
@FedericaSanta
pm sent
--snork13
I absolutely do want this, and here's the code which has worked for me:
// Create the absolute URL for display in info
// with subdomains the variable is $_SERVER["SERVER_NAME"] does not return the right value instead of using a new config variable I reused $CONFIG["ecards_more_pic_target"] no trailing slash in the configure
// Create the image link for display in info
$info['Link'] = "http://".($_SERVER['SERVER_NAME'])."/gallery/".$path_to_pic;
Controlled hotlinking is why I've set up the gallery in the first place and I want to make it as easy as possible for my members to find their URLs! Anyway, thanks for all the help, I got my solution with trial, error, and all your handy tips!
See the result http://www.steveperryfans.com/gallery/index.php
Thanks Snork13!!
He shows me the right way. :-* :-* :-*
I've another question: i'd like to show the users the image's url after they have upload it. Anyone has an idea??
THANKS!!!!
Quote from: FedericaSanta on July 17, 2005, 02:55:52 PMI've another question: i'd like to show the users the image's url after they have upload it. Anyone has an idea??
not related imo, please don't try to hijack threads, especially not in the mods/hacks board. After all, the mods/hacks board is meant for existing mods, not to request new ones. Modifications of upload.php or db_input.php would be needed, a simple text input field with the url output in the value attribute would do as far as I can see.
Quote from: Crash_Sys on June 13, 2005, 04:44:15 AM
Quote from: FedericaSanta on June 10, 2005, 01:41:55 PM
Oh yes, i just need it.
Thank, with the hope of being able to reciprocate your courtesy!!
Thanks!!!!!!
Here is the URL:
http://sandbox.fastefx.com/cpg133/index.php
Please Note, It will be there for a week.
User Account to View all of them;
UserID: test
PassWD: test
How can I get your hack? that's awesome.
Quote from: rcsmith on August 08, 2005, 09:52:44 PM
Quote from: Crash_Sys on June 13, 2005, 04:44:15 AM
Here is the URL:
http://sandbox.fastefx.com/cpg133/index.php
Please Note, It will be there for a week.
User Account to View all of them;
UserID: test
PassWD: test
How can I get your hack? that's awesome.
I'd love to have the code for this too. Looks fantastic!
Quote from: rcsmith on August 08, 2005, 09:52:44 PM
Quote from: Crash_Sys on June 13, 2005, 04:44:15 AM
Quote from: FedericaSanta on June 10, 2005, 01:41:55 PM
Oh yes, i just need it.
Thank, with the hope of being able to reciprocate your courtesy!!
Thanks!!!!!!
Here is the URL:
http://sandbox.fastefx.com/cpg133/index.php
Please Note, It will be there for a week.
User Account to View all of them;
UserID: test
PassWD: test
How can I get your hack? that's awesome.
What Hack ???
Plz email me much better to contact me, fastefx_com@cox.net
Quote from: jenepherre on August 09, 2005, 11:20:56 PM
Quote from: rcsmith on August 08, 2005, 09:52:44 PM
Quote from: Crash_Sys on June 13, 2005, 04:44:15 AM
Here is the URL:
http://sandbox.fastefx.com/cpg133/index.php
Please Note, It will be there for a week.
User Account to View all of them;
UserID: test
PassWD: test
How can I get your hack? that's awesome.
I'd love to have the code for this too. Looks fantastic!
Sure, Just Contact me and Ill e-mail you the code>
my email is fastefx_com@cox.net
Change DOMAIN to your Domain.
On DisplayImage.php, around line 322.
Find:
// Create the absolute URL for display in info
$info['URL'] = '<a href="' . $CONFIG["ecards_more_pic_target"] . (substr($CONFIG["ecards_more_pic_target"], -1) == '/' ? '' : '/') .basename($_SERVER['PHP_SELF']) . "?pos=-$CURRENT_PIC_DATA[pid]" . '" >' . $CONFIG["ecards_more_pic_target"] . (substr($CONFIG["ecards_more_pic_target"], -1) == '/' ? '' : '/') . basename($_SERVER['PHP_SELF']) . "?pos=-$CURRENT_PIC_DATA[pid]" . '</a>';
// with subdomains the variable is $_SERVER["SERVER_NAME"] does not return the right value instead of using a new config variable I reused $CONFIG["ecards_more_pic_target"] no trailing slash in the configure
Add After:
// *** Begin of USER/Public Mode BB-Code and HTML ***
// Create the BB-Code with Link to Thumbnail for USERS/PUBLIC MODE
$bbcodethumb_url = get_pic_url($CURRENT_PIC_DATA, 'thumb');
$info['<b>Copy Info</b>']='<font color="#FF0000">Press Ctrl+A to Select All.</font> <font color="#008000">Then Press Ctrl+C to Copy Selected </font>';
$info['bbCode<br>Thumbnail']='<textarea type=text name=text rows=2 cols=46>[url=http://DOMAIN.COM'.$_SERVER["SCRIPT_NAME"]."?pos=-$CURRENT_PIC_DATA[pid]".'][img]'.'http://DOMAIN.COM/'.$bbcodethumb_url.'[/img][/url]</textarea> <button class=button onClick="javascript:bbcodepublic();">Copy</button>';
// Image Link with URL for HTML
$info['HTML Code<br>Thumbnail'] = '<textarea type=text name=text1 rows=2 cols=46><a href="' . $CONFIG["ecards_more_pic_target"] . (substr($CONFIG["ecards_more_pic_target"], -1) == '/' ? '' : '/') . basename($_SERVER['PHP_SELF']) . "?pos=-$CURRENT_PIC_DATA[pid]" . '" ><img src="'. $CONFIG["ecards_more_pic_target"] . (substr($CONFIG["ecards_more_pic_target"], -1) == '/' ? '' : '/') . get_pic_url($CURRENT_PIC_DATA,'thumb') . '" height="' . $CONFIG['thumb_width'] . '" alt="' . $CURRENT_PIC_DATA['title'] . '" align="left" border="0" /></a></textarea> <button class=button onClick="javascript:htmlcode();">Copy</button>';
// *** END of USER/Public Mode BB-Code and HTML ***
// *** Begin Admin Mode BB-Code List ***
if (GALLERY_ADMIN_MODE || USER_ADMIN_MODE) {
//Show BBcode for
if ($CONFIG['make_intermediate'] && max($CURRENT_PIC_DATA['pwidth'], $CURRENT_PIC_DATA['pheight']) > $CONFIG['picture_width']) {
$bbcodepicture_url = get_pic_url($CURRENT_PIC_DATA, 'normal');
} else {
$bbcodepicture_url = get_pic_url($CURRENT_PIC_DATA, 'fullsize');
}
// Create Image Link for Display
$info['Full'] = "<textarea type=text name=text2 rows=2 cols=46>http://".($_SERVER['SERVER_NAME'])."/".$path_to_pic."</textarea> <button class=button onClick=javascript:link();>Copy</button>";
// Create Intermediate Image for Display
$info['Intermediate']='<textarea type=text name=text3 rows=2 cols=46>'.'http://DOMAIN.COM/'.$bbcodepicture_url.'</textarea> <button class=button onClick="javascript:inter();">Copy</button>';
// Create the Image Link with URL for BBS
$info['bbCode<br>With URL']='<textarea type=text name=text4 rows=2 cols=46>[url=http://DOMAIN.COM'.$_SERVER["SCRIPT_NAME"]."?pos=-$CURRENT_PIC_DATA[pid]".'][img]'.'http://DOMAIN.COM/'.$path_to_pic.'[/img][/url]</textarea> <button class=button onClick="javascript:bbcode();">Copy</button>';
// Create the BB-Code with link to resized image
$info['bbCode<br>Intermediate']='<textarea type=text name=text5 rows=2 cols=46>[img]http://DOMAIN.COM/'.$bbcodepicture_url.'[/img]</textarea> <button class=button onClick="javascript:bbinter();">Copy</button>';
$info['bbCode<br>Intermediate<br>With URL']='<textarea type=text name=text6 rows=2 cols=46>[url=http://DOMAIN.COM'.$_SERVER["SCRIPT_NAME"]."?pos=-$CURRENT_PIC_DATA[pid]".'][img]'.'http://DOMAIN.COM/'.$bbcodepicture_url.'[/img][/url]</textarea> <button class=button onClick="javascript:bbinterurl();">Copy</button>';
}
// *** End of Admin Mode BB-Code List ***
Please Note the Copy Bottom is Still Not Working...I havent Work on it since a while!
Quote from: Crash_Sys on August 12, 2005, 12:41:09 AM
Please Note the Copy Bottom is Still Not Working...I havent Work on it since a while!
Thanks so much for posting this. I hope you'll keep working on it and get that copy button working. :)
Quote from: jenepherre on August 12, 2005, 09:10:56 AM
Quote from: Crash_Sys on August 12, 2005, 12:41:09 AM
Please Note the Copy Bottom is Still Not Working...I havent Work on it since a while!
Thanks so much for posting this. I hope you'll keep working on it and get that copy button working. :)
Yes, I have finish it, is currently under Beta Testing!View Beta Version of it!
http://sandbox.fastefx.com/gallery/displayimage.php?album=random&cat=0&pos=-3
Quote from: Crash_Sys on August 12, 2005, 12:41:09 AM
Change DOMAIN to your Domain.
On DisplayImage.php, around line 322.
Find:
// Create the absolute URL for display in info
$info['URL'] = '<a href="' . $CONFIG["ecards_more_pic_target"] . (substr($CONFIG["ecards_more_pic_target"], -1) == '/' ? '' : '/') .basename($_SERVER['PHP_SELF']) . "?pos=-$CURRENT_PIC_DATA[pid]" . '" >' . $CONFIG["ecards_more_pic_target"] . (substr($CONFIG["ecards_more_pic_target"], -1) == '/' ? '' : '/') . basename($_SERVER['PHP_SELF']) . "?pos=-$CURRENT_PIC_DATA[pid]" . '</a>';
// with subdomains the variable is $_SERVER["SERVER_NAME"] does not return the right value instead of using a new config variable I reused $CONFIG["ecards_more_pic_target"] no trailing slash in the configure
Add After:
// *** Begin of USER/Public Mode BB-Code and HTML ***
// Create the BB-Code with Link to Thumbnail for USERS/PUBLIC MODE
$bbcodethumb_url = get_pic_url($CURRENT_PIC_DATA, 'thumb');
$info['<b>Copy Info</b>']='<font color="#FF0000">Press Ctrl+A to Select All.</font> <font color="#008000">Then Press Ctrl+C to Copy Selected </font>';
$info['bbCode<br>Thumbnail']='<textarea type=text name=text rows=2 cols=46>[url=http://DOMAIN.COM'.$_SERVER["SCRIPT_NAME"]."?pos=-$CURRENT_PIC_DATA[pid]".'][img]'.'http://DOMAIN.COM/'.$bbcodethumb_url.'[/img][/url]</textarea> <button class=button onClick="javascript:bbcodepublic();">Copy</button>';
// Image Link with URL for HTML
$info['HTML Code<br>Thumbnail'] = '<textarea type=text name=text1 rows=2 cols=46><a href="' . $CONFIG["ecards_more_pic_target"] . (substr($CONFIG["ecards_more_pic_target"], -1) == '/' ? '' : '/') . basename($_SERVER['PHP_SELF']) . "?pos=-$CURRENT_PIC_DATA[pid]" . '" ><img src="'. $CONFIG["ecards_more_pic_target"] . (substr($CONFIG["ecards_more_pic_target"], -1) == '/' ? '' : '/') . get_pic_url($CURRENT_PIC_DATA,'thumb') . '" height="' . $CONFIG['thumb_width'] . '" alt="' . $CURRENT_PIC_DATA['title'] . '" align="left" border="0" /></a></textarea> <button class=button onClick="javascript:htmlcode();">Copy</button>';
// *** END of USER/Public Mode BB-Code and HTML ***
// *** Begin Admin Mode BB-Code List ***
if (GALLERY_ADMIN_MODE || USER_ADMIN_MODE) {
//Show BBcode for
if ($CONFIG['make_intermediate'] && max($CURRENT_PIC_DATA['pwidth'], $CURRENT_PIC_DATA['pheight']) > $CONFIG['picture_width']) {
$bbcodepicture_url = get_pic_url($CURRENT_PIC_DATA, 'normal');
} else {
$bbcodepicture_url = get_pic_url($CURRENT_PIC_DATA, 'fullsize');
}
// Create Image Link for Display
$info['Full'] = "<textarea type=text name=text2 rows=2 cols=46>http://".($_SERVER['SERVER_NAME'])."/".$path_to_pic."</textarea> <button class=button onClick=javascript:link();>Copy</button>";
// Create Intermediate Image for Display
$info['Intermediate']='<textarea type=text name=text3 rows=2 cols=46>'.'http://DOMAIN.COM/'.$bbcodepicture_url.'</textarea> <button class=button onClick="javascript:inter();">Copy</button>';
// Create the Image Link with URL for BBS
$info['bbCode<br>With URL']='<textarea type=text name=text4 rows=2 cols=46>[url=http://DOMAIN.COM'.$_SERVER["SCRIPT_NAME"]."?pos=-$CURRENT_PIC_DATA[pid]".'][img]'.'http://DOMAIN.COM/'.$path_to_pic.'[/img][/url]</textarea> <button class=button onClick="javascript:bbcode();">Copy</button>';
// Create the BB-Code with link to resized image
$info['bbCode<br>Intermediate']='<textarea type=text name=text5 rows=2 cols=46>[img]http://DOMAIN.COM/'.$bbcodepicture_url.'[/img]</textarea> <button class=button onClick="javascript:bbinter();">Copy</button>';
$info['bbCode<br>Intermediate<br>With URL']='<textarea type=text name=text6 rows=2 cols=46>[url=http://DOMAIN.COM'.$_SERVER["SCRIPT_NAME"]."?pos=-$CURRENT_PIC_DATA[pid]".'][img]'.'http://DOMAIN.COM/'.$bbcodepicture_url.'[/img][/url]</textarea> <button class=button onClick="javascript:bbinterurl();">Copy</button>';
}
// *** End of Admin Mode BB-Code List ***
Please Note the Copy Bottom is Still Not Working...I havent Work on it since a while!
Hi, I have added the above code in my gallery and it working wonderfully just as it claimed, Thanks!
I wonder if anyone have know how to show the absolute url understand each thumbs.
Cheers,
ed3877
Hello!
First thanks for this MOD because it is very useful for me. I have installed the MOD, although only I want to use the function of "Image Link with URL for BBS".
Everything works correctly, but there is a problem. The case is that, on having generated the code, since the photos of my gallery it has the format "Name of the photo", (With spaces between the words), on having generated the code, also it includes these spaces, and on having included the code in a forum, it does not work, since when a space is used, it is generated automatically "%20" to replace this space. My question is if there would be some possible way of modifying this code, or in another case to be able to rename all the photos simultaneously to replace the spaces for, for example, "_" or "-".
I hope that you could help me and if it is possible in the minor possible time since I need this MOD. Thank you very much!
Thanks to all that have come before me!
This is what I did for Coppermine version: 1.4.3
in displayimage.php find (was line 169 in mine)
// Create the absolute URL for display in info
$info[$lang_picinfo['URL']] = '<a href="' . $CONFIG["ecards_more_pic_target"] . (substr($CONFIG["ecards_more_pic_target"], -1) == '/' ? '' : '/') .basename($_SERVER['PHP_SELF']) . "?pos=-$CURRENT_PIC_DATA[pid]" . '" >' . $CONFIG["ecards_more_pic_target"] . (substr($CONFIG["ecards_more_pic_target"], -1) == '/' ? '' : '/') . basename($_SERVER['PHP_SELF']) . "?pos=-$CURRENT_PIC_DATA[pid]" . '</a>';
After add
//**mod on
$info['Picture link'] = '<a href="' .$CONFIG["ecards_more_pic_target"] . (substr($CONFIG["ecards_more_pic_target"], -1) == '/' ? '' : '/') .$path_to_pic. '" >' .$CONFIG["ecards_more_pic_target"] . (substr($CONFIG["ecards_more_pic_target"], -1) == '/' ? '' : '/') .$path_to_pic. '</a>';
$info['Thumbnail link'] = '<a href="' .$CONFIG["ecards_more_pic_target"] . (substr($CONFIG["ecards_more_pic_target"], -1) == '/' ? '' : '/') . get_pic_url($CURRENT_PIC_DATA,'thumb'). '" >' .$CONFIG["ecards_more_pic_target"] . (substr($CONFIG["ecards_more_pic_target"], -1) == '/' ? '' : '/') . get_pic_url($CURRENT_PIC_DATA,'thumb'). '</a>' ;
$info['Cut and Paste notes'] =' Cut and paste one of the following to put in a forum thread. Do not use the img link that is part of the forum. If your photo is very large be considerate and use the thumbnail version which allows the viewer the choice of downloading it, and keeps the forum layout smooth.';
$info['Forum code fullsize'] = '[img]'. $CONFIG["ecards_more_pic_target"] . (substr($CONFIG["ecards_more_pic_target"], -1) == '/' ? '' : '/') .$path_to_pic . '[/img]';
$info['Forum code thumb with link back here'] = '[url=' . $CONFIG["ecards_more_pic_target"] . (substr($CONFIG["ecards_more_pic_target"], -1) == '/' ? '' : '/') . basename($_SERVER['PHP_SELF']) . "?pos=-$CURRENT_PIC_DATA[pid]" . '][img]'. $CONFIG["ecards_more_pic_target"] . (substr($CONFIG["ecards_more_pic_target"], -1) == '/' ? '' : '/') . get_pic_url($CURRENT_PIC_DATA,'thumb') . '[/img]<br />Click to enlarge![/url]';
//**mod off
Edit
the last line respects viewing restrictions. If you want to bypass that so anyone can view use this one
$info['Forum code thumb with link to full size'] = '[url=' . $CONFIG["ecards_more_pic_target"] . (substr($CONFIG["ecards_more_pic_target"], -1) == '/' ? '' : '/') .$path_to_pic . '][img]'. $CONFIG["ecards_more_pic_target"] . (substr($CONFIG["ecards_more_pic_target"], -1) == '/' ? '' : '/') . get_pic_url($CURRENT_PIC_DATA,'thumb') . '[/img]<br />Click to enlarge![/url]';
I've have found this discussion very useful.
I am using this code to link directly to the picture:
$info['Forum code thumb with link to full size'] = '[url=' . $CONFIG["ecards_more_pic_target"] . (substr($CONFIG["ecards_more_pic_target"], -1) == '/' ? '' : '/') .$path_to_pic . '][img]'. $CONFIG["ecards_more_pic_target"] . (substr($CONFIG["ecards_more_pic_target"], -1) == '/' ? '' : '/') . get_pic_url($CURRENT_PIC_DATA,'thumb') . '[/img]<br />Click to enlarge![/url]';
It gives me this link:
<a href="http://www.mindscope.dk/coppermine/albums/2005/totalkursus5/000_0019.jpg" >Direct link</a>
I need to wrap the url to redirect it to our SMS server.
The link should then look like this:
<a href="#" onClick="OpenMobilpic('http://www.mindscope.dk/coppermine/albums/2005/totalkursus5/000_0019.jpg');">Order SMS</a>
Do any of you know how to make this.
Regards.
Bo Sundgaard
I have to say that I also found this very usefull. I was able to use the codes that Crash Sys had posted with a bit of mod and get it closer to what I wanted. I still need to edit out some of the links it adds which I do not need.
// *** Begin of USER/Public Mode BB-Code and HTML ***
// Create the BB-Code with Link to Thumbnail for USERS/PUBLIC MODE
$bbcodethumb_url = get_pic_url($CURRENT_PIC_DATA, 'thumb');
$info['<b>Copy Info</b>']='<font color="#FF0000">Press Ctrl+A to Select All.</font> <font color="#008000">Then Press Ctrl+C to Copy Selected </font>';
$info['bbCode<br>Thumbnail']='<textarea type=text name=text rows=2 cols=46>[url=http://www.image-elf.com/Coppermine'.$_SERVER["SCRIPT_NAME"]."?pos=-$CURRENT_PIC_DATA[pid]".'][img]'.'http://www.image-elf.com/Coppermine/'.$bbcodethumb_url.'[/img][/url]</textarea> <button class=button onClick="javascript:bbcodepublic();">Copy</button>';
// Image Link with URL for HTML
$info['HTML Code<br>Thumbnail'] = '<textarea type=text name=text1 rows=2 cols=46><a href="' . $CONFIG["ecards_more_pic_target"] . (substr($CONFIG["ecards_more_pic_target"], -1) == '/' ? '' : '/') . basename($_SERVER['PHP_SELF']) . "?pos=-$CURRENT_PIC_DATA[pid]" . '" ><img src="'. $CONFIG["ecards_more_pic_target"] . (substr($CONFIG["ecards_more_pic_target"], -1) == '/' ? '' : '/') . get_pic_url($CURRENT_PIC_DATA,'thumb') . '" height="' . $CONFIG['thumb_width'] . '" alt="' . $CURRENT_PIC_DATA['title'] . '" align="left" border="0" /></a></textarea> <button class=button onClick="javascript:htmlcode();">Copy</button>';
// *** END of USER/Public Mode BB-Code and HTML ***
// *** Begin Admin Mode BB-Code List ***
if (GALLERY_ADMIN_MODE || USER_ADMIN_MODE) {
//Show BBcode for
if ($CONFIG['make_intermediate'] && max($CURRENT_PIC_DATA['pwidth'], $CURRENT_PIC_DATA['pheight']) > $CONFIG['picture_width']) {
$bbcodepicture_url = get_pic_url($CURRENT_PIC_DATA, 'normal');
} else {
$bbcodepicture_url = get_pic_url($CURRENT_PIC_DATA, 'fullsize');
}
// Create Image Link for Display
$info['Full'] = "<textarea type=text name=text2 rows=2 cols=46>http://".($_SERVER['SERVER_NAME'])."/".$path_to_pic."</textarea> <button class=button onClick=javascript:link();>Copy</button>";
// Create Intermediate Image for Display
$info['Intermediate']='<textarea type=text name=text3 rows=2 cols=46>'.'http://www.image-elf.com/Coppermine/'.$bbcodepicture_url.'</textarea> <button class=button onClick="javascript:inter();">Copy</button>';
// Create the Image Link with URL for BBS
$info['bbCode<br>With URL']='<textarea type=text name=text4 rows=2 cols=46>[url=http://www.image-elf.com/Coppermine'.$_SERVER["SCRIPT_NAME"]."?pos=-$CURRENT_PIC_DATA[pid]".'][img]'.'http://www.image-elf.com/Coppermine/'.$path_to_pic.'[/img][/url]</textarea> <button class=button onClick="javascript:bbcode();">Copy</button>';
// Create the BB-Code with link to resized image
$info['bbCode<br>Intermediate']='<textarea type=text name=text5 rows=2 cols=46>[img]http://www.image-elf.com/Coppermine'.$bbcodepicture_url.'[/img]</textarea> <button class=button onClick="javascript:bbinter();">Copy</button>';
$info['bbCode<br>Intermediate<br>With URL']='<textarea type=text name=text6 rows=2 cols=46>[url=http://www.image-elf.com/Coppermine'.$_SERVER["SCRIPT_NAME"]."?pos=-$CURRENT_PIC_DATA[pid]".'][img]'.'http://www.image-elf.com/Coppermine/'.$bbcodepicture_url.'[/img][/url]</textarea> <button class=button onClick="javascript:bbinterurl();">Copy</button>';
// *** End of Admin Mode BB-Code List ***
Thanks to everyone that contributed!!!
Thanks Crash_Sys, great mod.
I have made some small alterations of my own, like remove the need to hardcode your domain name, reduced the list to the links i require and also fixed all the links. (my first attempt at this by the way, didnt even know what the code looked like 2 days ago)
Still working on the copy buttons tho.
I hope this will be useful, just copy and paste, no changes needed.
Again, thanks for the mod Crash_Sys
Find lines
// Create the absolute URL for display in info
$info[$lang_picinfo['URL']] = '<a href="' . $CONFIG["ecards_more_pic_target"] . (substr($CONFIG["ecards_more_pic_target"], -1) == '/' ? '' : '/') .basename($_SERVER['PHP_SELF']) . "?pos=-$CURRENT_PIC_DATA[pid]" . '" >' . $CONFIG["ecards_more_pic_target"] . (substr($CONFIG["ecards_more_pic_target"], -1) == '/' ? '' : '/') . basename($_SERVER['PHP_SELF']) . "?pos=-$CURRENT_PIC_DATA[pid]" . '</a>';
// with subdomains the variable is $_SERVER["SERVER_NAME"] does not return the right value instead of using a new config variable I reused $CONFIG["ecards_more_pic_target"] no trailing slash in the configure
Add following lines below
// *** Begin of USER/Public Mode BB-Code and HTML ***
// Create the BB-Code with Link to Thumbnail for USERS/PUBLIC MODE
$bbcodethumb_url = get_pic_url($CURRENT_PIC_DATA, 'thumb');
$info['<b>Copy Info</b>']='<font color="#FF0000">Press Ctrl+A to Select All.</font> <font color="#008000">Then Press Ctrl+C to Copy Selected </font>';
$info['Forum Code<br>Thumbnail<br>With URL']='<textarea type=text name=text rows=2 cols=46>[url='.$CONFIG["ecards_more_pic_target"] . (substr($CONFIG["ecards_more_pic_target"], -1) == '/' ? '' : '/').basename($_SERVER['PHP_SELF'])."?pos=-$CURRENT_PIC_DATA[pid]".'][img]'.$CONFIG["ecards_more_pic_target"] . (substr($CONFIG["ecards_more_pic_target"], -1) == '/' ? '' : '/').$bbcodethumb_url.'[/img][/url]</textarea> <button class=button onClick="javascript:bbcodepublic();">Copy</button>';
// Image Link with URL for HTML
//$info['HTML Code<br>Thumbnail'] = '<textarea type=text name=text1 rows=2 cols=46><a href="' . $CONFIG["ecards_more_pic_target"] . (substr($CONFIG["ecards_more_pic_target"], -1) == '/' ? '' : '/') . basename($_SERVER['PHP_SELF']) . "?pos=-$CURRENT_PIC_DATA[pid]" . '" ><img src="'. $CONFIG["ecards_more_pic_target"] . (substr($CONFIG["ecards_more_pic_target"], -1) == '/' ? '' : '/') . get_pic_url($CURRENT_PIC_DATA,'thumb') . '" height="' . $CONFIG['thumb_width'] . '" alt="' . $CURRENT_PIC_DATA['title'] . '" align="left" border="0" /></a></textarea> <button class=button onClick="javascript:htmlcode();">Copy</button>';
// *** END of USER/Public Mode BB-Code and HTML ***
// *** Begin Admin Mode BB-Code List ***
if (GALLERY_ADMIN_MODE || USER_ADMIN_MODE) {
//Show BBcode for
if ($CONFIG['make_intermediate'] && max($CURRENT_PIC_DATA['pwidth'], $CURRENT_PIC_DATA['pheight']) > $CONFIG['picture_width']) {
$bbcodepicture_url = get_pic_url($CURRENT_PIC_DATA, 'normal');
} else {
$bbcodepicture_url = get_pic_url($CURRENT_PIC_DATA, 'fullsize');
}
// Create Intermediate Image for Display
//$info['Intermediate']='<textarea type=text name=text3 rows=2 cols=46>' . $CONFIG["ecards_more_pic_target"] . (substr($CONFIG["ecards_more_pic_target"], -1) == '/' ? '' : '/') . (str_replace($CURRENT_PIC_DATA['filename'] , "normal_".$CURRENT_PIC_DATA['filename'] , $path_to_pic)).'</textarea> <button class=button onClick="javascript:inter();">Copy</button>';
// Create the BB-Code with link to resized image
$info['Forum Code<br>Intermediate']='<textarea type=text name=text5 rows=2 cols=46>[img]'.$CONFIG["ecards_more_pic_target"] . (substr($CONFIG["ecards_more_pic_target"], -1) == '/' ? '' : '/').(str_replace($CURRENT_PIC_DATA['filename'] , "normal_".$CURRENT_PIC_DATA['filename'] , $path_to_pic)).'[/img]</textarea> <button class=button onClick="javascript:bbinter();">Copy</button>';
$info['Forum Code<br>Intermediate<br>With URL']='<textarea type=text name=text6 rows=2 cols=46>[url='.$CONFIG["ecards_more_pic_target"] . (substr($CONFIG["ecards_more_pic_target"], -1) == '/' ? '' : '/').basename($_SERVER['PHP_SELF'])."?pos=-$CURRENT_PIC_DATA[pid]".'][img]'.$CONFIG["ecards_more_pic_target"] . (substr($CONFIG["ecards_more_pic_target"], -1) == '/' ? '' : '/').(str_replace($CURRENT_PIC_DATA['filename'] , "normal_".$CURRENT_PIC_DATA['filename'] , $path_to_pic)).'[/img][/url]</textarea> <button class=button onClick="javascript:bbinterurl();">Copy</button>';
// Create Image Link for Display
//$info['Full'] = "<textarea type=text name=text2 rows=2 cols=46>".$CONFIG["ecards_more_pic_target"] . (substr($CONFIG["ecards_more_pic_target"], -1) == '/' ? '' : '/') . $path_to_pic ."</textarea> <button class=button onClick=javascript:link();>Copy</button>";
// Show BB-Code for Full Image
$info['Forum Code<br>Full']='<textarea type=text name=text4 rows=2 cols=46>[img]'.$CONFIG["ecards_more_pic_target"] . (substr($CONFIG["ecards_more_pic_target"], -1) == '/' ? '' : '/') . $path_to_pic.'[/img]</textarea> <button class=button onClick="javascript:bbcode();">Copy</button>';
// Create the Image Link with URL for BBS
//$info['Forum Code<br>Full<br>With URL']='<textarea type=text name=text4 rows=2 cols=46>[url='.$CONFIG["ecards_more_pic_target"] . (substr($CONFIG["ecards_more_pic_target"], -1) == '/' ? '' : '/') . basename($_SERVER['PHP_SELF']) . "?pos=-$CURRENT_PIC_DATA[pid]".'][img]'.$CONFIG["ecards_more_pic_target"] . (substr($CONFIG["ecards_more_pic_target"], -1) == '/' ? '' : '/') . $path_to_pic.'[/img][/url]</textarea> <button class=button onClick="javascript:bbcode();">Copy</button>';
}
// *** End of Admin Mode BB-Code List ***
Hi svennicus,
I am not a programer but have been researching this topic.
Not sure if this code is of any use to you but saw it on another forum.
Dealing with copy text to clipboard for pasting somewhere else across different browsers.
<script>
function copy_clip(meintext){
if (window.clipboardData){
window.clipboardData.setData("Text", meintext);
}else if (window.netscape){
netscape.security.PrivilegeManager.enablePrivilege ('UniversalXPConnect');
var clip = Components.classes['@mozilla.org/widget/clipboard;1'].createInstance(Components.interfaces.nsIClipboard );
if (!clip) return;
var trans = Components.classes['@mozilla.org/widget/transferable;1'].createInstance(Components.interfaces.nsITransferable);
if (!trans) return;
trans.addDataFlavor('text/unicode');
var str = new Object();
var len = new Object();
var str = Components.classes["@mozilla.org/supports-string;1"].createInstance(Components.interfaces.nsISupportsString);
var copytext=meintext;
str.data=copytext;
trans.setTransferData("text/unicode",str,copytext.length*2);
var clipid=Components.interfaces.nsIClipboard;
if (!clip) return false;
clip.setData(trans,null,clipid.kGlobalClipboard);
}
return false;
}
//-->
</script>
<form name="testform">
<textarea name="testsquare">
</textarea>
<br>
<input type="button" onclick="return copy_clip(document.forms[0].testsquare.value)" value="Copy to Clipboard">
</form>
I think that code would work if intrgrated with another ... i didnt realise there was a BBCode output thing for coppermine , and i ended up doing my own version ...
http://forum.coppermine-gallery.net/index.php?topic=27804.0
So here is my code integrated with the code that Ross just posted for easy copying to clipboard
OK THIS IS TESTED AND IT WORKS - JUST WHAT U WANT
In /gallery/lang/english.php
Find :
$lang_picinfo = array(
'title' =>'File information', //cpg1.3.0
'Filename' => 'Filename',
'Album name' => 'Album name',
Add below :
'BB Code' => 'VB Code',
_________________________________________________________________________
in /gallery/displayimage.php
Find :
$info[$lang_picinfo['Filename']] = htmlspecialchars($CURRENT_PIC_DATA['filename']);
$info[$lang_picinfo['Album name']] = '<span class="alblink">' . $owner_link . $ipinfo . '<a href="thumbnails.php?album=' . $CURRENT_PIC_DATA['aid'] . '">' . $CURRENT_ALBUM_DATA['title'] . ' Photos</a></span>';
add below
//// THANKS TO ROSS FOR THE SCRIPT//
?>
<script>
function copy_clip(meintext){
if (window.clipboardData){
window.clipboardData.setData("Text", meintext);
}else if (window.netscape){
netscape.security.PrivilegeManager.enablePrivilege ('UniversalXPConnect');
var clip = Components.classes['@mozilla.org/widget/clipboard;1'].createInstance(Components.interfaces.nsIClipboard );
if (!clip) return;
var trans = Components.classes['@mozilla.org/widget/transferable;1'].createInstance(Components.interfaces.nsITransferable);
if (!trans) return;
trans.addDataFlavor('text/unicode');
var str = new Object();
var len = new Object();
var str = Components.classes["@mozilla.org/supports-string;1"].createInstance(Components.interfaces.nsISupportsString);
var copytext=meintext;
str.data=copytext;
trans.setTransferData("text/unicode",str,copytext.length*2);
var clipid=Components.interfaces.nsIClipboard;
if (!clip) return false;
clip.setData(trans,null,clipid.kGlobalClipboard);
}
return false;
}
//-->
</script>
<?
////////////////////////////////////////////////
//// OUTPUT CODES FOR VBCODE AND HTML CODE /////
//////////////// BY DjTaz (www.djtaz.com)//////
////////////////////////////////////////////////
$picture_url = get_pic_url($CURRENT_PIC_DATA, '');
$website = $CONFIG["ecards_more_pic_target"];
$info[$lang_picinfo['BB Code']] = "<form name=\"testform\"><textarea name=\"testsquare\" cols=35>[IMG] ".$website.$picture_url." [/IMG]</textarea><input type=\"button\" onclick=\"return copy_clip(document.forms[0].testsquare.value)\" value=\"Copy to Clipboard\"></form>";
////////////////////////////////////////////////
//// END OF VBCODE AND HTML OUTPUT CODE ////////
////////////////////////////////////////////////
Reupload both files , click and thats it , your done !
Also here :
http://www.vbulletin.org/forum/showthread.php?p=898178
I can't take credit for the code just finding it & passing it on.
Only wish I remembered where I found it to give that person the proper credit.
Quote from: St. Anger on December 13, 2004, 06:11:05 AM
What about an option for admins to choose which way the gallery displays the URLs? That would solve both problems since the admins could choose how the links would be displayed.
Wow - imagine that...
Quote from: djtaz on February 14, 2006, 03:29:52 PM
I think that code would work if intrgrated with another ... i didnt realise there was a BBCode output thing for coppermine , and i ended up doing my own version ...
http://forum.coppermine-gallery.net/index.php?topic=27804.0
So here is my code integrated with the code that Ross just posted for easy copying to clipboard
OK THIS IS TESTED AND IT WORKS - JUST WHAT U WANT
In /gallery/lang/english.php
Find :
$lang_picinfo = array(
'title' =>'File information', //cpg1.3.0
'Filename' => 'Filename',
'Album name' => 'Album name',
Add below :
'BB Code' => 'VB Code',
_________________________________________________________________________
in /gallery/displayimage.php
Find :
$info[$lang_picinfo['Filename']] = htmlspecialchars($CURRENT_PIC_DATA['filename']);
$info[$lang_picinfo['Album name']] = '<span class="alblink">' . $owner_link . $ipinfo . '<a href="thumbnails.php?album=' . $CURRENT_PIC_DATA['aid'] . '">' . $CURRENT_ALBUM_DATA['title'] . ' Photos</a></span>';
add below
//// THANKS TO ROSS FOR THE SCRIPT//
?>
<script>
function copy_clip(meintext){
if (window.clipboardData){
window.clipboardData.setData("Text", meintext);
}else if (window.netscape){
netscape.security.PrivilegeManager.enablePrivilege ('UniversalXPConnect');
var clip = Components.classes['@mozilla.org/widget/clipboard;1'].createInstance(Components.interfaces.nsIClipboard );
if (!clip) return;
var trans = Components.classes['@mozilla.org/widget/transferable;1'].createInstance(Components.interfaces.nsITransferable);
if (!trans) return;
trans.addDataFlavor('text/unicode');
var str = new Object();
var len = new Object();
var str = Components.classes["@mozilla.org/supports-string;1"].createInstance(Components.interfaces.nsISupportsString);
var copytext=meintext;
str.data=copytext;
trans.setTransferData("text/unicode",str,copytext.length*2);
var clipid=Components.interfaces.nsIClipboard;
if (!clip) return false;
clip.setData(trans,null,clipid.kGlobalClipboard);
}
return false;
}
//-->
</script>
<?
////////////////////////////////////////////////
//// OUTPUT CODES FOR VBCODE AND HTML CODE /////
//////////////// BY DjTaz (www.djtaz.com)//////
////////////////////////////////////////////////
$picture_url = get_pic_url($CURRENT_PIC_DATA, '');
$website = $CONFIG["ecards_more_pic_target"];
$info[$lang_picinfo['BB Code']] = "<form name=\"testform\"><textarea name=\"testsquare\" cols=35>[IMG] ".$website.$picture_url." [/IMG]</textarea><input type=\"button\" onclick=\"return copy_clip(document.forms[0].testsquare.value)\" value=\"Copy to Clipboard\"></form>";
////////////////////////////////////////////////
//// END OF VBCODE AND HTML OUTPUT CODE ////////
////////////////////////////////////////////////
Reupload both files , click and thats it , your done !
Also here :
http://www.vbulletin.org/forum/showthread.php?p=898178
this isn't working. Why is that? no field nothing shows up!
I just want to inform everybody, that I will begin working on the MOD, for the latest version of Coppermine, with more power to it...
I'll be adding:
Fire Fox and most common Browsers Support.
Control what type of code to show, via Admin Control Panel...
Control what to show, TEXT/Bottom/ and so on...
And some more Modification to it...
Quote from: GauGau on January 20, 2004, 05:47:41 AM
usually people don't want their pics to be hotlinked at all and request features to make hotlinking impossible.
Will definitely not go into a future version - most users would hate us for such a feature... :wink:
GauGau
Is it possible that we can get this feature as an option that can be turned on and off in the control panel? I know that quite a few people do like having the direct url for the picture which is why this thread keeps turning up again and again for different versions of coppermine.
Thanks,
Dshade69
This is not the place for feature requests. Also there's a plugin with the basic functiuonality of this mod. You can add everything you need to that plugin and customize it to your needs.
There is really no need for a button to copy the code. You can easily modify the first FORM declaration to append the following emphasized attributes.
Quote<textarea type=text name=text1 rows=4 cols=50 onFocus="this.select()" onClick="this.select()" readonly>
Proper syntax would be <textarea type="text" name="text1" rows="4" cols="50" onFocus="this.select();" onClick="this.select();" readonly="readonly">
Thanks for the correction.
I'm very interested in this modification.
I run a woodworking forum, with a bridge to Coppermine. My members like to pick up their photos in the gallery and use them to post inline in the posts. It would be great to have an easy way to pick up the URL for pasting in the forum.
There seems to be a lot of great information here. But I'm a little confused. What's the best way to simply get the URL references to display?
Thanks for your help!
I think that i am missing somthing, isent there supose to be somthing in the themes.inc.php to actualy shov the link ?
Well im not getting anything if i add the $info['Link'] = "http://".($_SERVER['SERVER_NAME'])."/galleri/".$path_to_pic; in the displayimage.php
Do you even have the file information section displayed? Post a link to your gallery.
http://yal.dk/galleri/displayimage.php?album=1&pos=1
Where it says {LINK} i would like a link for the file
the file info thingy i cant find, hmmm not that smart am i
The file information section is displayed in a box below the pic. I can see the link where it should be. If you want it where the {LINK} is then you need to code that. This mod does not place it there.
Figured it out, gotta look in the code thanks