建议全局header模块的加入

Bug,需求以及想法
回复
China_Y
帖子: 5
注册时间: 2009年 8月 26日 01:33
联系:

建议全局header模块的加入

帖子 China_Y »

我一直使用bo-blog时因为他很适合中国人的习惯。我是一个皮肤作者,看到Typecho没有全局header模块觉得有点失望。
因为在使用插件的时候很多需要手动编辑模板的 header.php来实现,这样的话,我们做皮肤比较累。比如图片特效。

在后台直接加入全局header模块,让用户自己编辑内容加入<head></head>里,会很方便以后插件的开发。

昨天刚来到Typecho 希望开发顺利,很高兴来到这里。
﹎sκyˊ☆
帖子: 41
注册时间: 2008年 9月 10日 08:35
联系:

Re: 建议全局header模块的加入

帖子 ﹎sκyˊ☆ »

<!-- 通过自有函数输出HTML头部信息 -->
<?php $this->header(); ?>

楼主是说上面这个函数吗?
China_Y
帖子: 5
注册时间: 2009年 8月 26日 01:33
联系:

Re: 建议全局header模块的加入

帖子 China_Y »

是的,后台加入header的插入项,使得<?php $this->header(); ?>可以直接调用到。
而不是每个插件需要在模板文件加入。
﹎sκyˊ☆
帖子: 41
注册时间: 2008年 9月 10日 08:35
联系:

Re: 建议全局header模块的加入

帖子 ﹎sκyˊ☆ »

这个我觉得没必要 本身已经是完整的 何必自己找麻烦?
$this->header()输出的是

代码: 全选

<meta name="description" content="<?php $this->options->description(); ?>" />
<meta name="keywords" content="<?php $this->_keywords(); ?>" />
<meta name="generator" content="<?php $this->options->generator(); ?>" />
<meta name="template" content="<?php $this->options->theme(); ?>" />
<link rel="pingback" href="<?php $this->options->xmlRpcUrl(); ?>" />
<link rel="EditURI" type="application/rsd+xml" title="RSD" href="<?php $this->options->xmlRpcUrl(); ?>?rsd" />
<link rel="wlwmanifest" type="application/wlwmanifest+xml" href="<?php $this->options->xmlRpcUrl(); ?>?wlw" />
<link rel="alternate" type="application/rss+xml" title="RSS 2.0" href="<?php $this->_feedUrl(); ?>" />
<link rel="alternate" type="application/rdf+xml" title="RSS 1.0" href="<?php $this->_feedRssUrl(); ?>" />
<link rel="alternate" type="application/atom+xml" title="ATOM 1.0" href="<?php $this->_feedAtomUrl(); ?>" />
China_Y
帖子: 5
注册时间: 2009年 8月 26日 01:33
联系:

Re: 建议全局header模块的加入

帖子 China_Y »

是的,我的意思就是在后台加一个可以编辑其内容[即$this->header()],

比如:加入audioplayer播放器,需要在header加载JS。
那么,如果后台没有header编辑直接插入,那么就必须在themes中的加入,
如果更换其他皮肤,就调用不到这个JS 。

我就是这个意思,请问如何简易解决这个问题?
﹎sκyˊ☆
帖子: 41
注册时间: 2008年 9月 10日 08:35
联系:

Re: 建议全局header模块的加入

帖子 ﹎sκyˊ☆ »

要加JS那只能你自己在theme加了 也没多复杂的事情
eallion
帖子: 109
注册时间: 2011年 1月 7日 15:07
联系:

Re: 建议全局header模块的加入

帖子 eallion »

原来是这个全局的意思,确实支持楼主的意见。如果那些<head>里加得多的,换个模板就杯具了。
回复