注册 登录  
 加关注
   显示下一条  |  关闭
温馨提示!由于新浪微博认证机制调整,您的新浪微博帐号绑定已过期,请重新绑定!立即重新绑定新浪微博》  |  关闭

John's Blog

天空,有梦就可以飞翔!

 
 
 

日志

 
 
关于我

刚走出校园的毕业生,就读计算机网络专业,对网站建设有一定的基础。开始探求Drupal已有一段时间,对Drupal的发展很是看好。现就职于深圳慧衡科技有限公司(intematrix.cn),它是一家专门服务于中国及海外中小企业的网络营销分析和优化服务提供商。 QQ交流群:44581272

网易考拉推荐

Drupal中Open aggregator links in new browser window  

2009-04-10 16:56:04|  分类: drupal问题小汇 |  标签: |举报 |字号 订阅

  下载LOFTER 我的照片书  |

  解决在新的页面打开aggregator里边的链接。文来源于drupal.org,

*This "tactic" is not remotely underhanded these days, it is how feeds should operate. Tabbed browsing makes this appropriate, so I think the article above is "quite" dated.

I am using Drupal 6.10

In drupal_root/modules/aggregator/ you are going to modify two files and save them into your themes folder. Do not save this file back into your /modules folder.. instead save it into your themes folder where your template.php resides, otherwise it will just be overwritten next time you do a routine upgrade of Drupal.

First open aggregator-item.tpl.php

Find this line:

<a href="<?php print $feed_url; ?>" >

and replace it with

<a href="<?php print $feed_url; ?>" target="myfeed">

where "myfeed" is any window target identifier you want to use so that each feed will open into that same new tab. Use "_blank" if you want every link to open in its own new tab, but that's usually not the best way for a feed to work, in my opinion.

In this same file make this change:

<a href="<?php print $source_url; ?>" >

and replace it with

<a href="<?php print $source_url; ?>" target="myfeed">

Write the modified file into your themes folder:for example /themes/garland or in my case /themes/colorise

You must do this same step to one more file - the file that controls the summaries listing on your "Source" page

Modify aggregator-summary-item.tpl.php

Find this line:

<a href="<?php print $feed_url; ?>" >

and replace it with

<a href="<?php print $feed_url; ?>" target="myfeed">

Save it also to your themes folder and not to the /modules/aggregator folder

  评论这张
 
阅读(193)| 评论(0)
推荐 转载

历史上的今天

评论

<#--最新日志,群博日志--> <#--推荐日志--> <#--引用记录--> <#--博主推荐--> <#--随机阅读--> <#--首页推荐--> <#--历史上的今天--> <#--被推荐日志--> <#--上一篇,下一篇--> <#-- 热度 --> <#-- 网易新闻广告 --> <#--右边模块结构--> <#--评论模块结构--> <#--引用模块结构--> <#--博主发起的投票-->
 
 
 
 
 
 
 
 
 
 
 
 
 
 

页脚

网易公司版权所有 ©1997-2016