Terborch
(regular)
Sun Nov 18 2007 09:36 PM
Linking pics from a gallery site to a forum

I have a gallery site (http://terborch.cyberspeed.org/gallery/index.php ) and I want to
have users be able to be able to link the pics there to
there site/forum/blog etc kinda like on:
http://imageshack.us . The gallery I'm using is http://coppermine-gallery.net/
and it uses PHP & MYSQL. Here is part of the displayimage.php code that while display the image and info.
Code:
 // 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
// Create the add to fav link
$ref = $REFERER ? "&amp;ref=$REFERER" : '';
if (!in_array($CURRENT_PIC_DATA['pid'], $FAVPICS)) {
$info[$lang_picinfo['addFavPhrase']] = "
<a href=\"addfav.php?pid=" . $CURRENT_PIC_DATA['pid'] . $ref . "\" >" . $lang_picinfo['addFav'] . '</a>';
} else {
$info[$lang_picinfo['addFavPhrase']] = "
<a href=\"addfav.php?pid=" . $CURRENT_PIC_DATA['pid'] . $ref . "\" >" . $lang_picinfo['remFav'] . '</a>';
}


Here is a imageshack.us code to show what I want to add/integrate into the code above. Code:
 </p><input type="text" onClick='highlight(this);' style="width: 500px" size="70" value="&lt;a href="http://img220.imageshack.us/my.php?image=downloadwwwyg0.gif" target="_blank"&gt;&lt;img
src="http://img220.imageshack.us/img220/4869/downloadwwwyg0.th.gif" border="0"
alt="Free
Image Hosting at www.ImageShack.us" /&gt;&lt;/a&gt;" /> Thumbnail for Websites <br /><input type="text" onClick='highlight(this);'
style="width: 500px" size="70" value="[URL=http://img220.imageshack.us/my.php?image=downloadwwwyg0.gif]
[IMG]http://img220.imageshack.us/img220/4869/downloadwwwyg0.th.gif[/IMG][/URL]" />
Thumbnail for forums (1)<br /><input type="text" onClick='highlight(this);' style="width: 500px" size="70" value="[url=http://img220.imageshack.us/my.php?image=downloadwwwyg0.gif]
[img=http://img220.imageshack.us/img220/4869/downloadwwwyg0.th.gif][/url]" /> Thumbnail for forums (2)<br /><input type="text" onClick='highlight(this);' style="width: 300px" size="70"
value="Thanks to ImageShack for [URL=http://imageshack.us]Free Image Hosting[/URL]" /> Link back to ImageShack or use the
<a href="http://reg.imageshack.us/content.php?page=linkto">
<b>banners and buttons</b>


Can anyone help?


predator
(regular)
Mon Nov 19 2007 11:09 AM
Re: Linking pics from a gallery site to a forum

Its a bit fiddly but it is possible for users to do it. In firefox right click the image and select properties and it gives you the full URL for the image.



dandesign
(regular)
Mon Nov 19 2007 08:54 PM
Re: Linking pics from a gallery site to a forum

Quote:

Its a bit fiddly but it is possible for users to do it. In firefox right click the image and select properties and it gives you the full URL for the image.






I agree. That is a LOT of code when it could be made so much more simple, well said!


Contact Us | Privacy statement Main website
Hitwise Top 10 Award Winner - Jan-Mar 2005

About us | Contact us | Link to us | Terms & Conditions | Privacy Policy
© Copyright IPC Media Limited, All rights reserved