Recent Entries





有關模板 [4]
FreeNX [1]
TinyMCE [3]
系統修改 [4]
LightBox [1]
Ubuntu相關 [1]
MySQL [4]
校務系統 [3]
xoops [5]
學用Blog [2]
硬體相關 [2]
Lifetype系統更新 [10]
Windows相關 [5]
IMageMagick [1]
XPress [1]
CSS [1]
站務公告 [7]
Plugins套用修改 [3]
設備使用 [1]
Moodle [1]
電腦教室管理 [0]


- LifeType 線上教學(官網)
- 部落格教室(怡杰老師)
- 阿欣部落
- 阿杰老師部落格教室


RSS 0.90
RSS 1.0
RSS 2.0
Atom 0.3


andreas01 v1.3

替LifeType加上Lightbox JS v2.04效果-1-系統修改篇

sirius | 18 六月, 2008 08:49



  1. 下載Lightbox JS v2 裡所提供的檔案
    解壓縮後產生一個名為 lightbox2.04 的目錄(在我這裡我又將這目錄自行改名為lightbox2),將該目錄放在 lifetype 的目錄下。
  2. 修改 /lightbox2/js/lightbox.js

    fileLoadingImage: 'images/loading.gif',
    fileBottomNavCloseImage: 'images/closelabel.gif',


    fileLoadingImage = "http://你的網址/lifetype安裝目錄/lightbox2/images/loading.gif";
    fileBottomNavCloseImage = "http://你的網址/lifetype安裝目錄/lightbox2/images/closelabel.gif";
  3. 修改 /lightbox2/css/lightbox.css
    在 #imageData 裡增加一行字型大小的設定,這個設定是參考 Magicbug 在論壇上的說明來改的。前面說過,Lightbox v2.0可以在圖片上顯示出圖片的說明文字,但原本css的設定,以中文字來說可能會太小,所以自行增加一行 font 大小的設定,讓圖片的說明文字大一些,我是設定為11pt,你可以依照自己的喜好來做改變。

    將#imageData{padding:0 10px; color: #666;}
    #imageData{ padding:0 10px; color: #666;font: 11pt Verdana, Helvetica, sans-serif;}
  4. 修改 /js/tinymce/jscripts/tiny_mce/tiny_mce-plog-resourcelist.js
    在兩個位置上加上文字    rel="lightbox[roadtrip]" title="'+resourceDesc+'"

    function _generateResourceLink( resourceId, resourceLink, targetLink, resourceName, resourceDesc, resourceType, resourceMimeType )
        var htmlCode = '';

        if( resourceType == 1 ) {
            if( targetLink != '' ) {
                htmlCode = '<a rel="lightbox[roadtrip]" title="'+resourceDesc+'" id="res_'+resourceId+ '" href="'+targetLink+'" type="'+resourceMimeType+'">';
                htmlCode += '<img style="margin: 5px;" border="0" alt="'+resourceDesc+'" src="'+resourceLink+'" />';
                htmlCode += '</a>';
            else {
                htmlCode = '<img style="margin: 5px;" alt="'+resourceDesc+'" src="'+resourceLink+'" />';
        else {
            // if not an image, there is not much we can do
            htmlCode = '<a rel="lightbox[roadtrip]" title="'+resourceDesc+'" id="res_'+resourceId+'" title="'+resourceDesc+'" href="'+resourceLink+'" type="'+resourceMimeType+'">'+resourceName+'</a>';
        return htmlCode;



 加上 rel="lightbox[roadtrip]" 這一段,是為了讓lightbox可以在同一網頁下,呈現多張圖片同時展示的效果,若你希望圖片都是一張一張地單獨展示,這裡只要加上 rel="lightbox" 就可以。

至於 title="'+resourceDesc+'",是為了在lightbox所展示的圖片左下角顯示出「圖片的說明文字」。


5.修改 js/tinymce/jscripts/tiny_mce/tiny_mce-plog.js

在extended_valid_elements裡的 a 加上 rel ,若沒有加上rel,tinyMCE會認為rel不是合法的參數,所以會自動過濾掉了,這樣就看不到lightbox的效果了。(P.S.不過這件事在Lifetype 1.25以後就不用作了,它已經把rel加入 )

Posted in TinyMCE, 系統修改, LightBox . 迴響: (3149). 引用:(1). 靜態連結網址
«Next post | Previous post»


  1. 1. 바카라  |  09/22,2021 at 07:28

    Your style is so unique compared to other folks I
    have read stuff from. Many thanks for posting when you have the opportunity, Guess I will just book mark this site.

  2. 2. 헨타이  |  09/22,2021 at 07:00

    Hi there, just became alert to your blog through Google, and found
    that it's really informative. I'm gonna watch out for brussels.
    I'll appreciate if you continue this in future. Numerous people will be benefited from your writing.

  3. 3. ジパングカジノ ボーナス  |  09/22,2021 at 06:02

    This is very interesting, You're a very skilled blogger. I've joined your rss feed and look
    forward to seeking more of your fantastic post. Also, I have shared
    your website in my social networks!

  4. 4. 바카라  |  09/22,2021 at 05:45

    This is very interesting, You're an excessively skilled blogger.
    I've joined your feed and stay up for in quest of more of your wonderful post.
    Additionally, I've shared your web site in my social networks

  5. 5. 007카지노  |  09/22,2021 at 05:39

    I seriously love your website.. Excellent colors
    & theme. Did you develop this web site yourself?
    Please reply back as I'm trying to create my own personal website and would love to find out where you
    got this from or just what the theme is named.

  6. 6. online slots  |  09/22,2021 at 03:03

    This design is steller! You most certainly know how to keep a reader
    entertained. Between your wit and your videos, I was almost moved to start my own blog (well, almost...HaHa!) Wonderful job.
    I really loved what you had to say, and more than that, how
    you presented it. Too cool!

  7. 7. bingo live online  |  09/22,2021 at 02:44

    It's very trouble-free to find out any matter on net as compared
    to books, as I found this article at this web page.

  8. 8. competitive swimming games  |  09/22,2021 at 00:36

    It's the best time to make a few plans for the long run and it is
    time to be happy. I have learn this put up and if I may I desire to suggest you some fascinating things
    or suggestions. Maybe you can write next articles relating to this
    article. I want to learn more issues about it!

  9. 9. casino-x   |  09/22,2021 at 00:06

    I'm more than happy to find this page. I wanted to thank you for ones time for this fantastic
    read!! I definitely enjoyed every bit of it and i also
    have you saved as a favorite to see new information in your site.

  10. 10. 에비앙카지노  |  09/21,2021 at 23:31

    Hi there! I'm at work surfing around your blog from my new iphone 3gs!
    Just wanted to say I love reading your blog and look forward to all your posts!
    Carry on the outstanding work!

  11. 11. 비윈  |  09/21,2021 at 22:38

    My relatives every time say that I am wasting my time here at web,
    but I know I am getting familiarity every day by reading such
    good content.

  12. 12. 카지노  |  09/21,2021 at 21:35

    My relatives always say that I am killing my
    time here at web, however I know I am getting experience daily by reading such nice articles.

  13. 13. Trada Casino  |  09/21,2021 at 21:20

    Thank you for another fantastic post. The place else may just anybody get that type of
    information in such an ideal means of writing? I've a presentation subsequent
    week, and I'm at the search for such information.

  14. 14. drug crime  |  09/21,2021 at 21:18

    Thank you for another informative site. Where else could I am getting that kind of info written in such a perfect way?
    I've a mission that I am simply now working on, and I've been at the look out for such information.

  15. 15. สมัคร vwin  |  09/21,2021 at 20:47

    I got this website from my buddy who informed me on the topic of this web site and
    now this time I am visiting this site and reading very
    informative articles or reviews here.

  16. 16. カジノ シークレット 出 金 時間  |  09/21,2021 at 20:33

    My partner and I stumbled over here coming from a different page and thought
    I might check things out. I like what I see so i am
    just following you. Look forward to checking out your web page repeatedly.

  17. 17. hemp seeds  |  09/21,2021 at 20:26

    Outstanding information it is without doubt. Friend on mine has been searching for this info.

  18. 18. mens skin  |  09/21,2021 at 19:47

    Peculiar article, just what I wanted to find.

  19. 19. cờ tướng úp  |  09/21,2021 at 19:37

    Since the admin of this site is working, no doubt very soon it will be
    well-known, due to its feature contents.

  20. 20. 더킹카지노  |  09/21,2021 at 19:35

    We stumbled over here different website and thought I might as well check things out.
    I like what I see so now i'm following you.
    Look forward to checking out your web page for a second time.

Leave a Reply