diff --git a/application/default/controllers/NewsController.php b/application/default/controllers/NewsController.php index 7c0784ea..b5c7e8d5 100644 --- a/application/default/controllers/NewsController.php +++ b/application/default/controllers/NewsController.php @@ -71,7 +71,10 @@ class NewsController extends Zend_Controller_Action $this->view->types=$types; - $sql = "SELECT * FROM news_archives WHERE typeid='{$row['id']}' AND ts_published<".time()." AND pub>=1 ORDER BY ts_published DESC"; + $sql = "SELECT arc.*,c.url FROM news_archives arc + left join news_catlog c ON arc.typeid=c.id + WHERE arc.typeid='{$row['id']}' AND arc.ts_published<".time()." AND arc.pub>=1 + ORDER BY arc.ts_published DESC"; $rs = $this->db->query($sql); $rows = $rs->fetchAll(); diff --git a/application/default/views/scripts/news/archive.phtml b/application/default/views/scripts/news/archive.phtml index c4cf5b50..32dd32aa 100644 --- a/application/default/views/scripts/news/archive.phtml +++ b/application/default/views/scripts/news/archive.phtml @@ -32,12 +32,6 @@ $this->headMeta()->appendName('description', mb_substr($this->infos['description -
-
Search
-
- -
-
diff --git a/application/default/views/scripts/news/index.phtml b/application/default/views/scripts/news/index.phtml index f441242c..6f48d5c7 100644 --- a/application/default/views/scripts/news/index.phtml +++ b/application/default/views/scripts/news/index.phtml @@ -27,12 +27,6 @@ $this->breadcrumb()->setSeparator(' > ');
-
-
Search
-
- -
-
@@ -48,12 +42,12 @@ $this->breadcrumb()->setSeparator(' > '); $description = "No description"; }else if (mb_strlen($v['description'])>160) { - $description = mb_substr($v['description'],0,160,'utf-8').'...(more)'; + $description = mb_substr($v['description'],0,160,'utf-8').'...(more)'; }else{ $description = $v['description']; } echo '
  • - '.$v['title'].'
    + ['.$v['typetitle'].''.$v['title'].'
    TIME : '.date("Y-m-d H:i",$v['ts_published']).'

    '.$description.'

  • '; diff --git a/application/default/views/scripts/news/list.phtml b/application/default/views/scripts/news/list.phtml index ccb9272f..9e4dc0c0 100644 --- a/application/default/views/scripts/news/list.phtml +++ b/application/default/views/scripts/news/list.phtml @@ -28,12 +28,6 @@ $this->breadcrumb()->setSeparator(' > ');
    -
    -
    Search
    -
    - -
    -
    @@ -49,12 +43,12 @@ $this->breadcrumb()->setSeparator(' > '); $description = "No description"; }else if (mb_strlen($v['description'])>160) { - $description = mb_substr($v['description'],0,160,'utf-8').'...(more)'; + $description = mb_substr($v['description'],0,160,'utf-8').'...(more)'; }else{ $description = $v['description']; } echo '
  • - '.$v['title'].'
    + '.$v['title'].'
    TIME : '.date("Y-m-d H:i",$v['ts_published']).'

    '.$description.'

  • ';