Xiuno程序全部版块列表页面

Xiuno程序全部版块列表页面

Laoyao
2021-07-03 / 0 评论 / 103 阅读 / 正在检测是否收录...
温馨提示:
本文最后更新于2021年07月03日,已超过411天没有更新,若内容或图片失效,请留言反馈。
首先添加路由,在插件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}-->
3

评论

博主关闭了所有页面的评论