summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--BitPage.php105
-rw-r--r--admin/admin_wiki_inc.php14
-rw-r--r--admin/schema_inc.php8
-rw-r--r--admin/upgrade_inc.php6
-rw-r--r--bit_setup_inc.php2
-rw-r--r--copyrights.php17
-rw-r--r--display_bitpage_inc.php19
-rw-r--r--edit.php21
-rw-r--r--list_pages.php8
-rw-r--r--modules/mod_breadcrumb.tpl4
-rw-r--r--modules/mod_comm_received_objects.tpl4
-rw-r--r--modules/mod_last_modif_pages.tpl4
-rw-r--r--modules/mod_random_pages.php7
-rw-r--r--modules/mod_random_pages.tpl14
-rw-r--r--modules/mod_top_pages.tpl4
-rw-r--r--orphan_pages.php10
-rw-r--r--rankings.php10
-rw-r--r--templates/admin_wiki.tpl26
-rw-r--r--templates/center_wiki_page.tpl2
-rw-r--r--templates/copyrights.tpl2
-rwxr-xr-xtemplates/edit_book.tpl18
-rw-r--r--templates/edit_page.tpl24
-rw-r--r--templates/list_books.tpl2
-rw-r--r--templates/list_pages.tpl62
-rw-r--r--templates/menu_wiki.tpl20
-rw-r--r--templates/menu_wiki_admin.tpl2
-rw-r--r--templates/orphan_pages.tpl3
-rw-r--r--templates/page_action_bar.tpl109
-rw-r--r--templates/page_display.tpl3
-rw-r--r--templates/page_header.tpl4
-rw-r--r--templates/page_icons.tpl133
-rw-r--r--templates/preview.tpl2
-rw-r--r--templates/show_page.tpl22
33 files changed, 355 insertions, 336 deletions
diff --git a/BitPage.php b/BitPage.php
index f3cd250..54a91ba 100644
--- a/BitPage.php
+++ b/BitPage.php
@@ -1,11 +1,11 @@
<?php
/**
- * @version $Header: /cvsroot/bitweaver/_bit_wiki/BitPage.php,v 1.3 2005/06/28 07:46:27 spiderr Exp $
+ * @version $Header: /cvsroot/bitweaver/_bit_wiki/BitPage.php,v 1.4 2005/07/17 17:36:45 squareing Exp $
* @package wiki
*
* @author spider <spider@steelsun.com>
*
- * @version $Revision: 1.3 $ $Date: 2005/06/28 07:46:27 $ $Author: spiderr $
+ * @version $Revision: 1.4 $ $Date: 2005/07/17 17:36:45 $ $Author: squareing $
*
* Copyright (c) 2004 bitweaver.org
* Copyright (c) 2003 tikwiki.org
@@ -13,7 +13,7 @@
* 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: BitPage.php,v 1.3 2005/06/28 07:46:27 spiderr Exp $
+ * $Id: BitPage.php,v 1.4 2005/07/17 17:36:45 squareing Exp $
*/
/**
@@ -401,7 +401,7 @@ this watch code is only half fixed - spiderr
// ********* Footnote functions for the wiki ********** //
- function storeFootnote($pUserId, $data) {
+ function storeFootnote($pUserId, $data) {
if( $this->mPageId ) {
$querydel = "delete from `".BIT_DB_PREFIX."tiki_page_footnotes` where `user_id`=? and `page_id`=?";
$this->query( $querydel, array( $pUserId, $this->mPageId ) );
@@ -434,9 +434,7 @@ this watch code is only half fixed - spiderr
* @return the link to display the page.
*/
function getListLink( $pPageHash ) {
- global $gBitSystem;
- $baseUrl = WIKI_PKG_URL.(!$gBitSystem->isFeatureActive( 'pretty_urls' ) ? 'index.php?page=' : NULL);
- return $baseUrl.urlencode( $pPageHash['title'] );
+ return BitPage::getDisplayUrl($pPageHash['title']);
}
@@ -454,16 +452,21 @@ this watch code is only half fixed - spiderr
* @return the link to display the page.
*/
function getDisplayUrl( $pPageName=NULL ) {
+ global $gBitSystem;
if( empty( $pPageName ) ) {
$pPageName = $this->mPageName;
}
- global $gBitSystem;
- if( $gBitSystem->isFeatureActive( 'pretty_urls' ) ) {
- $ret = WIKI_PKG_URL.urlencode( $pPageName );
- } else {
- $ret = WIKI_PKG_URL.'index.php?page='.urlencode( $pPageName );
+ $rewrite_tag = $gBitSystem->isFeatureActive( 'feature_pretty_urls_extended' ) ? 'view/':'';
+ if ($gBitSystem->isFeatureActive( 'pretty_urls' )
+ || $gBitSystem->isFeatureActive( 'feature_pretty_urls_extended' ) ) {
+ $baseUrl = WIKI_PKG_URL . $rewrite_tag;
+ $baseUrl .= urlencode( $pPageName );
}
- return $ret;
+ else {
+ $baseUrl = WIKI_PKG_URL . 'index.php?page=';
+ $baseUrl .= urlencode( $pPageName );
+ }
+ return $baseUrl;
}
/**
@@ -475,7 +478,6 @@ this watch code is only half fixed - spiderr
global $gBitSystem, $gBitUser;
$ret = $pPageName;
if( $gBitSystem->isPackageActive( 'wiki' ) ) {
- $baseUrl = WIKI_PKG_URL.(!$gBitSystem->isFeatureActive( 'pretty_urls' ) ? 'index.php?page=' : NULL);
if( is_array( $pExistsHash ) ) {
if( is_array( current( $pExistsHash ) ) ) {
$exists = $pExistsHash[0];
@@ -487,10 +489,10 @@ this watch code is only half fixed - spiderr
// we have a multi-demensional array (likely returned from LibertyContent::pageExists() ) - meaning we potentially have multiple pages with the same name
if( $multi ) {
$desc = tra( 'multiple pages with this name' );
- $ret = "<a title=\"$desc\" href=\"$baseUrl" . urlencode( $exists['title'] ) . "\">$pPageName</a>";
+ $ret = "<a title=\"$desc\" href=\"" . BitPage::getDisplayUrl( $exists['title'] ) . "\">$pPageName</a>";
} elseif( count( $pExistsHash ) == 1 ) {
$desc = $exists['description'];
- $ret = "<a title=\"$desc\" href=\"$baseUrl" . urlencode( $exists['title'] ) . "\">$pPageName</a>";
+ $ret = "<a title=\"$desc\" href=\"" . BitPage::getDisplayUrl( $exists['title'] ) . "\">$pPageName</a>";
} else {
if( $gBitUser->hasPermission( 'bit_p_edit' ) ) {
$ret = "<a href=\"".WIKI_PKG_URL."edit.php?page_id=" . urlencode( $exists['title'] ). "\" class=\"create\">$pPageName</a>";
@@ -727,8 +729,7 @@ vd( $this->mErrors );
}
$old_sort_mode = '';
-
- if ($pOrphansOnly || in_array($sort_mode, array(
+ if (in_array($sort_mode, array(
'versions_desc',
'versions_asc',
'links_asc',
@@ -759,15 +760,60 @@ vd( $this->mErrors );
$bindVars = array_merge($bindVars, array( $pUserId ));
}
- // If sort mode is versions then offset is 0, maxRecords is -1 (again) and sort_mode is nil
- // If sort mode is links then offset is 0, maxRecords is -1 (again) and sort_mode is nil
- // If sort mode is backlinks then offset is 0, maxRecords is -1 (again) and sort_mode is nil
$query = "SELECT uue.`login` AS modifier_user, uue.`real_name` AS modifier_real_name, uuc.`login` AS creator_user, uuc.`real_name` AS creator_real_name ,`page_id`, `hits`, `page_size` as `len`, tc.`title`, tc.`format_guid`, tp.`description`, tc.`last_modified`, tc.`created`, `ip`, `comment`, `version`, `flag`, tp.`content_id`
FROM `".BIT_DB_PREFIX."tiki_pages` tp INNER JOIN `".BIT_DB_PREFIX."tiki_content` tc ON (tc.`content_id` = tp.`content_id`), `".BIT_DB_PREFIX."users_users` uue, `".BIT_DB_PREFIX."users_users` uuc
WHERE tc.`content_type_guid`=? AND tc.`modifier_user_id`=uue.`user_id` AND tc.`user_id`=uuc.`user_id` $mid
ORDER BY ".$this->convert_sortmode($sort_mode);
+ $query_cant = "select count(*) from
+ `".BIT_DB_PREFIX."tiki_pages` tp INNER JOIN `".BIT_DB_PREFIX."tiki_content` tc
+ ON (tc.`content_id` = tp.`content_id`)
+ WHERE tc.`content_type_guid`=? $mid";
+
+ if ($pOrphansOnly) {
+ $query = "SELECT
+ uue.`login` AS modifier_user,
+ uue.`real_name` AS modifier_real_name,
+ uuc.`login` AS creator_user,
+ uuc.`real_name` AS creator_real_name ,
+ `page_id`,
+ `hits`,
+ `page_size` as `len`,
+ tc.`title`,
+ tc.`format_guid`,
+ tp.`description`,
+ tc.`last_modified`,
+ tc.`created`,
+ `ip`,
+ `comment`,
+ `version`,
+ `flag`,
+ tp.`content_id`
+ FROM `".BIT_DB_PREFIX."tiki_pages` tp
+ LEFT JOIN `".BIT_DB_PREFIX."tiki_links` as tl on tp.content_id = tl.to_content_id
+ INNER JOIN `".BIT_DB_PREFIX."tiki_content` tc
+ ON (tc.`content_id` = tp.`content_id`),
+ `".BIT_DB_PREFIX."users_users` uue,
+ `".BIT_DB_PREFIX."users_users` uuc
+ WHERE tc.`content_type_guid`=?
+ AND tc.`modifier_user_id`=uue.`user_id`
+ AND tc.`user_id`=uuc.`user_id` $mid
+ AND tl.`to_content_id` is NULL
+ ORDER BY "
+ . $this->convert_sortmode($sort_mode);
+ $query_cant = "select count(*)
+ FROM `".BIT_DB_PREFIX."tiki_pages` tp
+ LEFT JOIN `".BIT_DB_PREFIX."tiki_links` as tl on tp.content_id = tl.to_content_id
+ INNER JOIN `".BIT_DB_PREFIX."tiki_content` tc
+ ON (tc.`content_id` = tp.`content_id`)
+ WHERE tc.`content_type_guid`=?
+ AND tl.`to_content_id` is NULL";
+ }
+
+
+ // If sort mode is versions then offset is 0, maxRecords is -1 (again) and sort_mode is nil
+ // If sort mode is links then offset is 0, maxRecords is -1 (again) and sort_mode is nil
+ // If sort mode is backlinks then offset is 0, maxRecords is -1 (again) and sort_mode is nil
- $query_cant = "select count(*) from `".BIT_DB_PREFIX."tiki_pages` tp INNER JOIN `".BIT_DB_PREFIX."tiki_content` tc ON (tc.`content_id` = tp.`content_id`) WHERE tc.`content_type_guid`=? $mid";
$result = $this->query($query,$bindVars,$maxRecords,$offset);
$cant = $this->getOne($query_cant,$bindVars);
$ret = array();
@@ -779,17 +825,16 @@ vd( $this->mErrors );
$aux['flag'] = $res["flag"] == 'L' ? tra('locked') : tra('unlocked');
$aux['display_link'] = $this->getListLink( $aux ); //WIKI_PKG_URL."index.php?page_id=".$res['page_id'];
$aux['display_url'] = $this->getDisplayUrl( $aux['title'], $aux );
- if( $pExtras || $pOrphansOnly) {
+ if( $pExtras ) {
// USE SPARINGLY!!! This gets expensive fast
// $aux['versions"] = $this->getOne("select count(*) from `".BIT_DB_PREFIX."tiki_history` where `page_id`=?", array( $res["page_id"] ) );
$aux['links'] = $this->getOne("select count(*) from `".BIT_DB_PREFIX."tiki_links` where `from_content_id`=?", array( $res["content_id"] ) );
$aux['backlinks'] = $this->getOne("select count(*) from `".BIT_DB_PREFIX."tiki_links` where `to_content_id`=?", array( $res["content_id"] ) );
}
- if( !$pOrphansOnly || $aux['backlinks'] == 0 ) {
- $ret[] = $aux;
- }
+ $ret[] = $aux;
}
+
// If sortmode is versions, links or backlinks sort using the ad-hoc function and reduce using old_offse and old_maxRecords
if ($old_sort_mode == 'versions_asc' && !empty( $ret['versions'] ) ) {
usort($ret, 'compare_versions');
@@ -826,9 +871,6 @@ vd( $this->mErrors );
$ret = array_slice($ret, $old_offset, $old_maxRecords);
}
- if( $pOrphansOnly ) {
- $ret = array_slice($ret, $old_offset, $old_maxRecords);
- }
$retval = array();
$retval["data"] = $ret;
@@ -1079,7 +1121,8 @@ class WikiLib extends BitPage {
$query = "select `content_id`, `title` from `".BIT_DB_PREFIX."tiki_content` WHERE `content_type_guid`='".BITPAGE_CONTENT_TYPE_GUID."' ORDER BY ".$this->convert_sortmode( 'random' );
$rs = $this->query( $query, array(), $pNumPages );
while( $rs && !$rs->EOF ) {
- $ret[$rs->fields['content_id']] = $rs->fields['title'];
+ $ret[$rs->fields['content_id']]['title'] = $rs->fields['title'];
+ $ret[$rs->fields['content_id']]['display_url'] = $this->getDisplayUrl( $rs->fields['title'] );
$rs->MoveNext();
}
@@ -1292,7 +1335,7 @@ class WikiLib extends BitPage {
$tar->addData($title, $data, $res["last_modified"]);
}
- $tar->toTar( $gBitSystem->getStoragePath( "dump/".$bitdomain )."new.tar", FALSE);
+ $tar->toTar( $this->getStoragePath( "dump/".$bitdomain )."new.tar", FALSE);
unset ($tar);
$action = "dump created";
$t = date("U");
diff --git a/admin/admin_wiki_inc.php b/admin/admin_wiki_inc.php
index 7412f1a..a5e5700 100644
--- a/admin/admin_wiki_inc.php
+++ b/admin/admin_wiki_inc.php
@@ -1,5 +1,5 @@
<?php
-// $Header: /cvsroot/bitweaver/_bit_wiki/admin/admin_wiki_inc.php,v 1.1 2005/06/19 06:12:45 bitweaver Exp $
+// $Header: /cvsroot/bitweaver/_bit_wiki/admin/admin_wiki_inc.php,v 1.2 2005/07/17 17:36:46 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.
@@ -304,18 +304,6 @@ if (isset($_REQUEST["removetag"])) {
// Check existance
$adminlib->remove_tag($_REQUEST["remtagname"]);
}
-if (isset($_REQUEST["wikiprefs"])) {
-
- if (isset($_REQUEST["wiki_comments_per_page"])) {
- $gBitSystem->storePreference("wiki_comments_per_page", $_REQUEST["wiki_comments_per_page"]);
- $smarty->assign('wiki_comments_per_page', $_REQUEST["wiki_comments_per_page"]);
- }
- if (isset($_REQUEST["wiki_comments_default_ordering"])) {
- $gBitSystem->storePreference("wiki_comments_default_ordering", $_REQUEST["wiki_comments_default_ordering"]);
- $smarty->assign('wiki_comments_default_ordering', $_REQUEST["wiki_comments_default_ordering"]);
- }
-}
-
if (isset($_REQUEST["setwikihome"])) {
$gBitSystem->storePreference('wikiHomePage', $_REQUEST["wikiHomePage"]);
diff --git a/admin/schema_inc.php b/admin/schema_inc.php
index c7299d7..ed99dad 100644
--- a/admin/schema_inc.php
+++ b/admin/schema_inc.php
@@ -107,7 +107,7 @@ global $gBitInstaller;
$gBitInstaller->makePackageHomeable(WIKI_PKG_NAME);
foreach( array_keys( $tables ) AS $tableName ) {
- $gBitInstaller->registerSchemaTable( WIKI_PKG_DIR, $tableName, $tables[$tableName] );
+ $gBitInstaller->registerSchemaTable( WIKI_PKG_NAME, $tableName, $tables[$tableName] );
}
$gBitInstaller->registerPackageInfo( WIKI_PKG_NAME, array(
@@ -124,13 +124,13 @@ $indices = array (
'tiki_pages_page_rank_idx' => array( 'table' => 'tiki_pages', 'cols' => 'page_rank', 'opts' => NULL ),
'tiki_page_footnotes_page_idx' => array( 'table' => 'tiki_page_footnotes', 'cols' => 'page_id', 'opts' => NULL )
);
-$gBitInstaller->registerSchemaIndexes( WIKI_PKG_DIR, $indices );
+$gBitInstaller->registerSchemaIndexes( WIKI_PKG_NAME, $indices );
// ### Sequences
$sequences = array (
'tiki_pages_page_id_seq' => array( 'start' => 1 )
);
-$gBitInstaller->registerSchemaSequences( WIKI_PKG_DIR, $sequences );
+$gBitInstaller->registerSchemaSequences( WIKI_PKG_NAME, $sequences );
// ### Default UserPermissions
@@ -194,8 +194,6 @@ $gBitInstaller->registerPreferences( WIKI_PKG_NAME, array(
array(WIKI_PKG_NAME, 'warn_on_edit_time','2'),
array(WIKI_PKG_NAME, 'wiki_bot_bar','n'),
array(WIKI_PKG_NAME, 'wiki_cache','0'),
- array(WIKI_PKG_NAME, 'wiki_comments_default_ordering','points_desc'),
- array(WIKI_PKG_NAME, 'wiki_comments_per_page','10'),
array(WIKI_PKG_NAME, 'wiki_creator_admin','n'),
array(WIKI_PKG_NAME, 'wiki_feature_copyrights','n'),
array(WIKI_PKG_NAME, 'wiki_forum',''),
diff --git a/admin/upgrade_inc.php b/admin/upgrade_inc.php
index 4b37887..78f8e75 100644
--- a/admin/upgrade_inc.php
+++ b/admin/upgrade_inc.php
@@ -129,7 +129,7 @@ array( 'QUERY' =>
"UPDATE `".BIT_DB_PREFIX."tiki_actionlog` SET `user_id`=".ROOT_USER_ID." WHERE `user_id` IS NULL",
"UPDATE `".BIT_DB_PREFIX."tiki_links` SET `from_content_id`= (SELECT `content_id` FROM `".BIT_DB_PREFIX."tiki_pages` tp WHERE tp.`pageName`=`".BIT_DB_PREFIX."tiki_links`.`fromPage`)",
"UPDATE `".BIT_DB_PREFIX."tiki_links` SET `to_content_id`= (SELECT `content_id` FROM `".BIT_DB_PREFIX."tiki_pages` tp WHERE tp.`pageName`=`".BIT_DB_PREFIX."tiki_links`.`toPage`)",
- "UPDATE users_permissions SET perm_name='bit_p_edit_books', perm_desc='Can create and edit books' WHERE perm_name='bit_p_edit_structures'",
+ "UPDATE `".BIT_DB_PREFIX."users_permissions` SET perm_name='bit_p_edit_books', perm_desc='Can create and edit books' WHERE perm_name='bit_p_edit_structures'",
"INSERT INTO `".BIT_DB_PREFIX."users_grouppermissions` (`group_id`, `perm_name`) VALUES (2,'bit_p_edit_books')",
@@ -159,7 +159,7 @@ array( 'QUERY' =>
"UPDATE `".BIT_DB_PREFIX."tiki_pages` SET `version`=(SELECT th.`version`+1 FROM `".BIT_DB_PREFIX."tiki_history` th WHERE th.`page_id`=`".BIT_DB_PREFIX."tiki_pages`.`page_id` AND `".BIT_DB_PREFIX."tiki_pages`.`version`=th.`version`) WHERE `page_id` IN (SELECT `page_id` FROM `".BIT_DB_PREFIX."tiki_history` th WHERE th.`version`=`".BIT_DB_PREFIX."tiki_pages`.`version` AND th.`page_id`=`".BIT_DB_PREFIX."tiki_pages`.`page_id`)",
// should go into users, but has to go here do to wiki needing user changes first
- "UPDATE tiki_content SET content_type_guid='bituser' WHERE title like 'UserPage%'",
+ "UPDATE `".BIT_DB_PREFIX."tiki_content` SET content_type_guid='bituser' WHERE title like 'UserPage%'",
"UPDATE `".BIT_DB_PREFIX."users_users` SET `content_id`=(SELECT `content_id` FROM `".BIT_DB_PREFIX."tiki_content` WHERE `content_type_guid`='bituser' AND `user_id`=`".BIT_DB_PREFIX."users_users`.`user_id`)",
// update comments on user pages
@@ -172,7 +172,7 @@ array( 'QUERY' =>
// set parent ID = content ID of parent comment
// this will only work correctly for TW DB upgrades, and will corrupt the DB if run more then once
"create temporary table `".BIT_DB_PREFIX."tiki_comments_temp` as (select * from `".BIT_DB_PREFIX."tiki_comments`) ",
- "UPDATE `".BIT_DB_PREFIX."tiki_comments` as tc SET `parent_id`=(SELECT i_tcm.`content_id` FROM `".BIT_DB_PREFIX."tiki_content` as i_tcn, `".BIT_DB_PREFIX."tiki_comments_temp` as i_tcm WHERE i_tcm.`content_id` = i_tcn.`content_id` and tc.`parent_id` = i_tcm.`comment_id` ) where parent_id != 0 and `objectType`='".BITPAGE_CONTENT_TYPE_GUID."' ",
+ "UPDATE `".BIT_DB_PREFIX."tiki_comments` SET `parent_id`=(SELECT i_tcm.`content_id` FROM `".BIT_DB_PREFIX."tiki_content` as i_tcn, `".BIT_DB_PREFIX."tiki_comments_temp` as i_tcm WHERE i_tcm.`content_id` = i_tcn.`content_id` and `".BIT_DB_PREFIX."tiki_comments`.`parent_id` = i_tcm.`comment_id` ) where parent_id != 0 and `objectType`='".BITPAGE_CONTENT_TYPE_GUID."' ",
// parent ID = 0 indicates a root comment in TW, but now needs to = content ID of wiki page it is the root comment for
"UPDATE `".BIT_DB_PREFIX."tiki_comments` SET `parent_id`=(SELECT `content_id` FROM `".BIT_DB_PREFIX."tiki_content` WHERE `content_type_guid`='".BITPAGE_CONTENT_TYPE_GUID."' AND `title`=`".BIT_DB_PREFIX."tiki_comments`.`object` ) WHERE `parent_id`=0 AND `objectType`='".BITPAGE_CONTENT_TYPE_GUID."'",
diff --git a/bit_setup_inc.php b/bit_setup_inc.php
index 387545f..e82ef54 100644
--- a/bit_setup_inc.php
+++ b/bit_setup_inc.php
@@ -36,8 +36,6 @@
$smarty->assign('wiki_list_links', 'y');
$smarty->assign('wiki_list_backlinks', 'y');
$smarty->assign('wiki_list_size', 'y');
- $smarty->assign('wiki_comments_default_ordering', 'points_desc');
- $smarty->assign('wiki_comments_per_page', 10);
$smarty->assign('wiki_feature_copyrights', 'n');
$smarty->assign('wiki_cache', 0);
$smarty->assign('w_use_db', 'y');
diff --git a/copyrights.php b/copyrights.php
index 139c2e6..6bd2536 100644
--- a/copyrights.php
+++ b/copyrights.php
@@ -1,6 +1,6 @@
<?php
/**
- * $Header: /cvsroot/bitweaver/_bit_wiki/copyrights.php,v 1.2 2005/06/28 07:46:27 spiderr Exp $
+ * $Header: /cvsroot/bitweaver/_bit_wiki/copyrights.php,v 1.3 2005/07/17 17:36:45 squareing Exp $
*
* Copyright (c) 2004 bitweaver.org
* Copyright (c) 2003 tikwiki.org
@@ -8,7 +8,7 @@
* 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: copyrights.php,v 1.2 2005/06/28 07:46:27 spiderr Exp $
+ * $Id: copyrights.php,v 1.3 2005/07/17 17:36:45 squareing Exp $
* @package wiki
* @subpackage functions
*/
@@ -17,16 +17,9 @@
* required setup
*/
require_once( '../bit_setup_inc.php' );
-if ($wiki_feature_copyrights != 'y') {
- $smarty->assign('msg', tra("The copyright management feature is not enabled."));
- $gBitSystem->display( 'error.tpl' );
- die;
-}
-if (!((isset($bit_p_edit_copyrights)) && ($gBitUser->hasPermission( 'bit_p_edit_copyrights' )))) {
- $smarty->assign('msg', tra("You do not have permission to use this feature."));
- $gBitSystem->display( 'error.tpl' );
- die;
-}
+$gBitSystem->isFeatureActive( 'wiki_feature_copyrights', tra("The copyright management feature is not enabled.") );
+
+$gBitUser->hasPermission( 'bit_p_edit_copyrights' );
require_once( WIKI_PKG_PATH.'copyrights_lib.php' );
require_once( WIKI_PKG_PATH.'lookup_page_inc.php' );
diff --git a/display_bitpage_inc.php b/display_bitpage_inc.php
index 00b6abf..3f66814 100644
--- a/display_bitpage_inc.php
+++ b/display_bitpage_inc.php
@@ -1,6 +1,6 @@
<?php
/**
- * $Header: /cvsroot/bitweaver/_bit_wiki/display_bitpage_inc.php,v 1.2 2005/06/28 07:46:27 spiderr Exp $
+ * $Header: /cvsroot/bitweaver/_bit_wiki/display_bitpage_inc.php,v 1.3 2005/07/17 17:36:45 squareing Exp $
*
* Copyright (c) 2004 bitweaver.org
* Copyright (c) 2003 tikwiki.org
@@ -8,7 +8,7 @@
* 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: display_bitpage_inc.php,v 1.2 2005/06/28 07:46:27 spiderr Exp $
+ * $Id: display_bitpage_inc.php,v 1.3 2005/07/17 17:36:45 squareing Exp $
* @package wiki
* @subpackage functions
*/
@@ -210,15 +210,14 @@ $smarty->assign_by_ref('description',$gContent->mInfo["description"]);
// Comments engine!
if( $gBitSystem->isFeatureActive( 'feature_wiki_comments' ) ) {
- $maxComments = $gBitSystem->getPreference( 'wiki_comments_per_page', 10 );
- $comments_default_ordering = $gBitSystem->getPreference( 'wiki_comments_default_ordering' );
- $comments_vars=Array('page');
- $comments_prefix_var='wiki page:';
- $comments_object_var='page';
- $commentsParentId = $gContent->mContentId;
- $comments_return_url = WIKI_PKG_URL.'index.php?page_id='.$gContent->mPageId;
- include_once( LIBERTY_PKG_PATH.'comments_inc.php' );
+ $comments_vars = Array('page');
+ $comments_prefix_var='wiki page:';
+ $comments_object_var='page';
+ $commentsParentId = $gContent->mContentId;
+ $comments_return_url = WIKI_PKG_URL.'index.php?page_id='.$gContent->mPageId;
+ include_once( LIBERTY_PKG_PATH.'comments_inc.php' );
}
+
$section='wiki';
if( $gBitSystem->isFeatureActive( 'feature_wiki_attachments' ) ) {
if(isset($_REQUEST["removeattach"])) {
diff --git a/edit.php b/edit.php
index 960ae3b..b212aac 100644
--- a/edit.php
+++ b/edit.php
@@ -1,6 +1,6 @@
<?php
/**
- * $Header: /cvsroot/bitweaver/_bit_wiki/edit.php,v 1.2 2005/06/28 07:46:27 spiderr Exp $
+ * $Header: /cvsroot/bitweaver/_bit_wiki/edit.php,v 1.3 2005/07/17 17:36:45 squareing Exp $
*
* Copyright (c) 2004 bitweaver.org
* Copyright (c) 2003 tikwiki.org
@@ -8,7 +8,7 @@
* 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: edit.php,v 1.2 2005/06/28 07:46:27 spiderr Exp $
+ * $Id: edit.php,v 1.3 2005/07/17 17:36:45 squareing Exp $
* @package wiki
* @subpackage functions
*/
@@ -284,8 +284,20 @@ if (isset($_REQUEST["comment"])) {
$formInfo['comment'] = $_REQUEST["comment"];
}
-if(isset($_REQUEST["preview"])) {
+$cat_type = BITPAGE_CONTENT_TYPE_GUID;
+if(isset($_REQUEST["preview"])) {
+ if ($gBitSystem->isPackageActive( 'categories' ) && isset( $_REQUEST['cat_categories'] ) ) {
+ $cat_objid = $gContent->mContentId;
+ include_once( CATEGORIES_PKG_PATH.'categorize_list_inc.php' );
+ foreach( $categories['data'] as $key => $cat ) {
+ foreach( $_REQUEST['cat_categories'] as $rCat ) {
+ if( $cat['category_id'] == $rCat ) {
+ $categories['data'][$key]['incat'] = 'y';
+ }
+ }
+ }
+ }
$smarty->assign('preview',1);
$smarty->assign('title',$_REQUEST["title"]);
@@ -345,8 +357,6 @@ function parse_output(&$obj, &$parts,$i) {
}
}
-$cat_type = BITPAGE_CONTENT_TYPE_GUID;
-
// Pro
// Check if the page has changed
if (isset($_REQUEST["fCancel"])) {
@@ -395,6 +405,7 @@ if (isset($_REQUEST["fCancel"])) {
if( $gContent->store( $_REQUEST ) ) {
if( $gBitSystem->isPackageActive( 'categories' ) ) {
$cat_objid = $gContent->mContentId;
+ $cat_obj_type = 'bitpage';
$cat_desc = ($gBitSystem->isFeatureActive( 'feature_wiki_description' ) && !empty( $_REQUEST["description"] )) ? substr($_REQUEST["description"],0,200) : '';
$cat_name = $gContent->mPageName;
$cat_href = WIKI_PKG_URL."index.php?content_id=".$cat_objid;
diff --git a/list_pages.php b/list_pages.php
index d50f3d9..b81217f 100644
--- a/list_pages.php
+++ b/list_pages.php
@@ -1,6 +1,6 @@
<?php
/**
- * $Header: /cvsroot/bitweaver/_bit_wiki/list_pages.php,v 1.2 2005/06/28 07:46:27 spiderr Exp $
+ * $Header: /cvsroot/bitweaver/_bit_wiki/list_pages.php,v 1.3 2005/07/17 17:36:45 squareing Exp $
*
* Copyright (c) 2004 bitweaver.org
* Copyright (c) 2003 tikwiki.org
@@ -8,7 +8,7 @@
* 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: list_pages.php,v 1.2 2005/06/28 07:46:27 spiderr Exp $
+ * $Id: list_pages.php,v 1.3 2005/07/17 17:36:45 squareing Exp $
* @package wiki
* @subpackage functions
*/
@@ -87,6 +87,9 @@ if (isset($_REQUEST['page'])) {
$smarty->assign_by_ref('offset', $offset);
if (isset($_REQUEST["find"])) {
$find = $_REQUEST["find"];
+// If we leave $_REQUEST["find"] set, it also seems to affect other places
+// like the shoutbox.
+ $_REQUEST["find"] = "";
} else {
$find = '';
}
@@ -98,6 +101,7 @@ $listpages = $Content->getList( $offset, $maxRecords, $sort_mode, $find, NULL, T
// 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_by_ref('pagecount', $listpages['cant']);
$smarty->assign('actual_page', 1 + ($offset / $maxRecords));
if ($listpages["cant"] > ($offset + $maxRecords)) {
$smarty->assign('next_offset', $offset + $maxRecords);
diff --git a/modules/mod_breadcrumb.tpl b/modules/mod_breadcrumb.tpl
index 5309326..a3f1a9c 100644
--- a/modules/mod_breadcrumb.tpl
+++ b/modules/mod_breadcrumb.tpl
@@ -1,6 +1,6 @@
-{* $Header: /cvsroot/bitweaver/_bit_wiki/modules/Attic/mod_breadcrumb.tpl,v 1.1 2005/06/19 06:12:45 bitweaver Exp $ *}
+{* $Header: /cvsroot/bitweaver/_bit_wiki/modules/Attic/mod_breadcrumb.tpl,v 1.2 2005/07/17 17:36:46 squareing Exp $ *}
{strip}
-{if $gBitSystemPrefs.feature_featuredLinks eq 'y'}
+{if $gBitSystem->isFeatureActive( 'feature_featuredLinks' )}
{bitmodule title="$moduleTitle" name="breadcrumb"}
<ol class="wiki">
{section name=ix loop=$breadCrumb}
diff --git a/modules/mod_comm_received_objects.tpl b/modules/mod_comm_received_objects.tpl
index ee4431f..4f2c697 100644
--- a/modules/mod_comm_received_objects.tpl
+++ b/modules/mod_comm_received_objects.tpl
@@ -1,5 +1,5 @@
-{* $Header: /cvsroot/bitweaver/_bit_wiki/modules/mod_comm_received_objects.tpl,v 1.1 2005/06/19 06:12:45 bitweaver Exp $ *}
-{if $gBitSystemPrefs.feature_comm eq 'y'}
+{* $Header: /cvsroot/bitweaver/_bit_wiki/modules/mod_comm_received_objects.tpl,v 1.2 2005/07/17 17:36:46 squareing Exp $ *}
+{if $gBitSystem->isFeatureActive( 'feature_comm' )}
{bitmodule title="$moduleTitle" name="comm_received_objects"}
<table class="module box"><tr>
<td valign="top">{tr}Pages:{/tr}</td>
diff --git a/modules/mod_last_modif_pages.tpl b/modules/mod_last_modif_pages.tpl
index 5e81aea..7243d38 100644
--- a/modules/mod_last_modif_pages.tpl
+++ b/modules/mod_last_modif_pages.tpl
@@ -1,6 +1,6 @@
-{* $Header: /cvsroot/bitweaver/_bit_wiki/modules/mod_last_modif_pages.tpl,v 1.1 2005/06/19 06:12:45 bitweaver Exp $ *}
+{* $Header: /cvsroot/bitweaver/_bit_wiki/modules/mod_last_modif_pages.tpl,v 1.2 2005/07/17 17:36:46 squareing Exp $ *}
{strip}
-{if $gBitSystemPrefs.package_wiki eq 'y'}
+{if $gBitSystem->isPackageActive( 'wiki' )}
{if $nonums eq 'y'}
{eval var="{tr}Last `$module_rows` changes{/tr}" assign="tpl_module_title"}
{else}
diff --git a/modules/mod_random_pages.php b/modules/mod_random_pages.php
index 4f8a9a0..174f5e6 100644
--- a/modules/mod_random_pages.php
+++ b/modules/mod_random_pages.php
@@ -1,6 +1,6 @@
<?php
/**
- * $Header: /cvsroot/bitweaver/_bit_wiki/modules/mod_random_pages.php,v 1.2 2005/06/28 07:46:28 spiderr Exp $
+ * $Header: /cvsroot/bitweaver/_bit_wiki/modules/mod_random_pages.php,v 1.3 2005/07/17 17:36:46 squareing Exp $
*
* Copyright (c) 2004 bitweaver.org
* Copyright (c) 2003 tikwiki.org
@@ -8,12 +8,13 @@
* 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: mod_random_pages.php,v 1.2 2005/06/28 07:46:28 spiderr Exp $
+ * $Id: mod_random_pages.php,v 1.3 2005/07/17 17:36:46 squareing Exp $
* @package wiki
* @subpackage modules
*/
+require_once( WIKI_PKG_PATH.'BitPage.php' );
global $wikilib;
$ranking = $wikilib->get_random_pages($module_rows);
$smarty->assign('modRandomPages', $ranking);
-?> \ No newline at end of file
+?>
diff --git a/modules/mod_random_pages.tpl b/modules/mod_random_pages.tpl
index 0bb846e..72299e2 100644
--- a/modules/mod_random_pages.tpl
+++ b/modules/mod_random_pages.tpl
@@ -1,14 +1,14 @@
-{* $Header: /cvsroot/bitweaver/_bit_wiki/modules/mod_random_pages.tpl,v 1.1 2005/06/19 06:12:45 bitweaver Exp $ *}
+{* $Header: /cvsroot/bitweaver/_bit_wiki/modules/mod_random_pages.tpl,v 1.2 2005/07/17 17:36:46 squareing Exp $ *}
{strip}
-{if $gBitSystemPrefs.package_wiki eq 'y'}
+{if $gBitSystem->isPackageActive( 'wiki' )}
{bitmodule title="$moduleTitle" name="random_pages"}
<ol class="wiki">
- {section name=ix loop=$modRandomPages}
- <li><a href="{$gBitLoc.WIKI_PKG_URL}index.php?page={$modRandomPages[ix]}">{$modRandomPages[ix]}</a></li>
- {sectionelse}
+ {foreach from=$modRandomPages key=contentId item=pageHash}
+ <li><a href="{$modRandomPages.$contentId.display_url}">{$modRandomPages.$contentId.title}</a></li>
+ {foreachelse}
<li></li>
- {/section}
+ {/foreach}
</ol>
{/bitmodule}
{/if}
-{/strip} \ No newline at end of file
+{/strip}
diff --git a/modules/mod_top_pages.tpl b/modules/mod_top_pages.tpl
index c958722..7cd1c12 100644
--- a/modules/mod_top_pages.tpl
+++ b/modules/mod_top_pages.tpl
@@ -1,6 +1,6 @@
-{* $Header: /cvsroot/bitweaver/_bit_wiki/modules/mod_top_pages.tpl,v 1.1 2005/06/19 06:12:45 bitweaver Exp $ *}
+{* $Header: /cvsroot/bitweaver/_bit_wiki/modules/mod_top_pages.tpl,v 1.2 2005/07/17 17:36:46 squareing Exp $ *}
{strip}
-{if $gBitSystemPrefs.package_wiki eq 'y'}
+{if $gBitSystem->isPackageActive( 'wiki' )}
{if $nonums eq 'y'}
{eval var="{tr}Top `$module_rows` Pages{/tr}" assign="tpl_module_title"}
{else}
diff --git a/orphan_pages.php b/orphan_pages.php
index 8808ab6..b8ff3bf 100644
--- a/orphan_pages.php
+++ b/orphan_pages.php
@@ -1,6 +1,6 @@
<?php
/**
- * $Header: /cvsroot/bitweaver/_bit_wiki/orphan_pages.php,v 1.2 2005/06/28 07:46:27 spiderr Exp $
+ * $Header: /cvsroot/bitweaver/_bit_wiki/orphan_pages.php,v 1.3 2005/07/17 17:36:45 squareing Exp $
*
* Copyright (c) 2004 bitweaver.org
* Copyright (c) 2003 tikwiki.org
@@ -8,7 +8,7 @@
* 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: orphan_pages.php,v 1.2 2005/06/28 07:46:27 spiderr Exp $
+ * $Id: orphan_pages.php,v 1.3 2005/07/17 17:36:45 squareing Exp $
* @package wiki
* @subpackage functions
*/
@@ -73,6 +73,7 @@ if ( empty( $_REQUEST["sort_mode"] ) ) {
} else {
$sort_mode = $_REQUEST["sort_mode"];
}
+$smarty->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
// if sortMode is not set then use last_modified_desc
@@ -93,10 +94,13 @@ if (isset($_REQUEST["find"])) {
}
$smarty->assign('find', $find);
// Get a list of last changes to the Wiki database
-$listpages = $BitPage->getList( $offset, $maxRecords, $sort_mode, $find, NULL, NULL, TRUE );
+$Content = new BitPage();
+$sort_mode = preg_replace( '/^user_/', 'creator_user_', $sort_mode );
+$listpages = $Content->getList( $offset, $maxRecords, $sort_mode, $find, NULL, TRUE, TRUE );
// 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_by_ref('pagecount', $listpages['cant']);
$smarty->assign('actual_page', 1 + ($offset / $maxRecords));
if ($listpages["cant"] > ($offset + $maxRecords)) {
$smarty->assign('next_offset', $offset + $maxRecords);
diff --git a/rankings.php b/rankings.php
index a86eea4..95e02cf 100644
--- a/rankings.php
+++ b/rankings.php
@@ -1,6 +1,6 @@
<?php
/**
- * $Header: /cvsroot/bitweaver/_bit_wiki/rankings.php,v 1.2 2005/06/28 07:46:27 spiderr Exp $
+ * $Header: /cvsroot/bitweaver/_bit_wiki/rankings.php,v 1.3 2005/07/17 17:36:45 squareing Exp $
*
* Copyright (c) 2004 bitweaver.org
* Copyright (c) 2003 tikwiki.org
@@ -8,7 +8,7 @@
* 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: rankings.php,v 1.2 2005/06/28 07:46:27 spiderr Exp $
+ * $Id: rankings.php,v 1.3 2005/07/17 17:36:45 squareing Exp $
* @package wiki
* @subpackage functions
*/
@@ -38,11 +38,11 @@ if (!isset($_REQUEST["limit"])) {
}
$allrankings = array(
array(
- 'name' => tra('Top pages'),
+ 'name' => tra('Most often viewed pages'),
'value' => 'wiki_ranking_top_pages'
),
array(
- 'name' => tra('Last pages'),
+ 'name' => tra('Most recently modified pages'),
'value' => 'wiki_ranking_last_pages'
),
array(
@@ -50,7 +50,7 @@ $allrankings = array(
'value' => 'wiki_ranking_top_pagerank'
),
array(
- 'name' => tra('Top authors'),
+ 'name' => tra('Most active authors'),
'value' => 'wiki_ranking_top_authors'
)
);
diff --git a/templates/admin_wiki.tpl b/templates/admin_wiki.tpl
index 1e28cf1..a72d5eb 100644
--- a/templates/admin_wiki.tpl
+++ b/templates/admin_wiki.tpl
@@ -193,30 +193,6 @@
</div>
{/legend}
- {legend legend="Wiki comments settings"}
- <div class="row">
- {formlabel label="Default number of comments per page" for="wiki_comments_per_page"}
- {forminput}
- <input size="5" type="text" name="wiki_comments_per_page" id="wiki_comments_per_page" value="{$wiki_comments_per_page|escape}" />
- {/forminput}
- </div>
-
- <div class="row">
- {formlabel label="Comments default ordering" for="wiki_comments_default_ordering"}
- {forminput}
- <select name="wiki_comments_default_ordering" id="wiki_comments_default_ordering">
- <option value="comment_date_desc" {if $wiki_comments_default_ordering eq 'comment_date_desc'}selected="selected"{/if}>{tr}Newest first{/tr}</option>
- <option value="comment_date_asc" {if $wiki_comments_default_ordering eq 'comment_date_asc'}selected="selected"{/if}>{tr}Oldest first{/tr}</option>
- <option value="points_desc" {if $wiki_comments_default_ordering eq 'points_desc'}selected="selected"{/if}>{tr}Points{/tr}</option>
- </select>
- {/forminput}
- </div>
-
- <div class="row submit">
- <input type="submit" name="wikiprefs" value="{tr}Change preferences{/tr}" />
- </div>
- {/legend}
-
{legend legend="Wiki Link Format"}
<div class="row">
{formlabel label="Wiki Link Format" for="wiki_page_regex"}
@@ -304,7 +280,7 @@
{/jstabs}
{/strip}
-{if $gBitSystem->mPrefs.package_tiki_forums eq 'y'}
+{if $gBitSystem->mPrefs->isPackageActive( 'tiki_forums' )}
<div class="boxcontent">
<form method="post" action="{$gBitLoc.KERNEL_PKG_URL}admin/index.php?page=wiki">
<table class="panel"><tr>
diff --git a/templates/center_wiki_page.tpl b/templates/center_wiki_page.tpl
index 8f7e6e0..407b78f 100644
--- a/templates/center_wiki_page.tpl
+++ b/templates/center_wiki_page.tpl
@@ -38,7 +38,7 @@
<div class="header"><h1>{$gContent->mInfo.title}</h1></div>
{/if}
<div class="content">
- {if $gBitSystemPrefs.liberty_auto_display_attachment_thumbs eq 'y'}
+ {if $gBitSystem->isFeatureActive( 'liberty_auto_display_attachment_thumbs' )}
{include file="bitpackage:liberty/storage_thumbs.tpl"}
{/if}
{$gContent->mInfo.parsed_data}
diff --git a/templates/copyrights.tpl b/templates/copyrights.tpl
index e1ad414..1f29f37 100644
--- a/templates/copyrights.tpl
+++ b/templates/copyrights.tpl
@@ -44,7 +44,7 @@
{/section}
{/legend}
- {form legend="Add a new copyright setting gor `$pageInfo.title`"}
+ {form legend="Add a new copyright setting for `$pageInfo.title`"}
<input type="hidden" name="page_id" value="{$pageInfo.page_id}" />
<div class="row">
{formlabel label="Title" for="copyleft-tit"}
diff --git a/templates/edit_book.tpl b/templates/edit_book.tpl
index c2a5057..8c13158 100755
--- a/templates/edit_book.tpl
+++ b/templates/edit_book.tpl
@@ -1,13 +1,11 @@
<div class="floaticon">{bithelp}</div>
-<div class="admin structure">
-<div class="header">
-<h1>{tr}Edit Wiki Book{/tr}</h1>
-</div>
+<div class="edit structure">
+ <div class="header">
+ <h1>{tr}Edit Wiki Book{/tr}</h1>
+ </div>
-<div class="body">
-
-{include file="bitpackage:liberty/edit_structure.tpl"}
-
-</div> {* end .body *}
-</div> {* end .admin *}
+ <div class="body">
+ {include file="bitpackage:liberty/edit_structure.tpl"}
+ </div><!-- end .body -->
+</div><!-- end .edit -->
diff --git a/templates/edit_page.tpl b/templates/edit_page.tpl
index d2157fd..c95a194 100644
--- a/templates/edit_page.tpl
+++ b/templates/edit_page.tpl
@@ -1,4 +1,4 @@
-{* $Header: /cvsroot/bitweaver/_bit_wiki/templates/edit_page.tpl,v 1.3 2005/06/28 07:46:29 spiderr Exp $ *}
+{* $Header: /cvsroot/bitweaver/_bit_wiki/templates/edit_page.tpl,v 1.4 2005/07/17 17:36:47 squareing Exp $ *}
<div class="floaticon">{bithelp}</div>
<div class="admin wiki">
@@ -51,14 +51,14 @@
{formlabel label="$conDescr Title" for="title"}
{forminput}
{if $gBitUser->hasPermission( 'bit_p_rename' ) || !$pageInfo.page_id}
- <input type="text" size="60" maxlength="200" name="title" id="title" value="{$pageInfo.title}" />
+ <input type="text" size="50" maxlength="200" name="title" id="title" value="{$pageInfo.title}" />
{else}
{$page} {$pageInfo.title}
{/if}
{/forminput}
</div>
- {if $gBitSystemPrefs.feature_wiki_templates eq 'y' and $gBitUser->hasPermission( 'bit_p_use_content_templates' )}
+ {if $gBitSystem->isFeatureActive( 'feature_wiki_templates' ) and $gBitUser->hasPermission( 'bit_p_use_content_templates' )}
<div class="row">
{formlabel label="Apply template" for="template_id"}
{forminput}
@@ -72,11 +72,11 @@
</div>
{/if}
- {if $gBitSystemPrefs.feature_wiki_description eq 'y'}
+ {if $gBitSystem->isFeatureActive( 'feature_wiki_description' )}
<div class="row">
{formlabel label="Description" for="description"}
{forminput}
- <input size="60" type="text" name="description" id="description" value="{$pageInfo.description}" />
+ <input size="50" type="text" name="description" id="description" value="{$pageInfo.description}" />
{formhelp note="Brief description of the page. This is visible when you hover over a link to this page and just below the title of the wiki page."}
{/forminput}
</div>
@@ -110,7 +110,7 @@
<div class="row">
{formlabel label="Comment" for="comment"}
{forminput}
- <input size="60" type="text" name="comment" id="comment" value="{$pageInfo.comment}" />
+ <input size="50" type="text" name="comment" id="comment" value="{$pageInfo.comment}" />
{formhelp note="Add a comment to illustrate your most recent changes."}
{/forminput}
</div>
@@ -139,7 +139,7 @@
{/legend}
{/jstab}
- {if $gBitSystemPrefs.package_categories eq 'y'}
+ {if $gBitSystem->isPackageActive( 'categories' )}
{jstab title="Categorize"}
{legend legend="Categorize"}
{include file="bitpackage:categories/categorize.tpl"}
@@ -160,7 +160,7 @@
{include file="bitpackage:liberty/edit_format.tpl"}
- {if $gBitSystemPrefs.wiki_feature_copyrights eq 'y'}
+ {if $gBitSystem->isFeatureActive( 'wiki_feature_copyrights' )}
<div class="row">
{formlabel label="Copyright" for="copyrightTitle"}
{forminput}
@@ -198,7 +198,7 @@
</div>
{/if}
- {if $gBitSystemPrefs.feature_wiki_icache eq 'y'}
+ {if $gBitSystem->isFeatureActive( 'feature_wiki_icache' )}
<div class="row">
{formlabel label="Cache" for="wiki_cache"}
{forminput}
@@ -238,20 +238,20 @@
{/if}
{/legend}
- {if $gBitSystemPrefs.package_nexus eq 'y'}
+ {if $gBitSystem->isPackageActive( 'nexus' )}
{legend legend="Insert Link in Menu"}
{include file="bitpackage:nexus/insert_menu_item_inc.tpl"}
{/legend}
{/if}
{/jstab}
- {if $gBitSystemPrefs.feature_wiki_url_import eq 'y'}
+ {if $gBitSystem->isFeatureActive( 'feature_wiki_url_import' )}
{jstab title="Import HMTL"}
{legend legend="Import HMTL"}
<div class="row">
{formlabel label="Import HTML from URL" for="suck_url"}
{forminput}
- <input type="text" size="60" name="suck_url" id="suck_url" value="{$suck_url|escape}" />
+ <input type="text" size="50" name="suck_url" id="suck_url" value="{$suck_url|escape}" />
{formhelp note=""}
{/forminput}
</div>
diff --git a/templates/list_books.tpl b/templates/list_books.tpl
index 827c41d..7ee0f3a 100644
--- a/templates/list_books.tpl
+++ b/templates/list_books.tpl
@@ -31,7 +31,7 @@
<a href="{$gBitLoc.WIKI_PKG_URL}edit_book.php?action=export_tree&structure_id={$channels[ix].structure_id}">{biticon ipackage="wiki" iname="tree" iexplain="dump tree"}</a>
*}
{if $gBitUser->isAdmin()}
- {if $gBitSystemPrefs.package_nexus eq 'y'}
+ {if $gBitSystem->isPackageActive( 'nexus' )}
<a href="{$gBitLoc.NEXUS_PKG_URL}menus.php?structure_id={$channels[ix].structure_id}&amp;action=convert_structure">{biticon ipackage="liberty" iname="tree" iexplain="create menu from structure"}</a>
{/if}
<a href="{$gBitLoc.WIKI_PKG_URL}create_webhelp.php?structure_id={$channels[ix].structure_id}">{biticon ipackage="wiki" iname="webhelp" iexplain="create webhelp"}</a>
diff --git a/templates/list_pages.tpl b/templates/list_pages.tpl
index cbf0c3b..b5fd45d 100644
--- a/templates/list_pages.tpl
+++ b/templates/list_pages.tpl
@@ -1,9 +1,9 @@
-{* $Header: /cvsroot/bitweaver/_bit_wiki/templates/list_pages.tpl,v 1.1 2005/06/19 06:12:45 bitweaver Exp $ *}
+{* $Header: /cvsroot/bitweaver/_bit_wiki/templates/list_pages.tpl,v 1.2 2005/07/17 17:36:47 squareing Exp $ *}
<div class="floaticon">{bithelp}</div>
<div class="admin wiki">
<div class="header">
- <h1>{tr}WikiPages{/tr}</h1>
+ <h1>{if $pagetitle ne ''}{$pagetitle}{else}{tr}WikiPages{/tr}{/if}</h1>
</div>
{formfeedback error=$errors}
@@ -14,16 +14,16 @@
<div class="navbar">
<ul>
<li>{biticon ipackage=liberty iname=sort iexplain="sort by"}</li>
- {if $gBitSystemPrefs.wiki_list_name eq 'y'}
+ {if $gBitSystem->isFeatureActive( 'wiki_list_name' )}
<li>{smartlink ititle="Page Name" isort="title" offset=$offset}</li>
{/if}
- {if $gBitSystemPrefs.wiki_list_lastmodif eq 'y'}
+ {if $gBitSystem->isFeatureActive( 'wiki_list_lastmodif' )}
<li>{smartlink ititle="Last Modified" iorder="desc" idefault=1 isort="last_modified" offset=$offset}</li>
{/if}
- {if $gBitSystemPrefs.wiki_list_creator eq 'y'}
+ {if $gBitSystem->isFeatureActive( 'wiki_list_creator' )}
<li>{smartlink ititle="Author" isort="creator_user" offset=$offset}</li>
{/if}
- {if $gBitSystemPrefs.wiki_list_user eq 'y'}
+ {if $gBitSystem->isFeatureActive( 'wiki_list_user' )}
<li>{smartlink ititle="Last Editor" isort="modifier_user" offset=$offset}</li>
{/if}
</ul>
@@ -44,39 +44,39 @@
{else}
{assign var='checkboxes_on' value='n'}
{/if}
- {if $gBitSystemPrefs.wiki_list_hits eq 'y'}
+ {if $gBitSystem->isFeatureActive( 'wiki_list_hits' )}
<th>{smartlink ititle="Hits" isort="hits" offset=$offset}</th>
{counter name=cols assign=cols print=false}
{/if}
- {if $gBitSystemPrefs.wiki_list_lastver eq 'y'}
+ {if $gBitSystem->isFeatureActive( 'wiki_list_lastver' )}
<th>{smartlink ititle="Last Version" isort="version" offset=$offset}</th>
{counter name=cols assign=cols print=false}
{/if}
- {if $gBitSystemPrefs.wiki_list_comment eq 'y'}
+ {if $gBitSystem->isFeatureActive( 'wiki_list_comment' )}
<th>{smartlink ititle="Comment" isort="comment" offset=$offset}</th>
{counter name=cols assign=cols print=false}
{/if}
- {if $gBitSystemPrefs.wiki_list_status eq 'y'}
+ {if $gBitSystem->isFeatureActive( 'wiki_list_status' )}
<th>{smartlink ititle="Status" isort="flag" offset=$offset}</th>
{counter name=cols assign=cols print=false}
{/if}
- {if $gBitSystemPrefs.wiki_list_versions eq 'y'}
+ {if $gBitSystem->isFeatureActive( 'wiki_list_versions' )}
<th>{smartlink ititle="Version" isort="versions" offset=$offset}</th>
{counter name=cols assign=cols print=false}
{/if}
- {if $gBitSystemPrefs.wiki_list_links eq 'y'}
+ {if $gBitSystem->isFeatureActive( 'wiki_list_links' )}
<th>{smartlink ititle="Links" isort="links" offset=$offset}</th>
{counter name=cols assign=cols print=false}
{/if}
- {if $gBitSystemPrefs.wiki_list_backlinks eq 'y'}
+ {if $gBitSystem->isFeatureActive( 'wiki_list_backlinks' )}
<th>{smartlink ititle="Backlinks" isort="backlinks" offset=$offset}</th>
{counter name=cols assign=cols print=false}
{/if}
- {if $gBitSystemPrefs.wiki_list_format_guid eq 'y'}
+ {if $gBitSystem->isFeatureActive( 'wiki_list_format_guid' )}
<th>{smartlink ititle="GUID" isort="format_guid" offset=$offset}</th>
{counter name=cols assign=cols print=false}
{/if}
- {if $gBitSystemPrefs.wiki_list_size eq 'y'}
+ {if $gBitSystem->isFeatureActive( 'wiki_list_size' )}
<th>{smartlink ititle="Size" isort="size" offset=$offset}</th>
{counter name=cols assign=cols print=false}
{/if}
@@ -90,16 +90,16 @@
{section name=changes loop=$listpages}
<tr class="{cycle advance=false}">
<td colspan="{$cols}">
- {if $gBitSystemPrefs.wiki_list_name eq 'y'}
+ {if $gBitSystem->isFeatureActive( 'wiki_list_name' )}
<h3><a href="{$listpages[changes].display_url}" title="{$listpages[changes].description}">{$listpages[changes].title}</a></h3>
{else}
<a href="{$gBitLoc.WIKI_PKG_URL}index.php?page_id={$listpages[changes].page_id}" title="{$listpages[changes].page_id}">Page #{$listpages[changes].page_id}</a>
{/if}
- {if $gBitSystemPrefs.wiki_list_creator eq 'y'}
+ {if $gBitSystem->isFeatureActive( 'wiki_list_creator' )}
{tr}Created by{/tr} {displayname real_name=$listpages[changes].creator_real_name user=$listpages[changes].creator_user}
{/if}
, {$listpages[changes].created|bit_short_datetime}
- {if $gBitSystemPrefs.wiki_list_lastmodif eq 'y' && ($listpages[changes].version > 1)}
+ {if $gBitSystem->isFeatureActive( 'wiki_list_lastmodif' ) && ($listpages[changes].version > 1)}
<br />
{tr}Last modified{/tr}
{if $listpages[changes].editor != $listpages[changes].creator}
@@ -110,16 +110,16 @@
</td>
</tr>
<tr class="{cycle}">
- {if $gBitSystemPrefs.wiki_list_hits eq 'y'}
+ {if $gBitSystem->isFeatureActive( 'wiki_list_hits' )}
<td style="text-align:center;">{$listpages[changes].hits}</td>
{/if}
- {if $gBitSystemPrefs.wiki_list_lastver eq 'y'}
+ {if $gBitSystem->isFeatureActive( 'wiki_list_lastver' )}
<td style="text-align:center;">{$listpages[changes].version}</td>
{/if}
- {if $gBitSystemPrefs.wiki_list_comment eq 'y'}
+ {if $gBitSystem->isFeatureActive( 'wiki_list_comment' )}
<td>{$listpages[changes].comment}</td>
{/if}
- {if $gBitSystemPrefs.wiki_list_status eq 'y'}
+ {if $gBitSystem->isFeatureActive( 'wiki_list_status' )}
<td style="text-align:center;">
{if $listpages[changes].flag eq 'locked'}
{biticon ipackage="wiki" iname="locked" iexplain="locked"}
@@ -128,27 +128,27 @@
{/if}
</td>
{/if}
- {if $gBitSystemPrefs.wiki_list_versions eq 'y'}
- {if $gBitSystemPrefs.feature_history eq 'y'}
+ {if $gBitSystem->isFeatureActive( 'wiki_list_versions' )}
+ {if $gBitSystem->isFeatureActive( 'feature_history' )}
<td style="text-align:center;">{smartlink ititle=$listpages[changes].version ifile='page_history.php' page_id=$listpages[changes].page_id}</td>
{else}
<td style="text-align:center;">{$listpages[changes].version}</td>
{/if}
{/if}
- {if $gBitSystemPrefs.wiki_list_links eq 'y'}
+ {if $gBitSystem->isFeatureActive( 'wiki_list_links' )}
<td style="text-align:center;">{$listpages[changes].links|default:"0"}</td>
{/if}
- {if $gBitSystemPrefs.wiki_list_backlinks eq 'y'}
- {if $gBitSystemPrefs.feature_backlinks eq 'y' && $listpages[changes].backlinks > 0}
+ {if $gBitSystem->isFeatureActive( 'wiki_list_backlinks' )}
+ {if $gBitSystem->isFeatureActive( 'feature_backlinks' ) && $listpages[changes].backlinks > 0}
<td style="text-align:center;"><a href="{$gBitLoc.WIKI_PKG_URL}backlinks.php?page={$listpages[changes].title|escape:"url"}">{$listpages[changes].backlinks|default:"0"}</a></td>
{else}
<td style="text-align:center;">{$listpages[changes].backlinks|default:"0"}</td>
{/if}
{/if}
- {if $gBitSystemPrefs.wiki_list_format_guid eq 'y'}
+ {if $gBitSystem->isFeatureActive( 'wiki_list_format_guid' )}
<td>{$listpages[changes].format_guid}</td>
{/if}
- {if $gBitSystemPrefs.wiki_list_size eq 'y'}
+ {if $gBitSystem->isFeatureActive( 'wiki_list_size' )}
<td style="text-align:right;">{$listpages[changes].len|kbsize}</td>
{/if}
{if $gBitUser->hasPermission( 'bit_p_edit' )}
@@ -198,6 +198,10 @@
</noscript>
</div>
{/if}
+
+ <p class="total small">
+ {tr}Total number of entries{/tr}: {$pagecount}
+ </p>
{/form}
{pagination}
diff --git a/templates/menu_wiki.tpl b/templates/menu_wiki.tpl
index a2b49d4..2b46547 100644
--- a/templates/menu_wiki.tpl
+++ b/templates/menu_wiki.tpl
@@ -3,37 +3,37 @@
{if $gBitUser->hasPermission( 'bit_p_view' )}
<li><a class="item" href="{$gBitLoc.WIKI_PKG_URL}index.php">{biticon ipackage=liberty iname=home iexplain="Wiki Home" iforce="icon"} {tr}Wiki Home{/tr}</a></li>
{/if}
- {if $gBitSystemPrefs.feature_listPages eq 'y' and $gBitUser->hasPermission( 'bit_p_view' )}
+ {if $gBitSystem->isFeatureActive( 'feature_listPages' ) and $gBitUser->hasPermission( 'bit_p_view' )}
<li><a class="item" href="{$gBitLoc.WIKI_PKG_URL}list_pages.php">{biticon ipackage=liberty iname=list iexplain="List pages" iforce="icon"} {tr}List pages{/tr}</a></li>
{/if}
{if $gBitUser->hasPermission( 'bit_p_edit' )}
<li><a class="item" href="{$gBitLoc.WIKI_PKG_URL}edit.php">{biticon ipackage=liberty iname=new iexplain="Create page" iforce="icon"} {tr}Create page{/tr}</a></li>
{/if}
- {if $gBitUser->hasPermission( 'bit_p_view' ) and $gBitSystemPrefs.feature_wiki_books eq 'y'}
+ {if $gBitUser->hasPermission( 'bit_p_view' ) and $gBitSystem->isFeatureActive( 'feature_wiki_books' )}
<li><a class="item" href="{$gBitLoc.WIKI_PKG_URL}books.php">{biticon ipackage=wiki iname=book iexplain="Wiki Books" iforce="icon"} {tr}Wiki Books{/tr}</a></li>
{/if}
- {if $gBitSystemPrefs.feature_wiki_books eq 'y' && $gBitUser->hasPermission( 'bit_p_edit_books' )}
+ {if $gBitSystem->isFeatureActive( 'feature_wiki_books' ) && $gBitUser->hasPermission( 'bit_p_edit_books' )}
<li><a class="item" href="{$gBitLoc.WIKI_PKG_URL}edit_book.php">{biticon ipackage=liberty iname=new iexplain="Create a new book" iforce="icon"} {tr}Create book{/tr}</a></li>
{/if}
- {if $gBitSystemPrefs.feature_listPages eq 'y' and $gBitUser->hasPermission( 'bit_p_view' )}
+ {if $gBitSystem->isFeatureActive( 'feature_listPages' ) and $gBitUser->hasPermission( 'bit_p_view' )}
<li><a class="item" href="{$gBitLoc.WIKI_PKG_URL}orphan_pages.php">{biticon ipackage=liberty iname=spacer iexplain="Orphan pages" iforce="icon"} {tr}Orphan pages{/tr}</a></li>
{/if}
- {if $gBitSystemPrefs.feature_wiki_multiprint eq 'y' and $gBitUser->hasPermission( 'bit_p_view' )}
+ {if $gBitSystem->isFeatureActive( 'feature_wiki_multiprint' ) and $gBitUser->hasPermission( 'bit_p_view' )}
<li><a class="item" href="{$gBitLoc.WIKI_PKG_URL}print_pages.php">{biticon ipackage=liberty iname=print iexplain="Print" iforce="icon"} {tr}Print{/tr}</a></li>
{/if}
- {if $gBitSystemPrefs.feature_wiki_rankings eq 'y' and $gBitUser->hasPermission( 'bit_p_view' )}
+ {if $gBitSystem->isFeatureActive( 'feature_wiki_rankings' ) and $gBitUser->hasPermission( 'bit_p_view' )}
<li><a class="item" href="{$gBitLoc.WIKI_PKG_URL}rankings.php">{biticon ipackage=liberty iname=list iexplain="Wiki Rankings" iforce="icon"} {tr}Wiki Rankings{/tr}</a></li>
{/if}
- {if $gBitUser->hasPermission( 'bit_p_send_pages' ) and $gBitSystemPrefs.feature_comm eq 'y'}
+ {if $gBitUser->hasPermission( 'bit_p_send_pages' ) and $gBitSystem->isFeatureActive( 'feature_comm' )}
<li><a class="item" href="{$gBitLoc.XMLRPC_PKG_URL}send_objects.php">{biticon ipackage=liberty iname=spacer iexplain="Send pages" iforce="icon"} {tr}Send pages{/tr}</a></li>
{/if}
- {if $gBitUser->hasPermission( 'bit_p_admin_received_pages' ) and $gBitSystemPrefs.feature_comm eq 'y'}
+ {if $gBitUser->hasPermission( 'bit_p_admin_received_pages' ) and $gBitSystem->isFeatureActive( 'feature_comm' )}
<li><a class="item" href="{$gBitLoc.WIKI_PKG_URL}received_pages.php">{biticon ipackage=liberty iname=spacer iexplain="Recieved pages" iforce="icon"} {tr}Received pages{/tr}</a></li>
{/if}
- {if $gBitSystemPrefs.feature_dump eq 'y' and $gBitUser->hasPermission( 'bit_p_view' )}
+ {if $gBitSystem->isFeatureActive( 'feature_dump' ) and $gBitUser->hasPermission( 'bit_p_view' )}
<li><a class="item" href="{$gBitLoc.STORAGE_PKG_URL}dump/{$bitdomain}new.tar">{biticon ipackage=liberty iname=save iexplain="Backup" iforce="icon"} {tr}Backup{/tr}</a></li>
{/if}
- {if $gBitSystemPrefs.feature_sandbox eq 'y' and $gBitUser->hasPermission( 'bit_p_view' )}
+ {if $gBitSystem->isFeatureActive( 'feature_sandbox' ) and $gBitUser->hasPermission( 'bit_p_view' )}
<li><a class="item" href="{$gBitLoc.WIKI_PKG_URL}edit.php?page=SandBox">{biticon ipackage=liberty iname=spacer iexplain="Sandbox" iforce="icon"} {tr}Sandbox{/tr}</a></li>
{/if}
</ul>
diff --git a/templates/menu_wiki_admin.tpl b/templates/menu_wiki_admin.tpl
index 81482bc..8ff4679 100644
--- a/templates/menu_wiki_admin.tpl
+++ b/templates/menu_wiki_admin.tpl
@@ -1,7 +1,7 @@
{strip}
<ul>
<li><a class="item" href="{$gBitLoc.KERNEL_PKG_URL}admin/index.php?page=wiki">{tr}Wiki Settings{/tr}</a></li>
- {if $gBitSystemPrefs.feature_dump eq 'y' and $gBitUser->hasPermission( 'bit_p_view' )}
+ {if $gBitSystem->isFeatureActive( 'feature_dump' ) and $gBitUser->hasPermission( 'bit_p_view' )}
<li><a class="item" href="{$gBitLoc.STORAGE_PKG_URL}dump/{$bitdomain}new.tar">{tr}Backup{/tr}</a></li>
{/if}
</ul>
diff --git a/templates/orphan_pages.tpl b/templates/orphan_pages.tpl
index aff1da7..c9e4b74 100644
--- a/templates/orphan_pages.tpl
+++ b/templates/orphan_pages.tpl
@@ -1,2 +1,3 @@
-{* $Header: /cvsroot/bitweaver/_bit_wiki/templates/orphan_pages.tpl,v 1.1 2005/06/19 06:12:45 bitweaver Exp $ *}
+{* $Header: /cvsroot/bitweaver/_bit_wiki/templates/orphan_pages.tpl,v 1.2 2005/07/17 17:36:47 squareing Exp $ *}
+{assign var=pagetitle value="{tr}Orphan Wiki Pages{/tr}"}
{include file="bitpackage:wiki/list_pages.tpl"}
diff --git a/templates/page_action_bar.tpl b/templates/page_action_bar.tpl
index 31280d5..66807cf 100644
--- a/templates/page_action_bar.tpl
+++ b/templates/page_action_bar.tpl
@@ -1,66 +1,55 @@
{if $print_page ne 'y'}
-{if $gBitUser->hasPermission( 'bit_p_view_tabs_and_tools' )}
-{navbar}
- {if !$lock}
- {assign var=format_guid value=$pageInfo.format_guid}
- {if $gLibertySystem->mPlugins.$format_guid.is_active eq 'y'}
- {if $gBitUser->hasPermission( 'bit_p_edit' ) or $page eq 'SandBox'}
- {if $beingEdited eq 'y'}
- {*popup_init src="`$gBitLoc.THEMES_PKG_URL`js/overlib.js"*}
- <strong><a href="{$gBitLoc.WIKI_PKG_URL}edit.php?page_id={$pageInfo.page_id}" {popup text="$semUser"}>{tr}edit{/tr}</a></strong>
- {else}
- <a href="{$gBitLoc.WIKI_PKG_URL}edit.php?page_id={$pageInfo.page_id}">{tr}edit{/tr}</a>
+<div class="navbar">
+ <ul>
+ {if $gBitUser->hasPermission( 'bit_p_view_tabs_and_tools' )}
+ {if !$lock}
+ {assign var=format_guid value=$pageInfo.format_guid}
+ {if $gLibertySystem->mPlugins.$format_guid.is_active eq 'y'}
+ {if $gBitUser->hasPermission( 'bit_p_edit' ) or $page eq 'SandBox'}
+ {if $beingEdited eq 'y'}
+ {*popup_init src="`$gBitLoc.THEMES_PKG_URL`js/overlib.js"*}
+ <li><strong><a href="{$gBitLoc.WIKI_PKG_URL}edit.php?page_id={$pageInfo.page_id}" {popup text="$semUser"}>{tr}edit{/tr}</a></strong></li>
+ {else}
+ <li><a href="{$gBitLoc.WIKI_PKG_URL}edit.php?page_id={$pageInfo.page_id}">{tr}edit{/tr}</a></li>
+ {/if}
+ {/if}
{/if}
{/if}
- {/if}
- {/if}
- {if $page ne 'SandBox'}
- {if $gBitUser->hasPermission( 'bit_p_admin_wiki' ) or ($gBitUser->mUserId and ($gBitUser->mUserId eq $pageInfo.modifier_user_id) and ($gBitUser->hasPermission( 'bit_p_lock' )) and ($gBitSystemPrefs.feature_wiki_usrlock eq 'y'))}
- {if $lock}
- <a href="{$gBitLoc.WIKI_PKG_URL}index.php?page_id={$pageInfo.page_id}&amp;action=unlock">{tr}unlock{/tr}</a>
- {else}
- <a href="{$gBitLoc.WIKI_PKG_URL}index.php?page_id={$pageInfo.page_id}&amp;action=lock">{tr}lock{/tr}</a>
+ {if $page ne 'SandBox'}
+ {if $gBitUser->hasPermission( 'bit_p_admin_wiki' ) or ($gBitUser->mUserId and ($gBitUser->mUserId eq $pageInfo.modifier_user_id) and ($gBitUser->hasPermission( 'bit_p_lock' )) and ($gBitSystem->isFeatureActive( 'feature_wiki_usrlock' )))}
+ {if $lock}
+ <li><a href="{$gBitLoc.WIKI_PKG_URL}index.php?page_id={$pageInfo.page_id}&amp;action=unlock">{tr}unlock{/tr}</a></li>
+ {else}
+ <li><a href="{$gBitLoc.WIKI_PKG_URL}index.php?page_id={$pageInfo.page_id}&amp;action=lock">{tr}lock{/tr}</a></li>
+ {/if}
+ {/if}
+ {if $gBitUser->hasPermission( 'bit_p_admin_wiki' )}
+ <li><a href="{$gBitLoc.WIKI_PKG_URL}page_permissions.php?page_id={$pageInfo.page_id}">{tr}perms{/tr}</a></li>
+ {/if}
+ {if $gBitSystem->isFeatureActive( 'feature_history' )}
+ <li><a href="{$gBitLoc.WIKI_PKG_URL}page_history.php?page_id={$pageInfo.page_id}">{tr}history{/tr}</a></li>
+ {/if}
{/if}
- {/if}
- {if $gBitUser->hasPermission( 'bit_p_admin_wiki' )}
- <a href="{$gBitLoc.WIKI_PKG_URL}page_permissions.php?page_id={$pageInfo.page_id}">{tr}perms{/tr}</a>
- {/if}
- {if $gBitSystemPrefs.feature_history eq 'y'}
- <a href="{$gBitLoc.WIKI_PKG_URL}page_history.php?page_id={$pageInfo.page_id}">{tr}history{/tr}</a>
- {/if}
- {/if}
- {if $gBitSystemPrefs.feature_likePages eq 'y'}
- <a href="{$gBitLoc.WIKI_PKG_URL}like_pages.php?page_id={$pageInfo.page_id}">{tr}similar{/tr}</a>
- {/if}
- {if $gBitSystemPrefs.feature_wiki_undo eq 'y' and $canundo eq 'y'}
- <a href="{$gBitLoc.WIKI_PKG_URL}index.php?page_id={$pageInfo.page_id}&amp;undo=1">{tr}undo{/tr}</a>
- {/if}
- {if $gBitSystemPrefs.wiki_uses_slides eq 'y'}
- {if $show_slideshow eq 'y'}
- <a href="{$gBitLoc.WIKI_PKG_URL}slideshow.php?page_id={$pageInfo.page_id}">{tr}slides{/tr}</a>
- {elseif $structure eq 'y'}
- <a href="slideshow2.php?structure_id={$page_info.structure_id}">{tr}slides{/tr}</a>
- {/if}
- {/if}
- {if $gBitUser->hasPermission( 'bit_p_admin_wiki' )}
- <a href="{$gBitLoc.WIKI_PKG_URL}export_wiki_pages.php?page_id={$pageInfo.page_id}">{tr}export{/tr}</a>
- {/if}
- {if $gBitSystemPrefs.feature_wiki_discuss eq 'y'}
- <a href="{$gBitLoc.BITFORUMS_PKG_URL}view_forum.php?forum_id={$wiki_forum_id}&amp;comments_postComment=post&amp;comments_title={$page|escape:"url"}&amp;comments_data={ "Use this thread to discuss the [index.php\?page=$page|$page page."|escape:"url"}&amp;comment_topictype=n">{tr}discuss{/tr}</a>
- {/if}
-{/navbar}
-{/if}
-
-{*if $show_page eq 'y'}
- <!-- this comment code is no longer valid. The current comment system should probably be changed to use this "comzone" style
- {if $gBitSystemPrefs.feature_wiki_comments eq 'y'}
- <div class="navbar comment">
- {if $comments_cant > 0}
- <a href="javascript:document.location='#comments';flip('comzone{if $comments_show eq 'y'}open{/if}');">{if $comments_cant eq 1}{tr}1 comment{/tr}{else}{$comments_cant} {tr}comments{/tr}{/if}</a>
- {else}
- <a href="javascript:document.location='#comments';flip('comzone{if $comments_show eq 'y'}open{/if}');">{tr}comment{/tr}</a>
+ {if $gBitSystem->isFeatureActive( 'feature_likePages' )}
+ <li><a href="{$gBitLoc.WIKI_PKG_URL}like_pages.php?page_id={$pageInfo.page_id}">{tr}similar{/tr}</a></li>
+ {/if}
+ {if $gBitSystem->isFeatureActive( 'feature_wiki_undo' ) and $canundo eq 'y'}
+ <li><a href="{$gBitLoc.WIKI_PKG_URL}index.php?page_id={$pageInfo.page_id}&amp;undo=1">{tr}undo{/tr}</a></li>
+ {/if}
+ {if $gBitSystem->isFeatureActive( 'wiki_uses_slides' )}
+ {if $show_slideshow eq 'y'}
+ <li><a href="{$gBitLoc.WIKI_PKG_URL}slideshow.php?page_id={$pageInfo.page_id}">{tr}slides{/tr}</a></li>
+ {elseif $structure eq 'y'}
+ <li><a href="slideshow2.php?structure_id={$page_info.structure_id}">{tr}slides{/tr}</a></li>
+ {/if}
{/if}
- </div>
- {/if}-->
-{/if*}
+ {if $gBitUser->hasPermission( 'bit_p_admin_wiki' )}
+ <li><a href="{$gBitLoc.WIKI_PKG_URL}export_wiki_pages.php?page_id={$pageInfo.page_id}">{tr}export{/tr}</a></li>
+ {/if}
+ {if $gBitSystem->isFeatureActive( 'feature_wiki_discuss' )}
+ <li><a href="{$gBitLoc.BITFORUMS_PKG_URL}view_forum.php?forum_id={$wiki_forum_id}&amp;comments_postComment=post&amp;comments_title={$page|escape:"url"}&amp;comments_data={ "Use this thread to discuss the [index.php\?page=$page|$page page."|escape:"url"}&amp;comment_topictype=n">{tr}discuss{/tr}</a></li>
+ {/if}
+ {/if}
+ </ul>
+</div>
{/if}
diff --git a/templates/page_display.tpl b/templates/page_display.tpl
index 4ec58ab..785f3ae 100644
--- a/templates/page_display.tpl
+++ b/templates/page_display.tpl
@@ -1,10 +1,11 @@
{strip}
<div class="body"{if $user_dbl eq 'y' and $dblclickedit eq 'y' and $gBitUser->hasPermission( 'bit_p_edit' )} ondblclick="location.href='{$gBitLoc.WIKI_PKG_URL}edit.php?page_id={$pageInfo.page_id}';"{/if}>
<div class="content">
- {if $gBitSystemPrefs.liberty_auto_display_attachment_thumbs eq 'y'}
+ {if $gBitSystem->isFeatureActive( 'liberty_auto_display_attachment_thumbs' )}
{include file="bitpackage:liberty/storage_thumbs.tpl"}
{/if}
{$parsed}
+ <div class="clear"></div>
</div> <!-- end .content -->
</div> <!-- end .body -->
{/strip}
diff --git a/templates/page_header.tpl b/templates/page_header.tpl
index 55b7f2b..e02a2b0 100644
--- a/templates/page_header.tpl
+++ b/templates/page_header.tpl
@@ -3,14 +3,14 @@
{include file="bitpackage:categories/categories_nav.tpl"}
{/if}
- {if $gBitSystemPrefs.feature_page_title eq 'y'}
+ {if $gBitSystem->isFeatureActive( 'feature_page_title' )}
<h1>{$pageInfo.title}</h1>
{if $cached_page eq 'y'}<span class="cached">(cached)</span>{/if}
{/if}
{include file="bitpackage:wiki/page_date_bar.tpl"}
- {if $gBitSystemPrefs.feature_wiki_description eq 'y' and $description}
+ {if $gBitSystem->isFeatureActive( 'feature_wiki_description' ) and $description}
<h2>{$description}</h2>
{/if}
</div><!-- end .header -->
diff --git a/templates/page_icons.tpl b/templates/page_icons.tpl
index c6d51c1..f5587b8 100644
--- a/templates/page_icons.tpl
+++ b/templates/page_icons.tpl
@@ -1,79 +1,80 @@
{strip}
{if $gBitUser->hasPermission( 'bit_p_view_tabs_and_tools' )}
-<div class="floaticon">
- {if $print_page ne 'y' && count($showstructs) ne 0}
- <select name="page" onchange="go(this)">
- <option value="">{tr}Wiki Books{/tr}...</option>
- {section name=struct loop=$showstructs}
- <option value="{$gBitLoc.WIKI_PKG_URL}index.php?structure_id={$showstructs[struct].structure_id}">
- {$showstructs[struct].root_title}
- </option>
- {/section}
- </select>
- {/if}
- {if $print_page ne 'y'}
- {if $lock}
- {biticon ipackage="wiki" iname="locked" iexplain="locked"}{$info.editor|userlink}
- {else}
- {assign var=format_guid value=$pageInfo.format_guid}
- {if $gLibertySystem->mPlugins.$format_guid.is_active eq 'y'}
- {if $gBitUser->hasPermission( 'bit_p_edit' ) or $page eq 'SandBox'}
- <a href="{$gBitLoc.WIKI_PKG_URL}edit.php?page_id={$pageInfo.page_id}" {if $beingEdited eq 'y'}{*popup_init src="`$gBitLoc.THEMES_PKG_URL`js/overlib.js"*}{popup text="$semUser" width="-1"}{/if}>{biticon ipackage=liberty iname="edit" iexplain="edit"}</a>
+ <div class="floaticon">
+ {if $print_page ne 'y' && count($showstructs) ne 0}
+ <select name="page" onchange="go(this)">
+ <option value="">{tr}Wiki Books{/tr}...</option>
+ {section name=struct loop=$showstructs}
+ <option value="{$gBitLoc.WIKI_PKG_URL}index.php?structure_id={$showstructs[struct].structure_id}">
+ {$showstructs[struct].root_title}
+ </option>
+ {/section}
+ </select>
+ {/if}
+ {if $print_page ne 'y'}
+ {if $lock}
+ {biticon ipackage="wiki" iname="locked" iexplain="locked"}{$info.editor|userlink}
+ {else}
+ {assign var=format_guid value=$pageInfo.format_guid}
+ {if $gLibertySystem->mPlugins.$format_guid.is_active eq 'y'}
+ {if $gBitUser->hasPermission( 'bit_p_edit' ) or $page eq 'SandBox'}
+ <a href="{$gBitLoc.WIKI_PKG_URL}edit.php?page_id={$pageInfo.page_id}" {if $beingEdited eq 'y'}{*popup_init src="`$gBitLoc.THEMES_PKG_URL`js/overlib.js"*}{popup text="$semUser" width="-1"}{/if}>{biticon ipackage=liberty iname="edit" iexplain="edit"}</a>
+ {/if}
{/if}
{/if}
- {/if}
- {if $gBitSystem->isPackageActive( 'stickies' ) && $gBitUser->hasPermission('bit_p_stickies_edit') }
- {if ($structureInfo.structure_id)}{assign var='stickyRequest' value="structure_id=`$structureInfo.structure_id`"}
- {else}{assign var='stickyRequest' value="notated_content_id=`$pageInfo.content_id`"}{/if}
- <a href="{$gBitLoc.STICKIES_PKG_URL}edit.php?{$stickyRequest}">{biticon ipackage=stickies iname="sticky_note" iexplain="add sticky note"}</a>
- {/if}
+ {if $gBitSystem->isPackageActive( 'stickies' ) && $gBitUser->hasPermission('bit_p_stickies_edit') }
+ {if ($structureInfo.structure_id)}{assign var='stickyRequest' value="structure_id=`$structureInfo.structure_id`"}
+ {else}{assign var='stickyRequest' value="notated_content_id=`$pageInfo.content_id`"}{/if}
+ <a href="{$gBitLoc.STICKIES_PKG_URL}edit.php?{$stickyRequest}">{biticon ipackage=stickies iname="sticky_note" iexplain="add sticky note"}</a>
+ {/if}
- {if ($structureInfo.structure_id) && (($gStructure->mInfo.creator_user_id == $gBitUser->mUserId) || $gBitUser->hasPermission( 'bit_p_admin_books' )) }
- <a href="{$gBitLoc.WIKI_PKG_URL}edit_book.php?structure_id={$structureInfo.structure_id}">{biticon ipackage=liberty iname="settings" iexplain="edit book"}</a>
- {/if}
+ {if ($structureInfo.structure_id) && (($gStructure->mInfo.creator_user_id == $gBitUser->mUserId) || $gBitUser->hasPermission( 'bit_p_admin_books' )) }
+ <a href="{$gBitLoc.WIKI_PKG_URL}edit_book.php?structure_id={$structureInfo.structure_id}">{biticon ipackage=liberty iname="settings" iexplain="edit book"}</a>
+ {/if}
- {if $gBitSystemPrefs.wiki_uses_s5 eq 'y'}
- <a href="{$gBitLoc.WIKI_PKG_URL}index.php?page_id={$pageInfo.page_id}&amp;s5=1" onclick="return confirm('this works best in gecko based browsers (mozilla, firefox) or opera (press F11)')">{biticon ipackage=wiki iname="s5" iexplain="s5 slideshow"}</a>
- {/if}
+ {if $gBitSystem->isFeatureActive( 'wiki_uses_s5' )}
+ <a href="{$gBitLoc.WIKI_PKG_URL}index.php?page_id={$pageInfo.page_id}&amp;s5=1" onclick="return confirm('this works best in gecko based browsers (mozilla, firefox) or opera (press F11)')">{biticon ipackage=wiki iname="s5" iexplain="s5 slideshow"}</a>
+ {/if}
- {if $cached_page eq 'y'}
- <a title="{tr}refresh{/tr}" href="{$gBitLoc.WIKI_PKG_URL}index.php?page_id={$pageInfo.page_id}&amp;refresh=1">{biticon ipackage=liberty iname="refresh" iexplain="refresh"}</a>
- {/if}
- {if $gBitUser->hasPermission( 'bit_p_print' )}
- <a title="{tr}print{/tr}" style="display:none;" href="{$gBitLoc.WIKI_PKG_URL}print.php?{if $structureInfo.root_structure_id}structure_id={$structureInfo.root_structure_id}{else}page_id={$pageInfo.page_id}{/if}">{biticon ipackage=liberty iname="print" iexplain="print"}</a>
- {/if}
- {if $gBitSystem->isPackageActive( 'pdf' ) && $gContent->hasUserPermission( 'bit_p_pdf_generation' )}
- {if $structureInfo.root_structure_id}
- <a title="{tr}create PDF{/tr}" href="{$gBitLoc.PDF_PKG_URL}?structure_id={$structureInfo.root_structure_id}">{biticon ipackage="pdf" iname="pdf" iexplain="PDF"}</a>
- {else}
- <a title="{tr}create PDF{/tr}" href="{$gBitLoc.PDF_PKG_URL}?content_id={$pageInfo.content_id}">{biticon ipackage="pdf" iname="pdf" iexplain="PDF"}</a>
+ {if $cached_page eq 'y'}
+ <a title="{tr}refresh{/tr}" href="{$gBitLoc.WIKI_PKG_URL}index.php?page_id={$pageInfo.page_id}&amp;refresh=1">{biticon ipackage=liberty iname="refresh" iexplain="refresh"}</a>
{/if}
- {/if}
- {if $user and $gBitSystem->isPackageActive( 'notepad' ) and $gBitUser->hasPermission( 'bit_p_notepad' )}
- <a title="{tr}Save{/tr}" href="{$gBitLoc.WIKI_PKG_URL}index.php?page_id={$pageInfo.page_id}&amp;savenotepad=1">{biticon ipackage="wiki" iname="save" iexplain="save"}</a>
- {/if}
- {if $gBitUser->mUserId && $gBitSystem->isFeatureActive( 'feature_user_watches' ) }
- {if $user_watching_page eq 'y'}
- <a title="{tr}stop monitoring this page{/tr}" href="{$gBitLoc.WIKI_PKG_URL}index.php?page_id={$pageInfo.page_id}&amp;watch_event=wiki_page_changed&amp;watch_object={$pageInfo.page_id}&amp;watch_action=remove">{biticon ipackage="users" iname="unwatch" iexplain="stop monitoring"}</a>
- {else}
- <a title="{tr}monitor this page{/tr}" href="{$gBitLoc.WIKI_PKG_URL}index.php?page_id={$pageInfo.page_id}&amp;watch_event=wiki_page_changed&amp;watch_object={$pageInfo.page_id}&amp;watch_action=add">{biticon ipackage="users" iname="watch" iexplain="monitor"}</a>
+ {if $gBitUser->hasPermission( 'bit_p_print' )}
+ <a title="{tr}print{/tr}" style="display:none;" href="{$gBitLoc.WIKI_PKG_URL}print.php?{if $structureInfo.root_structure_id}structure_id={$structureInfo.root_structure_id}{else}page_id={$pageInfo.page_id}{/if}">{biticon ipackage=liberty iname="print" iexplain="print"}</a>
{/if}
- {/if}
- {if $pageInfo.title ne 'SandBox'}
- {if $gBitUser->hasPermission( 'bit_p_remove' )}
- <a title="{tr}remove this page{/tr}" href="{$gBitLoc.WIKI_PKG_URL}remove_page.php?page_id={$pageInfo.page_id}&amp;version=last">{biticon ipackage=liberty iname="delete" iexplain="delete"}</a>
+ {if $gBitSystem->isPackageActive( 'pdf' ) && $gContent->hasUserPermission( 'bit_p_pdf_generation' )}
+ {if $structureInfo.root_structure_id}
+ <a title="{tr}create PDF{/tr}" href="{$gBitLoc.PDF_PKG_URL}?structure_id={$structureInfo.root_structure_id}">{biticon ipackage="pdf" iname="pdf" iexplain="PDF"}</a>
+ {else}
+ <a title="{tr}create PDF{/tr}" href="{$gBitLoc.PDF_PKG_URL}?content_id={$pageInfo.content_id}">{biticon ipackage="pdf" iname="pdf" iexplain="PDF"}</a>
+ {/if}
{/if}
- {/if}
- {if $gBitSystemPrefs.feature_backlinks eq 'y' and $backlinks}
- <select name="page" onchange="go(this)">
- <option value="{$gBitLoc.WIKI_PKG_URL}index.php?page_id={$pageInfo.page_id}">{tr}backlinks{/tr}...</option>
- {foreach key=contentId item=backPage from=$backlinks}
- <option value="{$gBitLoc.BIT_ROOT_URL}index.php?content_id={$contentId}">{$backPage}</option>
- {/foreach}
- </select>
- {/if}
- {/if}<!-- end print_page -->
-</div><!-- end .floaticon -->
+ {if $user and $gBitSystem->isPackageActive( 'notepad' ) and $gBitUser->hasPermission( 'bit_p_notepad' )}
+ <a title="{tr}Save{/tr}" href="{$gBitLoc.WIKI_PKG_URL}index.php?page_id={$pageInfo.page_id}&amp;savenotepad=1">{biticon ipackage="wiki" iname="save" iexplain="save"}</a>
+ {/if}
+
+ {if $gBitUser->isRegistered() and $gBitUser->mUserId && $gBitSystem->isFeatureActive( 'feature_user_watches' ) }
+ {if $user_watching_page eq 'y'}
+ <a title="{tr}stop monitoring this page{/tr}" href="{$gBitLoc.WIKI_PKG_URL}index.php?page_id={$pageInfo.page_id}&amp;watch_event=wiki_page_changed&amp;watch_object={$pageInfo.page_id}&amp;watch_action=remove">{biticon ipackage="users" iname="unwatch" iexplain="stop monitoring"}</a>
+ {else}
+ <a title="{tr}monitor this page{/tr}" href="{$gBitLoc.WIKI_PKG_URL}index.php?page_id={$pageInfo.page_id}&amp;watch_event=wiki_page_changed&amp;watch_object={$pageInfo.page_id}&amp;watch_action=add">{biticon ipackage="users" iname="watch" iexplain="monitor"}</a>
+ {/if}
+ {/if}
+ {if $pageInfo.title ne 'SandBox'}
+ {if $gBitUser->hasPermission( 'bit_p_remove' )}
+ <a title="{tr}remove this page{/tr}" href="{$gBitLoc.WIKI_PKG_URL}remove_page.php?page_id={$pageInfo.page_id}&amp;version=last">{biticon ipackage=liberty iname="delete" iexplain="delete"}</a>
+ {/if}
+ {/if}
+ {if $gBitSystem->isFeatureActive( 'feature_backlinks' ) and $backlinks}
+ <select name="page" onchange="go(this)">
+ <option value="{$gBitLoc.WIKI_PKG_URL}index.php?page_id={$pageInfo.page_id}">{tr}backlinks{/tr}...</option>
+ {foreach key=contentId item=backPage from=$backlinks}
+ <option value="{$gBitLoc.BIT_ROOT_URL}index.php?content_id={$contentId}">{$backPage|truncate:30:"...":true}</option>
+ {/foreach}
+ </select>
+ {/if}
+ {/if}<!-- end print_page -->
+ </div>
{/if}
{/strip}
diff --git a/templates/preview.tpl b/templates/preview.tpl
index 35eb5ec..b882511 100644
--- a/templates/preview.tpl
+++ b/templates/preview.tpl
@@ -1,5 +1,5 @@
<h2>{tr}Preview{/tr}: {$title}</h2>
-{if $gBitSystemPrefs.feature_wiki_description eq 'y'}
+{if $gBitSystem->isFeatureActive( 'feature_wiki_description' )}
<small>{$description}</small>
{/if}
<div class="wikibody">{$parsed}</div>
diff --git a/templates/show_page.tpl b/templates/show_page.tpl
index 7117fcf..ebeca68 100644
--- a/templates/show_page.tpl
+++ b/templates/show_page.tpl
@@ -1,10 +1,18 @@
+{if $comments_at_top_of_page eq 'y' and $print_page ne 'y' and $feature_wiki_comments eq 'y' }
+ {include file="bitpackage:wiki/page_header.tpl"}
+ {include file="bitpackage:liberty/comments.tpl"}
+{/if}
+
<div class="display wiki {$pageInfo.title|lower|regex_replace:"[\s|_]":""}">
{include file="bitpackage:wiki/page_icons.tpl"}
{include file="bitpackage:wiki/page_header.tpl"}
+
{if $gBitSystem->isPackageActive( 'stickies' )}
{include file="bitpackage:stickies/display_bitsticky.tpl"}
{/if}
+
{include file="bitpackage:wiki/page_display.tpl"}
+
{if $pages > 1}
<div class="pagination">
{*<a title="{tr}First page{/tr}" href="index.php?page_id={$pageInfo.page_id}&amp;pagenum={$first_page}">&laquo; &laquo;</a>*}
@@ -19,11 +27,8 @@
{$footnote}
{/if}
- {if $print_page ne 'y'}
- {include file="bitpackage:wiki/page_action_bar.tpl"}
- {/if}
- {if $gBitSystemPrefs.wiki_feature_copyrights eq 'y'}
+ {if $gBitSystem->isFeatureActive( 'wiki_feature_copyrights' )}
<p class="copyright">
{if $pageCopyrights}
{section name=i loop=$pageCopyrights}
@@ -38,11 +43,16 @@
</p>
{/if}
- {if $print_page ne 'y' and $feature_wiki_comments eq 'y' }
- {include file="bitpackage:liberty/comments.tpl"}
+ {if $print_page ne 'y'}
+ {include file="bitpackage:wiki/page_action_bar.tpl"}
{/if}
{if $gBitSystem->isPackageActive( 'categories' )}
{include file="bitpackage:categories/categories_objects.tpl"}
{/if}
</div><!-- end .wiki -->
+
+{if $comments_at_top_of_page ne 'y' and $print_page ne 'y' and $feature_wiki_comments eq 'y' }
+ {include file="bitpackage:liberty/comments.tpl"}
+{/if}
+