From: Chuck Scott Date: Tue, 1 Mar 2016 16:35:54 +0000 (-0500) Subject: Cleaned up incompatible template references to URL/Url. X-Git-Tag: v1.1.3^2~20 X-Git-Url: http://cvs2.gaslightmedia.com/gitweb/?a=commitdiff_plain;h=7f61cf05a6c4076bee730f52da952a95ee9143f8;p=WP-Plugins%2Fglm-member-db-packaging.git Cleaned up incompatible template references to URL/Url. --- diff --git a/models/front/hooked/detail.php b/models/front/hooked/detail.php index 015d966..60bf860 100644 --- a/models/front/hooked/detail.php +++ b/models/front/hooked/detail.php @@ -67,47 +67,6 @@ class GlmMembersFront_packaging_detailHook extends GlmDataPackages /* * Merge data returned from the model with the selected view */ -/* - // Load Smarty Template support - $smarty = new smartyTemplateSupport(); - - // Update the Smarty view path based on plugin/add-on that's providing the action - $smarty->template->setTemplateDir($viewPath); - - // Add standard parameters - $smarty->templateAssign ( 'errorMsg', $errorMsg); - $smarty->templateAssign ( 'frontDebug', GLM_MEMBERS_PLUGIN_FRONT_DEBUG); - $smarty->templateAssign ( 'baseURL', GLM_MEMBERS_PLUGIN_BASE_URL); - $smarty->templateAssign ( 'thisURL', GLM_MEMBERS_PLUGIN_CURRENT_URL ); - $smarty->templateAssign ( 'glmPluginName', GLM_MEMBERS_PLUGIN_NAME ); - $smarty->templateAssign ( 'glmPluginMediaURL', GLM_MEMBERS_PLUGIN_MEDIA_URL ); - $smarty->templateAssign ( 'ref_type_numb', $this->config['ref_type_numb']); - $smarty->templateAssign ( 'thisYear', date ( 'Y' ) ); - $smarty->templateAssign ( 'settings', $this->config['settings']); - $smarty->templateAssign ( 'terms', $this->config['terms']); - $smarty->templateAssign('thisAction', $action); - - // Add data from model to Smarty template - if (is_array($results['data']) && count($results['data']) > 0) { - foreach ($results['data'] as $k => $d) { - $smarty->templateAssign($k, $d); - } - } - - // If view debug has been requested - if (GLM_MEMBERS_PLUGIN_FRONT_DEBUG) { - - glmMembersFront::addNotice("Template File: $view", 'Process'); - - $x = $smarty->template->getTemplateVars(); - $templateVars = '
' . print_r($x, 1) . '
'; - glmMembersFront::addNotice($templateVars, 'DataBlock', 'Template Parameters'); - } - - // Generate output from model data and view - $out = $smarty->template->fetch($view); -*/ - } diff --git a/models/front/packaging/detail.php b/models/front/packaging/detail.php index c5330de..0053146 100644 --- a/models/front/packaging/detail.php +++ b/models/front/packaging/detail.php @@ -99,7 +99,6 @@ class GlmMembersFront_packaging_detail extends GlmDataPackages $havePackage = false; $packageID = false; $package = false; - $settings = array(); $status = false; // If we have a package slug supplied from a rewrite - get the id @@ -148,8 +147,7 @@ class GlmMembersFront_packaging_detail extends GlmDataPackages 'menuItemRedirect' => false, 'modelRedirect' => false, 'view' => 'front/packaging/detail.html', - 'data' => $templateData, - 'settings' => $settings + 'data' => $templateData ); } diff --git a/models/front/packaging/list.php b/models/front/packaging/list.php index 3955af6..64a8221 100644 --- a/models/front/packaging/list.php +++ b/models/front/packaging/list.php @@ -99,7 +99,6 @@ class GlmMembersFront_packaging_list extends GlmDataPackages $havePackages = false; $packages = false; // Used if sorting by package $members = false; // Used if sorting by member then package - $settings = array(); $status = false; $orderBy = ''; $byMember = false; @@ -261,8 +260,7 @@ class GlmMembersFront_packaging_list extends GlmDataPackages 'menuItemRedirect' => false, 'modelRedirect' => false, 'view' => 'front/packaging/'.$view, - 'data' => $templateData, - 'settings' => $settings + 'data' => $templateData ); } diff --git a/views/admin/management/packaging.html b/views/admin/management/packaging.html index a98a700..8296a83 100644 --- a/views/admin/management/packaging.html +++ b/views/admin/management/packaging.html @@ -1,6 +1,6 @@ {include file='admin/management/header.html'} -
+ diff --git a/views/admin/member/packaging.html b/views/admin/member/packaging.html index d337740..765a075 100644 --- a/views/admin/member/packaging.html +++ b/views/admin/member/packaging.html @@ -8,8 +8,8 @@ {if apply_filters('glm_members_permit_admin_member_packaging_edit_package', true)} - {if $packageUpdated}

Package Updated

{/if} - {if $packageError}

Error submitting package, see below...

{/if} + {if $packageUpdated}

Package Updated

{/if} + {if $packageError}

Error submitting package, see below...

{/if} {if $option == 'edit'}

Edit Package

@@ -35,9 +35,9 @@ {else}

Add new Package

{/if} - Return to Package List + Return to Package List - + @@ -97,7 +97,7 @@
- +
@@ -108,7 +108,7 @@ {/if} New image: -
+
{if $packageInfo.fieldFail.image}

{$packageInfo.fieldFail.image}

{/if} @@ -158,7 +158,7 @@ Active:{$packageInfo.fieldData.active.name} Short Description:{$packageInfo.fieldData.short_descr} Description:{$packageInfo.fieldData.descr} - Image: + Image: Start Date:{$packageInfo.fieldData.start_date.date} End Date:{$packageInfo.fieldData.end_date.date} Expiration Date:{$packageInfo.fieldData.expire_date.date} @@ -190,7 +190,7 @@ {foreach $packages as $p} - {$p.title} + {$p.title} {$p.start_date.date} @@ -215,7 +215,7 @@ // Add Package Button Action $('#addPackageButton').click( function() { - window.location.href = "{$thisURL}?page={$thisPage}&glm_action=packaging&option=add&member={$memberID}"; + window.location.href = "{$thisUrl}?page={$thisPage}&glm_action=packaging&option=add&member={$memberID}"; }); // Date Input @@ -235,7 +235,7 @@ $("#deletePackageDialog").dialog("close"); }); $('#deletePackageSubmit').click( function() { - window.location.replace("{$thisURL}?page={$thisPage}&glm_action=packaging&member={$memberID}&option=delete&packageID={$packageInfo.fieldData.id}"); + window.location.replace("{$thisUrl}?page={$thisPage}&glm_action=packaging&member={$memberID}&option=delete&packageID={$packageInfo.fieldData.id}"); }); {/if} diff --git a/views/admin/members/packaging.html b/views/admin/members/packaging.html index 05baa5c..7aed491 100644 --- a/views/admin/members/packaging.html +++ b/views/admin/members/packaging.html @@ -32,10 +32,10 @@ {else}

Add new Multi-Member Package

{/if} - Return to Package List + Return to Package List - + @@ -91,7 +91,7 @@
- +
@@ -102,7 +102,7 @@ {/if} New image: -
+
{if $packageInfo.fieldFail.image}

{$packageInfo.fieldFail.image}

{/if} @@ -213,7 +213,7 @@ Active:{$packageInfo.fieldData.active.name} Description:{$packageInfo.fieldData.descr} Short Description:{$packageInfo.fieldData.short_descr} - Image: + Image: Start Date:{$packageInfo.fieldData.start_date.date} End Date:{$packageInfo.fieldData.end_date.date} Expiration Date:{$packageInfo.fieldData.expire_date.date} @@ -258,13 +258,13 @@ {if $p.ref_type.value} - {$p.title} + {$p.title} {else} - {$p.title} + {$p.title} {/if} - {$p.ref_dest_name} + {$p.ref_dest_name} {$p.start_date.date} @@ -290,7 +290,7 @@ // Add Package Button Action $('#addPackageButton').click( function() { - window.location.href = "{$thisURL}?page={$thisPage}&glm_action=packaging&option=add"; + window.location.href = "{$thisUrl}?page={$thisPage}&glm_action=packaging&option=add"; }); // Date Input @@ -313,7 +313,7 @@ $("#deletePackageDialog").dialog("close"); }); $('#deletePackageSubmit').click( function() { - window.location.replace("{$thisURL}?page={$thisPage}&glm_action=packaging&option=delete&packageID={$packageInfo.fieldData.id}"); + window.location.replace("{$thisUrl}?page={$thisPage}&glm_action=packaging&option=delete&packageID={$packageInfo.fieldData.id}"); }); {/if} @@ -326,7 +326,7 @@ // Get type of package filter selected filter = $(this).val(); - window.location.href = "{$thisURL}?page={$thisPage}&glm_action=packaging&filterPackageType=" + filter; + window.location.href = "{$thisUrl}?page={$thisPage}&glm_action=packaging&filterPackageType=" + filter; return false; }); @@ -354,10 +354,10 @@ var memberID = ui.item.memb; if (memberID > 0) { // Selected package is a member package - window.location.replace("{$adminURL}?page=glm-members-admin-menu-member&glm_action=packaging&option=edit&member=" + memberID + "&packageID=" + packageID ); + window.location.replace("{$adminUrl}?page=glm-members-admin-menu-member&glm_action=packaging&option=edit&member=" + memberID + "&packageID=" + packageID ); } else { // Selected package is a mulit-member package - window.location.replace("{$adminURL}?page=glm-members-admin-menu-members&glm_action=packaging&option=edit&packageID=" + packageID ); + window.location.replace("{$adminUrl}?page=glm-members-admin-menu-members&glm_action=packaging&option=edit&packageID=" + packageID ); } } }); diff --git a/views/front/footer.html b/views/front/footer.html index e4b25c0..f8b0015 100644 --- a/views/front/footer.html +++ b/views/front/footer.html @@ -3,7 +3,7 @@ {if $frontDebug} {/if} diff --git a/views/front/packaging/detail.html b/views/front/packaging/detail.html index 741c128..3b37097 100644 --- a/views/front/packaging/detail.html +++ b/views/front/packaging/detail.html @@ -39,17 +39,17 @@
{apply_filters('glm-member-db-front-members-detail-otherDetailBottom', '', $package.member.id)}
- - - - + + + +
{if $package.member.logo && $settings.detail_show_logo} {/if} @@ -59,10 +59,10 @@ {if $package.image}
- +
{/if} -

{$package.title}

+

{$package.title}

{if $package.descr} {$package.descr} {else if $package.short_descr} diff --git a/views/front/packaging/list.html b/views/front/packaging/list.html index 2304487..a9395b4 100644 --- a/views/front/packaging/list.html +++ b/views/front/packaging/list.html @@ -21,7 +21,7 @@
{if $m.logo}
- +
{/if}

{$m.member_name}

@@ -58,7 +58,7 @@ {if $p.image}
- +
{/if}

{$p.title}

@@ -87,7 +87,7 @@
{if $p.member.logo}
- +
{/if}

{$p.member.member_name}

@@ -121,7 +121,7 @@ {if $p.image}
- +
{/if}

{$p.title}

diff --git a/views/front/packaging/listForMemberDetail.html b/views/front/packaging/listForMemberDetail.html index 5746e8c..b32dfd9 100644 --- a/views/front/packaging/listForMemberDetail.html +++ b/views/front/packaging/listForMemberDetail.html @@ -15,7 +15,7 @@ {if $p.image}
- +
{/if}

{$p.title}

diff --git a/views/front/packaging/listForMemberListing.html b/views/front/packaging/listForMemberListing.html index 1718aa8..ad2ccdc 100644 --- a/views/front/packaging/listForMemberListing.html +++ b/views/front/packaging/listForMemberListing.html @@ -11,7 +11,7 @@ {if $p.image}
- +
{/if}

{$p.title}