summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMax Kremmel <xing@synapse.plus.com>2005-08-11 13:03:46 +0000
committerMax Kremmel <xing@synapse.plus.com>2005-08-11 13:03:46 +0000
commit5d100e8078e5a53a70aee8a29080fa00559b4972 (patch)
treed2f6d528c57261ce3036adaf7d28ff945f46feee
parentea82e999f8043ba0821df00ddc84df38c6c48c1c (diff)
downloadliberty-5d100e8078e5a53a70aee8a29080fa00559b4972.tar.gz
liberty-5d100e8078e5a53a70aee8a29080fa00559b4972.tar.bz2
liberty-5d100e8078e5a53a70aee8a29080fa00559b4972.zip
merge recent changes with HEAD - keeping stuff up to date in case someone starts going nuts in HEAD
-rw-r--r--LibertyAttachable.php4
-rw-r--r--LibertyBase.php21
-rw-r--r--LibertyContent.php256
-rw-r--r--plugins/format.tikiwiki.php6
-rw-r--r--plugins/storage.bitfile.php4
-rw-r--r--templates/edit_help_inc.tpl4
-rw-r--r--templates/edit_structure_content.tpl10
7 files changed, 231 insertions, 74 deletions
diff --git a/LibertyAttachable.php b/LibertyAttachable.php
index 342de1d..e2e75ce 100644
--- a/LibertyAttachable.php
+++ b/LibertyAttachable.php
@@ -3,7 +3,7 @@
* Management of Liberty Content
*
* @package liberty
- * @version $Header: /cvsroot/bitweaver/_bit_liberty/LibertyAttachable.php,v 1.3 2005/08/07 17:40:29 squareing Exp $
+ * @version $Header: /cvsroot/bitweaver/_bit_liberty/LibertyAttachable.php,v 1.4 2005/08/11 13:03:45 squareing Exp $
* @author spider <spider@steelsun.com>
*/
// +----------------------------------------------------------------------+
@@ -443,6 +443,7 @@ function liberty_process_image( &$pFileHash ) {
$ret = NULL;
$resizeFunc = ($gBitSystem->getPreference( 'image_processor' ) == 'imagick' ) ? 'liberty_imagick_resize_image' : 'liberty_gd_resize_image';
list($type, $ext) = split( '/', strtolower( $pFileHash['type'] ) );
+ mkdir_p( BIT_PKG_PATH.$pFileHash['dest_path'] );
if( $resizePath = $resizeFunc( $pFileHash, $ext ) ) {
$pFileHash['source_file'] = BIT_ROOT_PATH.$resizePath;
@@ -501,6 +502,7 @@ function liberty_generate_thumbnails( &$pFileHash ) {
}
function liberty_imagick_resize_image( &$pFileHash, $pFormat = NULL ) {
+ $pFileHash['error'] = NULL;
$ret = NULL;
if( !empty( $pFileHash['source_file'] ) && is_file( $pFileHash['source_file'] ) ) {
$iImg = imagick_readimage( $pFileHash['source_file'] );
diff --git a/LibertyBase.php b/LibertyBase.php
index 5b12a32..27951d3 100644
--- a/LibertyBase.php
+++ b/LibertyBase.php
@@ -3,7 +3,7 @@
* Base class for Management of Liberty Content
*
* @package liberty
- * @version $Header: /cvsroot/bitweaver/_bit_liberty/LibertyBase.php,v 1.4 2005/08/07 21:11:47 squareing Exp $
+ * @version $Header: /cvsroot/bitweaver/_bit_liberty/LibertyBase.php,v 1.5 2005/08/11 13:03:45 squareing Exp $
* @author spider <spider@steelsun.com>
*/
// +----------------------------------------------------------------------+
@@ -31,17 +31,24 @@ require_once( KERNEL_PKG_PATH.'BitBase.php' );
*/
class LibertyBase extends BitBase {
+ /**
+ * Constructor building on BitBase object
+ *
+ * Object need to init the database connection early
+ * Database will be linked via a previously activated BitDb object
+ * which will provide the mDb pointer to that database
+ */
function LibertyBase () {
- // we need to init our database connection early
BitBase::BitBase();
}
/**
- * Given a content_id, this will return and object of the proper type
- * @param pConId content_id of the object to be returned
- * @param pGuid optional content_type_guid of pConId. This will save a select if you happen to have this info. If not, this method will look it up for you.
- * @returns an object of the appropriate content type class
- */
+ * Given a content_id, this will return and object of the proper type
+ *
+ * @param integer content_id of the object to be returned
+ * @param string optional content_type_guid of pConId. This will save a select if you happen to have this info. If not, this method will look it up for you.
+ * @returns object of the appropriate content type class
+ */
function getLibertyObject( $pContentId, $pContentGuid=NULL ) {
$ret = NULL;
global $gLibertySystem;
diff --git a/LibertyContent.php b/LibertyContent.php
index be4b3a7..5e84bcb 100644
--- a/LibertyContent.php
+++ b/LibertyContent.php
@@ -3,7 +3,7 @@
* Management of Liberty content
*
* @package liberty
-* @version $Header: /cvsroot/bitweaver/_bit_liberty/LibertyContent.php,v 1.6 2005/08/07 17:40:29 squareing Exp $
+* @version $Header: /cvsroot/bitweaver/_bit_liberty/LibertyContent.php,v 1.7 2005/08/11 13:03:45 squareing Exp $
* @author spider <spider@steelsun.com>
*/
@@ -43,6 +43,10 @@ require_once( LIBERTY_PKG_PATH.'LibertyBase.php' );
* @package liberty
*/
class LibertyContent extends LibertyBase {
+ /**
+ * Content Id if an object has been loaded
+ * @public
+ */
var $mContentId;
/**
* If this content is being viewed within a structure
@@ -65,13 +69,18 @@ class LibertyContent extends LibertyBase {
*/
var $mPerms;
+ /**
+ * Construct an empty LibertyBase object with a blank permissions array
+ */
function LibertyContent () {
LibertyBase::LibertyBase();
$this->mPerms = array();
}
+ /**
+ * Assume a derived class has joined on the tiki_content table, and loaded it's columns already.
+ */
function load($pContentId = NULL) {
- // assume a derived class has joined on the tiki_content table, and loaded it's columns already.
if( !empty( $this->mInfo['content_type_guid'] ) ) {
global $gLibertySystem, $gBitSystem;
$this->mInfo['content_type'] = $gLibertySystem->mContentTypes[$this->mInfo['content_type_guid']];
@@ -82,6 +91,11 @@ class LibertyContent extends LibertyBase {
}
+ /**
+ * Verify the core class data required to update the tiki_content table entries
+ *
+ * @param array Array of content data to be stored
+ */
function verify( &$pParamHash ) {
global $gLibertySystem;
if( empty( $pParamHash['user_id'] ) ) {
@@ -163,7 +177,11 @@ class LibertyContent extends LibertyBase {
}
- // Things to be stored should be shoved in the array $pParamHash['STORAGE']
+ /**
+ * Create a new content object or update an existing one
+ *
+ * @param array Array of content data to be stored
+ */
function store( &$pParamHash ) {
global $gBitSystem;
global $gLibertySystem;
@@ -206,6 +224,9 @@ class LibertyContent extends LibertyBase {
return( count( $this->mErrors ) == 0 );
}
+ /**
+ * Delete comment entries relating to the content object
+ */
function expungeComments() {
require_once( LIBERTY_PKG_PATH.'LibertyComment.php' );
// Delete all comments associated with this piece of content
@@ -219,6 +240,9 @@ class LibertyContent extends LibertyBase {
return TRUE;
}
+ /**
+ * Delete content object and all related records
+ */
function expunge() {
global $gBitSystem;
$ret = FALSE;
@@ -260,6 +284,11 @@ class LibertyContent extends LibertyBase {
return $ret;
}
+ /**
+ * Create an export object from the data
+ *
+ * @param array Not used
+ */
function exportHtml( $pData = NULL ) {
$ret = NULL;
$ret[] = array( 'type' => $this->mContentTypeGuid,
@@ -270,15 +299,24 @@ class LibertyContent extends LibertyBase {
return $ret;
}
+ /**
+ * Check mContentId to establish if the object has been loaded with a valid record
+ */
function isValid() {
return( !empty( $this->mContentId ) && is_numeric( $this->mContentId ) && $this->mContentId );
}
+ /**
+ * Check user_id to establish if the object that has been loaded was created by the current user
+ */
function isOwner() {
global $gBitUser;
return( $this->isValid() && !empty( $this->mInfo['user_id'] ) && $this->mInfo['user_id'] == $gBitUser->mUserId );
}
+ /**
+ * Check permissions for the object that has been loaded against the permission database
+ */
function loadPermissions() {
if( $this->isValid() && empty( $this->mPerms ) && $this->mContentTypeGuid ) {
//$object_id = md5($object_type . $object_id);
@@ -292,11 +330,15 @@ class LibertyContent extends LibertyBase {
return( count( $this->mPerms ) );
}
-
- /**
- * Function that determines if this content specified permission for the current gBitUser
- * @return the fully specified path to file to be included
- */
+ /**
+ * Function that determines if this content specified permission for the current gBitUser
+ *
+ * @param string Name of the permission to check
+ * @param bool Generate fatal message if permission denigned
+ * @param string Message if permission denigned
+ * @return bool true if user has permission to access file
+ * @todo Fatal message still to be implemented
+ */
function hasUserPermission( $pPermName, $pFatalIfFalse=FALSE, $pFatalMessage=NULL ) {
global $gBitUser;
if( !$gBitUser->isRegistered() || !($ret = $this->isOwner()) ) {
@@ -312,8 +354,12 @@ class LibertyContent extends LibertyBase {
return( $ret );
}
-
- // get specific permissions for the specified user for this content
+ /**
+ * Get specific permissions for the specified user for this content
+ *
+ * @param integer Id of user for whom permissions are to be loaded
+ * @return array Array of user permissions
+ */
function getUserPermissions( $pUserId ) {
$ret = array();
if( $pUserId ) {
@@ -328,7 +374,15 @@ class LibertyContent extends LibertyBase {
return $ret;
}
-
+ /**
+ * Store a permission for the object that has been loaded in the permission database
+ *
+ * Any old copy of the permission is deleted prior to loading the new copy
+ * @param integer Group Identifier
+ * @param string Name of the permission
+ * @param integer Content Itentifier
+ * @return bool true ( will not currently report a failure )
+ */
function storePermission( $pGroupId, $perm_name, $object_id=NULL ) {
if( empty( $object_id ) ) {
$object_id = $this->mContentId;
@@ -344,7 +398,15 @@ class LibertyContent extends LibertyBase {
return true;
}
-
+ /**
+ * Check is a user has permission to access the object
+ *
+ * @param integer User Identifier
+ * @param integer Content Itentifier
+ * @param string Content Type GUID
+ * @param string Name of the permission
+ * @return bool true if access is allowed
+ */
function hasPermission( $pUserId, $object_id, $object_type, $perm_name ) {
$ret = FALSE;
$groups = $this->get_user_groups( $pUserId );
@@ -361,7 +423,13 @@ class LibertyContent extends LibertyBase {
return $ret;
}
-
+ /**
+ * Remove a permission to access the object
+ *
+ * @param integer Group Identifier
+ * @param string Name of the permission
+ * @return bool true ( will not currently report a failure )
+ */
function removePermission( $pGroupId, $perm_name ) {
//$object_id = md5($object_type . $object_id);
$query = "delete from `".BIT_DB_PREFIX."users_objectpermissions`
@@ -372,7 +440,12 @@ class LibertyContent extends LibertyBase {
return true;
}
-
+ /**
+ * Copy current permissions to another object
+ *
+ * @param integer Content Identifier of the target object
+ * @return bool true ( will not currently report a failure )
+ */
function copyPermissions( $destinationObjectId ) {
//$object_id = md5($object_type.$object_id);
$query = "select `perm_name`, `group_name`
@@ -386,15 +459,26 @@ class LibertyContent extends LibertyBase {
return true;
}
-
-
-
+ /**
+ * Copy current permissions to another object
+ *
+ * @param string Content Type GUID
+ * @param array Array of content type data
+ * Populates the mType array with the following entries
+ * string content_type_guid
+ * string
+ */
function registerContentType( $pContentGuid, $pTypeParams ) {
global $gLibertySystem;
$gLibertySystem->registerContentType( $pContentGuid, $pTypeParams );
$this->mType = $pTypeParams;
}
+ /**
+ * Increment the content item hit flag by 1
+ *
+ * @return bool true ( will not currently report a failure )
+ */
function addHit() {
global $gBitUser;
if( $this->mContentId && ($gBitUser->mUserId != $this->mInfo['user_id'] ) ) {
@@ -404,7 +488,6 @@ class LibertyContent extends LibertyBase {
return true;
}
-
/**
* Determines if a wiki page (row in tiki_pages) exists, and returns a hash of important info. If N pages exists with $pPageName, returned existsHash has a row for each unique pPageName row.
* @param pPageName name of the wiki page
@@ -426,7 +509,14 @@ class LibertyContent extends LibertyBase {
return $ret;
}
-
+ /**
+ * Create the generic title for a content item
+ *
+ * This will normally be overwriten by extended classes to provide
+ * an appropriate title title string
+ * @param array mInfo type hash of data to be used to provide base data
+ * @return string Descriptive title for the object
+ */
function getTitle( $pHash=NULL ) {
$ret = NULL;
if( empty( $pHash ) ) {
@@ -440,7 +530,11 @@ class LibertyContent extends LibertyBase {
return $ret;
}
-
+ /**
+ * Access a content item type GUID
+ *
+ * @return string content_type_guid for the object
+ */
function getContentType() {
$ret = NULL;
if( isset( $this->mInfo['content_type_guid'] ) ) {
@@ -449,6 +543,24 @@ class LibertyContent extends LibertyBase {
return $ret;
}
+ /**
+ * Return content type description for this content object.
+ *
+ * @return string content_type_guid description for the object
+ */
+ function getContentDescription() {
+ $ret = NULL;
+ if( isset( $this->mInfo['content_type_guid'] ) ) {
+ global $gLibertySystem;
+ if( !empty( $gLibertySystem->mContentTypes[$this->mInfo['content_type_guid']]['content_description'] ) ) {
+ $ret = $gLibertySystem->mContentTypes[$this->mInfo['content_type_guid']]['content_description'];
+ } else {
+ $ret = $this->mInfo['content_type_guid'];
+ }
+ }
+ return $ret;
+ }
+
/**
* Pure virtual function that returns the include file that should render a page of content of this type
@@ -460,9 +572,9 @@ class LibertyContent extends LibertyBase {
/**
* Pure virtual function that returns link to display a piece of content
- * @param pLinkText name of
- * @param pMixed different possibilities depending on derived class
- * @return the link to display the page.
+ * @param string Text for the link unless overriden by object title
+ * @param array different possibilities depending on derived class
+ * @return string Formated html the link to display the page.
*/
function getDisplayLink( $pLinkText, $pMixed ) {
$ret = '';
@@ -478,9 +590,9 @@ class LibertyContent extends LibertyBase {
/**
* Pure virtual function that returns Request_URI to a piece of content
- * @param pLinkText name of
- * @param pMixed different possibilities depending on derived class
- * @return the link to display the page.
+ * @param string Text for DisplayLink function
+ * @param array different possibilities depending on derived class
+ * @return string Formated URL address to display the page.
*/
function getDisplayUrl( $pLinkText, $pMixed ) {
print "UNDEFINED PURE VIRTUAL FUNCTION: LibertyContent::getDisplayUrl";
@@ -489,7 +601,7 @@ class LibertyContent extends LibertyBase {
/**
* Updates results from any getList function to provide the control set
* displaying in the smarty template
- * @param pParamHash hash of parameters returned by any getList() function
+ * @param array hash of parameters returned by any getList() function
* @return - none the hash is updated via the reference
*/
function postGetList( &$pListHash ) {
@@ -516,7 +628,10 @@ class LibertyContent extends LibertyBase {
}
/**
- * Get a list of users this content is a member of
+ * Get a list of users who have created entries in the content table
+ *
+ * @param array hash of parameters ( content_type_guid will limit list to a single content type
+ * @return - none the hash is updated via the reference
**/
function getAuthorList( &$pListHash ) {
$ret = NULL;
@@ -540,10 +655,17 @@ class LibertyContent extends LibertyBase {
return $ret;
}
-
/**
- * Get a list of all structures this content is a member of
- **/
+ * Get a list of all structures this content is a member of
+ *
+ * @param string Content GUID to limit the list to
+ * @param integer Number of the first record to access ( used to page the list )
+ * @param integer Number of records to return
+ * @param string Name of the field to sort by ( extended by _asc or _desc for sort direction )
+ * @param array List of text elements to filter the results by
+ * @param integer User ID - If set, then only the objcets created by that user will be returned
+ * @return array An array of mInfo type arrays of content objects
+ **/
function getContentList( $pContentGuid=NULL, $offset = 0, $maxRecords = -1, $sort_mode = 'title_desc', $find = NULL, $pUserId=NULL ) {
global $gLibertySystem, $gBitSystem, $gBitUser, $gBitSmarty;
if ($sort_mode == 'size_desc') {
@@ -738,12 +860,15 @@ class LibertyContent extends LibertyBase {
return $ret;
}
-
-
-
-
- // This is the "object like" method. It should be more object like,
- // but for now, we'll just point to the old lib style "parse_data" - XOXO spiderr
+ /**
+ * Process the raw content blob using the speified content GUID processor
+ *
+ * This is the "object like" method. It should be more object like,
+ * but for now, we'll just point to the old lib style "parse_data" - XOXO spiderr
+ * @param string Data to be formated
+ * @param string Format GUID processor to use
+ * @return string Formated data string
+ */
function parseData( $pData=NULL, $pFormatGuid=NULL ) {
$ret = &$pData;
if( empty( $pFormatGuid ) ) {
@@ -762,12 +887,17 @@ class LibertyContent extends LibertyBase {
}
- //Special parsing for multipage articles
+ /**
+ * Special parsing for multipage articles
+ *
+ * Temporary remove <PRE></PRE> secions to protect
+ * from broke <PRE> tags and leave well known <PRE>
+ * behaviour (i.e. type all text inside AS IS w/o
+ * any interpretation)
+ * @param string Data to process
+ * @return string Extracted pages
+ */
function getNumberOfPages( &$data ) {
- // Temporary remove <PRE></PRE> secions to protect
- // from broke <PRE> tags and leave well known <PRE>
- // behaviour (i.e. type all text inside AS IS w/o
- // any interpretation)
$preparsed = array();
preg_match_all("/(<[Pp][Rr][Ee]>)((.|\n)*?)(<\/[Pp][Rr][Ee]>)/", $data, $preparse);
@@ -787,11 +917,18 @@ class LibertyContent extends LibertyBase {
return count($parts);
}
+ /**
+ * Special parsing for a particular page of a multipage article
+ *
+ * Temporary remove <PRE></PRE> secions to protect
+ * from broke <PRE> tags and leave well known <PRE>
+ * behaviour (i.e. type all text inside AS IS w/o
+ * any interpretation)
+ * @param string Data to process
+ * @param integer Number of page to extract
+ * @return string Extracted page
+ */
function getPage( &$data, $i ) {
- // Temporary remove <PRE></PRE> secions to protect
- // from broke <PRE> tags and leave well known <PRE>
- // behaviour (i.e. type all text inside AS IS w/o
- // any interpretation)
$preparsed = array();
preg_match_all("/(<[Pp][Rr][Ee]>)((.|\n)*?)(<\/[Pp][Rr][Ee]>)/", $data, $preparse);
@@ -823,9 +960,13 @@ class LibertyContent extends LibertyBase {
}
-
- // ****** LEGACY FUNCTIONS that need to be cleaned / moved / or deprecated & deleted
-
+ /**
+ * Check if given url is currently cached locally
+ *
+ * @param string URL to check
+ * @return integer Id of the cached item
+ * @todo LEGACY FUNCTIONS that need to be cleaned / moved / or deprecated & deleted
+ */
function isCached($url) {
$query = "select `cache_id` from `".BIT_DB_PREFIX."tiki_link_cache` where `url`=?";
// sometimes we can have a cache_id of 0(?!) - seen it with my own eyes, spiderr
@@ -834,10 +975,14 @@ class LibertyContent extends LibertyBase {
}
/**
- * \brief Cache given url
+ * Cache given url
* If \c $data present (passed) it is just associated \c $url and \c $data.
* Else it will request data for given URL and store it in DB.
* Actualy (currently) data may be proviced by TIkiIntegrator only.
+ * @param string URL to cache
+ * @param string Data to be cached
+ * @return bool True if item was successfully cached
+ * @todo LEGACY FUNCTIONS that need to be cleaned / moved / or deprecated & deleted
*/
function cacheUrl($url, $data = '') {
// Avoid caching internal references... (only if $data not present)
@@ -868,12 +1013,23 @@ class LibertyContent extends LibertyBase {
else return false;
}
+ /**
+ * Set content related mStructureId
+ *
+ * @param integer Structure ID
+ */
function setStructure( $pStructureId ) {
if( $this->verifyId( $pStructureId ) ) {
$this->mStructureId = $pStructureId;
}
}
+ /**
+ * Check the number of structures that the content object is being used in
+ *
+ * @param integer Structure ID ( If NULL or not supplied check all structures )
+ * @return integer Number of structures that this content object is located in
+ */
function isInStructure( $pStructureId=NULL ) {
if( $this->isValid() ) {
$whereSql = NULL;
diff --git a/plugins/format.tikiwiki.php b/plugins/format.tikiwiki.php
index 7ccb464..cec33e6 100644
--- a/plugins/format.tikiwiki.php
+++ b/plugins/format.tikiwiki.php
@@ -1,6 +1,6 @@
<?php
/**
- * @version $Revision: 1.8 $
+ * @version $Revision: 1.9 $
* @package liberty
*/
global $gLibertySystem;
@@ -60,12 +60,12 @@ function tikiwiki_rename( $pContentId, $pOldName, $pNewName, &$pCommonObject ) {
FROM `".BIT_DB_PREFIX."tiki_links` tl
INNER JOIN `".BIT_DB_PREFIX."tiki_content` tc ON( tl.`from_content_id`=tc.`content_id` )
WHERE `to_content_id` = ?";
- if( $result = $pCommonObject->query($query, array( $pContentId ) ) ) {
+ if( $result = $pCommonObject->mDb->query($query, array( $pContentId ) ) ) {
while( !$result->EOF ) {
$data = preg_replace( '/(\W|\(\()('.$pOldName.')(\W|\)\))/', '\\1'.$pNewName.'\\3', $result->fields['data'] );
if( md5( $data ) != md5( $result->fields['data'] ) ) {
$query = "UPDATE `".BIT_DB_PREFIX."tiki_content` SET `data`=? WHERE `content_id`=?";
- $pCommonObject->query($query, array( $data, $result->fields['from_content_id'] ) );
+ $pCommonObject->mDb->query($query, array( $data, $result->fields['from_content_id'] ) );
}
$result->MoveNext();
}
diff --git a/plugins/storage.bitfile.php b/plugins/storage.bitfile.php
index ea0589a..ad9a1cd 100644
--- a/plugins/storage.bitfile.php
+++ b/plugins/storage.bitfile.php
@@ -1,6 +1,6 @@
<?php
/**
- * @version $Revision: 1.4 $
+ * @version $Revision: 1.5 $
* @package liberty
* @subpackage plugins_storage
*/
@@ -47,7 +47,7 @@ function bit_files_store( &$pStoreRow ) {
$sql = "UPDATE `".BIT_DB_PREFIX."tiki_files SET `storage_path`=?, `mime_type`=?, `size`=? WHERE `file_id` = ?";
$gBitSystem->mDb->query( $sql, array( $pStoreRow['dest_file_path'], $pStoreRow['type'], $pStoreRow['size'], $pStoreRow['foreign_id'] ) );
} else {
- $pStoreRow['file_id'] = $gBitSystem->GenID( 'tiki_files_file_id_seq' );
+ $pStoreRow['file_id'] = $gBitSystem->mDb->GenID( 'tiki_files_file_id_seq' );
$sql = "INSERT INTO `".BIT_DB_PREFIX."tiki_files` ( `storage_path`, `file_id`, `mime_type`, `size`, `user_id` ) VALUES ( ?, ?, ?, ?, ? )";
$userId = !empty( $pStoreRow['upload']['user_id'] ) ? $pStoreRow['upload']['user_id'] : $gBitUser->mUserId;
$gBitSystem->mDb->query($sql, array( $pStoreRow['upload']['dest_path'].$pStoreRow['upload']['name'], $pStoreRow['file_id'], $pStoreRow['upload']['type'], $pStoreRow['upload']['size'], $userId ) );
diff --git a/templates/edit_help_inc.tpl b/templates/edit_help_inc.tpl
index 8d8fa80..404f40a 100644
--- a/templates/edit_help_inc.tpl
+++ b/templates/edit_help_inc.tpl
@@ -1,4 +1,4 @@
-{* $Header: /cvsroot/bitweaver/_bit_liberty/templates/edit_help_inc.tpl,v 1.3 2005/07/17 17:36:11 squareing Exp $ *}
+{* $Header: /cvsroot/bitweaver/_bit_liberty/templates/edit_help_inc.tpl,v 1.4 2005/08/11 13:03:46 squareing Exp $ *}
{strip}
{if $gBitSystem->isFeatureActive( 'feature_wikihelp' )}
@@ -46,7 +46,7 @@
{/if}
{if $p.help_page}
- <br />{tr}for additional information about this plugin, see <a onkeypress="popUpWin(this.href,'full',800,800);" onclick="popUpWin(this.href,'full',800,800);return false;" class="external" href="http://www.bitweaver.org/wiki/index.php?page={$p.help_page}">{$p.help_page}</a>.{/tr}<br/>
+ <br />{tr}for additional information about this plugin, see <a title="This link will open a new window" onkeypress="popUpWin(this.href,'full',800,800);" onclick="popUpWin(this.href,'full',800,800);return false;" class="external" href="http://www.bitweaver.org/wiki/index.php?page={$p.help_page}">{$p.help_page}</a>.{/tr}<br/>
{/if}
{/box}
{/if}
diff --git a/templates/edit_structure_content.tpl b/templates/edit_structure_content.tpl
index 07c3c75..6142d00 100644
--- a/templates/edit_structure_content.tpl
+++ b/templates/edit_structure_content.tpl
@@ -21,15 +21,7 @@
<div class="row">
{formlabel label="Content" for="content"}
{forminput}
- <select name="content_type" onchange="submit();">
- <option {if !$contentSelect}selected="selected"{/if} value="">All Content</option>
- {foreach from=$contentTypes key=guid item=description}
- <option value="{$guid}" {if $contentSelect eq $guid}selected="selected"{assign var=selectDescription value=$description}{/if}>{$description}</option>
- {/foreach}
- </select>
- <noscript>
- <div><input type="submit" name="content_switch" value="{tr}change content type{/tr}" /></div>
- </noscript>
+ {html_options onchange="submit();" values=$contentTypes options=$contentTypes name=content_type_guid selected=$contentSelect}
{/forminput}
{forminput}