summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--BitBlogPost.php30
-rw-r--r--admin/admin_blogs_inc.php22
-rw-r--r--bit_setup_inc.php26
-rw-r--r--display_bitblogpost_inc.php54
-rw-r--r--edit.php68
-rw-r--r--index.php14
-rw-r--r--list_blogs.php26
-rw-r--r--lookup_post_inc.php4
-rw-r--r--modules/mod_last_blog_posts.php14
-rw-r--r--modules/mod_last_created_blogs.php4
-rw-r--r--modules/mod_last_modified_blogs.php4
-rw-r--r--modules/mod_top_active_blogs.php4
-rw-r--r--modules/mod_top_visited_blogs.php6
-rw-r--r--post.php83
-rw-r--r--print_blog_post.php35
-rw-r--r--rankings.php14
-rw-r--r--send_post.php43
-rw-r--r--templates/center_list_blog_posts.php32
-rw-r--r--templates/preview_post.tpl12
-rw-r--r--view.php78
-rw-r--r--view_post.php7
-rw-r--r--view_post_image.php6
22 files changed, 292 insertions, 294 deletions
diff --git a/BitBlogPost.php b/BitBlogPost.php
index a5f2da2..62cd835 100644
--- a/BitBlogPost.php
+++ b/BitBlogPost.php
@@ -1,12 +1,12 @@
<?php
/**
- * $Header: /cvsroot/bitweaver/_bit_blogs/BitBlogPost.php,v 1.3 2005/07/17 17:35:56 squareing Exp $
+ * $Header: /cvsroot/bitweaver/_bit_blogs/BitBlogPost.php,v 1.4 2005/08/01 18:40:03 squareing Exp $
*
* Copyright (c) 2004 bitweaver.org
* All Rights Reserved. See copyright.txt for details and a complete list of authors.
* Licensed under the GNU LESSER GENERAL PUBLIC LICENSE. See license.txt for details
*
- * $Id: BitBlogPost.php,v 1.3 2005/07/17 17:35:56 squareing Exp $
+ * $Id: BitBlogPost.php,v 1.4 2005/08/01 18:40:03 squareing Exp $
*
* Virtual base class (as much as one can have such things in PHP) for all
* derived tikiwiki classes that require database access.
@@ -16,7 +16,7 @@
*
* @author drewslater <andrew@andrewslater.com>, spiderr <spider@steelsun.com>
*
- * @version $Revision: 1.3 $ $Date: 2005/07/17 17:35:56 $ $Author: squareing $
+ * @version $Revision: 1.4 $ $Date: 2005/08/01 18:40:03 $ $Author: squareing $
*/
/**
@@ -146,7 +146,7 @@ class BitBlogPost extends LibertyAttachable {
LibertyContent::store( $pParamHash );
}
if (empty($pParamHash['post_id'])) {
- global $smarty;
+ global $gBitSmarty;
global $feature_user_watches;
$tracks = serialize(explode(',', $pParamHash['trackback']));
$pParamHash['edit'] = strip_tags($pParamHash['edit'], '<a><b><i><h1><h2><h3><h4><h5><h6><ul><li><ol><br><p><table><tr><td><img><pre>');
@@ -175,25 +175,25 @@ class BitBlogPost extends LibertyAttachable {
global $gBitUser;
if( $nots = $gBitUser->getEventWatches( 'blog_post', $this->mInfo['blog_id'] ) ) {
foreach ($nots as $not) {
- $smarty->assign('mail_site', $_SERVER["SERVER_NAME"]);
+ $gBitSmarty->assign('mail_site', $_SERVER["SERVER_NAME"]);
- $smarty->assign('mail_title', $this->mInfo['title']);
- $smarty->assign('mail_blogid', $this->mInfo['blog_id']);
- $smarty->assign('mail_postid', $this->mPostId);
- $smarty->assign('mail_date', date("U"));
- $smarty->assign('mail_user', $this->mInfo['user']);
- $smarty->assign('mail_data', $this->mInfo['data']);
- $smarty->assign('mail_hash', $not['hash']);
+ $gBitSmarty->assign('mail_title', $this->mInfo['title']);
+ $gBitSmarty->assign('mail_blogid', $this->mInfo['blog_id']);
+ $gBitSmarty->assign('mail_postid', $this->mPostId);
+ $gBitSmarty->assign('mail_date', date("U"));
+ $gBitSmarty->assign('mail_user', $this->mInfo['user']);
+ $gBitSmarty->assign('mail_data', $this->mInfo['data']);
+ $gBitSmarty->assign('mail_hash', $not['hash']);
$foo = parse_url($_SERVER["REQUEST_URI"]);
$machine = httpPrefix(). $foo["path"];
- $smarty->assign('mail_machine', $machine);
+ $gBitSmarty->assign('mail_machine', $machine);
$parts = explode('/', $foo['path']);
if (count($parts) > 1)
unset ($parts[count($parts) - 1]);
- $smarty->assign('mail_machine_raw', httpPrefix(). implode('/', $parts));
- $mail_data = $smarty->fetch('bitpackage:blogs/user_watch_blog_post.tpl');
+ $gBitSmarty->assign('mail_machine_raw', httpPrefix(). implode('/', $parts));
+ $mail_data = $gBitSmarty->fetch('bitpackage:blogs/user_watch_blog_post.tpl');
@mail($not['email'], tra('Blog post'). ' ' . $title, $mail_data, "From: ".$gBitSystem->getPrefence( 'sender_email' )."\r\nContent-type: text/plain;charset=utf-8\r\n");
}
}
diff --git a/admin/admin_blogs_inc.php b/admin/admin_blogs_inc.php
index f628681..07838ba 100644
--- a/admin/admin_blogs_inc.php
+++ b/admin/admin_blogs_inc.php
@@ -1,19 +1,19 @@
<?php
-// $Header: /cvsroot/bitweaver/_bit_blogs/admin/admin_blogs_inc.php,v 1.2 2005/07/17 17:35:58 squareing Exp $
+// $Header: /cvsroot/bitweaver/_bit_blogs/admin/admin_blogs_inc.php,v 1.3 2005/08/01 18:40:04 squareing Exp $
// Copyright (c) 2002-2003, Luis Argerich, Garland Foster, Eduardo Polidor, et. al.
// All Rights Reserved. See copyright.txt for details and a complete list of authors.
// Licensed under the GNU LESSER GENERAL PUBLIC LICENSE. See license.txt for details.
if (isset($_REQUEST["blogset"]) && isset($_REQUEST["homeBlog"])) {
$gBitSystem->storePreference("home_blog", $_REQUEST["homeBlog"]);
- $smarty->assign('home_blog', $_REQUEST["homeBlog"]);
+ $gBitSmarty->assign('home_blog', $_REQUEST["homeBlog"]);
}
require_once( BLOGS_PKG_PATH.'BitBlog.php' );
if (defined("CATEGORIES_PKG_PATH") and $gBitSystem->isPackageActive( 'categories' )) {
include_once( CATEGORIES_PKG_PATH.'categ_lib.php');
$categs = $categlib->get_all_categories();
- $smarty->assign('categs',$categs);
+ $gBitSmarty->assign('categs',$categs);
}
$formBlogLists = array(
@@ -46,7 +46,7 @@ $formBlogLists = array(
'note' => 'This number is an indication of how active a given blog is. The number is calculated based on god knows what...',
),
);
-$smarty->assign( 'formBlogLists',$formBlogLists );
+$gBitSmarty->assign( 'formBlogLists',$formBlogLists );
$formBlogFeatures = array(
"feature_blog_rankings" => array(
@@ -61,7 +61,7 @@ $formBlogFeatures = array(
'label' => 'Spellchecking',
),
);
-$smarty->assign( 'formBlogFeatures',$formBlogFeatures );
+$gBitSmarty->assign( 'formBlogFeatures',$formBlogFeatures );
$processForm = set_tab();
@@ -75,22 +75,22 @@ if( $processForm ) {
$gBitSystem->storePreference("feature_blogposts_comments", isset( $_REQUEST["feature_blogposts_comments"] ) ? 'y' : 'n');
$gBitSystem->storePreference("blog_list_order", $_REQUEST["blog_list_order"]);
$gBitSystem->storePreference("blog_list_user", $_REQUEST["blog_list_user"]);
- $smarty->assign('blog_list_order', $_REQUEST["blog_list_order"]);
- $smarty->assign('blog_list_user', $_REQUEST['blog_list_user']);
+ $gBitSmarty->assign('blog_list_order', $_REQUEST["blog_list_order"]);
+ $gBitSmarty->assign('blog_list_user', $_REQUEST['blog_list_user']);
if ($gBitSystem->isPackageActive( 'categories' )) {
if (isset($_REQUEST["blog_categ"]) && $_REQUEST["blog_categ"] == "on") {
$gBitSystem->storePreference("blog_categ", 'y');
- $smarty->assign("blog_categ", 'y');
+ $gBitSmarty->assign("blog_categ", 'y');
} else {
$gBitSystem->storePreference("blog_categ", 'n');
- $smarty->assign("blog_categ", 'n');
+ $gBitSmarty->assign("blog_categ", 'n');
}
$gBitSystem->storePreference("blog_parent_categ", $_REQUEST["blog_parent_categ"]);
- $smarty->assign('blog_parent_categ', $_REQUEST['blog_parent_categ']);
+ $gBitSmarty->assign('blog_parent_categ', $_REQUEST['blog_parent_categ']);
}
}
$blogs = $gBlog->list_blogs(0, -1, 'created_desc', '');
-$smarty->assign_by_ref('blogs', $blogs["data"]);
+$gBitSmarty->assign_by_ref('blogs', $blogs["data"]);
?>
diff --git a/bit_setup_inc.php b/bit_setup_inc.php
index e03a1a2..a3083ae 100644
--- a/bit_setup_inc.php
+++ b/bit_setup_inc.php
@@ -3,7 +3,7 @@
* @package blogs
*/
-global $gBitSystem, $smarty, $bit_p_blog_admin;
+global $gBitSystem, $gBitSmarty, $bit_p_blog_admin;
$gBitSystem->registerPackage( 'blogs', dirname( __FILE__).'/' );
if( $gBitSystem->isPackageActive( 'blogs' ) ) {
@@ -12,18 +12,18 @@ if( $gBitSystem->isPackageActive( 'blogs' ) ) {
$gBitSystem->registerNotifyEvent( array( "blog_post" => tra("An entry is posted to a blog") ) );
- $smarty->assign('home_blog', 0);
- $smarty->assign('blog_spellcheck', 'n');
- $smarty->assign('blog_list_order', 'created_desc');
- $smarty->assign('blog_list_title', 'y');
- $smarty->assign('blog_list_description', 'y');
- $smarty->assign('blog_list_created', 'y');
- $smarty->assign('blog_list_lastmodif', 'y');
- $smarty->assign('blog_list_user', 'y');
- $smarty->assign('blog_list_posts', 'y');
- $smarty->assign('blog_list_visits', 'y');
- $smarty->assign('blog_list_activity', 'y');
- $smarty->assign('blog_list_user', 'text');
+ $gBitSmarty->assign('home_blog', 0);
+ $gBitSmarty->assign('blog_spellcheck', 'n');
+ $gBitSmarty->assign('blog_list_order', 'created_desc');
+ $gBitSmarty->assign('blog_list_title', 'y');
+ $gBitSmarty->assign('blog_list_description', 'y');
+ $gBitSmarty->assign('blog_list_created', 'y');
+ $gBitSmarty->assign('blog_list_lastmodif', 'y');
+ $gBitSmarty->assign('blog_list_user', 'y');
+ $gBitSmarty->assign('blog_list_posts', 'y');
+ $gBitSmarty->assign('blog_list_visits', 'y');
+ $gBitSmarty->assign('blog_list_activity', 'y');
+ $gBitSmarty->assign('blog_list_user', 'text');
}
diff --git a/display_bitblogpost_inc.php b/display_bitblogpost_inc.php
index abe6320..6a1479f 100644
--- a/display_bitblogpost_inc.php
+++ b/display_bitblogpost_inc.php
@@ -58,24 +58,24 @@ $gBitSystem->verifyPackage( 'blogs' );
if (!isset($gContent->mPostId) && $post_id) {
$gContent->mPostId = $gContent->mInfo['blog_id'];
}
-$smarty->assign('post_info', $gContent->mInfo );
-$smarty->assign('post_id', $gContent->mPostId);
+$gBitSmarty->assign('post_info', $gContent->mInfo );
+$gBitSmarty->assign('post_id', $gContent->mPostId);
$_REQUEST["blog_id"] = $gContent->mInfo["blog_id"];
-$smarty->assign('blog_id', $_REQUEST["blog_id"]);
+$gBitSmarty->assign('blog_id', $_REQUEST["blog_id"]);
if( !empty( $gContent->mInfo['blog_style'] ) && $gBitSystem->getPreference('feature_user_theme') == 'h' ) {
$gBitSystem->setStyle( $gContent->mInfo['blog_style'] );
$gBitLoc['styleSheet'] = $gBitSystem->getStyleCss( $gContent->mInfo['blog_style'], $gContent->mInfo['user_id'] );
- $smarty->assign( 'userStyle', $gContent->mInfo['blog_style'] );
+ $gBitSmarty->assign( 'userStyle', $gContent->mInfo['blog_style'] );
}
//Build absolute URI for this
$parts = parse_url($_SERVER['REQUEST_URI']);
$uri = httpPrefix(). $parts['path'] . '?blog_id=' . $gContent->mInfo['blog_id'] . '&post_id=' . $gContent->mPostId;
$uri2 = httpPrefix(). $parts['path'] . '/' . $gContent->mInfo['blog_id'] . '/' . $gContent->mPostId;
-$smarty->assign('uri', $uri);
-$smarty->assign('uri2', $uri2);
+$gBitSmarty->assign('uri', $uri);
+$gBitSmarty->assign('uri2', $uri2);
if (!isset($_REQUEST['offset']))
$_REQUEST['offset'] = 0;
@@ -86,9 +86,9 @@ if (!isset($_REQUEST['sort_mode']))
if (!isset($_REQUEST['find']))
$_REQUEST['find'] = '';
-$smarty->assign('offset', $_REQUEST["offset"]);
-$smarty->assign('sort_mode', $_REQUEST["sort_mode"]);
-$smarty->assign('find', $_REQUEST["find"]);
+$gBitSmarty->assign('offset', $_REQUEST["offset"]);
+$gBitSmarty->assign('sort_mode', $_REQUEST["sort_mode"]);
+$gBitSmarty->assign('find', $_REQUEST["find"]);
$offset = $_REQUEST["offset"];
$sort_mode = $_REQUEST["sort_mode"];
$find = $_REQUEST["find"];
@@ -100,30 +100,30 @@ if (!isset($_REQUEST['page']))
$pages = $gContent->getNumberOfPages($parsed_data);
$parsed_data = $gContent->getPage($parsed_data, $_REQUEST['page']);
-$smarty->assign('pages', $pages);
+$gBitSmarty->assign('pages', $pages);
if ($pages > $_REQUEST['page']) {
- $smarty->assign('next_page', $_REQUEST['page'] + 1);
+ $gBitSmarty->assign('next_page', $_REQUEST['page'] + 1);
} else {
- $smarty->assign('next_page', $_REQUEST['page']);
+ $gBitSmarty->assign('next_page', $_REQUEST['page']);
}
if ($_REQUEST['page'] > 1) {
- $smarty->assign('prev_page', $_REQUEST['page'] - 1);
+ $gBitSmarty->assign('prev_page', $_REQUEST['page'] - 1);
} else {
- $smarty->assign('prev_page', 1);
+ $gBitSmarty->assign('prev_page', 1);
}
-$smarty->assign('first_page', 1);
-$smarty->assign('last_page', $pages);
-$smarty->assign('page', $_REQUEST['page']);
+$gBitSmarty->assign('first_page', 1);
+$gBitSmarty->assign('last_page', $pages);
+$gBitSmarty->assign('page', $_REQUEST['page']);
-$smarty->assign('parsed_data', $parsed_data);
+$gBitSmarty->assign('parsed_data', $parsed_data);
-$smarty->assign('individual', 'n');
+$gBitSmarty->assign('individual', 'n');
if ($gBitUser->object_has_one_permission($_REQUEST["blog_id"], 'blog')) {
- $smarty->assign('individual', 'y');
+ $gBitSmarty->assign('individual', 'y');
if (!$gBitUser->isAdmin()) {
// Now get all the permissions that are set for this type of permissions 'image gallery'
@@ -135,11 +135,11 @@ if ($gBitUser->object_has_one_permission($_REQUEST["blog_id"], 'blog')) {
if ($gBitUser->object_has_permission($user, $_REQUEST["blog_id"], 'blog', $perm_name)) {
$$perm_name = 'y';
- $smarty->assign("$perm_name", 'y');
+ $gBitSmarty->assign("$perm_name", 'y');
} else {
$$perm_name = 'n';
- $smarty->assign("$perm_name", 'n');
+ $gBitSmarty->assign("$perm_name", 'n');
}
}
}
@@ -148,22 +148,22 @@ if ($gBitUser->object_has_one_permission($_REQUEST["blog_id"], 'blog')) {
if ($gBitUser->hasPermission( 'bit_p_blog_admin' )) {
$bit_p_create_blogs = 'y';
- $smarty->assign('bit_p_create_blogs', 'y');
+ $gBitSmarty->assign('bit_p_create_blogs', 'y');
$bit_p_blog_post = 'y';
- $smarty->assign('bit_p_blog_post', 'y');
+ $gBitSmarty->assign('bit_p_blog_post', 'y');
$bit_p_read_blog = 'y';
- $smarty->assign('bit_p_read_blog', 'y');
+ $gBitSmarty->assign('bit_p_read_blog', 'y');
}
$gBitSystem->verifyPermission( 'bit_p_read_blog' );
/*if (!$gBitUser->hasPermission( 'bit_p_read_blog' )) {
- $smarty->assign('msg', tra("Permission denied you can not view this section"));
+ $gBitSmarty->assign('msg', tra("Permission denied you can not view this section"));
$gBitSystem->display( 'error.tpl' );
die;
}*/
-$smarty->assign('ownsblog', ( $gBitUser->isValid() && $gBitUser->mUserId == $gContent->mInfo["user_id"] ) ? 'y' : 'n' );
+$gBitSmarty->assign('ownsblog', ( $gBitUser->isValid() && $gBitUser->mUserId == $gContent->mInfo["user_id"] ) ? 'y' : 'n' );
if ($gBitSystem->isFeatureActive( 'feature_blogposts_comments' ) ) {
$comments_return_url = $PHP_SELF."?post_id=".$gContent->mPostId;
diff --git a/edit.php b/edit.php
index 4fa6d63..1e3fe09 100644
--- a/edit.php
+++ b/edit.php
@@ -1,6 +1,6 @@
<?php
/**
- * @version $Header: /cvsroot/bitweaver/_bit_blogs/edit.php,v 1.2 2005/06/28 07:45:39 spiderr Exp $
+ * @version $Header: /cvsroot/bitweaver/_bit_blogs/edit.php,v 1.3 2005/08/01 18:40:04 squareing Exp $
* @package blogs
* @subpackage functions
*/
@@ -28,10 +28,10 @@ if (isset($_REQUEST["blog_id"])) {
$blog_id = 0;
}
-$smarty->assign('individual', 'n');
+$gBitSmarty->assign('individual', 'n');
if ($gBitUser->object_has_one_permission($blog_id, 'blog')) {
- $smarty->assign('individual', 'y');
+ $gBitSmarty->assign('individual', 'y');
if (!$gBitUser->isAdmin()) {
// Now get all the permissions that are set for this content type
@@ -39,33 +39,33 @@ if ($gBitUser->object_has_one_permission($blog_id, 'blog')) {
foreach( array_keys( $perms ) as $permName ) {
if ($gBitUser->object_has_permission( $user, $_REQUEST["blog_id"], 'blog', $permName ) ) {
$$permName = 'y';
- $smarty->assign( $permName, 'y');
+ $gBitSmarty->assign( $permName, 'y');
} else {
$$permName = 'n';
- $smarty->assign( $permName, 'n');
+ $gBitSmarty->assign( $permName, 'n');
}
}
}
}
-$smarty->assign('blog_id', $blog_id);
-$smarty->assign('title', '');
-$smarty->assign('description', '');
-$smarty->assign('public', 'n');
-$smarty->assign('use_find', 'y');
-$smarty->assign('use_title', 'y');
-$smarty->assign('allow_comments', 'y');
-$smarty->assign('max_posts', 10);
+$gBitSmarty->assign('blog_id', $blog_id);
+$gBitSmarty->assign('title', '');
+$gBitSmarty->assign('description', '');
+$gBitSmarty->assign('public', 'n');
+$gBitSmarty->assign('use_find', 'y');
+$gBitSmarty->assign('use_title', 'y');
+$gBitSmarty->assign('allow_comments', 'y');
+$gBitSmarty->assign('max_posts', 10);
if (!isset($created)) {
$created=time();
- $smarty->assign('created', $created);
+ $gBitSmarty->assign('created', $created);
}
if (!isset($last_modified)) {
$last_modified=time();
- $smarty->assign('last_modified', $last_modified);
+ $gBitSmarty->assign('last_modified', $last_modified);
}
if (isset($_REQUEST["heading"])and $bit_p_edit_templates) {
@@ -74,7 +74,7 @@ if (isset($_REQUEST["heading"])and $bit_p_edit_templates) {
$heading = '';
}
-$smarty->assign_by_ref('heading', $heading);
+$gBitSmarty->assign_by_ref('heading', $heading);
if (isset($_REQUEST["blog_id"]) && $_REQUEST["blog_id"] > 0) {
// Check permission
@@ -84,36 +84,36 @@ if (isset($_REQUEST["blog_id"]) && $_REQUEST["blog_id"] > 0) {
$gBitSystem->verifyPermission( 'bit_p_blog_admin', "Permission denied you cannot edit this blog" );
}
- $smarty->assign('title', $data["title"]);
- $smarty->assign('description', $data["description"]);
- $smarty->assign('public', $data["public"]);
- $smarty->assign('use_title', $data["use_title"]);
- $smarty->assign('allow_comments', $data["allow_comments"]);
- $smarty->assign('use_find', $data["use_find"]);
- $smarty->assign('max_posts', $data["max_posts"]);
- $smarty->assign('heading', $data["heading"]);
+ $gBitSmarty->assign('title', $data["title"]);
+ $gBitSmarty->assign('description', $data["description"]);
+ $gBitSmarty->assign('public', $data["public"]);
+ $gBitSmarty->assign('use_title', $data["use_title"]);
+ $gBitSmarty->assign('allow_comments', $data["allow_comments"]);
+ $gBitSmarty->assign('use_find', $data["use_find"]);
+ $gBitSmarty->assign('max_posts', $data["max_posts"]);
+ $gBitSmarty->assign('heading', $data["heading"]);
} else {
$data = NULL;
}
// Now check permissions to access this page
if (!$gBitUser->hasPermission( 'bit_p_create_blogs' ) && ($gBitUser->mUserId != $data['user_id'] || !$gBitUser->mUserId) ) {
- $smarty->assign('msg', tra("Permission denied you cannot create or edit blogs"));
+ $gBitSmarty->assign('msg', tra("Permission denied you cannot create or edit blogs"));
$gBitSystem->display( 'error.tpl' );
die;
}
if (isset($_REQUEST['preview'])) {
- $smarty->assign('title', $_REQUEST["title"]);
+ $gBitSmarty->assign('title', $_REQUEST["title"]);
- $smarty->assign('description', $_REQUEST["description"]);
- $smarty->assign('public', isset($_REQUEST["public"]) ? 'y' : 'n');
- $smarty->assign('use_find', isset($_REQUEST["use_find"]) ? 'y' : 'n');
- $smarty->assign('use_title', isset($_REQUEST["use_title"]) ? 'y' : 'n');
- $smarty->assign('allow_comments', isset($_REQUEST["allow_comments"]) ? 'y' : 'n');
- $smarty->assign('max_posts', $_REQUEST["max_posts"]);
- $smarty->assign('heading', $heading);
+ $gBitSmarty->assign('description', $_REQUEST["description"]);
+ $gBitSmarty->assign('public', isset($_REQUEST["public"]) ? 'y' : 'n');
+ $gBitSmarty->assign('use_find', isset($_REQUEST["use_find"]) ? 'y' : 'n');
+ $gBitSmarty->assign('use_title', isset($_REQUEST["use_title"]) ? 'y' : 'n');
+ $gBitSmarty->assign('allow_comments', isset($_REQUEST["allow_comments"]) ? 'y' : 'n');
+ $gBitSmarty->assign('max_posts', $_REQUEST["max_posts"]);
+ $gBitSmarty->assign('heading', $heading);
}
if (isset($_REQUEST['save_blog'])) {
@@ -157,7 +157,7 @@ if ($gBitSystem->isPackageActive( 'categories' )) {
$gBitSystem->setBrowserTitle("Edit Blog Post - ".$data['title']);
// Display the Index Template
-$smarty->assign('show_page_bar', 'n');
+$gBitSmarty->assign('show_page_bar', 'n');
$gBitSystem->display( 'bitpackage:blogs/edit_blog.tpl');
?>
diff --git a/index.php b/index.php
index b7bcc8f..4340b7d 100644
--- a/index.php
+++ b/index.php
@@ -1,6 +1,6 @@
<?php
/**
- * @version $Header: /cvsroot/bitweaver/_bit_blogs/index.php,v 1.2 2005/06/28 07:45:39 spiderr Exp $
+ * @version $Header: /cvsroot/bitweaver/_bit_blogs/index.php,v 1.3 2005/08/01 18:40:04 squareing Exp $
* @package blogss
* @subpackage functions
@@ -28,15 +28,15 @@ if ($gBitSystem->isPackageActive( 'categories' )) {
}
$categs = $categlib->list_all_categories(0, -1, 'name_asc', '', '', 0);
- $smarty->assign('categs',$categs['data']);
- $smarty->assign('page','index.php');
- $choosecateg = str_replace('"',"'",$smarty->fetch('bitpackage:blogs/popup_categs.tpl'));
- $smarty->assign('choosecateg',$choosecateg);
+ $gBitSmarty->assign('categs',$categs['data']);
+ $gBitSmarty->assign('page','index.php');
+ $choosecateg = str_replace('"',"'",$gBitSmarty->fetch('bitpackage:blogs/popup_categs.tpl'));
+ $gBitSmarty->assign('choosecateg',$choosecateg);
}
-$smarty->assign( 'showEmpty', TRUE );
+$gBitSmarty->assign( 'showEmpty', TRUE );
$gDefaultCenter = 'bitpackage:blogs/center_list_blog_posts.tpl';
-$smarty->assign_by_ref( 'gDefaultCenter', $gDefaultCenter );
+$gBitSmarty->assign_by_ref( 'gDefaultCenter', $gDefaultCenter );
// Display the template
$gBitSystem->display( 'bitpackage:kernel/dynamic.tpl', 'List Blog Posts' );
diff --git a/list_blogs.php b/list_blogs.php
index 4c8d7ed..1833ca5 100644
--- a/list_blogs.php
+++ b/list_blogs.php
@@ -1,6 +1,6 @@
<?php
/**
- * @version $Header: /cvsroot/bitweaver/_bit_blogs/list_blogs.php,v 1.2 2005/06/28 07:45:39 spiderr Exp $
+ * @version $Header: /cvsroot/bitweaver/_bit_blogs/list_blogs.php,v 1.3 2005/08/01 18:40:04 squareing Exp $
* @package blogs
* @subpackage functions
*/
@@ -22,7 +22,7 @@ $gBitSystem->verifyPermission( 'bit_p_read_blog' );
/*
if($feature_listPages != 'y') {
- $smarty->assign('msg',tra("This feature is disabled"));
+ $gBitSmarty->assign('msg',tra("This feature is disabled"));
$gBitSystem->display( 'error.tpl' );
die;
}
@@ -31,7 +31,7 @@ if($feature_listPages != 'y') {
/*
// Now check permissions to access this page
if(!$gBitUser->hasPermission( 'bit_p_view' )) {
- $smarty->assign('msg',tra("Permission denied you cannot view pages"));
+ $gBitSmarty->assign('msg',tra("Permission denied you cannot view pages"));
$gBitSystem->display( 'error.tpl' );
die;
}
@@ -67,7 +67,7 @@ if( empty( $_REQUEST["sort_mode"] ) ) {
$sort_mode = $_REQUEST["sort_mode"];
}
-$smarty->assign_by_ref('sort_mode', $sort_mode);
+$gBitSmarty->assign_by_ref('sort_mode', $sort_mode);
// If offset is set use it if not then use offset =0
// use the maxRecords php variable to set the limit
@@ -83,7 +83,7 @@ if (isset($_REQUEST['page'])) {
$offset = ($page - 1) * $maxRecords;
}
-$smarty->assign_by_ref('offset', $offset);
+$gBitSmarty->assign_by_ref('offset', $offset);
if (isset($_REQUEST["find"])) {
$find = $_REQUEST["find"];
@@ -91,7 +91,7 @@ if (isset($_REQUEST["find"])) {
$find = '';
}
-$smarty->assign('find', $find);
+$gBitSmarty->assign('find', $find);
// Get a list of last changes to the Wiki database
$listpages = $gBlog->list_blogs($offset, $maxRecords, $sort_mode, $find);
@@ -132,23 +132,23 @@ for ($i = 0; $i < count($listpages["data"]); $i++) {
// If there're more records then assign next_offset
$cant_pages = ceil($listpages["cant"] / $maxRecords);
-$smarty->assign_by_ref('cant_pages', $cant_pages);
-$smarty->assign('actual_page', 1 + ($offset / $maxRecords));
+$gBitSmarty->assign_by_ref('cant_pages', $cant_pages);
+$gBitSmarty->assign('actual_page', 1 + ($offset / $maxRecords));
if ($listpages["cant"] > ($offset + $maxRecords)) {
- $smarty->assign('next_offset', $offset + $maxRecords);
+ $gBitSmarty->assign('next_offset', $offset + $maxRecords);
} else {
- $smarty->assign('next_offset', -1);
+ $gBitSmarty->assign('next_offset', -1);
}
// If offset is > 0 then prev_offset
if ($offset > 0) {
- $smarty->assign('prev_offset', $offset - $maxRecords);
+ $gBitSmarty->assign('prev_offset', $offset - $maxRecords);
} else {
- $smarty->assign('prev_offset', -1);
+ $gBitSmarty->assign('prev_offset', -1);
}
-$smarty->assign_by_ref('listpages', $listpages["data"]);
+$gBitSmarty->assign_by_ref('listpages', $listpages["data"]);
//print_r($listpages["data"]);
$section = 'blogs';
diff --git a/lookup_post_inc.php b/lookup_post_inc.php
index cf4f1dd..dabb050 100644
--- a/lookup_post_inc.php
+++ b/lookup_post_inc.php
@@ -4,13 +4,13 @@
* @subpackage functions
*/
- global $gContent, $smarty;
+ global $gContent, $gBitSmarty;
if( empty( $gContent ) || !is_object( $gContent ) || !$gContent->isValid() ) {
$postId = isset( $_REQUEST['post_id'] ) ? $_REQUEST['post_id'] : NULL;
$gContent = new BitBlogPost( $postId );
$gContent->load();
$comments_return_url = $_SERVER['PHP_SELF']."?post_id=$postId";
- $smarty->assign_by_ref( 'gContent', $gContent );
+ $gBitSmarty->assign_by_ref( 'gContent', $gContent );
}
?>
diff --git a/modules/mod_last_blog_posts.php b/modules/mod_last_blog_posts.php
index fb70812..45ce8ae 100644
--- a/modules/mod_last_blog_posts.php
+++ b/modules/mod_last_blog_posts.php
@@ -3,7 +3,7 @@
* Params:
* - title : if is "title", show the title of the post, else show the date of creation
*
- * @version $Header: /cvsroot/bitweaver/_bit_blogs/modules/mod_last_blog_posts.php,v 1.2 2005/06/28 07:45:39 spiderr Exp $
+ * @version $Header: /cvsroot/bitweaver/_bit_blogs/modules/mod_last_blog_posts.php,v 1.3 2005/08/01 18:40:05 squareing Exp $
* @package blogs
* @subpackage modules
*/
@@ -20,7 +20,7 @@ include_once( BLOGS_PKG_PATH.'BitBlogPost.php' );
require_once( USERS_PKG_PATH.'BitUser.php' );
require_once( KERNEL_PKG_PATH.'mod_lib.php' );
-global $smarty, $gBlog, $modlib, $gQueryUserId, $module_rows, $module_params, $gBitSystem;
+global $gBitSmarty, $gBlog, $modlib, $gQueryUserId, $module_rows, $module_params, $gBitSystem;
$listHash = array( 'user_id' => $gQueryUserId, 'sort_mode' => 'created_desc', 'max_records' => $module_rows, 'parse_data' => TRUE );
$blogPost = new BitBlogPost();
@@ -33,10 +33,10 @@ $user_blog_id = NULL;
if( count( $ranking['data'] ) ) {
$user_blog_id = $ranking['data'][0]['blog_id'];
}
-$smarty->assign('user_blog_id', $user_blog_id);
+$gBitSmarty->assign('user_blog_id', $user_blog_id);
-$smarty->assign('maxPreviewLength', $maxPreviewLength);
-$smarty->assign('modLastBlogPosts', $ranking["data"]);
-$smarty->assign('modLastBlogPostsTitle',(isset($module_params["title"])?$module_params["title"]:""));
-$smarty->assign('blogsPackageActive', $gBitSystem->isPackageActive('blogs'));
+$gBitSmarty->assign('maxPreviewLength', $maxPreviewLength);
+$gBitSmarty->assign('modLastBlogPosts', $ranking["data"]);
+$gBitSmarty->assign('modLastBlogPostsTitle',(isset($module_params["title"])?$module_params["title"]:""));
+$gBitSmarty->assign('blogsPackageActive', $gBitSystem->isPackageActive('blogs'));
?>
diff --git a/modules/mod_last_created_blogs.php b/modules/mod_last_created_blogs.php
index c95b0d9..6459d46 100644
--- a/modules/mod_last_created_blogs.php
+++ b/modules/mod_last_created_blogs.php
@@ -1,6 +1,6 @@
<?php
/**
- * @version $Header: /cvsroot/bitweaver/_bit_blogs/modules/mod_last_created_blogs.php,v 1.2 2005/06/28 07:45:40 spiderr Exp $
+ * @version $Header: /cvsroot/bitweaver/_bit_blogs/modules/mod_last_created_blogs.php,v 1.3 2005/08/01 18:40:05 squareing Exp $
* @package blogs
* @subpackage modules
*/
@@ -14,5 +14,5 @@ require_once( USERS_PKG_PATH.'BitUser.php' );
global $gBlog, $gQueryUserId, $module_rows;
$ranking = $gBlog->list_blogs(0, $module_rows, 'created_desc', '', $gQueryUserId);
-$smarty->assign('modLastCreatedBlogs', $ranking["data"]);
+$gBitSmarty->assign('modLastCreatedBlogs', $ranking["data"]);
?>
diff --git a/modules/mod_last_modified_blogs.php b/modules/mod_last_modified_blogs.php
index e75b7a9..c4f56e8 100644
--- a/modules/mod_last_modified_blogs.php
+++ b/modules/mod_last_modified_blogs.php
@@ -1,6 +1,6 @@
<?php
/**
- * @version $Header: /cvsroot/bitweaver/_bit_blogs/modules/mod_last_modified_blogs.php,v 1.2 2005/06/28 07:45:40 spiderr Exp $
+ * @version $Header: /cvsroot/bitweaver/_bit_blogs/modules/mod_last_modified_blogs.php,v 1.3 2005/08/01 18:40:05 squareing Exp $
* @package blogs
* @subpackage modules
*/
@@ -15,5 +15,5 @@ global $gBlog, $gQueryUserId, $module_rows;
$ranking = $gBlog->list_blogs(0, $module_rows, 'last_modified_desc', '', $gQueryUserId );
-$smarty->assign('modLastModifiedBlogs', $ranking["data"]);
+$gBitSmarty->assign('modLastModifiedBlogs', $ranking["data"]);
?>
diff --git a/modules/mod_top_active_blogs.php b/modules/mod_top_active_blogs.php
index 674d33e..11d8761 100644
--- a/modules/mod_top_active_blogs.php
+++ b/modules/mod_top_active_blogs.php
@@ -1,6 +1,6 @@
<?php
/**
- * @version $Header: /cvsroot/bitweaver/_bit_blogs/modules/mod_top_active_blogs.php,v 1.2 2005/06/28 07:45:40 spiderr Exp $
+ * @version $Header: /cvsroot/bitweaver/_bit_blogs/modules/mod_top_active_blogs.php,v 1.3 2005/08/01 18:40:05 squareing Exp $
* @package blogs
* @subpackage modules
*/
@@ -16,5 +16,5 @@ global $gBlog, $gQueryUserId, $modlib;
$params = $modlib->get_module_params('bitpackage:blogs/mod_top_active_blogs.tpl', $gQueryUserId);
$ranking = $gBlog->list_blogs(0, $params['rows'], 'activity_desc', '', $gQueryUserId, 'tb.`activity` IS NOT NULL');
-$smarty->assign('modTopActiveBlogs', $ranking["data"]);
+$gBitSmarty->assign('modTopActiveBlogs', $ranking["data"]);
?>
diff --git a/modules/mod_top_visited_blogs.php b/modules/mod_top_visited_blogs.php
index 6913f2d..60016ef 100644
--- a/modules/mod_top_visited_blogs.php
+++ b/modules/mod_top_visited_blogs.php
@@ -1,6 +1,6 @@
<?php
/**
- * @version $Header: /cvsroot/bitweaver/_bit_blogs/modules/mod_top_visited_blogs.php,v 1.2 2005/06/28 07:45:40 spiderr Exp $
+ * @version $Header: /cvsroot/bitweaver/_bit_blogs/modules/mod_top_visited_blogs.php,v 1.3 2005/08/01 18:40:05 squareing Exp $
* @package blogs
* @subpackage modules
*/
@@ -16,6 +16,6 @@ global $gBlog, $gQueryUserId, $modlib;
$params = $modlib->get_module_params('bitpackage:blogs/mod_top_visited_blogs.tpl', $gQueryUserId);
$ranking = $gBlog->list_blogs(0, $params['rows'], 'hits_desc', '',$gQueryUserId,' `hits` IS NOT NULL ');
-$smarty->assign('modTopVisitedBlogs', $ranking["data"]);
-$smarty->assign('bulletSrc', isset($params["bullet"]) ? $params['bullet'] : NULL);
+$gBitSmarty->assign('modTopVisitedBlogs', $ranking["data"]);
+$gBitSmarty->assign('bulletSrc', isset($params["bullet"]) ? $params['bullet'] : NULL);
?>
diff --git a/post.php b/post.php
index eb807ab..0ee7d6e 100644
--- a/post.php
+++ b/post.php
@@ -1,6 +1,7 @@
<?php
/**
- * @version $Header: /cvsroot/bitweaver/_bit_blogs/post.php,v 1.3 2005/07/17 17:35:56 squareing Exp $
+ * @version $Header: /cvsroot/bitweaver/_bit_blogs/post.php,v 1.4 2005/08/01 18:40:04 squareing Exp $
+
* @package blogs
* @subpackage functions
*/
@@ -24,7 +25,7 @@ $gBitSystem->verifyPermission( 'bit_p_blog_post' );
include_once( LIBERTY_PKG_PATH.'edit_help_inc.php' );
if (isset($_REQUEST['wysiwyg']) && $_REQUEST['wysiwyg'] == 'y') {
- $smarty->assign('wysiwyg', 'y');
+ $gBitSmarty->assign('wysiwyg', 'y');
}
if (isset($_REQUEST["blog_id"])) {
@@ -55,13 +56,13 @@ if ($gBitUser->hasPermission( 'bit_p_blog_admin' )) {
if ($blogInfo) {
//if (($blogInfo['user_id'] != $gBitUser->mUserId && $blogInfo['public'] != 'y') && !$gBlog->viewerCanPostIntoBlog()) {
if ($gBlog->viewerCanPostIntoBlog()) {
- $smarty->assign('msg', tra("You cannot post into this blog"));
+ $gBitSmarty->assign('msg', tra("You cannot post into this blog"));
$gBitSystem->display('error.tpl');
die();
}
$blogs = array($blogInfo);
} else {
- $smarty->assign('msg',tra("The given blog does not exist"));
+ $gBitSmarty->assign('msg',tra("The given blog does not exist"));
$gBitSystem->display('error.tpl');
die();
}
@@ -76,9 +77,9 @@ if (!$blog_id && count($blogs) > 0) {
if (count($blogs) == 0) {
if( $gBitUser->hasPermission( 'bit_p_create_blogs' )) {
$mid = 'bitpackage:blogs/edit_blog.tpl';
- $smarty->assign('warning', tra("Before you can post, you first need to create a blog that will hold your posts."));
+ $gBitSmarty->assign('warning', tra("Before you can post, you first need to create a blog that will hold your posts."));
} else {
- $smarty->assign('msg', tra("You can't post in any blog maybe you have to create a blog first"));
+ $gBitSmarty->assign('msg', tra("You can't post in any blog maybe you have to create a blog first"));
$mid = 'error.tpl';
}
@@ -89,11 +90,11 @@ if (count($blogs) == 0) {
$mid = 'bitpackage:blogs/blog_post.tpl';
}
-$smarty->assign('data', '');
-$smarty->assign('created', date("U"));
+$gBitSmarty->assign('data', '');
+$gBitSmarty->assign('created', date("U"));
$blog_data = $gBlog->get_blog($blog_id);
-$smarty->assign_by_ref('blog_data', $blog_data);
+$gBitSmarty->assign_by_ref('blog_data', $blog_data);
require_once( BLOGS_PKG_PATH.'lookup_post_inc.php' );
if ( $gBitSystem->isPackageActive('categories') ) {
@@ -116,14 +117,14 @@ if( isset($_REQUEST["post_id"]) && $_REQUEST["post_id"] > 0 ) {
$gBitSystem->verifyPermission( 'bit_p_blog_admin', "Permission denied you cannot edit this blog" );
}
- $smarty->assign('data', $gContent->mInfo["data"]);
- $smarty->assign('title', $gContent->mInfo["title"]);
- $smarty->assign('trackbacks_to', $gContent->mInfo["trackbacks_to"]);
- $smarty->assign('created', $gContent->mInfo["created"]);
- $smarty->assign('parsed_data', $gContent->parseData() );
+ $gBitSmarty->assign('data', $gContent->mInfo["data"]);
+ $gBitSmarty->assign('title', $gContent->mInfo["title"]);
+ $gBitSmarty->assign('trackbacks_to', $gContent->mInfo["trackbacks_to"]);
+ $gBitSmarty->assign('created', $gContent->mInfo["created"]);
+ $gBitSmarty->assign('parsed_data', $gContent->parseData() );
} else {
// Avoid undefined trackbacks_to smarty var in the case of 'preview'
- $smarty->assign('trackbacks_to', NULL);
+ $gBitSmarty->assign('trackbacks_to', NULL);
}
if (isset($_REQUEST["preview"])) {
@@ -134,9 +135,9 @@ if (isset($_REQUEST["preview"])) {
if (isset($_REQUEST["spellcheck"]) && $_REQUEST["spellcheck"] == 'on') {
$parsed_data = $gBitSystem->spellcheckreplace($data, $parsed_data, $language, 'blogedit');
- $smarty->assign('spellcheck', 'y');
+ $gBitSmarty->assign('spellcheck', 'y');
} else {
- $smarty->assign('spellcheck', 'n');
+ $gBitSmarty->assign('spellcheck', 'n');
}
}
@@ -148,16 +149,16 @@ if (isset($_REQUEST["preview"])) {
'use_title' => 'y',
'created' => time(),
);
- $smarty->assign('post_info', $post_info);
- $smarty->assign('data', $data);
- $smarty->assign('title', isset($_REQUEST["title"]) ? $_REQUEST['title'] : '');
- $smarty->assign('parsed_data', $parsed_data);
- $smarty->assign('preview', 'y');
+ $gBitSmarty->assign('post_info', $post_info);
+ $gBitSmarty->assign('data', $data);
+ $gBitSmarty->assign('title', isset($_REQUEST["title"]) ? $_REQUEST['title'] : '');
+ $gBitSmarty->assign('parsed_data', $parsed_data);
+ $gBitSmarty->assign('preview', 'y');
} elseif (isset($_REQUEST['save_post']) || isset($_REQUEST['save_post_exit'])) {
- $smarty->assign('individual', 'n');
+ $gBitSmarty->assign('individual', 'n');
if ($gBitUser->object_has_one_permission($_REQUEST["blog_id"], 'blog')) {
- $smarty->assign('individual', 'y');
+ $gBitSmarty->assign('individual', 'y');
if (!$gBitUser->isAdmin()) {
// Now get all the permissions that are set for this content type
@@ -165,10 +166,10 @@ if (isset($_REQUEST["preview"])) {
foreach( array_keys( $perms ) as $permName ) {
if ($gBitUser->object_has_permission( $user, $_REQUEST["blog_id"], 'blog', $permName ) ) {
$$permName = 'y';
- $smarty->assign( $permName, 'y');
+ $gBitSmarty->assign( $permName, 'y');
} else {
$$permName = 'n';
- $smarty->assign( $permName, 'n');
+ $gBitSmarty->assign( $permName, 'n');
}
}
}
@@ -177,11 +178,11 @@ if (isset($_REQUEST["preview"])) {
if ($gBitUser->hasPermission( 'bit_p_blog_admin' )) {
$bit_p_create_blogs = 'y';
- $smarty->assign('bit_p_create_blogs', 'y');
+ $gBitSmarty->assign('bit_p_create_blogs', 'y');
$bit_p_blog_post = 'y';
- $smarty->assign('bit_p_blog_post', 'y');
+ $gBitSmarty->assign('bit_p_blog_post', 'y');
$bit_p_read_blog = 'y';
- $smarty->assign('bit_p_read_blog', 'y');
+ $gBitSmarty->assign('bit_p_read_blog', 'y');
}
$title = isset($_REQUEST['title']) ? $_REQUEST['title'] : '';
@@ -202,7 +203,7 @@ if (isset($_REQUEST["preview"])) {
include_once( CATEGORIES_PKG_PATH.'categorize_inc.php' );
}
$postid = $_REQUEST['post_id'];
- $smarty->assign('post_id', $gContent->mPostId);
+ $gBitSmarty->assign('post_id', $gContent->mPostId);
if (isset($_REQUEST['save_post_exit'])) {
header ("location: ".BLOGS_PKG_URL."view_post.php?post_id=$postid");
@@ -215,24 +216,26 @@ if (isset($_REQUEST["preview"])) {
if (empty($data))
$data = '';
- $smarty->assign('data', $data);
- $smarty->assign('title', isset($_REQUEST["title"]) ? $_REQUEST['title'] : '');
- $smarty->assign('trackbacks_to', explode(',', $_REQUEST['trackback']));
- $smarty->assign('parsed_data', $parsed_data);
+ $gBitSmarty->assign('data', $data);
+ $gBitSmarty->assign('title', isset($_REQUEST["title"]) ? $_REQUEST['title'] : '');
+ $gBitSmarty->assign('trackbacks_to', explode(',', $_REQUEST['trackback']));
+ $gBitSmarty->assign('parsed_data', $parsed_data);
+
+ $gContent->load();
}
}
// WYSIWYG and Quicktag variable
-$smarty->assign( 'textarea_id', 'editblog' );
+$gBitSmarty->assign( 'textarea_id', 'editblog' );
if (isset($_REQUEST["post_id"])) {
$post_id = $_REQUEST["post_id"];
} else {
$post_id = NULL;
}
-$smarty->assign_by_ref('post_id', $post_id);
+$gBitSmarty->assign_by_ref('post_id', $post_id);
-$smarty->assign_by_ref('post_images', $gContent->mStorage);
+$gBitSmarty->assign_by_ref('post_images', $gContent->mStorage);
$sameurl_elements = array(
'offset',
@@ -243,14 +246,14 @@ $sameurl_elements = array(
'post_id'
);
-$smarty->assign_by_ref('blogs', $blogs);
-$smarty->assign('blog_id', $blog_id);
+$gBitSmarty->assign_by_ref('blogs', $blogs);
+$gBitSmarty->assign('blog_id', $blog_id);
$section = 'blogs';
$gBitSystem->setBrowserTitle("Create Blog Post");
// Display the Index Template
$gBitSystem->display( $mid );
-$smarty->assign('show_page_bar', 'n');
+$gBitSmarty->assign('show_page_bar', 'n');
?>
diff --git a/print_blog_post.php b/print_blog_post.php
index 21ff814..c7b3ad8 100644
--- a/print_blog_post.php
+++ b/print_blog_post.php
@@ -1,6 +1,7 @@
<?php
/**
- * @version $Header: /cvsroot/bitweaver/_bit_blogs/print_blog_post.php,v 1.3 2005/07/17 17:35:56 squareing Exp $
+ * @version $Header: /cvsroot/bitweaver/_bit_blogs/print_blog_post.php,v 1.4 2005/08/01 18:40:04 squareing Exp $
+
* @package blogs
* @subpackage functions
*/
@@ -23,14 +24,14 @@ if (!isset($_REQUEST["post_id"])) {
include_once( BLOGS_PKG_PATH.'lookup_post_inc.php' );
-$smarty->assign('post_info', $gContent->mInfo );
+$gBitSmarty->assign('post_info', $gContent->mInfo );
//Build absolute URI for this
$parts = parse_url($_SERVER['REQUEST_URI']);
$uri = httpPrefix(). $parts['path'] . '?blog_id=' . $gContent->mInfo['blog_id'] . '&post_id=' . $gContent->mInfo['post_id'];
$uri2 = httpPrefix(). $parts['path'] . '/' . $gContent->mInfo['blog_id'] . '/' . $gContent->mInfo['post_id'];
-$smarty->assign('uri', $uri);
-$smarty->assign('uri2', $uri2);
+$gBitSmarty->assign('uri', $uri);
+$gBitSmarty->assign('uri2', $uri2);
if (!isset($_REQUEST['offset']))
$_REQUEST['offset'] = 0;
@@ -41,19 +42,19 @@ if (!isset($_REQUEST['sort_mode']))
if (!isset($_REQUEST['find']))
$_REQUEST['find'] = '';
-$smarty->assign('offset', $_REQUEST["offset"]);
-$smarty->assign('sort_mode', $_REQUEST["sort_mode"]);
-$smarty->assign('find', $_REQUEST["find"]);
+$gBitSmarty->assign('offset', $_REQUEST["offset"]);
+$gBitSmarty->assign('sort_mode', $_REQUEST["sort_mode"]);
+$gBitSmarty->assign('find', $_REQUEST["find"]);
$offset = $_REQUEST["offset"];
$sort_mode = $_REQUEST["sort_mode"];
$find = $_REQUEST["find"];
-$smarty->assign( 'parsed_data', $gContent->parseData() );
+$gBitSmarty->assign( 'parsed_data', $gContent->parseData() );
-$smarty->assign('individual', 'n');
+$gBitSmarty->assign('individual', 'n');
if ($gBitUser->object_has_one_permission($gContent->mInfo['blog_id'], 'blog')) {
- $smarty->assign('individual', 'y');
+ $gBitSmarty->assign('individual', 'y');
if (!$gBitUser->isAdmin()) {
// Now get all the permissions that are set for this content type
@@ -61,10 +62,10 @@ if ($gBitUser->object_has_one_permission($gContent->mInfo['blog_id'], 'blog')) {
foreach( array_keys( $perms ) as $permName ) {
if ($gBitUser->object_has_permission( $user, $_REQUEST["blog_id"], 'blog', $permName ) ) {
$$permName = 'y';
- $smarty->assign( $permName, 'y');
+ $gBitSmarty->assign( $permName, 'y');
} else {
$$permName = 'n';
- $smarty->assign( $permName, 'n');
+ $gBitSmarty->assign( $permName, 'n');
}
}
}
@@ -73,11 +74,11 @@ if ($gBitUser->object_has_one_permission($gContent->mInfo['blog_id'], 'blog')) {
if ($gBitUser->hasPermission( 'bit_p_blog_admin' )) {
$bit_p_create_blogs = 'y';
- $smarty->assign('bit_p_create_blogs', 'y');
+ $gBitSmarty->assign('bit_p_create_blogs', 'y');
$bit_p_blog_post = 'y';
- $smarty->assign('bit_p_blog_post', 'y');
+ $gBitSmarty->assign('bit_p_blog_post', 'y');
$bit_p_read_blog = 'y';
- $smarty->assign('bit_p_read_blog', 'y');
+ $gBitSmarty->assign('bit_p_read_blog', 'y');
}
$gBitSystem->verifyPermission( 'bit_p_read_blog' );
@@ -88,7 +89,7 @@ if ($gBitUser->mUserId && $gBitUser->mUserId == $gContent->mInfo['blog_user_id']
$ownsblog = 'y';
}
-$smarty->assign('ownsblog', $ownsblog);
+$gBitSmarty->assign('ownsblog', $ownsblog);
if ($feature_theme_control == 'y') {
$cat_type = 'blog';
@@ -105,6 +106,6 @@ if ($feature_blogposts_comments == 'y') {
$gBitSystem->setBrowserTitle( $gContent->mInfo['title'] );
// Display the template
-$smarty->display("bitpackage:blogs/print_blog_post.tpl");
+$gBitSmarty->display("bitpackage:blogs/print_blog_post.tpl");
?>
diff --git a/rankings.php b/rankings.php
index 3c18040..f8ef50e 100644
--- a/rankings.php
+++ b/rankings.php
@@ -1,6 +1,6 @@
<?php
/**
- * @version $Header: /cvsroot/bitweaver/_bit_blogs/rankings.php,v 1.2 2005/06/28 07:45:39 spiderr Exp $
+ * @version $Header: /cvsroot/bitweaver/_bit_blogs/rankings.php,v 1.3 2005/08/01 18:40:04 squareing Exp $
* @package blogs
* @subpackage functions
@@ -20,7 +20,7 @@ include_once( KERNEL_PKG_PATH.'rank_lib.php' );
$gBitSystem->verifyPackage( 'blogs' );
if ($feature_blog_rankings != 'y') {
- $smarty->assign('msg', tra("This feature is disabled").": feature_blog_rankings");
+ $gBitSmarty->assign('msg', tra("This feature is disabled").": feature_blog_rankings");
$gBitSystem->display( 'error.tpl' );
die;
@@ -43,7 +43,7 @@ $allrankings = array(
)
);
-$smarty->assign('allrankings', $allrankings);
+$gBitSmarty->assign('allrankings', $allrankings);
if (!isset($_REQUEST["which"])) {
$which = 'blog_ranking_top_blogs';
@@ -51,7 +51,7 @@ if (!isset($_REQUEST["which"])) {
$which = $_REQUEST["which"];
}
-$smarty->assign('which', $which);
+$gBitSmarty->assign('which', $which);
// Get the page from the request var or default it to HomePage
if (!isset($_REQUEST["limit"])) {
@@ -60,7 +60,7 @@ if (!isset($_REQUEST["limit"])) {
$limit = $_REQUEST["limit"];
}
-$smarty->assign_by_ref('limit', $limit);
+$gBitSmarty->assign_by_ref('limit', $limit);
// Rankings:
// Top Pages
@@ -74,8 +74,8 @@ $rank["title"] = $rk["title"];
$rank["y"] = $rk["y"];
$rankings[] = $rank;
-$smarty->assign_by_ref('rankings', $rankings);
-$smarty->assign('rpage', 'rankings.php');
+$gBitSmarty->assign_by_ref('rankings', $rankings);
+$gBitSmarty->assign('rpage', 'rankings.php');
// Display the template
diff --git a/send_post.php b/send_post.php
index 11a1809..288dc4b 100644
--- a/send_post.php
+++ b/send_post.php
@@ -1,6 +1,7 @@
<?php
/**
- * @version $Header: /cvsroot/bitweaver/_bit_blogs/send_post.php,v 1.3 2005/07/17 17:35:56 squareing Exp $
+ * @version $Header: /cvsroot/bitweaver/_bit_blogs/send_post.php,v 1.4 2005/08/01 18:40:04 squareing Exp $
+
* @package blogs
* @subpackage functions
*/
@@ -23,21 +24,21 @@ if (!isset($_REQUEST["post_id"])) {
}
include_once( BLOGS_PKG_PATH.'lookup_post_inc.php' );
-$smarty->assign('post_info', $gContent->mInfo );
+$gBitSmarty->assign('post_info', $gContent->mInfo );
//Build absolute URI for this
$parts = parse_url($_SERVER['REQUEST_URI']);
$uri = httpPrefix(). $parts['path'] . '?blog_id=' . $gContent->mInfo['blog_id'] . '&post_id=' . $gContent->mInfo['post_id'];
$uri2 = httpPrefix(). $parts['path'] . '/' . $gContent->mInfo['blog_id'] . '/' . $gContent->mInfo['post_id'];
-$smarty->assign('uri', $uri);
-$smarty->assign('uri2', $uri2);
+$gBitSmarty->assign('uri', $uri);
+$gBitSmarty->assign('uri2', $uri2);
-$smarty->assign( 'parsed_data', $gContent->parseData() );
+$gBitSmarty->assign( 'parsed_data', $gContent->parseData() );
-$smarty->assign('individual', 'n');
+$gBitSmarty->assign('individual', 'n');
if ($gBitUser->object_has_one_permission($gContent->mInfo["blog_id"], 'blog')) {
- $smarty->assign('individual', 'y');
+ $gBitSmarty->assign('individual', 'y');
if (!$gBitUser->isAdmin()) {
// Now get all the permissions that are set for this content type
@@ -45,10 +46,10 @@ if ($gBitUser->object_has_one_permission($gContent->mInfo["blog_id"], 'blog')) {
foreach( array_keys( $perms ) as $permName ) {
if ($gBitUser->object_has_permission( $user, $_REQUEST["blog_id"], 'blog', $permName ) ) {
$$permName = 'y';
- $smarty->assign( $permName, 'y');
+ $gBitSmarty->assign( $permName, 'y');
} else {
$$permName = 'n';
- $smarty->assign( $permName, 'n');
+ $gBitSmarty->assign( $permName, 'n');
}
}
}
@@ -57,14 +58,14 @@ if ($gBitUser->object_has_one_permission($gContent->mInfo["blog_id"], 'blog')) {
if ($gBitUser->hasPermission( 'bit_p_blog_admin' )) {
$bit_p_create_blogs = 'y';
- $smarty->assign('bit_p_create_blogs', 'y');
+ $gBitSmarty->assign('bit_p_create_blogs', 'y');
$bit_p_blog_post = 'y';
- $smarty->assign('bit_p_blog_post', 'y');
+ $gBitSmarty->assign('bit_p_blog_post', 'y');
$bit_p_read_blog = 'y';
- $smarty->assign('bit_p_read_blog', 'y');
+ $gBitSmarty->assign('bit_p_read_blog', 'y');
}
-$smarty->assign('ownsblog', $gContent->isBlogOwner() );
+$gBitSmarty->assign('ownsblog', $gContent->isBlogOwner() );
if ($feature_blogposts_comments == 'y') {
$comments_vars = array(
@@ -92,8 +93,8 @@ if (!isset($_REQUEST['addresses'])) {
$_REQUEST['addresses'] = '';
}
-$smarty->assign('addresses', $_REQUEST['addresses']);
-$smarty->assign('sent', 'n');
+$gBitSmarty->assign('addresses', $_REQUEST['addresses']);
+$gBitSmarty->assign('sent', 'n');
if (isset($_REQUEST['send'])) {
@@ -103,17 +104,17 @@ if (isset($_REQUEST['send'])) {
$machine = httpPrefix(). $gContent->getDisplayLink();
foreach ($emails as $email) {
- $smarty->assign('mail_site', $_SERVER["SERVER_NAME"]);
+ $gBitSmarty->assign('mail_site', $_SERVER["SERVER_NAME"]);
- $smarty->assign('mail_user', $gBitUser->getDisplayName() );
- $smarty->assign('mail_title', $gContent->mInfo['title'] ? $gContent->mInfo['title'] : date("d/m/Y [h:i]", $gContent->mInfo['created']));
- $smarty->assign('mail_machine', $machine);
- $mail_data = $smarty->fetch('bitpackage:blogs/blogs_send_link.tpl');
+ $gBitSmarty->assign('mail_user', $gBitUser->getDisplayName() );
+ $gBitSmarty->assign('mail_title', $gContent->mInfo['title'] ? $gContent->mInfo['title'] : date("d/m/Y [h:i]", $gContent->mInfo['created']));
+ $gBitSmarty->assign('mail_machine', $machine);
+ $mail_data = $gBitSmarty->fetch('bitpackage:blogs/blogs_send_link.tpl');
@mail($email, tra('Post recommendation at'). ' ' . $_SERVER["SERVER_NAME"], $mail_data,
"From: ".$gBitSystem->getPreference( 'sender_email' )."\r\nContent-type: text/plain;charset=utf-8\r\n");
}
- $smarty->assign('sent', 'y');
+ $gBitSmarty->assign('sent', 'y');
}
$gBitSystem->setBrowserTitle("Send Blog Post: ".$gContent->mInfo['title']);
diff --git a/templates/center_list_blog_posts.php b/templates/center_list_blog_posts.php
index c76109f..a6444d6 100644
--- a/templates/center_list_blog_posts.php
+++ b/templates/center_list_blog_posts.php
@@ -1,6 +1,6 @@
<?php
-global $smarty, $gBlog, $gBitSystem, $categlib, $_REQUEST, $maxRecords, $gQueryUserId, $package_categories;
+global $gBitSmarty, $gBlog, $gBitSystem, $categlib, $_REQUEST, $maxRecords, $gQueryUserId, $package_categories;
$postRecords = ( $module_rows ? $module_rows : $maxRecords );
if (defined("CATEGORIES_PKG_PATH")) {
@@ -16,10 +16,10 @@ if ($gBitSystem->isPackageActive( 'categories' )) {
$categlib->uncategorize('blogpost',$_REQUEST['post_id']);
}
$categs = $categlib->list_all_categories(0, -1, 'name_asc', '', '', 0);
- $smarty->assign('categs',$categs['data']);
- $smarty->assign('page','view.php');
- $choosecateg = str_replace('"',"'",$smarty->fetch('bitpackage:blogs/popup_categs.tpl'));
- $smarty->assign('choosecateg',$choosecateg);
+ $gBitSmarty->assign('categs',$categs['data']);
+ $gBitSmarty->assign('page','view.php');
+ $choosecateg = str_replace('"',"'",$gBitSmarty->fetch('bitpackage:blogs/popup_categs.tpl'));
+ $gBitSmarty->assign('choosecateg',$choosecateg);
}
if ( empty( $_REQUEST["sort_mode"] ) ) {
@@ -28,7 +28,7 @@ if ( empty( $_REQUEST["sort_mode"] ) ) {
$sort_mode = $_REQUEST["sort_mode"];
}
-$smarty->assign_by_ref('sort_mode', $sort_mode);
+$gBitSmarty->assign_by_ref('sort_mode', $sort_mode);
// If offset is set use it if not then use offset =0
// use the maxRecords php variable to set the limit
@@ -44,16 +44,16 @@ if (isset($_REQUEST['page'])) {
$offset = ($page - 1) * $postRecords;
}
-$smarty->assign_by_ref('offset', $offset);
+$gBitSmarty->assign_by_ref('offset', $offset);
if (isset($_REQUEST["find"])) {
$find = $_REQUEST["find"];
} else {
$find = '';
}
-$smarty->assign('find', $find);
+$gBitSmarty->assign('find', $find);
-$smarty->assign('showBlogTitle', 'y');
+$gBitSmarty->assign('showBlogTitle', 'y');
$listHash['max_records'] = $postRecords;
$listHash['parse_data'] = TRUE;
@@ -70,23 +70,23 @@ $blogPosts = $blogPost->getList( $listHash );
// If there're more records then assign next_offset
$cant_pages = ceil($blogPosts["cant"] / $postRecords);
-$smarty->assign_by_ref('cant_pages', $cant_pages);
-$smarty->assign('actual_page', 1 + ($offset / $postRecords));
+$gBitSmarty->assign_by_ref('cant_pages', $cant_pages);
+$gBitSmarty->assign('actual_page', 1 + ($offset / $postRecords));
if ($blogPosts["cant"] > ($offset + $postRecords)) {
- $smarty->assign('next_offset', $offset + $postRecords);
+ $gBitSmarty->assign('next_offset', $offset + $postRecords);
} else {
- $smarty->assign('next_offset', -1);
+ $gBitSmarty->assign('next_offset', -1);
}
// If offset is > 0 then prev_offset
if ($offset > 0) {
- $smarty->assign('prev_offset', $offset - $postRecords);
+ $gBitSmarty->assign('prev_offset', $offset - $postRecords);
} else {
- $smarty->assign('prev_offset', -1);
+ $gBitSmarty->assign('prev_offset', -1);
}
-$smarty->assign_by_ref('blogPosts', $blogPosts["data"]);
+$gBitSmarty->assign_by_ref('blogPosts', $blogPosts["data"]);
//print_r($blogPosts["data"]);
diff --git a/templates/preview_post.tpl b/templates/preview_post.tpl
deleted file mode 100644
index a6e4dd5..0000000
--- a/templates/preview_post.tpl
+++ /dev/null
@@ -1,12 +0,0 @@
-<h2>{tr}Preview{/tr}: {$page}</h2>
-<div class="posthead">
-{if $blog_data.use_title eq 'y'}
- {$title}<br />
- <small>{tr}posted by{/tr} {displayname hash=$gBitUser->mInfo} on {$created|bit_short_datetime}</small>
-{else}
- {$created|bit_short_datetime}<small>{tr}posted by{/tr} {displayname hash=$gBitUser}</small>
-{/if}
-</div>
-<div class="postbody">
-{$parsed_data}
-</div>
diff --git a/view.php b/view.php
index 2ba5c3c..d0fef98 100644
--- a/view.php
+++ b/view.php
@@ -1,6 +1,6 @@
<?php
/**
- * @version $Header: /cvsroot/bitweaver/_bit_blogs/view.php,v 1.2 2005/06/28 07:45:39 spiderr Exp $
+ * @version $Header: /cvsroot/bitweaver/_bit_blogs/view.php,v 1.3 2005/08/01 18:40:04 squareing Exp $
* @package blogs
* @subpackage functions
@@ -22,7 +22,7 @@ if (defined("CATEGORIES_PKG_PATH")) {
include_once( BLOGS_PKG_PATH.'BitBlog.php' );
$gBitSystem->verifyPackage( 'blogs' );
-$smarty->assign('showBlogTitle', 'y');
+$gBitSmarty->assign('showBlogTitle', 'y');
if (isset($_REQUEST['user_id']) && !isset($_REQUEST['blog_id'])) {
// We will try and grab the first blog owned by the user id given
@@ -36,10 +36,10 @@ if (!isset($_REQUEST["blog_id"])) {
$gBitSystem->fatalError( 'No blog indicated' );
}
-$smarty->assign('individual', 'n');
+$gBitSmarty->assign('individual', 'n');
if ($gBitUser->object_has_one_permission( $_REQUEST["blog_id"], $gBlog->getContentType() )) {
- $smarty->assign('individual', 'y');
+ $gBitSmarty->assign('individual', 'y');
if (!$gBitUser->isAdmin()) {
// Now get all the permissions that are set for this type of permissions 'image gallery'
@@ -52,11 +52,11 @@ if ($gBitUser->object_has_one_permission( $_REQUEST["blog_id"], $gBlog->getConte
if ($gBitUser->object_has_permission( $gBitUser->mUserId, $_REQUEST["blog_id"], $gBlog->getContentType(), $perm_name ) ) {
$$perm_name = 'y';
- $smarty->assign("$perm_name", 'y');
+ $gBitSmarty->assign("$perm_name", 'y');
} else {
$$perm_name = 'n';
- $smarty->assign("$perm_name", 'n');
+ $gBitSmarty->assign("$perm_name", 'n');
}
}
}
@@ -71,43 +71,43 @@ if ($gBitSystem->isPackageActive( 'categories' )) {
$categlib->uncategorize('blogpost',$_REQUEST['post_id']);
}
$categs = $categlib->list_all_categories(0, -1, 'name_asc', '', '', 0);
- $smarty->assign('categs',$categs['data']);
- $smarty->assign('page','view.php');
- $choosecateg = str_replace('"',"'",$smarty->fetch('bitpackage:blogs/popup_categs.tpl'));
- $smarty->assign('choosecateg',$choosecateg);
+ $gBitSmarty->assign('categs',$categs['data']);
+ $gBitSmarty->assign('page','view.php');
+ $choosecateg = str_replace('"',"'",$gBitSmarty->fetch('bitpackage:blogs/popup_categs.tpl'));
+ $gBitSmarty->assign('choosecateg',$choosecateg);
}
$blog_data = $gBlog->get_blog($_REQUEST["blog_id"]);
if( !empty( $blog_data['blog_style'] ) && $gBitSystem->getPreference('feature_user_theme') == 'h' ) {
$gBitSystem->setStyle( $blog_data['blog_style'] );
$gBitLoc['styleSheet'] = $gBitSystem->getStyleCss( $blog_data['blog_style'], $blog_data['user_id'] );
- $smarty->assign( 'userStyle', $blog_data['blog_style'] );
+ $gBitSmarty->assign( 'userStyle', $blog_data['blog_style'] );
}
$ownsblog = ($gBitUser->mUserId == $blog_data["user_id"] ) ? 'y' : 'n';
-$smarty->assign('ownsblog', $ownsblog);
+$gBitSmarty->assign('ownsblog', $ownsblog);
if (!$blog_data) {
$gBitSystem->fatalError( 'Blog not found' );
}
$gBlog->add_blog_hit($_REQUEST["blog_id"]);
-$smarty->assign('blog_id', $_REQUEST["blog_id"]);
-$smarty->assign('title', $blog_data["title"]);
-$smarty->assign('heading', $blog_data["heading"]);
-$smarty->assign('use_title', $blog_data["use_title"]);
-$smarty->assign('use_find', $blog_data["use_find"]);
-$smarty->assign('allow_comments', $blog_data["allow_comments"]);
-$smarty->assign('description', $blog_data["description"]);
-$smarty->assign('created', $blog_data["created"]);
-$smarty->assign('last_modified', $blog_data["last_modified"]);
-$smarty->assign('posts', $blog_data["posts"]);
-$smarty->assign('public', $blog_data["public"]);
-$smarty->assign('hits', $blog_data["hits"]);
-$smarty->assign('creator', $blog_data["user_id"]);
-$smarty->assign('activity', $blog_data["activity"]);
-$smarty->assign('avatar', $blog_data["avatar"]);
-$smarty->assign_by_ref('blog_data', $blog_data);
+$gBitSmarty->assign('blog_id', $_REQUEST["blog_id"]);
+$gBitSmarty->assign('title', $blog_data["title"]);
+$gBitSmarty->assign('heading', $blog_data["heading"]);
+$gBitSmarty->assign('use_title', $blog_data["use_title"]);
+$gBitSmarty->assign('use_find', $blog_data["use_find"]);
+$gBitSmarty->assign('allow_comments', $blog_data["allow_comments"]);
+$gBitSmarty->assign('description', $blog_data["description"]);
+$gBitSmarty->assign('created', $blog_data["created"]);
+$gBitSmarty->assign('last_modified', $blog_data["last_modified"]);
+$gBitSmarty->assign('posts', $blog_data["posts"]);
+$gBitSmarty->assign('public', $blog_data["public"]);
+$gBitSmarty->assign('hits', $blog_data["hits"]);
+$gBitSmarty->assign('creator', $blog_data["user_id"]);
+$gBitSmarty->assign('activity', $blog_data["activity"]);
+$gBitSmarty->assign('avatar', $blog_data["avatar"]);
+$gBitSmarty->assign_by_ref('blog_data', $blog_data);
if (isset($_REQUEST["remove"])) {
@@ -145,26 +145,26 @@ if (!empty($_REQUEST['offset'])) {
$offset = 0;
}
$cant_pages = ceil($blogPosts["cant"] / $blog_data["max_posts"]);
-$smarty->assign_by_ref('cant_pages', $cant_pages);
-$smarty->assign('actual_page', 1 + ($listHash['offset'] / $blog_data["max_posts"]));
-$smarty->assign_by_ref('offset', $listHash['offset']);
-$smarty->assign_by_ref('sort_mode', $listHash['sort_mode']);
+$gBitSmarty->assign_by_ref('cant_pages', $cant_pages);
+$gBitSmarty->assign('actual_page', 1 + ($listHash['offset'] / $blog_data["max_posts"]));
+$gBitSmarty->assign_by_ref('offset', $listHash['offset']);
+$gBitSmarty->assign_by_ref('sort_mode', $listHash['sort_mode']);
if ($blogPosts["cant"] > ($listHash['offset'] + $blog_data["max_posts"])) {
- $smarty->assign('next_offset', $offset + $blog_data["max_posts"]);
+ $gBitSmarty->assign('next_offset', $offset + $blog_data["max_posts"]);
} else {
- $smarty->assign('next_offset', -1);
+ $gBitSmarty->assign('next_offset', -1);
}
// If offset is > 0 then prev_offset
if ($listHash['offset'] > 0) {
- $smarty->assign('prev_offset', $offset - $blog_data["max_posts"]);
+ $gBitSmarty->assign('prev_offset', $offset - $blog_data["max_posts"]);
} else {
- $smarty->assign('prev_offset', -1);
+ $gBitSmarty->assign('prev_offset', -1);
}
// If there're more records then assign next_offset
-$smarty->assign_by_ref('blogPosts', $blogPosts["data"]);
+$gBitSmarty->assign_by_ref('blogPosts', $blogPosts["data"]);
//print_r($blogPosts["data"]);
if( $gBitSystem->isFeatureActive( 'feature_theme_control' ) ) {
@@ -194,10 +194,10 @@ if( $gBitSystem->isFeatureActive( 'feature_user_watches' ) ) {
}
}
- $smarty->assign('user_watching_blog', 'n');
+ $gBitSmarty->assign('user_watching_blog', 'n');
if ( $watch = $gBitUser->getEventWatches( $gBitUser->mUserId, 'blog_post', $_REQUEST['blog_id'])) {
- $smarty->assign('user_watching_blog', 'y');
+ $gBitSmarty->assign('user_watching_blog', 'y');
}
}
diff --git a/view_post.php b/view_post.php
index eeccc40..3cb163f 100644
--- a/view_post.php
+++ b/view_post.php
@@ -1,6 +1,7 @@
<?php
/**
- * @version $Header: /cvsroot/bitweaver/_bit_blogs/view_post.php,v 1.3 2005/07/17 17:35:56 squareing Exp $
+ * @version $Header: /cvsroot/bitweaver/_bit_blogs/view_post.php,v 1.4 2005/08/01 18:40:04 squareing Exp $
+
* @package blogs
* @subpackage functions
*/
@@ -31,4 +32,8 @@ if( $gContent->load() ) {
} else {
$gBitSystem->fatalError( 'Post could not be found.' );
}
+
+
+
+
?>
diff --git a/view_post_image.php b/view_post_image.php
index c636fa6..67bc199 100644
--- a/view_post_image.php
+++ b/view_post_image.php
@@ -1,6 +1,6 @@
<?php
/**
- * @version $Header: /cvsroot/bitweaver/_bit_blogs/view_post_image.php,v 1.2 2005/06/28 07:45:39 spiderr Exp $
+ * @version $Header: /cvsroot/bitweaver/_bit_blogs/view_post_image.php,v 1.3 2005/08/01 18:40:04 squareing Exp $
* @package blogs
* @subpackage functions
@@ -18,12 +18,12 @@ require_once( '../bit_setup_inc.php' );
include_once( BLOGS_PKG_PATH.'BitBlog.php' );
if (!isset($_REQUEST["image_id"])) {
- $smarty->assign('msg', tra("No image id given"));
+ $gBitSmarty->assign('msg', tra("No image id given"));
$gBitSystem->display( 'error.tpl' );
die;
}
$imageInfo = $gBlog->getStorageFileInfo($_REQUEST["image_id"]);
-$smarty->assign( 'imageInfo' , $imageInfo );
+$gBitSmarty->assign( 'imageInfo' , $imageInfo );
$gBitSystem->display( 'bitpackage:blogs/view_post_image.tpl' );
?>