Re: 画像掲示板の一覧表で詳細の文字列を丸める

このトピックの投稿一覧へ

なし Re: 画像掲示板の一覧表で詳細の文字列を丸める

msg# 1.1
depth:
1
前の投稿 - 次の投稿 | 親投稿 - 子投稿.1 | 投稿日時 2015/12/11 18:13
タツ  管理人   投稿数: 2403 オンライン
上記の方法だと、どうしてもBBコード、URLコードがあるとページが崩れてしまうため、別の方法で手直しすることに挑戦してみました。

html/modules/myalbum/include/draw_functions.phpの117行目辺りに
return array(
	'lid' => $lid ,
	'cid' => $cid ,
	'ext' => $ext ,
	'res_x' => $res_x ,
	'res_y' => $res_y ,
	'window_x' => $res_x + 16 ,
	'window_y' => $res_y + 16 ,
	'title' => $myts->makeTboxData4Show( $title ) ,
	'datetime' => formatTimestamp( $date , 'm' ) ,
	'description' => $myts->displayTarea( $description , 0 , 1 , 1 , 1 , 1 , 1 ) ,
	'sdescription' => xoops_substr(strip_tags($myts->displayTarea( $description , 0 , 1 , 1 , 1 , 1 , 1 )),0,256) ,
	'imgsrc_thumb' => $imgsrc_thumb ,
	'imgsrc_photo' => $imgsrc_photo ,
	'ahref_photo' => $ahref_photo ,
	'width_spec' => $width_spec ,
	'can_edit' => ( ( $global_perms & GPERM_EDITABLE ) && ( $my_uid == $submitter || $isadmin ) ) ,
	'submitter' => $submitter ,
	'submitter_name' => $submitter_name ,
	'hits' => $hits ,
	'rating' => $rating ,
	'rank' => floor( $rating - 0.001 ) ,
	'votes' => $votes ,
	'info_votes' => $info_votes ,
	'comments' => $comments ,
	'is_normal_image' => $is_normal_image ,
	'is_newphoto' => ( $date > time() - 86400 * $myalbum_newdays && $status == 1 ) , 
	'is_updatedphoto' => ( $date > time() - 86400 * $myalbum_newdays && $status == 2 ) , 
	'is_popularphoto' => ( $hits >= $myalbum_popular ) ,
	'info_morephotos' => sprintf( _ALBM_MOREPHOTOS , $submitter_name ) ,
	'cat_title' => $myts->makeTboxData4Show( $cat_title )
) ;
上記赤字のコードを追加し、

次にテンプレートのmyalbum_photo_in_list.htmlの
<{* DESCRIPTION *}>

    <{if $photo.description}>
      <table border='0' cellpadding='0' cellspacing='0' width='100%' class='outer'>
        <tr>
          <td class='odd'>
            <{$photo.description}>
          </td>
        </tr>
      </table>
    <{/if}>

この赤い部分を
<{$photo.sdescription}>
に変更しました。

これだとコンテンツにコードが含まれていたとしても今のところ問題なく表示されています。
投票数:22 平均点:4.55

投稿ツリー


     条件検索へ

旅と気ままなフォーラム最新投稿

欲しい商品が必ず見つかるメジャーなネットショップ

ログイン

Facebook,RSSリンク表示

検索

アクセスカウンタ

今日 :
昨日 : 327
総計 : 1630460