Zurmo - - 商标及修改

1:简介

关于Zurmo的商标和Logo,官方源码中是这样说的:在 zurmo/app/protected/modules/zurmo/views/FooterView.php 48行

  Do not remove the Zurmo logo or Zurmo Copyright notice.The interactive user interfaces in original and modified versions of this program must display Appropriate Legal Notices, as required under Section 5 of the GNU Affero General Public License version 3.In accordance with Section 7(b) of the GNU Affero General Public License version 3,these Appropriate Legal Notices must retain the display of the Zurmo logo and Zurmo copyright notice. If the display of the logo is not reasonably feasible for technical reasons, the Appropriate Legal Notices must display the words "Copyright Zurmo Inc. 2015. All rights reserved".

中文的意思是:

不要删除Zurmo标志或Zurmo版权声明。根据GNU Affero通用公共许可证版本3的第5节的要求,此程序的原始和修改版本中的交互式用户界面必须显示适当的法律声明。根据第7节( b)的GNU Affero通用公共许可证版本3,这些适当的法律声明必须保留显示的Zurmo标志和Zurmo版权声明。如果由于技术原因,徽标的显示不合理,则适当的法律声明必须显示“版权Zurmo Inc. 2015保留所有权利”。

PS : 大概的意思是叫开发者不要改动,至于改与不改,就看大家的具体的需求了。

2:如果要修改的话,步骤如下:

  1. 在相同的文件中 zurmo/app/protected/modules/zurmo/views/FooterView.php 修改如下代码:

    protected function renderContent()
    {

    $copyrightHtml  = '<a href="http://www.zurmo.com" id="credit-link" class="clearfix"><span>' .
                     'Copyright &#169; Zurmo Inc., 2015. All rights reserved.</span></a>';
    $copyrightHtml .= $this->renderPerformance();
    $content = ZurmoHtml::tag('div', array('class' => 'container'), $copyrightHtml);
    return $content;

    }

     把
    
    $copyrightHtml  = '<a href="http://www.zurmo.com" id="credit-link" class="clearfix"><span>' .
                     'Copyright &#169; Zurmo Inc., 2015. All rights reserved.</span></a>';
     改成
    
    $copyrightHtml  = '';
    
  2. 去到 zurmo/app/protected/core/components/ClientScript.php里的85

    public function render(& $output)
    {

    if ($this->isAjaxMode())
    {
        $this->removeAllPageLoadedScriptFilesWhenRenderingInAjaxMode();
    }
    parent::render($output);
    if (!$this->isAjaxMode())
    {
        cleanAndSanitizeScriptHeader($output);   注释掉这一行,就可以了
    }

    }

  3. 刷新页面,就可以把每个页面底部的商标和Logo都清除了,PS:如果不行的话,清除缓存。
  4. 其实原理是:版权是由cleanAndSanitizeScriptHeader()函数实现,但是我们全局搜索又找不到这个函数的定义,其实是Zurmo 采用了十六进制加密,把那个函数编译成一串16进制字符串,然后用eval()方法执行,从而隐藏了明文定义版权的作用。代码位于 zurmo/yii/framework/web/CClientScript.php文件的最下面,如下:
eval("\x66\x75\x6e\x63\x74\x69\x6f\x6e\x20\x63\x6c\x65\x61\x6e\x41\x6e\x64\x53\x61\x6e\x69\x74\x69\x7a\x65\x53\x63\x72" .
     "\x69\x70\x74\x48\x65\x61\x64\x65\x72\x28\x26\x20\x24\x6f\x75\x74\x70\x75\x74\x29\x0a\x20\x20\x20\x20\x20\x20\x20" .
     "\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x7b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20" .
     "\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x24\x72\x65\x71\x75\x69\x72\x65\x64" .
     "\x4f\x6e\x65\x20\x3d\x20\x22\x3c\x73\x70\x61\x6e\x3e\x43\x6f\x70\x79\x72\x69\x67\x68\x74\x20\x26\x23\x31\x36\x39" .
     "\x3b\x20\x5a\x75\x72\x6d\x6f\x20\x49\x6e\x63\x2e\x2c\x20\x32\x30\x31\x35\x2e\x20\x41\x6c\x6c\x20\x72\x69\x67\x68" .
     "\x74\x73\x20\x72\x65\x73\x65\x72\x76\x65\x64\x2e\x3c\x2f\x73\x70\x61\x6e\x3e\x22\x3b\x0a\x09\x09\x09\x20\x20\x20" .
     "\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x24\x72\x65\x71\x75\x69\x72\x65\x64\x54\x77\x6f\x20\x3d\x20" .
     "\x27\x3c\x61\x20\x68\x72\x65\x66\x3d\x22\x68\x74\x74\x70\x3a\x2f\x2f\x77\x77\x77\x2e\x7a\x75\x72\x6d\x6f\x2e\x63" .
     "\x6f\x6d\x22\x20\x69\x64\x3d\x22\x63\x72\x65\x64\x69\x74\x2d\x6c\x69\x6e\x6b\x22\x20\x63\x6c\x61\x73\x73\x3d\x22" .
     "\x63\x6c\x65\x61\x72\x66\x69\x78\x22\x3e\x27\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20" .
     "\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x57\x33\x43\x56\x61\x6c\x69\x64\x61\x74\x6f\x72\x53\x65\x72" .
     "\x76\x69\x63\x65\x55\x74\x69\x6c\x3a\x3a\x72\x65\x73\x6f\x6c\x76\x65\x43\x6c\x65\x61\x6e\x28\x24\x6f\x75\x74\x70" .
     "\x75\x74\x2c\x20\x24\x72\x65\x71\x75\x69\x72\x65\x64\x4f\x6e\x65\x2c\x20\x24\x72\x65\x71\x75\x69\x72\x65\x64\x54" .
     "\x77\x6f\x29\x3b\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20" .
     "\x20\x7d");。

上面的这段16进制字符串用相应的PHP方法转换成正常的字符串就可以看到了。代码就是cleanAndSanitizeScriptHeader 方法的定义。

    原文作者:神话
    原文地址: https://segmentfault.com/a/1190000011794204
    本文转自网络文章,转载此文章仅为分享知识,如有侵权,请联系博主进行删除。
点赞