From 863bce7f13191aa40f3388f7cadc6c00eaf1aec4 Mon Sep 17 00:00:00 2001 From: mistic100 Date: Thu, 20 Jun 2013 14:35:16 +0000 Subject: feature:2832 Provide better integration of plugins adding a all new section don't need for an extra file git-svn-id: http://piwigo.org/svn/trunk@23399 68402e56-0260-453c-a942-63ccdbb3a9ee --- index.php | 10 +----- themes/default/template/common_page.tpl | 62 --------------------------------- themes/default/template/index.tpl | 5 ++- 3 files changed, 5 insertions(+), 72 deletions(-) delete mode 100644 themes/default/template/common_page.tpl diff --git a/index.php b/index.php index a2b40417e..65c19bd69 100644 --- a/index.php +++ b/index.php @@ -119,6 +119,7 @@ $template->assign('TITLE', $template_title); //-------------------------------------------------------------- menubar include( PHPWG_ROOT_PATH.'include/menubar.inc.php'); +$template->set_filename('index', 'index.tpl'); // +-----------------------------------------------------------------------+ // | index page (categories, thumbnails, search, calendar, random, etc.) | @@ -127,8 +128,6 @@ if ( empty($page['is_external']) or !$page['is_external'] ) { //----------------------------------------------------- template initialization $page['body_id'] = 'theCategoryPage'; - - $template->set_filename('index', 'index.tpl'); if (isset($page['flat']) or isset($page['chronology_field'])) { @@ -335,13 +334,6 @@ if ( empty($page['is_external']) or !$page['is_external'] ) } } } -// +-----------------------------------------------------------------------+ -// | other pages (added by plugins) | -// +-----------------------------------------------------------------------+ -else -{ - $template->set_filename('index', 'common_page.tpl'); -} //------------------------------------------------------------ end include(PHPWG_ROOT_PATH.'include/page_header.php'); diff --git a/themes/default/template/common_page.tpl b/themes/default/template/common_page.tpl deleted file mode 100644 index b166f54f7..000000000 --- a/themes/default/template/common_page.tpl +++ /dev/null @@ -1,62 +0,0 @@ -{combine_script id='core.switchbox' load='footer' require='jquery' path='themes/default/js/switchbox.js'} -{$MENUBAR} - - -{if isset($errors) or isset($infos)} -
-{include file='infos_errors.tpl'} -
-{/if} - -{if !empty($PLUGIN_INDEX_CONTENT_BEFORE)}{$PLUGIN_INDEX_CONTENT_BEFORE}{/if} -
-
-
    -{if !empty($image_orders)} -
  • {strip} -  {'Sort order'|@translate} - -
    -
    {'Sort order'|@translate}
    - {foreach from=$image_orders item=image_order name=loop}{if !$smarty.foreach.loop.first}
    {/if} - {if $image_order.SELECTED} - {$image_order.DISPLAY} - {else} - {$image_order.DISPLAY} - {/if} - {/foreach} -
    - {footer_script require='core.switchbox'}switchBox("#sortOrderLink", "#sortOrderBox");{/footer_script} - {/strip}
  • -{/if} -{if !empty($image_derivatives)} -
  • {strip} -  {'Photo sizes'|@translate} - -
    -
    {'Photo sizes'|@translate}
    - {foreach from=$image_derivatives item=image_derivative name=loop}{if !$smarty.foreach.loop.first}
    {/if} - {if $image_derivative.SELECTED} - {$image_derivative.DISPLAY} - {else} - {$image_derivative.DISPLAY} - {/if} - {/foreach} -
    - {footer_script require='core.switchbox'}switchBox("#derivativeSwitchLink", "#derivativeSwitchBox");{/footer_script} - {/strip}
  • -{/if} -{if !empty($PLUGIN_INDEX_BUTTONS)}{foreach from=$PLUGIN_INDEX_BUTTONS item=button}
  • {$button}
  • {/foreach}{/if} -{if !empty($PLUGIN_INDEX_ACTIONS)}{$PLUGIN_INDEX_ACTIONS}{/if} -
- -

{$TITLE}

-
{* *} - -{if !empty($PLUGIN_INDEX_CONTENT_BEGIN)}{$PLUGIN_INDEX_CONTENT_BEGIN}{/if} - -{if !empty($CONTENT)}{$CONTENT}{/if} - -{if !empty($PLUGIN_INDEX_CONTENT_END)}{$PLUGIN_INDEX_CONTENT_END}{/if} -
{* *} -{if !empty($PLUGIN_INDEX_CONTENT_AFTER)}{$PLUGIN_INDEX_CONTENT_AFTER}{/if} diff --git a/themes/default/template/index.tpl b/themes/default/template/index.tpl index 4e3f2c73a..8b47aace4 100644 --- a/themes/default/template/index.tpl +++ b/themes/default/template/index.tpl @@ -93,7 +93,7 @@  {'Calendar'|@translate} {/strip} {/if} -{if isset($PLUGIN_INDEX_BUTTONS)}{foreach from=$PLUGIN_INDEX_BUTTONS item=button}
  • {$button}
  • {/foreach}{/if} +{if !empty($PLUGIN_INDEX_BUTTONS)}{foreach from=$PLUGIN_INDEX_BUTTONS item=button}
  • {$button}
  • {/foreach}{/if} {if !empty($PLUGIN_INDEX_ACTIONS)}{$PLUGIN_INDEX_ACTIONS}{/if} @@ -163,7 +163,10 @@ jQuery("#calendarViewSwitchBox").on("mouseleave", function() { {/if} +{if !empty($CONTENT)}{$CONTENT}{/if} + {if !empty($CATEGORIES)}{$CATEGORIES}{/if} + {if !empty($cats_navbar)} {include file='navigation_bar.tpl'|@get_extent:'navbar' navbar=$cats_navbar} {/if} -- cgit v1.2.3