n-s*

G-13とかjoomla!とかFileMakerとか

  • Full Screen
  • Wide Screen
  • Narrow Screen
  • Increase font size
  • Default font size
  • Decrease font size

Phoca Gallery Pluginで画像の説明を表示する

Eメール 印刷 PDF

高機能なフォトギャラリー、Phoca Galleryですが、これ単体では、記事内にフォトギャラリーの画像を表示できないので、別途プラグインを入れる必要があります。

Phoca Gallery Plugin

ところが、このプラグインは、バージョン2.7.2現在画像の説明が表示されません。表示されるのはphpをいじる必要があります。解決方法をフォーラムでみつけたので引用します。

Description under thumbs」より抜粋

A simple way to do it :D with file \plugins\content\phocagallery.php:

above lines:

$output .= '</div>';

$iI++;
}
}

//--------------------------

// DISPLAYING OF SWITCHIMAGE

//--------------------------

paste the lines:

if ($display_description == 1) {

$output .= '<div class="phocaimgdesc" style="font-size:10px">'. strip_tags(PhocaGalleryText::wordDelete($image->description, 100, '...')).'</div>';

}

Notice that the size of the description is hardcoded (100), the same for the font size (10px)

This way the same variable that controls the display of the description below the real file will control the desc below the thumbnail.

引用元: Phoca Forum

つまり、\plugins\content\phocagallery.phpを、

  1. if ($display_description == 1) {
  2. $output .= '<div class="phocaimgdesc" style="font-size:10px">'. strip_tags(PhocaGalleryText::wordDelete($image->description, 100, '...')).'</div>';
  3. }
  4. $output .= '</div>';
  5.  
  6. $iI++;
  7. }
  8. }
  9.  
  10. //--------------------------
  11.  
  12. // DISPLAYING OF SWITCHIMAGE
  13.  
  14. //--------------------------

こうすればOKです。

コメントを追加

セキュリティコード
再読込み

You are here: