Ms7 Search
Google 搜尋 翻譯
calendar
« 四月 2026 »
    1 2 3 4 5
6 7 8 9 10 11 12
13 14 15 16 17 18 19
20 21 22 23 24 25 26
27 28 29 30      
近期文章
文章分類
網站連結
Syndicate

lifetype2 與 gallery2 的 plugin

2007-07-26 @ 20:22 in LifeType,Moodle

試了幾天的 gallery2 plugin 終於免強完成,雖然不是很滿意,但目前也只能這樣,大部分的做法都是參考 Tommy 碎碎念

  1. 下載 gallery2 安裝 gallery2
  2. 下載 gallery plugin 將它解壓放到 /lifetype/plugins 下
  3. 在 lifetype  個人網誌設定=>Gallery
    1. 啟動 Gallery 外掛模組
    2. embed.php 路徑 => /var/www/html/gallery2/embed.php
    3. embedUri 参數 => /blog/index.php?op=gallery&blogId=2
    4. embedPath 参數 => /
    5. g2Uri 参數 => /gallery2/main.php
    6. 圖片區塊 => randomImage
    7. 顯示項目 => none
    8. Gallery 項目代碼 => /shyong
  4. 將 gallery2 整合進 lifetype 模版,我修改 ice 模版的
    1. header.template 加入下面幾行
      {if $gallery->isEnabled()}
      <li><a title="{$locale->tr('photo')}" href="http://ms7.fhsh.tp.edu.tw/blog/index.php?op=gallery&blogId=2&g2_itemId=27">{$locale->tr('photo')}</a></li>
      {/if}
    2. panel.template 加入下面幾行
      {if !empty($gallery)}
      {if $gallery->isEnabled()}
      <div class="block">
      <h5>相簿</h5>
      <div align=center>
      {$gallery->getImageBlock()}
      </div>
      </div>
      {/if}
      {/if}
  5. 就完成了,但是結果是不能用,後面是參考Tommy的修改,才勉強可以用
  6. 將 plugingallery.class.php 約 26行開始改成如下:
        function Plugingallery($source = "")
        {
            $this->PluginBase($source);

            // Setup the plugin information
            $this->id = "gallery";
            $this->author = "Laurent Vauthrin";
            $this->desc = "Integrates gallery2 into LifeType 1.2.";
            $this->version = "20070405";

            // Setup the locale
            $this->locales = Array( "en_UK" );

        if ($source == "admin")
            $this->initAdmin();
        else
            $this->init();
        }
        function init()
        {
        $this->registerBlogAction( "gallery", "PluginGalleryShowAction" );
        }
  7. 在 gallery2 部份 在網址改寫的部份, 其中 "限制熱鏈接項目" 這個項目不可以使用. 另外 "顯示項目" 這個也不要用,這樣就ok了
  8. 在Tommy的網站上,有教你如果要網址改寫要如何設,可是我設不出來,不知是否我的lifetype已經用自訂網址了,看來是要將 apache 的  mod_rewrite 模組研究一下才可以,等看完,再來將 gallery 也設成網址改寫

引用

引用本文的文章標題:lifetype2 與 gallery2 的 plugin