Xiuno程序全部版块列表页面
2019年11月29日 6262

xiuno

首先添加路由,在插件hook目录新建文件index_route_case_start.php,内容为

case 'bbs': include _include('plugin/xxx/view/htm/bbs.htm'); break;

其中xxx修改为所在插件目录

然后在/plugin/xxx/view/htm新建bbs.htm,内容为

<?php include _include(APP_PATH . 'view/htm/header.inc.htm'); ?>
<div class="row">
<div class="col-lg-9 main">
<!--{hook bbs_start.htm}-->
<ul class="list-unstyled mb-0">
<div class="row mx-0">
<?php foreach ($forumlist_show as $_forum) { ?>
    <li class="col-sm-6 px-0 px-sm-2" fid="<?php echo $_forum['fid']; ?>" data-active="fid-<?php echo $_forum['fid']; ?>">
     <div class="card mb-2">
      <div class="card-body">
       <div class="media">
        <img class="logo-4 mr-2" src="<?php echo $_forum['icon_url']; ?>">
        <div class="media-body">
        <div class="d-flex justify-content-between">
        <div><a href="<?php echo url("forum-$_forum[fid]"); ?>"><?php echo '' . $_forum['name'] . ''; ?></a></div>
        </div>
        <div class="text-small">
        <?php echo "全部" . lang('threads') . ':'; ?><?php echo $_forum['threads']; ?> &nbsp;&nbsp;/&nbsp;&nbsp;
        <?php echo "今日" . lang('posts') . ':'; ?><?php echo $_forum['todayposts']; ?>
        </div>
        <div class="text-small break-all">
        <?php echo xn_substr($_forum['brief'], 0, 18); ?>
        </div>
        </div>
       </div>
      </div>
      </div>
    </li>
<?php  } ?>
</div>
</ul>
</div>
<!--{hook bbs_end.htm}-->
<!-- 此处省略了侧边栏代码,需要的话从别的页面复制过来-->
</div>
</div>
<?php include _include(APP_PATH . 'view/htm/footer.inc.htm'); ?>
<script>
    $('li[data-active="bbs"]').addClass('active');
</script>
<!--{hook bbs_js.htm}-->

效果

站内演示(修改后的样式):

TAG


- End -




10 条评论
  • 表情
  • 游客你好,回复内容需要 登录 查看!