Clearbox3:
http://www.clearbox.hu/index_en.html
摘要步驟如下:
1) MarkupPostHead 加入:
<!--{{{-->
<script type="text/javascript" src="YourPathTo/clearbox.js"></script>
<!--}}}-->
2) 以下方式擇一:
a) ViewTemplate 加入:
<span macro='tiddler - with:{{CB_Init();}}' />
b) 在內含 clearbox 內容之 tiddler 中加入:
<<tiddler - with:{{CB_Init();}}>>
3) 使用說明:
使用 <html> ... </html>,
於其內之 html 元素,例如 <a>、<div> ...,指定 rel=clearbox 藉以定義 clearbox 參數,
再以呼叫 CB_Init(); 調用。2)
範例:
<html><a class="button" href="http://www.clearbox.hu/index_en.html"
rel="clearbox[width=800 height=600]">更多使用說明與範例 ...</a> </html>
4) 範例演示
下載網址:
https://sourceforge.net/projects/ptw/files/
下載檔案:
Clearbox3.zh-Hant-2.5.3-090918.zip
摘要:
1) 簡單示範於關閉 Clearbox 後,呼叫自定 function。
2) 幻燈片展示
3) 內嵌網頁
其餘詳見
http://www.clearbox.hu/index_en.html
例如<<Vlear URL 描述 参数>> 之类滴宏扩展语言,应当更好使用,毕竟要输入一堆的代码,还是麻烦了些。。
> 其餘詳見http://www.clearbox.hu/index_en.html
>
> On 9月18日, 下午8時12分, Dennis YMB <dennis...@gmail.com> wrote:
>
>
>
> > 大家好,我在PTW 已經有Lightbox2,
> > 但我覺得Lightbox2不夠漂亮和效果,
> > 請問有人可以幫我寫或教我如何製作plugin.js的Clearbox3輸入到PTW?
> > 希望看到你們的答覆~
> > 感謝你們!
>
> > Clearbox3:http://www.clearbox.hu/index_en.html- 隱藏被引用文字 -
>
> - 顯示被引用文字 -
clearbox3 的主程式 (CB_core.js) 經「壓縮」處理,其官網下載之壓縮檔未含「source code」,故「難以」得知其實際
處理方式。合理推測每次呼叫 CB_Init() 時,可能掃描顯示中的 html 元素,包含所有開啟中的 tiddlers 與其他如
MenuMain、SidebarTabs、...,處理具 rel=clearbox 屬性的 html tags 。
因此建議:
1)
使用前述摘要步驟 2) 之 b) 的方式。
2)
最好「關閉動畫顯示效果」。
3) 安裝套件:
SinglePageModePlugin 或 http://visualtw.ouvaton.org/VisualTW.html#TiddlersBarPlugin
SearchOptionsPlugin、YourSearchPlugin 或 SimpleSearchPlugin
( 詳見 http://tiddlywiki.org/wiki/Enhanced_Search )
應能減少可能的不良影響。
On 9月18日, 下午11時13分, BramChen <bram.c...@gmail.com> wrote:
> 其餘詳見http://www.clearbox.hu/index_en.html
非常感謝!
檔名:
Clearbox3.zh-Hant-2.5.3-090921.zip
摘要說明如下:
1) MarkupPostHead 改為:
<script type="text/javascript" src="common/clearbox.js?dir=common/
clearbox&lng=zh-Hant">
原 cleabox.js 與 CB_Config.js 還原為官網下載的原樣。亦即,除新增的 zh-Hant(s).js 的語系檔外,餘皆同
clearbox 官網版本。
切換語系與設定程式庫所在資料夾,改由參數傳遞。(clearbox.js 既有之功能)
2) 新增一個小小增益集 (ClearboxAddon),稍稍增進使用的便利性,並修正隱含的小問題。
CB_Init() 改由 ClearboxAddon 呼叫,並自動移除呼叫該 function 後,重複建立的 divs。
欲更改 CB_* 參數設定或啟用 CB_* functions,可自行增加 scripts 設定之。
這是一個配合第三方程式庫應的增益集小範例,只需善用 TW 內建功能,及幾行簡單的 javascripts ,便能簡化輸入的簡易應用,僅供參
考。
若用於更多圖檔的展示,可利用 tiddler slices、 tag 的功能延伸擴充之,可能需要多些 scripts,有興趣的話可以試試。
3) 修正範例錯誤:
[width=800 height=600] ==> [width=800,,height=600]
註: rel=clearbox[params] 此語法中的個參數間須以「雙逗號」(,,)區隔。
On 9月19日, 上午12時58分, Dennis YMB <dennis...@gmail.com> wrote:
> 哇Thank you BramChen,
> 感謝BramChen這麼快已經有格式和示例使用Clearbox3
>
> 非常感謝!
Thank you so so so much Bram Chen!
新版 TW 已內建 splash 功能,無需另行安裝 SplashScreen 套件。請參考:
http://bit.ly/info/iRndF
1) 請說明:
你如何安裝 SplashScreen
以及安裝 clearbox 、ClearboxAddon 的相關資訊
2) 請檢查 MarkupPostHead :
<script type="text/javascript" src="common/clearbox.js?dir=common/
clearbox&lng=zh-Hant">
確定 clearbox 所在路徑是否無誤。
> I finally found problem cause on old sample > ViewTemplate > <span
> macro='tiddler - with:{{CB_Init();}}' />
> that's why 執行巨集 <<tiddler>> 時,發生錯誤
如前述:
2) 新增一個小小增益集 (ClearboxAddon),稍稍增進使用的便利性,並修正隱含的小問題。
CB_Init() 改由 ClearboxAddon 呼叫,並自動移除呼叫該 function 後,重複建立的 divs。
因此無須於使用時再另行調用 CB_Init();
若 clearbox 成功載入,雖安裝 ClearboxAddon ,舊範例應仍可常執行。
(據知,某 SplashScreenPlugin 方法類似,未安裝測試,故不知其結果如何)
範例文件中係參照 clearbox 官網說明的使用方式,載入 clearbox:
<script type="text/javascript" src="common/clearbox.js?dir=common/
clearbox&lng=zh-Hant"></script>
clearbox.js 雖以對 TW 「不友善」的 document.write() 載入 cb_core.js 等。
但將其放在 MarkupPostHead (or MarkupPreHead) 執行,可在 TW layout 繪製前執行,方不致於「崩解」
TW。兩著
試著對調兩者宣告的前後順序,發現:
若 splashScreen 在前,則 clearbox 程式庫似無法正常載入。
反之,則 splash screen 無法顯示, clearbox 可正常調用。榮
若不使用 document.write() 改以其他方式的 javascript 動態加載cb_core.js 等 js files,情況亦
同。
由於 clearbox 未釋出原始碼,難以進一步偵錯。
(目前有到一個方式,但或需更動 TW core,且未必可行。再找時間測試 ...)
ClearboxAddon 僅 5 行 statements (其實可縮減為 2 行),應非肇事者。
尤其,相同問題也發生於僅直接使用 <html> 的方式。
很遺憾,僅能暫下結論:clearbox 與 splash screen 兩者不相容,請擇一使用。