SMF de İmage Popup (açılır pencerede resim eklemek )
Post.template.php de bul
Kod:
// Print a drop down list for all the colors we allow!
oncesine ekle
Kod:
// Java script to handle img input boxes ...
echo '<script language="JavaScript" type="text/javascript">
// <!' . '--
function imgINPT()
{
// Enter image .........................................
var imgLINK = prompt("Bir resim linki giriniz :","http://");
if (imgLINK == null )
{
//cancel pressed . . .
}
else if (imgLINK == "" || imgLINK == " ")
{
//ok pressed but with Notext . . .
alert("Bilgi Girilmedi!");
}
else
{
//ok pressed and there is something :)
//ok pressed but with notext so use URL only!
surroundText(\'[img]\'+imgLINK+\'\', \'[/img]\', document.', $context['post_form'], '.', $context['post_box_name'], ');
}
}
// --' . '>
</script>';
bul
Kod:
foreach ($context['bbc_tags'][1] as $image => $tag)
{
if (isset($tag['before']))
{
// Is this tag disabled?
if (!empty($context['disabled_tags'][$tag['code']]))
continue;
sonrasina ekle
Kod:
// img popup
if (isset($tag['code']) && $tag['code'] == 'img')
{
echo '<a href="javascript:void(0);" onclick="imgINPT(); return false;"><img onmouseover="bbc_highlight(this, true);" onmouseout="if (window.bbc_highlight) bbc_highlight(this, false);" src="', $settings['images_url'], '/bbc/', $image, '.gif" align="bottom" width="23" height="22" alt="', $tag['description'], '" title="', $tag['description'], '" border="0" style="background-image: url(', $settings['images_url'], '/bbc/bbc_bg.gif); margin: 1px 2px 1px 1px;" /></a>';
continue;
}
alıntıdır smf.gen.tr