📢 公告:没空更新文章内容,只是个臭卖主题的
已购买主题用户 推荐人购买可获得30元奖励,未购买主题用户 推荐人购买可获得10元奖励,(提供推荐聊天截图)
2025 祝大家新年快乐~

Xc-Three主题 前台增加注册登录按钮

  • Miss 2024年11月06日 300阅读 0评论
  • 找到以下目录文件内的文字:<!-- 这里可以放很多东西 --> 这句文字注释,代码就放到这句文字下面(位子差不多在最底下)

    默认左侧栏:Xc-Three/Miss/aside-left01.php
    自定义左侧栏:Xc-Three/Miss/aside-left02.php

    <!-- 登入 -->
    <li>
        <?php if ($this->user->hasLogin()) : ?>
            <a class="link panel" href="#" rel="nofollow">
                <span class="Xc_balance"><?php $this->user->screenName(); ?></span>
                <svg class="icon-xl" viewBox="0 0 1024 1024" xmlns="http://www.w3.org/2000/svg" width="15" height="15">
                    <path d="M624.865 512.247L332.71 220.088c-12.28-12.27-12.28-32.186 0-44.457 12.27-12.28 32.186-12.28 44.457 0l314.388 314.388c12.28 12.27 12.28 32.186 0 44.457L377.167 848.863c-6.136 6.14-14.183 9.211-22.228 9.211s-16.092-3.071-22.228-9.211c-12.28-12.27-12.28-32.186 0-44.457l292.155-292.16z"></path>
                </svg>
            </a>
            <ul class="slides panel-body">
                <li>
                    <?php if ($this->user->group == 'administrator' || $this->user->group == 'editor' || $this->user->group == 'contributor') : ?>
                        <a class="link" rel="noopener noreferrer nofollow" target="_blank" href="<?php $this->options->adminUrl("manage-posts.php"); ?>">管理文章</a>
                    <?php endif; ?>
                </li>
                <li>
                    <?php if ($this->user->group == 'administrator' || $this->user->group == 'editor') : ?>
                        <a class="link" rel="noopener noreferrer nofollow" target="_blank" href="<?php $this->options->adminUrl("manage-comments.php"); ?>">管理评论</a>
                    <?php endif; ?>
                </li>
                <li>
                    <?php if ($this->user->group == 'administrator') : ?>
                        <a class="link" rel="noopener noreferrer nofollow" target="_blank" href="<?php $this->options->adminUrl("options-theme.php"); ?>">修改外观</a>
                    <?php endif; ?>
                </li>
                <li>
                    <a class="link" rel="noopener noreferrer nofollow" target="_blank" href="<?php $this->options->adminUrl(); ?>">进入后台</a>
                </li>
            </ul>
        <?php else : ?>
    
    <li>
        <a class="link panel" href="#" rel="nofollow" target="">
            <span class="Xc_balance">用户登录</span><svg class="icon-xl" viewBox="0 0 1024 1024" xmlns="http://www.w3.org/2000/svg" width="15" height="15">
                <path d="M624.865 512.247L332.71 220.088c-12.28-12.27-12.28-32.186 0-44.457 12.27-12.28 32.186-12.28 44.457 0l314.388 314.388c12.28 12.27 12.28 32.186 0 44.457L377.167 848.863c-6.136 6.14-14.183 9.211-22.228 9.211s-16.092-3.071-22.228-9.211c-12.28-12.27-12.28-32.186 0-44.457l292.155-292.16z"></path>
            </svg></a>
        <ul class="slides panel-body panel-box" style="display: none;">
            <li>
                <a class="link" href="<?php $this->options->adminUrl('login.php'); ?>" target="_blank" rel="noopener noreferrer nofollow">登录</a>
                <?php if ($this->options->allowRegister) : ?>
                    <a class="link" href="<?php $this->options->adminUrl('register.php'); ?>" target="_blank" rel="noopener noreferrer nofollow">注册</a>
                <?php endif; ?>
            </li>
        </ul>
    </li>
    
    <?php endif; ?>
    </li>
    1
    打赏

    —— 评论区 ——

    昵称
    邮箱
    网址
    取消