Joomla 如何让IE6升级页面显示给IE7用户?

Joomla 如何让IE6升级页面显示给IE7用户?,joomla,internet-explorer-7,internet-explorer-6,Joomla,Internet Explorer 7,Internet Explorer 6,我正在使用Joomla 1.7和Yootheme模板。有一个选项可以向IE6用户显示“升级浏览器”页面,我也想向IE7用户显示它。我将如何修改此代码来执行此操作 public function isIE6() { if ($this['useragent']->browser() == 'msie' && $this['useragent']->version() == '6.0') { if ($this->get('forwardie6')

我正在使用Joomla 1.7和Yootheme模板。有一个选项可以向IE6用户显示“升级浏览器”页面,我也想向IE7用户显示它。我将如何修改此代码来执行此操作

public function isIE6() {
    if ($this['useragent']->browser() == 'msie' && $this['useragent']->version() == '6.0') {
    if ($this->get('forwardie6') !== null) {
    $this->cookie('WarpForwardie6', (int) $this->get('forwardie6') == 0 ? 'no' : 'yes');
        }
    }
return false;
}

我认为没有其他与IE6相关的功能,所以

我只想换衣服

if ($this['useragent']->browser() == 'msie' && $this['useragent']->version() == '6.0') {
进入


我不认为会有任何与强迫IE7被视为IE6相关的问题,我只想改变这一点-

if ($this['useragent']->browser() == 'msie' && $this['useragent']->version() == '6.0') {
对此-

if ($this['useragent']->browser() == 'msie' && int($this['useragent']->version()) < 8) {

这适用于IE 8之前的任何版本。

还有其他幕后代码。。。但基本上,您需要添加另一个条件,否则将版本更改为“7.0”,但其余代码需要更深入的分析…在这种情况下,您还可以将函数重命名为isOldIE,并使用数字解析和小于两个字符串比较,而不是两个字符串比较。然后再介绍IE5:为什么要重命名可以在许多地方使用的函数?我完全同意将IE5纳入范围,还有。。。对于IE4和更低版本的用户,我将使用exit扩展函数;:]
if ($this['useragent']->browser() == 'msie' && int($this['useragent']->version()) < 8) {