ログイン
ユーザ名

パスワード



パスワード紛失

新規登録
参照元情報
参照なし

このフォーラムではゲスト投稿が禁止されています

このフォーラムに新しいトピックを立てることはできません

Action
list-tree ツリー構造順で表示 sort-down 投稿の新しいものから previous 前のトピック next 次のトピック

なし Re: EGuide 2.5 Bug : Category Description Tags not de/encoded

Category description is only memo for admin, in current version. (^^;

Following patch assign tag "event.category.catdesc" in _item.html template and category blocks "option.catdesc" in _block_category.html template.
Need more?
--- modules/eguide/functions.php	23  7月 2008 00:09:44 +0900	1.26
+++ modules/eguide/functions.php	16  8月 2008 18:25:50 +0900	
@@ -97,6 +97,7 @@
 	    $data['catid'] = $cid;
 	    $data['catname'] = $catlist[$cid]['name'];
 	    $data['catimg'] = $catlist[$cid]['image'];
+	    $data['catgory'] = $catlist[$cid];
 	}
     }
     return $data;
@@ -339,18 +340,18 @@
     static $catall, $cattop;
     if ($all) {
 	if (isset($catall)) return $catall;
-	$result = $xoopsDB->query("SELECT c.catid, c.catname AS name, c.catimg AS image,if (p.weight, p.weight, c.weight) ord1, if(p.weight IS NULL, -1, c.weight) ord2,c.catpri FROM ".CATBL." c LEFT JOIN ".CATBL." p ON c.catpri=p.catid ORDER BY ord1,ord2,catid");
+	$result = $xoopsDB->query("SELECT c.catid, c.catname AS name, c.catimg AS image,if (p.weight, p.weight, c.weight) ord1, if(p.weight IS NULL, -1, c.weight) ord2,c.catpri, c.catdesc FROM ".CATBL." c LEFT JOIN ".CATBL." p ON c.catpri=p.catid ORDER BY ord1,ord2,catid");
     } else {
 	if (isset($cattop)) return $cattop;
-	$result = $xoopsDB->query("SELECT catid, catname AS name, catimg AS image, catpri FROM ".CATBL." WHERE catpri=0 ORDER BY weight,catid");
+	$result = $xoopsDB->query("SELECT catid, catname AS name, catimg AS image, catpri, catdesc FROM ".CATBL." WHERE catpri=0 ORDER BY weight,catid");
     }
     $list = array();
     while ($data=$xoopsDB->fetchArray($result)) {
 	$id = $data['catid'];
 	$name = htmlspecialchars($data['name']);
 	if (!empty($data['catpri'])) $name = $indent.$name;
-	$list[$id] = array('catid'=>$id, 'name'=>$name,
-			   'image'=>$data['image'], 'catpri'=>$data['catpri']);
+	$data['name'] = $name;
+	$list[$id] = $data;
     }
     if ($all) $catall = $list;
     else $cattop = $list;
--- modules/eguide/blocks/ev_cat.php	11  2月 2008 14:02:42 +0900	1.4
+++ modules/eguide/blocks/ev_cat.php	16  8月 2008 18:17:11 +0900	
@@ -18,14 +18,15 @@
     $cat = $xoopsDB->prefix($prefix.'_category');
     $cats = $options[0];
     $opt = preg_match('/^(\d+,)*\d+$/', $cats)?" WHERE p.catid IN ($cats)":"";
-    $result = $xoopsDB->query("SELECT c.catid, c.catname AS name, c.catimg AS image,if (p.weight, p.weight, c.weight) ord1, if(p.weight IS NULL, -1, c.weight) ord2,c.catpri FROM $cat c LEFT JOIN $cat p ON c.catpri=p.catid $opt ORDER BY ord1,ord2,catid");
+    $result = $xoopsDB->query("SELECT c.catid, c.catname AS name, c.catimg AS image,if (p.weight, p.weight, c.weight) ord1, if(p.weight IS NULL, -1, c.weight) ord2,c.catpri, c.catdesc FROM $cat c LEFT JOIN $cat p ON c.catpri=p.catid $opt ORDER BY ord1,ord2,catid");
     $list = array();
     $catid = isset($_GET['cat'])?intval($_GET['cat']):0;
     while ($data=$xoopsDB->fetchArray($result)) {
 	$id = $data['catid'];
 	$name = htmlspecialchars($data['name']);
 	if (!empty($data['catpri']) && empty($cats)) $name = '-- '.$name;
-	$list[] = array('name'=>$name, 'catid'=>$id, 'image'=>$data['image']);
+	$data['name'] = $name;
+	$list[] = $data;
     }
     return array('options'=>$list,
 		 'dirname'=>$dirname,
--
安冨 伸浩 (マイサイト管理人)

list-tree ツリー構造順で表示 sort-down 投稿の新しいものから previous 前のトピック next 次のトピック



条件検索へ
© 2008 MySite Web Service