- Timestamp:
- 07/09/06 15:40:22 (2 years ago)
- Location:
- branches/class-rewrite
- Files:
-
- 1 added
- 5 modified
-
common/hosts.php (modified) (1 diff)
-
common/livesearch.php (modified) (1 diff)
-
common/mvblog.php (added)
-
common/rss.php (modified) (6 diffs)
-
common/tb.php (modified) (4 diffs)
-
index.php (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/class-rewrite/common/hosts.php
r175 r188 1 <? 1 <?php 2 2 /* 3 3 * MvBlog -- An open source no-noncence blogtool 4 4 * 5 * Copyright (C) 2005 , Michiel van Baak5 * Copyright (C) 2005-2006, Michiel van Baak 6 6 * Logo design (C) 2005, Sofie van Tendeloo 7 7 * -
branches/class-rewrite/common/livesearch.php
r118 r188 1 <? 1 <?php 2 2 function db_init() { 3 3 session_start(); -
branches/class-rewrite/common/rss.php
r154 r188 1 <? 1 <?php 2 2 /* 3 3 * MvBlog -- An open source no-noncence blogtool … … 16 16 * at the top of the source tree. 17 17 */ 18 require("functions_blog.php"); 18 require("mvblog.php"); 19 $mvblog = new MvBlog(); 19 20 //get all the authors in an array 20 $res =& $ db->query("SELECT * FROM authors");21 $res =& $mvblog->db->query("SELECT * FROM authors"); 21 22 22 23 if (PEAR::isError($res)) { … … 27 28 $authors[$row["id"]]["fullname"] = $row["fullname"]; 28 29 $authors[$row["id"]]["email"] = $row["email"]; 29 }30 //same with categories31 $res =& $db->query("SELECT * FROM categories");32 33 if (PEAR::isError($res)) {34 die($res->getMessage());35 }36 37 while ($res->fetchInto($row, DB_FETCHMODE_ASSOC)) {38 $categories[$row["id"]] = $row["name"];39 30 } 40 31 … … 55 46 $comments = false; 56 47 } 57 $res =& $ db->limitQuery($sql, 0, 20);48 $res =& $mvblog->db->limitQuery($sql, 0, 20); 58 49 59 50 if (PEAR::isError($res)) { … … 82 73 } else { 83 74 echo "\t\t\t<link>".$url."index.php?action=view&id=".$row["id"]."$link</link>\n"; 84 echo "\t\t\t<category>".$ categories[$row["categories_id"]]."</category>\n";75 echo "\t\t\t<category>".$mvblog->categories[$row["categories_id"]]."</category>\n"; 85 76 echo "\t\t\t<guid isPermaLink=\"true\">".$url."index.php?action=view&id=".$row["id"]."$link</guid>\n"; 86 77 if (!$comments) { … … 89 80 } 90 81 } 91 echo "\t\t\t<description>". strip_bbcode(strip_tags(str_replace("##BREAKPOINT##", "", stripslashes($row["body"]))))."</description>\n";82 echo "\t\t\t<description>".$mvblog->strip_bbcode(strip_tags(str_replace("##BREAKPOINT##", "", stripslashes($row["body"]))))."</description>\n"; 92 83 echo "\t\t\t<pubDate>".date("r", $row["date"])."</pubDate>\n"; 93 84 -
branches/class-rewrite/common/tb.php
r118 r188 1 <? 1 <?php 2 2 /* 3 3 * MvBlog -- An open source no-noncence blogtool 4 4 * 5 * Copyright (C) 2005 , Michiel van Baak5 * Copyright (C) 2005-2006, Michiel van Baak 6 6 * Logo design (C) 2005, Sofie van Tendeloo 7 7 * … … 17 17 */ 18 18 19 require("functions_blog.php"); 19 require("mvblog.php"); 20 $mvblog = new MvBlog(); 20 21 21 22 function tb_response($error=0, $errorstr="") { … … 39 40 /* check to see if this article is here */ 40 41 $sql = sprintf("SELECT COUNT(*) AS count FROM articles WHERE active = 1 AND public = 1 AND id = %d", $tb_id); 41 $res =& $ db->query($sql);42 $res =& $mvblog->db->query($sql); 42 43 $res->fetchInto($row, DB_FETCHMODE_ASSOC); 43 44 if (!$row["count"]) { … … 67 68 preg_quote(strip_tags($title), "'") 68 69 ); 69 $res =& $ db->query($sql);70 $res =& $mvblog->db->query($sql); 70 71 if (PEAR::isError($res)) { 71 72 tb_response(1, "Something went wrong with inserting your trackback in the comments system. error:".$res->getUserInfo()); -
branches/class-rewrite/index.php
r172 r188 1 <? 1 <?php 2 2 /* 3 3 * MvBlog -- An open source no-noncence blogtool … … 17 17 */ 18 18 19 require("common/functions_blog.php"); 20 html_header(); 19 require("common/mvblog.php"); 20 $mvblog = new MvBlog(); 21 $mvblog->html_header(); 21 22 ?> 22 23 <div id="if_container"> … … 24 25 <div id="if_bar1"></div> 25 26 <div id="if_page_header"> 26 <h1 class="page_title"><a href="index.php" class="page_header"><? =blog_get_title()?></a></h1>27 <h1 class="page_title"><a href="index.php" class="page_header"><?php echo $mvblog->blog_get_title(); ?></a></h1> 27 28 </div> 28 29 <div id="if_page"> 29 30 <table><tr> 30 31 <td valign="top" width="90%" id="if_content_container"> 31 <p class="first"><? =blog_get_description()?></p>32 <? blog_content(0,0); ?>32 <p class="first"><?php echo $mvblog->blog_get_description(); ?></p> 33 <?php $mvblog->blog_content(0,0); ?> 33 34 </td> 34 35 <td valign="top" id="if_sidebar_container"> … … 36 37 <li> 37 38 <h2>Users</h2> 38 <? blog_show_login(); ?>39 <?php $mvblog->blog_show_login(); ?> 39 40 </li> 40 41 <li> 41 42 <h2>Site</h2> 42 <? blog_default_links(); ?>43 <?php $mvblog->blog_default_links(); ?> 43 44 </li> 44 45 <li> 45 46 <h2>Style</h2> 46 <? blog_show_styleswitcher(); ?>47 <?php $mvblog->blog_show_styleswitcher(); ?> 47 48 </li> 48 49 <li> 49 50 <h2>Monthly Archive</h2> 50 <? blog_archive_links(); ?>51 <?php $mvblog->blog_archive_links(); ?> 51 52 </li> 52 53 <li> 53 54 <h2>Category Archive</h2> 54 <? blog_cats_links(); ?>55 <?php $mvblog->blog_cats_links(); ?> 55 56 </li> 56 57 <li> 57 58 <h2>Search</h2> 58 <? blog_show_search(); ?>59 <?php $mvblog->blog_show_search(); ?> 59 60 </li> 60 61 <li> 61 62 <h2>Links etc.</h2> 62 <? blog_show_menulinks(); ?>63 <?php $mvblog->blog_show_menulinks(); ?> 63 64 </li> 64 65 </ul> 65 66 </td> 66 67 </tr></table> 67 <? html_footer(); ?>68 <?php $mvblog->html_footer(); ?>
