Credit to the JoomGallery (http://www.en.joomgallery.net/) creators for the idea.
Have translated this to CPG and added a couple of additional options. Support is not available for this simple mod.
Cosmetic adjustments may be necessary depending on your template, of course.
Enjoy! :D
NicMason.com (http://nicmason.com)
Files to edit:
english.php (or your local language file)
displayimage.php
In english.php look for:
'URL' => 'URL', //cpg1.4
After, add:
'BB_TITLE' => '<br /><b style="color:#757575">Forum BB Code</b> (Copy & paste into forum)', //cpg1.4 - NicMason.com
'BB_LINK' => 'Simple link to this page', //cpg1.4 - NicMason.com
'BB_THUMB' => 'Insert linked thumbnail', //cpg1.4 - NicMason.com
'BB_INSERT' => 'Insert full image', //cpg1.4 - NicMason.com
'BB_FULLLINK' => 'Insert linked full image', //cpg1.4 - NicMason.com
In displayimage.php look for:
$path_to_pic = $CONFIG['fullpath'] . $CURRENT_PIC_DATA['filepath'] . $CURRENT_PIC_DATA['filename'];
After, add:
$bb_pic_link = '[URL]' . $CONFIG["ecards_more_pic_target"] . (substr($CONFIG["ecards_more_pic_target"], -1) == '/' ? '' : '/') .basename($_SERVER['PHP_SELF']) . "?pos=-$CURRENT_PIC_DATA[pid]" . '[/URL]'; // NicMason.com
$bb_thumb_link = '[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) == '/' ? '' : '/') . $CONFIG['fullpath'] . $CURRENT_PIC_DATA['filepath'] . 'thumb_' . $CURRENT_PIC_DATA['filename'] . '[/IMG]' . '[/URL]'; // NicMason.com
$bb_pic_insert = '[IMG]' . $CONFIG["ecards_more_pic_target"] . (substr($CONFIG["ecards_more_pic_target"], -1) == '/' ? '' : '/') . $CONFIG['fullpath'] . $CURRENT_PIC_DATA['filepath'] . $CURRENT_PIC_DATA['filename'] . '[/IMG]'; // NicMason.com
$bb_full_link = '[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) == '/' ? '' : '/') . $CONFIG['fullpath'] . $CURRENT_PIC_DATA['filepath'] . $CURRENT_PIC_DATA['filename'] . '[/IMG]' . '[/URL]'; // NicMason.com
Then look for:
// Create the add to fav link
$ref = $REFERER ? "&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>';
}
After, add:
// "BB Codes for Forum (copy & paste)" TITLE - NicMason.com
$info[$lang_picinfo['BB_TITLE']] = ' ';
// "Simple Link to This Page" for Forum - NicMason.com
$info[$lang_picinfo['BB_LINK']] = '<input size="50" value="' . $bb_pic_link . '" readonly="readonly" onClick="select()" type="text">';
// "Insert Linked Thumbnail" for Forum - NicMason.com
$info[$lang_picinfo['BB_THUMB']] = '<input size="50" value="' . $bb_thumb_link . '" readonly="readonly" onClick="select()" type="text">';
// "Insert Full Image" for Forum - NicMason.com
$info[$lang_picinfo['BB_INSERT']] = '<input size="50" value="' . $bb_pic_insert . '" readonly="readonly" onClick="select()" type="text">';
// "Insert Full Linked Image" for Forum - NicMason.com
$info[$lang_picinfo['BB_FULLLINK']] = '<input size="50" value="' . $bb_full_link . '" readonly="readonly" onClick="select()" type="text">';
NicMason.com (http://nicmason.com)
So this will add direct url coding under the images? Similar to "photobucket"?
Short answer: Yes. :)
I haven't used Photobucket, but I think it's similar if not the same.
sorry to demean your work already NicMason, but there is an eve easier way to do it.
http://forum.coppermine-gallery.net/index.php/topic,46121.0.html
It might not look the same as yours, but it's easier to install.
Don't feel bad. My snippet of code doesn't feel demeaned at all. :) Good work with the plugin.