這個功能可以在點 輸入超連結 圖示後跳出讓你輸入連結位址和名稱的欄位。
Open Post.template.php:
Find:
// Print a drop down list for all the colors we allow!
Add above:
// Java script to handle URL input boxes ...
echo '<script language="JavaScript" type="text/javascript">
<!--
function urlINPT(){
// Enter URL .........................................
var urlLINK = prompt("Please enter URL address:","http://");
if (urlLINK == null ){ //cancel pressed . . .
}
else if (urlLINK == "" || urlLINK == " "){ //ok pressed but with Notext . . .
alert("Sorry no text entered!");
}
else
{ //ok pressed and there is something :)
// Enter Description ...................................
var urlNAME = prompt("Please enter URL name:","");
if (urlNAME == null ){ //cancel pressed . . .
}
else if (urlNAME == "" || urlNAME == " "){ //ok pressed but with notext so use URL only!
surroundText(\'[url]\'+urlLINK+\'\', \'[/url]\', document.', $context['post_form'], '.', $context['post_box_name'], ');
}
else //ok pressed with text so use URL and Name!
surroundText(\'[url=\'+urlLINK+\']\'+urlNAME+\'\', \'[/url]\', document.', $context['post_form'], '.', $context['post_box_name'], ');
}
}
// -->
</script>';
Find:
// Print the buttom row of buttons!
foreach ($context['bbc_tags'][1] as $image => $tag)
{
Add after:
// only replace the URL tag! . . . . . . . . . . .
if ($tag['code'] == 'url')
echo '<a href="javascript:void(0);" onclick="urlINPT(); 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>';
else