summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorwjames5 <will@tekimaki.com>2010-04-17 22:46:07 +0000
committerwjames5 <will@tekimaki.com>2010-04-17 22:46:07 +0000
commitd18b75ee1a060fbd3a913dca7e27d724b6ed1eb5 (patch)
tree56b59bd5a0737bef6071c6f5ba3af74c5189d8c1
parent566342953331f71576d3ca49c13f1943fb96a2e0 (diff)
downloadboards-CVS_HEAD.tar.gz
boards-CVS_HEAD.tar.bz2
boards-CVS_HEAD.zip
SCHEMA CHANGE - liberty_content_types - change content_description to content_name, add column content_name_plural - update all class files and hashes where appropriateCVS_HEAD
-rw-r--r--BitBoard.php14
-rw-r--r--admin/schema_inc.php6
-rw-r--r--templates/board_assign.tpl6
3 files changed, 15 insertions, 11 deletions
diff --git a/BitBoard.php b/BitBoard.php
index 8283979..af2a1d1 100644
--- a/BitBoard.php
+++ b/BitBoard.php
@@ -1,13 +1,13 @@
<?php
/**
- * $Header: /cvsroot/bitweaver/_bit_boards/BitBoard.php,v 1.64 2009/10/05 17:19:52 wjames5 Exp $
- * $Id: BitBoard.php,v 1.64 2009/10/05 17:19:52 wjames5 Exp $
+ * $Header: /cvsroot/bitweaver/_bit_boards/BitBoard.php,v 1.65 2010/04/17 22:46:07 wjames5 Exp $
+ * $Id: BitBoard.php,v 1.65 2010/04/17 22:46:07 wjames5 Exp $
*
* BitBoard class to illustrate best practices when creating a new bitweaver package that
* builds on core bitweaver functionality, such as the Liberty CMS engine
*
* @author spider <spider@steelsun.com>
- * @version $Revision: 1.64 $ $Date: 2009/10/05 17:19:52 $ $Author: wjames5 $
+ * @version $Revision: 1.65 $ $Date: 2010/04/17 22:46:07 $ $Author: wjames5 $
* @package boards
*/
@@ -41,7 +41,7 @@ class BitBoard extends LibertyMime {
$this->mContentTypeGuid = BITBOARD_CONTENT_TYPE_GUID;
$this->registerContentType( BITBOARD_CONTENT_TYPE_GUID, array(
'content_type_guid' => BITBOARD_CONTENT_TYPE_GUID,
- 'content_description' => 'Message Board',
+ 'content_name' => 'Message Board',
'handler_class' => 'BitBoard',
'handler_package' => 'boards',
'handler_file' => 'BitBoard.php',
@@ -319,7 +319,7 @@ class BitBoard extends LibertyMime {
// reorganise unmapped content for better display
$umapped = $b->getUnMapped();
foreach( $umapped as $key => $content ) {
- $umap[$content['content_description']][$key] = $content;
+ $umap[$content['content_name']][$key] = $content;
}
$ret['umap'] = $umap;
return $ret;
@@ -331,7 +331,7 @@ class BitBoard extends LibertyMime {
$sql = "SELECT
lc.`title`,
lc.`content_id`,
- lct.`content_description`, (
+ lct.`content_name`, (
SELECT count(*)
FROM `".BIT_DB_PREFIX."liberty_comments` lcom
WHERE lcom.`root_id`=lcom.`parent_id` AND lcom.`root_id`=lc.`content_id`
@@ -415,7 +415,7 @@ class BitBoard extends LibertyMime {
$sql = "SELECT
lc.`title` AS t_title,
lc.`content_id` AS t_content_id,
- lct.`content_description` AS t_content_description,
+ lct.`content_name` AS t_content_name,
blc.`title` AS b_title,
blc.`content_id` AS b_content_id,
b.`board_id` AS b_board_id, (
diff --git a/admin/schema_inc.php b/admin/schema_inc.php
index 8b4fb91..d1b3edd 100644
--- a/admin/schema_inc.php
+++ b/admin/schema_inc.php
@@ -92,4 +92,8 @@ if(defined('RSS_PKG_NAME')) {
$gBitInstaller->registerContentObjects( BOARDS_PKG_NAME, array(
'BitBoard'=>BOARDS_PKG_PATH.'BitBoard.php',
));
-?>
+
+// Requirements
+$gBitInstaller->registerRequirements( BOARDS_PKG_NAME, array(
+ 'liberty' => array( 'min' => '2.1.4' ),
+));
diff --git a/templates/board_assign.tpl b/templates/board_assign.tpl
index 1749677..67b1a9f 100644
--- a/templates/board_assign.tpl
+++ b/templates/board_assign.tpl
@@ -11,8 +11,8 @@
{formlabel label="Add Content" for="assign"}
{forminput}
<select id="assign" name="assign[]" multiple="multiple" size="12">
- {foreach item=umapped key=content_description from=$data.umap}
- <optgroup label="{$content_description}">
+ {foreach item=umapped key=content_name from=$data.umap}
+ <optgroup label="{$content_name}">
{foreach item=umapping from=$umapped}
<option value="{$umapping.content_id}">{$umapping.title|truncate:30} [{$umapping.thread_count}]</option>
{/foreach}
@@ -73,7 +73,7 @@
{foreach item=mapping from=$board.map}
<tr class="{cycle values="odd,even"}">
- <td>{$mapping.t_content_description}</td>
+ <td>{$mapping.t_content_name}</td>
<td>{$mapping.t_title|escape}</td>
<td style="text-align:right">{$mapping.thread_count}</td>
<td class="actionicon">