森林之原
五月 24, 2012, 03:38:33 am *
歡迎光臨, 訪客. 請先 登入註冊一個帳號.

請輸入帳號, 密碼以及預計登入時間
新聞: 森林之原歡迎您的蒞臨!
森林之原提供自由軟體的支援,包括繁體中文的翻譯。
 
   首頁   說明 搜尋 日曆 登入 註冊  
頁: [1]   向下
  寄送主題  |  列印  
作者 主題: 跳出輸入連結欄位  (閱讀 4590 次)
0 會員 以及 1 訪客 正在閱讀本篇主題.
Andrew::
魔,羯
*
離線 離線

文章: 217



個人網站
« 於: 六月 14, 2005, 10:49:41 pm »

這個功能可以在點 輸入超連結 圖示後跳出讓你輸入連結位址和名稱的欄位。

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


向版主檢舉   已記錄

jorhwa
初學者
*
離線 離線

文章: 23



個人網站
« 回覆文章 #1 於: 十月 12, 2006, 07:25:35 am »

超想要这个,可是照上面的方法更改不成功,楼主能否直接提供一个改好的POST~~~文件,让我们直接上传就OK了。感谢
向版主檢舉   已記錄
jorhwa
初學者
*
離線 離線

文章: 23



個人網站
« 回覆文章 #2 於: 十月 12, 2006, 07:30:01 am »

另告之:我用的是1.1RC2的,会不会是这个原因啊??
向版主檢舉   已記錄
頁: [1]   向上
  寄送主題  |  列印  
 
前往:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.11 | SMF © 2006, Simple Machines LLC Valid XHTML 1.0! Valid CSS!