phpcms后台部分修改

1、后台登陆前提示信息取消及成功后提示信息取消。    
(1)后台登陆前提示信息取消
      
        phpcms\modules\admin\classes\admin.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)后台登陆成功后提示信息取消
     
         phpcms\modules\admin\index.php
              在public function login()中
                  修改
                        showmessage(L('login_success'),'?m=admin&c=index');
                为
                        header("location:?m=admin&c=index");
2、后台右下角一行的取消,对于显示器小时尽可能更多的是留给管理部分。    

  phpcms\modules\admin\templates\index.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、后台登陆后直接入“内容”菜单,更加方便。    

phpcms\modules\admin\templates\index.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、选择“内容”菜单下的“管理内容”,直接取消左部(有管理内容部分)显示。    


直接变成


   phpcms\modules\content\templates\content_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日修改过,之前忘掉一条语句
phpcms\modules\content\classes\htm.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绑定不同域名就行了。
8、修改专题生成内容。。    



9、修改同时利用PHPCMS标签调用多个栏目内容。    

见45楼http://bbs.phpcms.cn/forum.php?m ... p;extra=#pid2870889
10、修改下面内容使默认模板更干净,没有style=""。   
见44楼http://bbs.phpcms.cn/forum.php?m ... p;extra=#pid2870873
11、修改在生成静态网页时设置“阅读收费”,内容页无法显示“阅读此信息需要您支付** 点,点击这里支付。”  
见43楼http://bbs.phpcms.cn/forum.php?m ... p;extra=#pid2870863
12、修改phpcms v9.3.1裁剪缩略图无效  
见42楼http://bbs.phpcms.cn/forum.php?m ... page%3D1#pid2870841

13、PHPCMS v9支持Email登陆的方法    
见49楼http://bbs.phpcms.cn/forum.php?m ... p;page=4#pid2890227
14、修改单页分页方法    
看到网上有单页分页的方法,试了一下没成功,结合网友提示重新编辑形成了新的单页分页方法。
见57楼http://bbs.phpcms.cn/forum.php?m ... p;extra=#pid2931461

15、推荐位正确修改方法    
见63楼http://bbs.phpcms.cn/forum.php?m ... p;extra=#pid2984271

本文来自转载 http://bbs.phpcms.cn/thread-772940-1-1.html

创作对你我有价值的,喜欢交朋友,失忆王子,期待与你共同探讨,技术qq群153039807
原文地址:https://www.cnblogs.com/hshanghai/p/3319365.html