Changeset 591
- Timestamp:
- 09/02/07 23:10:37 (10 months ago)
- Files:
-
- trunk/CSS-Documentation (modified) (1 diff)
- trunk/common/mvblog.php (modified) (5 diffs)
- trunk/common/mvblog_common.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/CSS-Documentation
r587 r591 16 16 17 17 h1.log_archive_h1 : tag for an archive (monthly or category) 18 19 div.log_dossier_description : Header above page with articles in a specific dossier 18 20 19 21 div.log_post : container tag for post (excl. comments) trunk/common/mvblog.php
r587 r591 167 167 /* article related functions */ 168 168 case "view" : $this->show_article($_REQUEST["id"]); break; 169 case "viewdossier" : $this->get_articles($start, $limit, 0, $_REQUEST["id"]); break; 169 170 case "post_comment" : $this->post_comment($_POST); break; 170 171 case "rss" : header("Location: common/rss.php"); break; … … 189 190 * @param int $limit the ammount of items to show 190 191 * @param int $archive type of archive. 0 = none, 1 = archive by date, 2 = archive by category, 3 = archive of asides, 4 = old old old 191 */ 192 public function get_articles($start, $limit, $archive=0) { 192 * @param int $dossier if not 0 show info about dossier 193 */ 194 public function get_articles($start, $limit, $archive=0, $dossier=0) { 193 195 // FB: 20070304: Check key and set a default if not set. 194 196 if (array_key_exists("top", $_REQUEST)) { … … 209 211 "top" => $top, 210 212 "archive" => $archive, 213 "dossier" => $dossier, 211 214 "replace_references" => 1 212 215 ); … … 217 220 218 221 echo $posts["title"]; 222 223 if ($posts["is_dossier"]) 224 echo $posts["desc"]; 219 225 220 226 if ($posts["total_count"]) { … … 1280 1286 } 1281 1287 /* }}} */ 1288 /* view_dossier {{{ */ 1289 /** 1290 * Overview page for a dossier with links to the articles 1291 * 1292 * @param int $id The dossier to show 1293 */ 1294 public function view_dossier($id) { 1295 1296 } 1297 /* }}} */ 1282 1298 } 1283 1299 ?> trunk/common/mvblog_common.php
r588 r591 555 555 else 556 556 $archive = 0; 557 558 if (array_key_exists("dossier", $options) && $options["dossier"]) 559 $dossier = $options["dossier"]; 560 else 561 $dossier = 0; 557 562 558 563 switch ($archive) { … … 600 605 break; 601 606 default : 602 $q = sprintf("AND date <= %d AND public=1", $options["max_time"]); 603 $title = ""; 604 $url_prev = "index.php?top=".($options["top"]-$options["limit"]); 605 $url_next = "index.php?top=".($options["top"]+$options["limit"]); 607 if ($dossier) { 608 //get dossierinfo 609 $dq = sprintf("SELECT * FROM dossiers WHERE id = %d", $dossier); 610 $dr =& $this->db->query($dq); 611 $dossierinfo = $dr->fetchRow(MDB2_FETCHMODE_ASSOC); 612 $title = $dossierinfo["name"]; 613 $desc = $dossierinfo["desc"]; 614 $url_prev = "index.php?action=viewdossier&id=$dossier&top=".($options["top"]-$options["limit"]); 615 $url_next = "index.php?action=viewdossier&id=$dossier&top=".($options["top"]+$options["limit"]); 616 $q = sprintf("AND date <= %d AND public=1 AND dossier_id = %d", $options["max_time"], $dossier); 617 } else { 618 $q = sprintf("AND date <= %d AND public=1", $options["max_time"]); 619 $title = ""; 620 $url_prev = "index.php?top=".($options["top"]-$options["limit"]); 621 $url_next = "index.php?top=".($options["top"]+$options["limit"]); 622 } 606 623 break; 607 624 } … … 611 628 "url_next" => $url_next 612 629 ); 630 if ($dossier) { 631 $posts["desc"] = "<br /><br /><div class=\"log_dossier_description\">".$desc."</div><br />"; 632 $posts["is_dossier"] = 1; 633 } 634 613 635 if ($options["limit"]) { 614 636 $res_count =& $this->db->query("SELECT COUNT(*) FROM articles WHERE active=1 $q");
