感謝H-ui、感謝CoreThink!
:
登入之後
登入表單
想做登入之後的下拉式功能表的,實在做不出來了,就一般顯示了。。。
整個麵包屑導航這裡,先遍曆模組,並且是允許前台顯示的模組,之後就是判斷使用者是否已經登入,已經登入了,就顯示個人中心,否則就顯示登入和註冊按鈕。
代碼:
<navclass="breadcrumb"><divclass="container"><spanclass="c-gray en"><iclass="Hui-iconfont">i><ahref="#">您好,歡迎來到 {:C('WEB_SITE_TITLE')} !a><opencmf:nav_listname="vo"pid="0"><atarget="{$vo.target}"href="{$vo.href}"><span> {$vo.title}span>a>opencmf:nav_list>span><presentname="_user_auth"><ahref="#" ><imgclass="round"src="{$_user_auth.avatar|get_cover='avatar'}"height="30px"width="30px"alt="{$_user_auth.nickname}" /><span>{$_user_auth.nickname} <span> {$_new_message} span>span><spanclass="caret">span>a><ahref="{:U('User/Index/home', array('uid' => $_user_auth['uid']), true, true)}"><spanclass="label label-secondary radius">個人首頁span>a><volistname="_user_nav_main"id="vo_nav"><ahref="{:U($vo_nav['url'], null, true, true)}"class="{$vo_nav.class}"><spanclass="label label-secondary radius"> {$vo_nav.title}span>a>volist><ahref="{:U('User/User/logout', null, true, true)}"class="ajax-get"><spanclass="label label-danger radius">登出登入span>a><else/><aclass="btn btn-success-outline radius"data-toggle="modal"href="#register-modal">註冊a><aclass="btn btn-danger-outline radius"data-toggle="modal"href="#login-modal">登入a>present>div>nav>
Blog/Home/Public/layout.html
<html><head><metacharset="utf-8"><metaname="renderer"content="webkit|ie-comp|ie-stand"><metahttp-equiv="X-UA-Compatible"content="IE=edge"><metaname="viewport"content="width=device-width,initial-scale=1,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no"/><metahttp-equiv="Cache-Control"content="no-siteapp"/><linkrel="stylesheet"type="text/css"href="__HOME_CSS__/H-ui.min.css"/><linkrel="stylesheet"type="text/css"href="__HOME_LIBS__/Hui-iconfont/1.0.7/iconfont.css"/><linkrel="stylesheet"type="text/css"href="__HOME_LIBS__/icheck/icheck.css"/><linkrel="stylesheet"type="text/css"href="__HOME_CSS__/style.css"/><blockname="title"><title>{:C('WEB_SITE_TITLE')}title>block><metaname="keywords"content="關鍵詞,5個左右,單個8漢字以內"><metaname="description"content="網站描述,字數盡量空制在80個漢字,160個字元以內!">head><body><divclass="clearfix hook hook-page-header"> {:hook('PageHeader')} div><headerclass="navbar-wrapper"><divclass="navbar navbar-black navbar-fixed-top"><divclass="container cl"><aclass="logo navbar-logo hidden-xs"href="/aboutHui.shtml">{:C('WEB_SITE_TITLE')}a><aclass="logo navbar-logo-m visible-xs"href="/aboutHui.shtml">H-uia><spanclass="logo navbar-slogan hidden-xs">{:C('WEB_SITE_SLOGAN')}span><aaria-hidden="false"class="nav-toggle Hui-iconfont visible-xs"href="javascript:;">a><navclass="nav navbar-nav nav-collapse"role="navigation"id="Hui-navbar"><ulclass="cl"><li><ahref="{:C('HOME_PAGE')}">首頁a>li><cms:category_listname="vo"pid="0"group="1"><php>if($vo['_child']):php><liclass="dropDown dropDown_hover"><ahref="{$vo.href}"class="dropDown_A"data-toggle="dropdown"role="button"> {$vo.title} <spanclass="caret">span>a><ulclass="dropDown-menu menu radius box-shadow"><volistname="vo._child"id="vo1"><li><ahref="{$vo1.href}">{$vo1.title}a>li>volist>ul>li><php>else:php><li><ahref="{$vo.href}"><span> {$vo.title}span>a>li><php>endif;php>cms:category_list>ul>nav><navclass="navbar-userbar hidden-xs">nav>div>div>header><navclass="breadcrumb"><divclass="container"><spanclass="c-gray en"><iclass="Hui-iconfont">i><ahref="#">您好,歡迎來到 {:C('WEB_SITE_TITLE')} !a><opencmf:nav_listname="vo"pid="0"><atarget="{$vo.target}"href="{$vo.href}"><span> {$vo.title}span>a>opencmf:nav_list>span><presentname="_user_auth"><ahref="#" ><imgclass="round"src="{$_user_auth.avatar|get_cover='avatar'}"height="30px"width="30px"alt="{$_user_auth.nickname}" /><span>{$_user_auth.nickname} <span> {$_new_message} span>span><spanclass="caret">span>a><ahref="{:U('User/Index/home', array('uid' => $_user_auth['uid']), true, true)}"><spanclass="label label-secondary radius">個人首頁span>a><volistname="_user_nav_main"id="vo_nav"><ahref="{:U($vo_nav['url'], null, true, true)}"class="{$vo_nav.class}"><spanclass="label label-secondary radius"> {$vo_nav.title}span>a>volist><ahref="{:U('User/User/logout', null, true, true)}"class="ajax-get"><spanclass="label label-danger radius">登出登入span>a><else/><aclass="btn btn-success-outline radius"data-toggle="modal"href="#register-modal">註冊a><aclass="btn btn-danger-outline radius"data-toggle="modal"href="#login-modal">登入a>present>div>nav><blockname="main">block><footerclass="footer mt-20"><divclass="container"><p>{:C('WEB_SITE_COPYRIGHT')} <br><arel="nofollow"target="_blank"href="http://www.miitbeian.gov.cn/"> {:C('WEB_SITE_ICP')} a>p>div>footer><scripttype="text/javascript"src="__HOME_LIBS__/jquery/1.9.1/jquery.min.js">script><scripttype="text/javascript"src="__HOME_LIBS__/layer/2.1/layer.js">script><scripttype="text/javascript"src="__HOME_LIBS__/laypage/1.2/laypage.js">script><scripttype="text/javascript"src="__HOME_LIBS__/My97DatePicker/WdatePicker.js">script><scripttype="text/javascript"src="__HOME_LIBS__/icheck/jquery.icheck.min.js">script><scripttype="text/javascript"src="__HOME_LIBS__/bootstrap-Switch/bootstrapSwitch.js">script><scripttype="text/javascript"src="__HOME_LIBS__/Validform/5.3.2/Validform.min.js">script><scripttype="text/javascript"src="__HOME_LIBS__/Validform/5.3.2/passwordStrength-min.js">script><scripttype="text/javascript"src="__HOME_JS__/H-ui.js">script><script>var navigation = responsiveNav("Hui-navbar", {customToggle: ".nav-toggle"}); $(function() { $('.skin-minimal input').iCheck({ checkboxClass: 'icheckbox-blue', radioClass: 'iradio-blue', increaseArea: '20%' }); $("#demoform").Validform({ tiptype: 2 }); });script>block><divclass="clearfix hook hook-page-footer"> {:hook('PageFooter')} div><includefile="$_user_login_modal"/><scripttype="text/javascript"src="__HOME_LIBS__/bootstrap-modal/2.2.4/bootstrap-modalmanager.js">script><scripttype="text/javascript"src="__HOME_LIBS__/bootstrap-modal/2.2.4/bootstrap-modal.js">script><blockname="script">block>body>html>
markdown 確實很好用
:)
').addClass('pre-numbering').hide(); $(this).addClass('has-numbering').parent().append($numbering); for (i = 1; i <= lines; i++) { $numbering.append($('
').text(i)); }; $numbering.fadeIn(1700); }); });
以上就介紹了CoreThink主題開發(八)使用H-ui開發部落客題之使用者登入之前及登入之後,包括了think,使用者登入方面的內容,希望對PHP教程有興趣的朋友有所協助。