第 1 頁 (共 2 頁)
[問題]BBcode - DSL代碼
發表於 : 2004-09-08 00:05
由 hpo14
http://phpbb-tw.net/phpbb/viewtopic.php?t=27160
原作 似乎漏寫了 按鈕 (button) 的部份!
我幫原作補上好了,以防有些新手看不懂..
開啟 posting_body.tpl
搜尋
代碼: 選擇全部
<td><span class="genmed">
<input type="button" class="button" accesskey="h" name="addbbcode24" value="HIDE" style="width: 50px" onClick="bbstyle(24)" onMouseOver="helpline('h')" />
</span></td>
下一行加入\r
代碼: 選擇全部
<td><span class="genmed">
<input type="button" class="button" accesskey="d" name="addbbcode264" value="DSL" style="width: 50px" onClick="bbstyle(26)" onMouseOver="helpline('d')" />
</span></td>
存檔, 關閉!
如上面有錯,請各位代為糾正!
謝謝
---- 本文由 hpo14 於 2004 / 9 / 9 下午 7:43 分 做了第一次修改!----
發表於 : 2004-09-08 00:29
由 吉川拓也
這個應該參考一下文章依法炮製就可以了 ...
學習自己修改才能進步^^
發表於 : 2004-09-08 00:35
由 JFA
抱歉...小弟孤陋寡聞....
不知道這個bbcode有什麼用?
DSL是指網絡技術嗎?
還是其他的game?
發表於 : 2004-09-08 00:52
由 haw
DSL是目前的新的下載技術
可以把ftp位址分析成亂碼\r
經由DSLite軟體來下載的一個技術
發表於 : 2004-09-08 08:05
由 Mac
我還寫過 pubdl 和 eDoNKeY bbcode

\n
~Mac
發表於 : 2004-09-08 10:04
由 .::藍色的天空::.
不過有用的是 Mac 的 pubdl 和 eDoNKeY bbcode, Url 轉化的, 而 DSL 都是一些代碼,用 code 就好了。
發表於 : 2004-09-08 19:34
由 hpo14
吉川拓也 寫:這個應該參考一下文章依法炮製就可以了 ...
學習自己修改才能進步^^
這個我知道,我也不算新手了!
玩phpbb也有一段時間,只是沒有其他大大來的久就是了!
發表於 : 2004-09-08 21:28
由 Mac
.::藍色的天空::. 寫: 而 DSL 都是一些代碼,用 code 就好了。
我家的會員都用 code 包住即可\r
~Mac
發表於 : 2004-09-08 22:14
由 hpo14
說來見笑!
小弟我正再寫一個覺得自己需要的特殊Hide BBcode!
但不是需要回覆的那種...
目前卡在程式部份...php不懂.. 唉~"~...
發表於 : 2004-09-08 23:53
由 吉川拓也
hpo14 寫:說來見笑!
小弟我正再寫一個覺得自己需要的特殊Hide BBcode!
但不是需要回覆的那種...
目前卡在程式部份...php不懂.. 唉~"~...
推薦你這個看看 :
http://www.phpbb.com/phpBB/viewtopic.ph ... 69#1193569
來這裡學習誰能說誰是新手誰是舊手呢 ?
如果你會就分享給人這樣不是很棒嗎 ?
你就把按鈕寫法補出來分享給大家不就好了嗎 ?
發表於 : 2004-09-09 01:01
由 hpo14
你上面那個網站裡的Hide BBcode 還蠻有趣的說~!
不過不是我需要的那種...呵呵\r
我想做的Hide BBCode 是只要是會員的,登入後可以看的到!
訪客或是沒登入的會員都會顯示!
-- 文章已隱藏,登入後才可觀看! --
但是 判斷是否有登入 跟 判斷訪客與會員的部份...就...因為自己不熟php...
只好慢慢的摸...
發表於 : 2004-09-09 01:09
由 吉川拓也
hpo14 寫:你上面那個網站裡的Hide BBcode 還蠻有趣的說~!
不過不是我需要的那種...呵呵\r
我想做的Hide BBCode 是只要是會員的,登入後可以看的到!
訪客或是沒登入的會員都會顯示!
-- 文章已隱藏,登入後才可觀看! --
但是 判斷是否有登入 跟 判斷訪客與會員的部份...就...因為自己不熟php...
只好慢慢的摸...
那你就下載藍天的外掛包研究一下就可以了 ...
發表於 : 2004-09-09 01:25
由 hpo14
我用的就是他的程式~~
但她的bbcode只有基本的那些...B,I,U,Hide,Code,Quote,Color,Size等的
其他就沒有了!
我是想說,因為我那個BBcode 需要做到判斷是否登入,跟Hide BBcode 有點像!
只不過hide bbcode 是設為 只要該會員有回覆文章,就將隱藏內容顯示!
她的程式碼我看了一下,目前自己找到一部份!
bbcode.php
代碼: 選擇全部
/**
* Does second-pass bbencoding. This should be used before displaying the message in
* a thread. Assumes the message is already first-pass encoded, and we are given the
* correct UID as used in first-pass encoding.
*/
function hide_in_quote($text)
{
$text = preg_replace("#\[hide\](.*?)\[\/hide\]#si","--- phpBB : The Protected Message is not copied in this quote ---", $text);
return $text;
}
function bbencode_third_pass($text, $uid, $deprotect)
{
global $bbcode_tpl;
// pad it with a space so we can distinguish between FALSE and matching the 1st char (index 0).
// This is important; bbencode_quote(), bbencode_list(), and bbencode_code() all depend on it.
$text = " " . $text;
// First: If there isn't a "[" and a "]" in the message, don't bother.
if (! (strpos($text, "[") && strpos($text, "]")) )
{
// Remove padding, return.
$text = substr($text, 1);
return $text;
}
// Patterns and replacements for URL and email tags..
$patterns = array();
$replacements = array();
if ( $deprotect )
{
$patterns[0] = "#\[hide:$uid\](.*?)\[/hide:$uid\]#si";
$replacements[0] = $bbcode_tpl['show'];
}
else
{
$patterns[0] = "#\[hide:$uid\](.*?)\[/hide:$uid\]#si";
$replacements[0] = $bbcode_tpl['hide'];
}
$text = preg_replace($patterns, $replacements, $text);
// Remove our padding from the string..
$text = substr($text, 1);
return $text;
}
這邊我就不知道要怎麼樣,去將我的BBCODE跟他一起合併作判斷!
有錯請糾正!
發表於 : 2004-09-09 10:04
由 .::藍色的天空::.
哇哈哈... 一分鐘即熟教學\r
打開 BBcode.tpl 找 Hide, 你就會看到有什麼了。
發表於 : 2004-09-09 11:17
由 御津闇慈
就如藍天兄所說的
只要改TPL即可達到你的效果
話說回來
也有人也做出這麼無聊低效果
