summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorlsces <lester@lsces.co.uk>2016-02-07 21:52:44 +0000
committerlsces <lester@lsces.co.uk>2016-02-07 21:52:44 +0000
commit9d0c9cd6d911b5b0d06adbb253418b812a5a3a7f (patch)
tree63fc09d6f9319e3671cee745d66a94b8fda176be
parentbafab752e95de81db23d057347ed715bb19d68bd (diff)
parent408a84375acb4b7ad9c4488a2fa6ab9f0d37b4db (diff)
downloadpigeonholes-9d0c9cd6d911b5b0d06adbb253418b812a5a3a7f.tar.gz
pigeonholes-9d0c9cd6d911b5b0d06adbb253418b812a5a3a7f.tar.bz2
pigeonholes-9d0c9cd6d911b5b0d06adbb253418b812a5a3a7f.zip
Merge to github
-rw-r--r--Pigeonholes.php17
-rw-r--r--modules/mod_category_menu.php2
-rw-r--r--modules/mod_category_suckerfish.php10
-rw-r--r--modules/mod_whats_related.php2
-rw-r--r--templates/assign_content.tpl4
-rw-r--r--templates/edit_pigeonholes.tpl7
-rw-r--r--templates/menu_pigeonholes.tpl2
-rw-r--r--templates/menu_pigeonholes_admin.tpl4
-rw-r--r--templates/view_table_inc.tpl2
9 files changed, 22 insertions, 28 deletions
diff --git a/Pigeonholes.php b/Pigeonholes.php
index bd2cb21..2ce9f2d 100644
--- a/Pigeonholes.php
+++ b/Pigeonholes.php
@@ -96,7 +96,7 @@ class Pigeonholes extends LibertyMime {
$this->mStructureId = $row['structure_id'];
$this->mInfo['user'] = $row['creator_user'];
$this->mInfo['real_name'] = ( isset( $row['creator_real_name'] ) ? $row['creator_real_name'] : $row['creator_user'] );
- $this->mInfo['display_name'] = BitUser::getTitle( $this->mInfo );
+ $this->mInfo['display_name'] = BitUser::getTitleFromHash( $this->mInfo );
$this->mInfo['editor'] = ( isset( $row['modifier_real_name'] ) ? $row['modifier_real_name'] : $row['modifier_user'] );
$this->mInfo['display_link'] = $this->getDisplayLink();
$this->mInfo['display_url'] = $this->getDisplayUrl();
@@ -176,7 +176,7 @@ class Pigeonholes extends LibertyMime {
SELECT pigm.*,
lc.`content_id`, lc.`last_modified`, lc.`user_id`, lc.`title`, lc.`content_type_guid`, lc.`created`,
lct.`content_name`, lcds.`data` AS `summary`,
- uu.`login`, uu.`real_name`, lf.`storage_path` $select
+ uu.`login`, uu.`real_name` $select
FROM `".BIT_DB_PREFIX."pigeonhole_members` pigm
INNER JOIN `".BIT_DB_PREFIX."pigeonholes` pig ON ( pig.`content_id` = pigm.`parent_id` )
INNER JOIN `".BIT_DB_PREFIX."liberty_content` lc ON ( lc.`content_id` = pigm.`content_id` )
@@ -199,11 +199,8 @@ class Pigeonholes extends LibertyMime {
if( $type['content_object']->isViewable( $aux['content_id'] )) {
$aux['display_url'] = $type['content_object']->getDisplayUrlFromHash( $aux );
$aux['display_link'] = $type['content_object']->getDisplayLink( $aux['title'], $aux );
- $aux['title'] = $type['content_object']->getTitle( $aux );
- $aux['thumbnail_url'] = liberty_fetch_thumbnails( array(
- 'storage_path' => $aux['storage_path'],
- 'mime_image' => FALSE
- ));
+ $aux['title'] = $type['content_object']->getTitleFromHash( $aux );
+// needs updating to bw3 $aux['thumbnail_url'] = liberty_fetch_thumbnails( array());
$ret[] = $aux;
}
}
@@ -289,7 +286,7 @@ class Pigeonholes extends LibertyMime {
$type['content_object'] = new $type['handler_class']();
}
$ret[$i]['display_link'] = $type['content_object']->getDisplayLink( $row['title'], $row );
- $ret[$i]['title'] = $type['content_object']->getTitle( $row );
+ $ret[$i]['title'] = $type['content_object']->getTitleFromHash( $row );
}
// generate a map of what items are assigned to what pigeonholes
@@ -933,9 +930,9 @@ class Pigeonholes extends LibertyMime {
if( @BitBase::verifyId( $$pParamHash['content_id'] ) ) {
$rewrite_tag = $gBitSystem->isFeatureActive( 'pretty_urls_extended' ) ? 'view/' : '';
if( $gBitSystem->isFeatureActive( 'pretty_urls' ) || $gBitSystem->isFeatureActive( 'pretty_urls_extended' ) ) {
- $ret = PIGEONHOLES_PKG_URL.$rewrite_tag.$$pParamHash['content_id'];
+ $ret = PIGEONHOLES_PKG_URL.$rewrite_tag.$pContentId;
}else{
- $ret = PIGEONHOLES_PKG_URL.'view.php?content_id='.$$pParamHash['content_id'];
+ $ret = PIGEONHOLES_PKG_URL.'view.php?content_id='.$pContentId;
}
}
diff --git a/modules/mod_category_menu.php b/modules/mod_category_menu.php
index bffbb69..fc7eeda 100644
--- a/modules/mod_category_menu.php
+++ b/modules/mod_category_menu.php
@@ -25,7 +25,7 @@ if( !empty( $gContent->mContentId ) ) {
foreach( $pigeons as $pigeon ) {
$modPigeonStructures[] = $gStructure->getSubTree( $pigeon['root_structure_id'], TRUE );
}
- $gBitSmarty->assign( 'modPigeonStructures', !empty( $modPigeonStructures ) ? $modPigeonStructures : FALSE );
+ $_template->tpl_vars['modPigeonStructures'] = new Smarty_variable( !empty( $modPigeonStructures );
}
}
}
diff --git a/modules/mod_category_suckerfish.php b/modules/mod_category_suckerfish.php
index 605ccda..8adadc7 100644
--- a/modules/mod_category_suckerfish.php
+++ b/modules/mod_category_suckerfish.php
@@ -20,7 +20,7 @@ global $gBitSmarty, $gQueryUserId, $gBitThemes, $module_rows, $moduleParams, $gB
$module_rows = $moduleParams['module_rows'];
$module_params = $moduleParams['module_params'];
-$gBitSmarty->assign( 'moduleTitle', isset($moduleParams['title']) ? $moduleParams['title']: 'Categories');
+$_template->tpl_vars['moduleTitle'] = new Smarty_variable( isset($moduleParams['title']) );
$ns = array();
if($gBitSystem->isPackageActive('pigeonholes')) {
@@ -105,15 +105,15 @@ if (!defined('MENU_LEVELS_DEFINED')) {
if (!empty($module_params['expand_root']) && $module_params['expand_root']) {
if (isset($ns[0]) && !empty($ns[0]['children'])) {
- $gBitSmarty->assign('pigeonMenu', menuLevels($ns[0]['children'], 0));
+ $_template->tpl_vars['pigeonMenu'] = new Smarty_variable( menuLevels($ns[0]['children'], 0));
}
else if (!empty($ns[0]['children'])) {
- $gBitSmarty->assign('pigeonMenu', menuLevels($ns['children'], 0));
+ $_template->tpl_vars['pigeonMenu'] = new Smarty_variable( menuLevels($ns['children'], 0));
}
}
else {
- $gBitSmarty->assign('pigeonMenu', menuLevels($ns, 0));
+ $_template->tpl_vars['pigeonMenu'] = new Smarty_variable( menuLevels($ns, 0));
}
-$gBitSmarty->assign('pigeonholesPackageActive', $gBitSystem->isPackageActive('pigeonholes'));
+$_template->tpl_vars['pigeonholesPackageActive'] = new Smarty_variable( $gBitSystem->isPackageActive('pigeonholes'));
?>
diff --git a/modules/mod_whats_related.php b/modules/mod_whats_related.php
index 2e2088b..b40e7a9 100644
--- a/modules/mod_whats_related.php
+++ b/modules/mod_whats_related.php
@@ -24,7 +24,7 @@ if( !empty( $gContent->mContentId ) ) {
$pigeonholes->load( TRUE );
$modRelatedPigeon[] = $pigeonholes->mInfo;
}
- $gBitSmarty->assign( 'modRelatedPigeon', !empty( $modRelatedPigeon ) ? $modRelatedPigeon : FALSE );
+ $_template->tpl_vars['modRelatedPigeon'] = new Smarty_variable( !empty( $modRelatedPigeon );
}
}
}
diff --git a/templates/assign_content.tpl b/templates/assign_content.tpl
index 768fa78..95d4e17 100644
--- a/templates/assign_content.tpl
+++ b/templates/assign_content.tpl
@@ -86,7 +86,7 @@
{/foreach}
{if $assignableContent}
- <table class="data">
+ <table class="table data">
<caption>{tr}Available Categories{/tr}</caption>
<tr>
<th>Categories</th>
@@ -117,7 +117,7 @@
</table>
{/if}
{else}
- <table class="data">
+ <table class="table data">
<caption>{tr}Available Content{/tr}</caption>
<tr>
<th>{smartlink ititle="Title" isort=title idefault=1 max_rows=$smarty.request.max_rows content_type=$contentSelect find=$smarty.request.find include=$smarty.request.include page=$page}</th>
diff --git a/templates/edit_pigeonholes.tpl b/templates/edit_pigeonholes.tpl
index 61fd8d4..9f61d55 100644
--- a/templates/edit_pigeonholes.tpl
+++ b/templates/edit_pigeonholes.tpl
@@ -39,15 +39,14 @@
{if $gBitSystem->isFeatureActive('pigeonholes_display_description')}
<div class="form-group">
- {textarea id="pigeonhole-desc" name="pigeonhole[edit]" help="A description of the category. This will be visible when users view this particular category." label="Description"}{$pigeonInfo.data}{/textarea}
+ {textarea id="pigeonhole-desc" name="pigeonhole[edit]" help="A description of the category. This will be visible when users view this particular category." label="Description" edit=$pigeonInfo.data}
</div>
{/if}
{if $gBitSystem->isFeatureActive( 'pigeonholes_allow_forbid_insertion') }
<div class="form-group">
- {formlabel label="Forbid Content Insertion" for="pigeonhole-no-insert"}
- {forminput}
- <input type="checkbox" name="pigeonhole[prefs][no_insert]" id="pigeonhole-no-insert" {if $gContent->mPrefs.no_insert}checked="checked"{/if} />
+ {forminput label="checkbox"}
+ <input type="checkbox" name="pigeonhole[prefs][no_insert]" id="pigeonhole-no-insert" {if $gContent->mPrefs.no_insert}checked="checked"{/if} />Forbid Content Insertion
{formhelp note="Forbids inserting new content into this category. Useful for categories which are meant to hold other categories in a heirarchy where only leaf categories should hold content."}
{/forminput}
</div>
diff --git a/templates/menu_pigeonholes.tpl b/templates/menu_pigeonholes.tpl
index 7bbd02f..94d8a19 100644
--- a/templates/menu_pigeonholes.tpl
+++ b/templates/menu_pigeonholes.tpl
@@ -1,5 +1,5 @@
{strip}
-<a class="dropdown-toggle" data-toggle="dropdown" href="#"> {tr}{$packageMenuTitle}{/tr} <b class="caret"></b></a>
+{if $packageMenuTitle}<a class="dropdown-toggle" data-toggle="dropdown" href="#"> {tr}{$packageMenuTitle}{/tr} <b class="caret"></b></a>{/if}
<ul class="{$packageMenuClass}">
{if $gBitUser->hasPermission( 'p_pigeonholes_create' )}
<li><a class="item" href="{$smarty.const.PIGEONHOLES_PKG_URL}edit_pigeonholes.php?action=create">{booticon iname="icon-file" iexplain="Create Category" ilocation=menu}</a></li>
diff --git a/templates/menu_pigeonholes_admin.tpl b/templates/menu_pigeonholes_admin.tpl
index 24df595..8ca6e2d 100644
--- a/templates/menu_pigeonholes_admin.tpl
+++ b/templates/menu_pigeonholes_admin.tpl
@@ -1,5 +1,3 @@
{strip}
-<li>
- {smartlink ititle="Pigeonhole Settings" ipackage="kernel" ifile="admin/index.php" page="pigeonholes"}
-</li>
+ {smartlink ititle="Pigeonhole" ipackage="kernel" ifile="admin/index.php" page="pigeonholes"}
{/strip}
diff --git a/templates/view_table_inc.tpl b/templates/view_table_inc.tpl
index dfb2f2b..96c845e 100644
--- a/templates/view_table_inc.tpl
+++ b/templates/view_table_inc.tpl
@@ -15,7 +15,7 @@
{counter assign=columns}
{/foreach}
{math equation="100 / x" x=$columns assign=width format="%u"}
- <table class="data" summary="Category listing"><tr>
+ <table class="table data" summary="Category listing"><tr>
{foreach from=$pigeonItem.members item=pigeonColumn}
<td style="vertical-align:top; width:{$width}%;">
{foreach from=$pigeonColumn item=members key=index}