在线问答插件,部分主题模板代码

newscms

列表页

<?php die;?>
{template:header}
<body class="single">
    {template:post-nav}
    <main class="container">
        <article class="crumbs">
            <div class="wrapper">
                <a href="{$host}"><i class="fa fa-home" aria-hidden="true"></i> 首页</a> - <span><a href="{$zbp->qa->GetUrl('list')}">{$zbp->qa->config->title_plugin_name}</a></span> - <span class="current"><a href="{$zbp->fullcurrenturl}">{$article->Title}</a></span></span>
            </div>
        </article>
        <section class="wrapper">
            <section class="content" id="scroll">
                <section class="content_left transition">
                    <article class="entry" style=padding:0>
                        {$article.Content}
                    </article>
                </section>
                <aside class="sidebar transition">
                    {$sidebar = $sidebar3}{template:post-sidebar}
                </aside>
            </section>
        </section>
    </main>
    {template:footer}

内容页

<?php die;?>
{template:header}
<body class="single">
    {template:post-nav}
    <main class="container">
        <article class="crumbs">
            <div class="wrapper">
                <a href="{$host}"><i class="fa fa-home" aria-hidden="true"></i> 首页</a> - <span><a href="{$zbp->qa->GetUrl('list')}">{$zbp->qa->config->title_plugin_name}</a></span> - <span><a href="{$article->CategoryUrl}">{$article->Category->Name}</a></span> - <span class="current">{$article->Title}</span></span>
        </div>
    </article>
        <section class="wrapper">
            <section class="content" id="scroll">
                <section class="content_left transition">
                    <article class="entry" style=padding:0>
                        {$article.Content}
                    </article>
                </section>
                <aside class="sidebar transition">
                    {$sidebar = $sidebar3}{template:post-sidebar}
                </aside>
            </section>
        </section>
    </main>
    {template:footer}

发布页

<?php die;?>
{template:header}
<body class="page">
    {template:post-nav}
    <main class="container">
        <article class="crumbs">
            <div class="wrapper">
               <a href="{$host}"><i class="fa fa-home" aria-hidden="true"></i> 首页</a> - <span><a href="{$zbp->qa->GetUrl('list')}">{$zbp->qa->config->title_plugin_name}</a></span> - <span class="current">发布问题</span></span>
            </div>
        </article>
        <section class="wrapper">
            <article class="entry" style=padding:0>
                {$article.Content}
            </article>
        </section>
    </main>
    {template:footer}

用户页

<?php die;?>
{template:header}
<body class="single">
    {template:post-nav}
    <main class="container">
        <article class="crumbs">
            <div class="wrapper">
                <a href="{$host}"><i class="fa fa-home" aria-hidden="true"></i> 首页</a> - <span><a href="{$zbp->qa->GetUrl('list')}">{$zbp->qa->config->title_plugin_name}</a></span> - <span class="current">{$article->Title}</span></span>
            </div>
        </article>
        <section class="wrapper">
            <section class="content" id="scroll">
                <section class="content_left transition">
                    <article class="entry" style=padding:0>
                        {$article.Content}
                    </article>
                </section>
                <aside class="sidebar transition">
                    {$sidebar = $sidebar3}{template:post-sidebar}
                </aside>
            </section>
        </section>
    </main>
    {template:footer}

自定义css

.crumbs {
    background-color: #fff;
    border-top: 1px #efefef solid;
    padding: 20px;
    color: #999;
}
.home-search-results{display:none!important}
</style>
<script>
$(document).ready(function(){
  $('.wrapper.search_form .search_type').remove();
  $('.wrapper.search_form .search_input').attr('name','so').attr('placeholder','输入你想搜索的问题关键字').css('width','90%');
  if ($('.q-header-tab').length){
    $('.wrapper.search_form').attr('action','');
  }else{
    $('.wrapper.search_form').attr('action',$('.crumbs span a').eq(0).attr('href'));
  }
})
</script>
<style>

Nice资源销售主题

列表页、内容页、用户页

<?php die()?>
{template:header}
{if ($postSidebar = $article->Metas->sidebar)}
{$postSidebar = "sidebar$postSidebar"}
{$sidebar = $$postSidebar}
{/if}
<body class="{$type} single single-post postid-{$article->ID} sidebar-right {$bodyClass}">
    <div class="site">{template:.nav}
        <div class="site-content">
            <div class="container" style="margin-top:20px">
                <div class="row">
                    <div class="content-column col-lg-9">
                        <div class="content-area">
                            <main class="site-main">
                                <div class="entry-wrapper">
                                    <div style=background:#fff class="entry-content u-text-format u-clearfix">
                                        {$article.Content}
                                    </div>
                                </div>
                            </main>
                        </div>
                    </div>
                    {template:sidebar}
                </div>
            </div>
        </div>
        <!-- end sitecoent -->
{template:footer}

发布页

<?php die()?>
{template:header} {if ($postSidebar = $article->Metas->sidebar)} {$postSidebar = "sidebar$postSidebar"} {$sidebar = $$postSidebar} {/if}
    <body class="{$type} page sidebar-right {$bodyClass}">
        <div class="site">
            {template:.nav}
            <div class="site-content">
                <div class="container">
                    <div class="row">
                        <div class="content-column col-lg-12" style="flex: 0 0 100%;max-width: 100%;">
                            <div class="article-content">
                                <div class="content-area">
                                    <main class="site-main">
                                        <div class="entry-wrapper">
                                            <div class="entry-content u-text-format u-clearfix">
                                                {$article.Content}
                                            </div>
                                        </div>
                                    </main>
                                </div>
                            </div>
                            {template:comments}
                        </div>
                    </div>
                </div>
            </div>
            <!-- end sitecoent -->
            {template:footer}

自定义css

.q-content .q-add-input input, .q-content .q-add-input select{line-height:initial}
#qanda_sidebar_publish{padding:0}

登录链接

javascript:(function(){$('.login-btn').click()})()

好运锦鲤koilee

列表页、内容页、用户页

<?php die();?>{template:header}
<section class="container wrapper">
  <section class="home-main category-main">
    <section class="wrapbox left" style=background:#fff>
    {$article.Content}
    </section>
    <aside class="sidebar right">
      {template:sidebar3}
    </aside>
  </section>
</section>
<script type='text/javascript' src="{$host}zb_users/theme/{$theme}/script/sticky-sidebar.js"></script>
{template:footer}

发布页

<?php die();?>{template:header}
<section class="container wrapper">
  <section class="home-main category-main">
    <section class="wrapbox" style="background:#fff;width:100%">
    {$article.Content}
    </section>
  </section>
</section>
{template:footer}

自定义css

.qanda_sidebar_publish{padding:0}

梦想家mxlee

列表页、内容页、用户页

<?php die();?>{template:header}
<div class="container-fluid home-fluid">
<div class="site-content">
  <div class="site-main content-left">
      <div class="widget-box post-single">
<article class="widget-content single-post">
    {$article.Content}
</article>
</div>
  </div>
  <aside class="sidebar sidebar-right">
    {template:sidebar3}
  </aside>
</div><div class="clear"></div>
</div>
{template:footer}

发布页

<?php die();?>{template:header}
<div class="container-fluid home-fluid">
<div class="site-content">
  <div class="content-left">
      <div class="widget-box post-single">
<article class="widget-content single-post">
    {$article.Content}
</article>
</div>
  </div>
</div><div class="clear"></div>
</div>
{template:footer}

宁静致远quietlee

列表页、内容页、用户页

<?php die();?>{template:header}
<div class="{$type}-wrap container clearfix">
  <main id="main" class="site-main article-main">
    <div class="row">
      <div class="main fl" style=padding:0>
        <article class="post single-post">
{$article.Content}
</article>
      </div>
      <aside class="side fr">
        {template:sidebar3}
      </aside>
    </div>
  </main>
</div>
{template:footer}

发布页

<?php die();?>{template:header}
<div class="{$type}-wrap container clearfix">
  <main id="main" class="site-main article-main">
    <div class="row">
      <div class="main fl" style=padding:0;width:100%>
        <article class="post single-post">
{$article.Content}
</article>
      </div>
    </div>
  </main>
</div>
{template:footer}

博览2020 (expolee)

列表页、内容页、用户页

<?php die();?>{template:header}
<div class="container clearfix article-cont">
  <section class="wrap-multi left">
		<div class="box-shadow">
  <div class="single-entry">
    {$article.Content}
  </div>
</div>
	</section>
	<aside class="sidebar right{if ($article->Metas->sidebar)=='1'} sidebaroff{/if}">
		{template:sidebar3}
	</aside>
</div>
<script src="{$host}zb_users/theme/{$theme}/plugin/js/html2canvas.min.js"></script>
<script src="{$host}zb_users/theme/{$theme}/plugin/js/common.js"></script>
{template:footer}

发布页

<?php die();?>{template:header}
<div class="container clearfix article-cont">
  <section class="wrap-multi" style=width:100%>
		<div class="box-shadow">
  <div class="single-entry">
    {$article.Content}
  </div>
</div>
	</section>
</div>
<script src="{$host}zb_users/theme/{$theme}/plugin/js/html2canvas.min.js"></script>
<script src="{$host}zb_users/theme/{$theme}/plugin/js/common.js"></script>
{template:footer}

自定义css

.q-mobile-ask a img{width:14px!important}
.q-content .reply-count .count-seperator {
    margin: 0 1px;
}

星岚网络工作室主题|网络科技官网模板(hnysnet)

列表页、内容页、用户页

<?php echo'404';die();?>
{template:header}
<div class="main" >
  <div class="container">
    <div class="postleft m-l">
        {$article.Content}
    </div>
   {template:post-single-right}
  </div>
</div>
{template:footer}

发布页

<?php echo'404';die();?>
{template:header}
<div class="main" >
  <div class="container">
    <div class="m-l">
        {$article.Content}
    </div>
  </div>
</div>
{template:footer}

由于该主题只能侧栏只能显示主题指定的模块,需要增加以下代码,侧栏才会显示出发布问题按钮

文件:zb_users/theme/hnysnet/template/module.php

文件最后一行{/if}前面加入以下代码:

{else}
<div class="m-l">
    {if !$module->IsHideTitle}<h3>{$module->Name}</h3>{/if}
	<{$module->Type}>{$module->Content}</{$module->Type}>
  </div>

保存后需要重建模板缓存

ZCMS 精美CMS主题

列表页、内容页、用户页

<?php include('c_safe.php');?>{template:header}
{if !$zbp->CheckPlugin('Nobird_Seo_Tools')}<link rel="canonical" href="{$article.Url}">
	<title>{if $article->Metas->title && $zbp->Config('ZCMS')->seo}{$article->Metas->title}{else}{$title}{$zbp->Config('ZCMS')->separator}{if $type=='article'}{$article.Category.Name}{$zbp->Config('ZCMS')->separator}{/if}{$name}{/if}</title>
</head>
<body>
	{template:c_topbar}
	{template:c_navbar}
	<div class="container mt-10">
		<div class="row">
            <div class="col-xs-12 col-sm-12 col-md-9">
            	<div class="layout noborder">
					{$article.Content}
            	</div>
            </div>
			<div class="col-md-3 hidden-xs hidden-sm" id="sidebar">
				{template:sidebar4}
			</div>
		</div>
	</div>
<div canvas="container" class="close-any">
	{template:footer}
</body>
</html>

发布页

<?php include('c_safe.php');?>{template:header}
{if !$zbp->CheckPlugin('Nobird_Seo_Tools')}<link rel="canonical" href="{$article.Url}">
	<title>{if $article->Metas->title && $zbp->Config('ZCMS')->seo}{$article->Metas->title}{else}{$title}{$zbp->Config('ZCMS')->separator}{if $type=='article'}{$article.Category.Name}{$zbp->Config('ZCMS')->separator}{/if}{$name}{/if}</title>
</head>
<body>
	{template:c_topbar}
	{template:c_navbar}
	<div class="container mt-10">
		<div class="row">
            <div class="col-xs-12 col-sm-12 col-md-12">
            	<div class="layout noborder">
					{$article.Content}
            	</div>
            </div>
		</div>
	</div>
<div canvas="container" class="close-any">
	{template:footer}
</body>
</html>


发表评论 取消回复

很抱歉,您暂时无法发布评论。需要 登录 后才能发布。

嘿,欢迎咨询!