phpcms后台部分修改

 1、后台登陆前提示信息取消及成功后提示信息取消。    
(1)后台登陆前提示信息取消
       
        phpcmsmodulesadminclassesadmin.class.php
                //        if(!isset($_SESSION['userid']) || !isset($_SESSION['roleid']) || !$_SESSION['userid'] || !$_SESSION['roleid']) showmessage(L('admin_login'),'?m=admin&c=index&a=login');

                        if(!isset($_SESSION['userid']) || !isset($_SESSION['roleid']) || !$_SESSION['userid'] || !$_SESSION['roleid'])
                        {
                           header ("Location:?m=admin&c=index&a=login");//直接进入后台,不需要提示。
                         }
      (2)后台登陆成功后提示信息取消
     
         phpcmsmodulesadminindex.php
              在public function login()中
                  修改
                        showmessage(L('login_success'),'?m=admin&c=index');
                为
                        header("location:?m=admin&c=index");
2、后台右下角一行的取消,对于显示器小时尽可能更多的是留给管理部分。    

  phpcmsmodulesadmin	emplatesindex.tpl.php
          修改
                  
                <iframe name="right" id="rightMain" src="?m=admin&c=index&a=public_main" frameborder="false" scrolling="auto" style="border:none; margin-bottom:30px" width="100%" height="auto" allowtransparency="true"></iframe>
                <div class="fav-nav">
                                        <div id="panellist">
                                                <?php foreach($adminpanel as $v) {?>
                                                                <span>
                                                                <a onclick="paneladdclass(this);" target="right" href="<?php echo $v['url'].'menuid='.$v['menuid'].'&pc_hash='.$_SESSION['pc_hash'];?>"><?php echo L($v['name'])?></a>
                                                                <a class="panel-delete" href="javascript:delete_panel(<?php echo $v['menuid']?>, this);"></a></span>
                                                <?php }?>
                                        </div>
                                        <div id="paneladd"></div>
                                        <input type="hidden" id="menuid" value="">
                                        <input type="hidden" id="bigid" value="" />
                    <div id="help" class="fav-help"></div>
                                </div> 

 为下一行
             <iframe name="right" id="rightMain" src="?m=admin&c=index&a=public_main" frameborder="false" scrolling="auto" style="border:none; margin-bottom:0px" width="100%" height="auto" allowtransparency="true"></iframe>
        修改
        var heights = strs[0]-150,Body = $('body');$('#rightMain').height(heights);   
        为
        var heights = strs[0]-120,Body = $('body');$('#rightMain').height(heights);   //取消右下角部分

      
3、后台登陆后直接入“内容”菜单,更加方便。    

phpcmsmodulesadmin	emplatesindex.tpl.php
    修改
      if($_value['id']==10) {
   为
     if($_value['id']==4) {
      修改
        $("#leftMain").load("?m=admin&c=index&a=public_menu_left&menuid=10");
     为
        $("#leftMain").load("?m=admin&c=index&a=public_menu_left&menuid=4");

4、选择“内容”菜单下的“管理内容”,直接取消左部(有管理内容部分)显示。    


直接变成


   phpcmsmodulescontent	emplatescontent_quick.tpl.php
  添加
   
<div id="closeParentTime" style="display:none"></div>
<!--上行内容原程序中没有,加入后打开时自动关闭左边窗口-->
    修改
        setInterval(closeParent,5000);
     为
        setInterval(closeParent,1000);
       不修改上面一行也行,只是反应时间长,网友反映“没成功”是因为时间设置长的原因。
5、添加修改内容直接在右部显示,不喜欢跳出窗口。。    



6、在信息列表头部加入“生成相关列表页”,手动生成与刚添加信息有关大小类列表页。最后只生成首页就可行了。(/Phpcms V9.3.1 Release 20130305 中添加信息或修改信息时会生成全部列表页及首页。比例消耗资源。)。    



7、分站生成与主站平行。    


说明:我的主站放在www文件夹下,其它为分站。我与2013年6月13日修改过,之前忘掉一条语句。
phpcmsmodulescontentclasseshtm.tpl.php
修改
                //添加到发布点队列
                //当站点为非系统站点
下面的:
                        $file = $this->html_root.'/'.$site_dir.$file;
为
                        $file = "../".$site_dir.'/'.$file;//建立与主站平行的目录
修改“//非系统站点时,生成到指定目录”下面的
                         $base_file = "../".$site_dir.'/'.$base_file;
为
                                $base_file = '../'.$site_dir.$this->html_root.'/'.$base_file;
修改                } else {下面的

                        $file = PHPCMS_PATH.substr($this->html_root,1).$base_file;
为
                        if($this->siteid==1)
                         {
                          $file = PHPCMS_PATH.substr($this->html_root,1).'/'.$base_file;//如果为二层必须要有/
                         }
            else
                          {
                          $file = PHPCMS_PATH.$base_file;
                          }
                   $file =str_replace('//','/',$file);
修改public function index() 中
                        $file = $this->html_root.'/'.$site_dir.'/index.html';
为
                        $file = '../'.$site_dir.'/index.html';
最后利用IIS绑定不同域名就行了。
原文地址:https://www.cnblogs.com/wang-yang/p/7693632.html