Nucleus管理画面のマークアップメモ
- 投稿日 : 2010-12-09, 11:14
- 最終更新日時 : 2011-02-04 03:26:33(履歴)
- タグ(Nucleus / 管理画面)
- カテゴリ(Nucleus)
- 記し人(luvsic)[PDF]
- 閲覧数(11160)
Nucleus CMS v3.41
アイテム追加・編集画面、ナビゲーション部分
ENCAPSULATE.php
111行目以降
クラスを4つ追加(.nav-1~)
<div class="navigation"><table>
<tr><td class="nav-1">
<form method="post" action="index.php"><div>
<input type="submit" value="<< <?php echo _LISTS_PREV?>" />
<input type="hidden" name="blogid" value="<?php echo $blogid; ?>" />
<input type="hidden" name="itemid" value="<?php echo $itemid; ?>" />
<input type="hidden" name="action" value="<?php echo $action; ?>" />
<input type="hidden" name="amount" value="<?php echo $amount; ?>" />
<input type="hidden" name="search" value="<?php echo $search; ?>" />
<input type="hidden" name="start" value="<?php echo $prev; ?>" />
</div></form>
</td><td class="nav-2">
<form method="post" action="index.php"><div>
<input type="hidden" name="blogid" value="<?php echo $blogid; ?>" />
<input type="hidden" name="itemid" value="<?php echo $itemid; ?>" />
<input type="hidden" name="action" value="<?php echo $action; ?>" />
<input name="amount" size="3" value="<?php echo $amount; ?>" /> <?php echo _LISTS_PERPAGE?>
<input type="hidden" name="start" value="<?php echo $start; ?>" />
<input type="hidden" name="search" value="<?php echo $search; ?>" />
<input type="submit" value="> <?php echo _LISTS_CHANGE?>" />
</div></form>
</td><td class="nav-3">
<form method="post" action="index.php"><div>
<input type="hidden" name="blogid" value="<?php echo $blogid; ?>" />
<input type="hidden" name="itemid" value="<?php echo $itemid; ?>" />
<input type="hidden" name="action" value="<?php echo $action; ?>" />
<input type="hidden" name="amount" value="<?php echo $amount; ?>" />
<input type="hidden" name="start" value="0" />
<input type="text" name="search" value="<?php echo $search; ?>" size="7" />
<input type="submit" value="> <?php echo _LISTS_SEARCH?>" />
</div></form>
</td><td class="nav-4">
<form method="post" action="index.php"><div>
<input type="submit" value="<?php echo _LISTS_NEXT?> > >" />
<input type="hidden" name="search" value="<?php echo $search; ?>" />
<input type="hidden" name="blogid" value="<?php echo $blogid; ?>" />
<input type="hidden" name="itemid" value="<?php echo $itemid; ?>" />
<input type="hidden" name="action" value="<?php echo $action; ?>" />
<input type="hidden" name="amount" value="<?php echo $amount; ?>" />
<input type="hidden" name="start" value="<?php echo $next; ?>" />
</div></form>
</td></tr>
</table></div>
アイテム追加・編集画面、アイテムリスト
showlist.php
91行目以降
「div.itemListArea」で囲む
function listplug_table($template, $type) {
switch($type) {
case 'HEAD':
echo "<div class='itemListArea'><table>";
echo "<thead><tr>";
// print head
call_user_func("listplug_table_" . $template['content'] , $template, 'HEAD');
echo "</tr></thead><tbody>";
break;
case 'BODY':
// print tabletype specific thingies
echo "<tr onmouseover='focusRow(this);' onmouseout='blurRow(this);'>";
call_user_func("listplug_table_" . $template['content'] , $template, 'BODY');
echo "</tr>";
break;
case 'FOOT':
call_user_func("listplug_table_" . $template['content'] , $template, 'FOOT');
echo "</tbody></table></div>";
break;
}
}
アイテム追加・編集画面、アイテムリスト
showlist.php
324行目以降
アイテムリストの左ブロック、中央ブロック、右ブロック
「th.itemListHead-1」「td.itemList-1」
checkboxのあるtd周りのマークアップ「span」「p」
function listplug_table_itemlist($template, $type) {
$cssclass = null;
switch($type) {
case 'HEAD':
echo "<th class='itemListHead-1'>"._LIST_ITEM_INFO."</th><th class='itemListHead-2'>"._LIST_ITEM_CONTENT."</th><th class='itemListHead-3' colspan='1'>"._LISTS_ACTIONS."</th>";
break;
case 'BODY':
$current = $template['current'];
$current->itime = strtotime($current->itime); // string -> unix timestamp
if ($current->idraft == 1)
$cssclass = " draft";
// (can't use offset time since offsets might vary between blogs)
if ($current->itime > $template['now'])
$cssclass = " future";
echo "<td class='itemList-1$cssclass'>",_LIST_ITEM_BLOG,' ', htmlspecialchars($current->bshortname);
echo " <br />",_LIST_ITEM_CAT,' ', htmlspecialchars($current->cname);
echo " <br />",_LIST_ITEM_AUTHOR, ' ', htmlspecialchars($current->mname);
echo " <br />",_LIST_ITEM_DATE," " . date("Y-m-d",$current->itime);
echo "<br />",_LIST_ITEM_TIME," " . date("H:i",$current->itime);
echo "</td>";
echo "<td class='itemList-2$cssclass'>";
$id = listplug_nextBatchId();
echo '<span><input type="checkbox" id="batch',$id,'" name="batch[',$id,']" value="',$current->inumber,'" />';
echo '<label for="batch',$id,'">';
echo "<b>" . htmlspecialchars(strip_tags($current->ititle)) . "</b>";
echo '</label></span>';
echo "<br />";
$current->ibody = strip_tags($current->ibody);
$current->ibody = htmlspecialchars(shorten($current->ibody,300,'...'));
$COMMENTS = new COMMENTS($current->inumber);
echo "<p>$current->ibody</p></td>";
echo "<td class='itemList-3$cssclass'>";
echo "<a href='\.\./?itemid=$current->inumber' class='itemListLink-0' target='_blank'>"._LISTS_BROWSE_ITEM."</a>";
echo "<a href='index.php?action=itemedit&itemid=$current->inumber' class='itemListLink-1'>"._LISTS_EDIT."</a>";
// evaluate amount of comments for the item
$camount = $COMMENTS->amountComments();
if ($camount>0) {
echo "<br /><a href='index.php?action=itemcommentlist&itemid=$current->inumber' class='itemListLink-2'>";
echo "( " . sprintf(_LIST_ITEM_COMMENTS, $COMMENTS->amountComments())." )</a>";
}
else {
echo "<br />"._LIST_ITEM_NOCONTENT;
}
echo "<br /><a href='index.php?action=itemmove&itemid=$current->inumber' class='itemListLink-3'>"._LISTS_MOVE."</a>";
echo "<br /><a href='index.php?action=itemdelete&itemid=$current->inumber' class='itemListLink-4'>"._LISTS_DELETE."</a>";
echo "</td>";
break;
}
}
アイテム追加・編集画面、アイテムリスト
showlist.php
434行目以降
アイテムリストの左ブロック、中央ブロック、右ブロック
「th.blogListHead-1」「td.blogList-1」
function listplug_table_bloglist($template, $type) {
switch($type) {
case 'HEAD':
echo "<th class='blogListHead-1'>" . _NAME . "</th><th colspan='7' class='blogListHead-2'>" ._LISTS_ACTIONS. "</th>";
break;
case 'BODY':
$current = $template['current'];
echo "<td title='blogid:$current->bnumber shortname:$current->bshortname' class='blogList-1'><a href='$current->burl'><img src='images/globe.gif' width='13' height='13' alt='". _BLOGLIST_TT_VISIT."' /></a> " . htmlspecialchars($current->bname) . "</td>";
echo "<td class='blogList-2'><a href='index.php?action=createitem&blogid=$current->bnumber' title='" . _BLOGLIST_TT_ADD ."'>" . _BLOGLIST_ADD . "</a></td>";
echo "<td class='blogList-3'><a href='index.php?action=itemlist&blogid=$current->bnumber' title='". _BLOGLIST_TT_EDIT."'>". _BLOGLIST_EDIT."</a></td>";
echo "<td class='blogList-4'><a href='index.php?action=blogcommentlist&blogid=$current->bnumber' title='". _BLOGLIST_TT_COMMENTS."'>". _BLOGLIST_COMMENTS."</a></td>";
echo "<td class='blogList-5'><a href='index.php?action=bookmarklet&blogid=$current->bnumber' title='". _BLOGLIST_TT_BMLET."'>". _BLOGLIST_BMLET . "</a></td>";
if ($current->tadmin == 1) {
echo "<td class='blogList-6'><a href='index.php?action=blogsettings&blogid=$current->bnumber' title='" . _BLOGLIST_TT_SETTINGS . "'>" ._BLOGLIST_SETTINGS. "</a></td>";
echo "<td class='blogList-7'><a href='index.php?action=banlist&blogid=$current->bnumber' title='" . _BLOGLIST_TT_BANS. "'>". _BLOGLIST_BANS."</a></td>";
}
if ($template['superadmin']) {
echo "<td class='blogList-8'><a href='index.php?action=deleteblog&blogid=$current->bnumber' title='". _BLOGLIST_TT_DELETE."'>" ._BLOGLIST_DELETE. "</a></td>";
}
break;
}
}
日本語ランゲージファイル
japanese-utf8.php
define('_LISTS_BROWSE_ITEM', '閲覧');//(+)Lusic
No comments yet