From 6e072be843d7b80cfc2bd06961862a29e8508ae1 Mon Sep 17 00:00:00 2001 From: secretr Date: Fri, 25 Nov 2011 17:55:25 +0000 Subject: [PATCH] News now using the new URL assembling and url configuration (including URLs leading to users area) --- .../shortcodes/batch/news_shortcodes.php | 22 +++++++++---------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/e107_core/shortcodes/batch/news_shortcodes.php b/e107_core/shortcodes/batch/news_shortcodes.php index 1eafb9915..f3ea9c26e 100644 --- a/e107_core/shortcodes/batch/news_shortcodes.php +++ b/e107_core/shortcodes/batch/news_shortcodes.php @@ -68,7 +68,7 @@ class news_shortcodes extends e_shortcode } else { - return "news_item['user_id'])."'>".$this->news_item['user_name']."{$parm}"; + return "news_item)."'>".$this->news_item['user_name']."{$parm}"; } } return "e107"; @@ -113,7 +113,7 @@ class news_shortcodes extends e_shortcode { $NEWIMAGE = $param['image_nonew_small']; } - return (!$news_item['news_allow_comments'] ? ''.($pref['comments_icon'] ? $NEWIMAGE : '')." ".$param['commentlink'].$news_item['news_comment_total'].'' : $param['commentoffstring']); + return (!$news_item['news_allow_comments'] ? ''.($pref['comments_icon'] ? $NEWIMAGE : '')." ".$param['commentlink'].$news_item['news_comment_total'].'' : $param['commentoffstring']); } function sc_trackback($parm) @@ -132,7 +132,7 @@ class news_shortcodes extends e_shortcode function sc_newscategory($parm) { $category_name = $this->e107->tp->toHTML($this->news_item['category_name'], FALSE ,'defs'); - return "param['catlink'] : "#")."' href='".$this->e107->url->getUrl('core:news', 'main', 'action=list&id='.$this->news_item['news_category'].'&sef='.$this->news_item['news_category_rewrite_string'])."'>".$category_name.""; + return "param['catlink'] : "#")."' href='".$this->e107->url->create('news/list/category', $this->news_item)."'>".$category_name.""; } function sc_newsdate($parm) @@ -162,7 +162,7 @@ class news_shortcodes extends e_shortcode function sc_newscommentlink($parm) { - return ($this->news_item['news_allow_comments'] ? $this->param['commentoffstring'] : " news_item['news_id'].'&sef='.$this->news_item['news_rewrite_string'])."'>".$this->param['commentlink'].''); + return ($this->news_item['news_allow_comments'] ? $this->param['commentoffstring'] : " news_item)."'>".$this->param['commentlink'].''); } function sc_newscommentcount($parm) @@ -231,7 +231,7 @@ class news_shortcodes extends e_shortcode } else { - return $es1."news_item['news_id'].'&sef='.$this->news_item['news_rewrite_string'])."'>".EXTENDEDSTRING."".$es2; + return $es1."news_item)."'>".EXTENDEDSTRING."".$es2; } } return ''; @@ -240,13 +240,13 @@ class news_shortcodes extends e_shortcode function sc_captionclass() { $news_title = $this->e107->tp->toHTML($this->news_item['news_title'], TRUE,'TITLE'); - return "
".($this->news_item['news_render_type'] == 1 ? "news_item['news_id'].'&sef='.$this->news_item['news_rewrite_string'])."'>".$news_title."" : $news_title)."
"; + return "
".($this->news_item['news_render_type'] == 1 ? "news_item)."'>".$news_title."" : $news_title)."
"; } function sc_admincaption() { $news_title = $this->e107->tp->toHTML($this->news_item['news_title'], TRUE,'TITLE'); - return "
".($this->news_item['news_render_type'] == 1 ? "news_item['news_id'].'&sef='.$this->news_item['news_rewrite_string'])."'>".$news_title."" : $news_title)."
"; + return "
".($this->news_item['news_render_type'] == 1 ? "news_item)."'>".$news_title."" : $news_title)."
"; } function sc_adminbody($parm) @@ -280,7 +280,7 @@ class news_shortcodes extends e_shortcode break; default: - return "news_item['news_id']}&catid={$this->news_item['news_category']}&sef={$this->news_item['news_rewrite_string']}")."'>"; + return "news_item)."'>"; break; } } @@ -306,7 +306,7 @@ class news_shortcodes extends e_shortcode case 'url': default: - return "news_item['news_id']}&catid={$this->news_item['news_category']}&sef={$this->news_item['news_rewrite_string']}")."'>"; + return "news_item)."'>"; break; } } @@ -319,7 +319,7 @@ class news_shortcodes extends e_shortcode function sc_newstitlelink($parm = '') { parse_str($parm, $parms); - $url = $this->e107->url->getUrl('core:news', 'main', "action=".vartrue($parms['action'], 'extend')."&id={$this->news_item['news_id']}&sef={$this->news_item['news_rewrite_string']}"); + $url = $this->e107->url->create('news/view/item', $this->news_item); if(isset($parms['href'])) { return $url; @@ -361,7 +361,7 @@ class news_shortcodes extends e_shortcode case 'url': default: - return "news_item['news_category']}&sef={$this->news_item['news_category_rewrite_string']}")."'>"; + return "news_item)."'>"; break; } }