diff options
author | rvelices <rv-github@modusoptimus.com> | 2008-09-10 01:16:13 +0000 |
---|---|---|
committer | rvelices <rv-github@modusoptimus.com> | 2008-09-10 01:16:13 +0000 |
commit | 6ddb20d6f096fa51b5e820e1b2e19e93f4df0253 (patch) | |
tree | 20cf82c77918e07c30f92e3764fa58f9f60a1541 | |
parent | d6b39bb4e127ab29beecb6793de7f72ce2a36397 (diff) |
- fix undefined template vars U_LOST_PASSWORD (menubar), F_ACTION (extend_for_templates) and F_C13Y_ACTION (check_integrity)
- normalized some template variable names between category thumbnails and thumbnails (take advantage of full template change with smarty and do it now)
git-svn-id: http://piwigo.org/svn/trunk@2515 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to '')
-rw-r--r-- | admin/template/yoga/admin/check_integrity.tpl | 2 | ||||
-rw-r--r-- | admin/template/yoga/admin/extend_for_templates.tpl | 2 | ||||
-rw-r--r-- | include/category_cats.inc.php | 14 | ||||
-rw-r--r-- | include/category_default.inc.php | 12 | ||||
-rw-r--r-- | include/menubar.inc.php | 1 | ||||
-rw-r--r-- | template-extension/distributed/samples/my-thumbnails.tpl | 8 | ||||
-rw-r--r-- | template-extension/distributed/samples/my-thumbnails2.tpl | 6 | ||||
-rw-r--r-- | template/yoga/mainpage_categories.tpl | 46 | ||||
-rw-r--r-- | template/yoga/thumbnails.tpl | 10 |
9 files changed, 50 insertions, 51 deletions
diff --git a/admin/template/yoga/admin/check_integrity.tpl b/admin/template/yoga/admin/check_integrity.tpl index 1783e69e2..3d1bfb5d1 100644 --- a/admin/template/yoga/admin/check_integrity.tpl +++ b/admin/template/yoga/admin/check_integrity.tpl @@ -3,7 +3,7 @@ <dt>{'c13y_title'|@translate}</dt> <dd> <ul> - <form method="post" name="c13y" id="c13y" action="{$F_C13Y_ACTION}"> + <form method="post" name="c13y" id="c13y" action=""> <fieldset> <table class="table2"> <tr class="throw"> diff --git a/admin/template/yoga/admin/extend_for_templates.tpl b/admin/template/yoga/admin/extend_for_templates.tpl index fdac49b7d..2e9c4766b 100644 --- a/admin/template/yoga/admin/extend_for_templates.tpl +++ b/admin/template/yoga/admin/extend_for_templates.tpl @@ -3,7 +3,7 @@ </div> {if isset($extents)} <h4>{'Replacement of original templates'|@translate}</h4> -<form method="post" name="extend_for_templates" id="extend_for_templates" action="{$F_ACTION}"> +<form method="post" name="extend_for_templates" id="extend_for_templates" action=""> <table class="table2"> <tr class="throw"> <th>{'Replacers'|@translate}</th> diff --git a/include/category_cats.inc.php b/include/category_cats.inc.php index c706ee496..c80ba918b 100644 --- a/include/category_cats.inc.php +++ b/include/category_cats.inc.php @@ -32,9 +32,8 @@ if ($page['section']=='recent_cats') // $user['forbidden_categories'] including with USER_CACHE_CATEGORIES_TABLE $query = ' SELECT - id, name, permalink, representative_picture_id, comment, nb_images, uppercats, - date_last, max_date_last, count_images, count_categories, global_rank - FROM '.CATEGORIES_TABLE.' INNER JOIN '.USER_CACHE_CATEGORIES_TABLE.' + c.*, nb_images, date_last, max_date_last, count_images, count_categories + FROM '.CATEGORIES_TABLE.' c INNER JOIN '.USER_CACHE_CATEGORIES_TABLE.' ON id = cat_id and user_id = '.$user['id'].' WHERE date_last >= SUBDATE( CURRENT_DATE,INTERVAL '.$user['recent_period'].' DAY @@ -54,9 +53,8 @@ else // $user['forbidden_categories'] including with USER_CACHE_CATEGORIES_TABLE $query = ' SELECT - id, name, permalink, representative_picture_id, comment, nb_images, uppercats, - date_last, max_date_last, count_images, count_categories - FROM '.CATEGORIES_TABLE.' INNER JOIN '.USER_CACHE_CATEGORIES_TABLE.' + c.*, nb_images, date_last, max_date_last, count_images, count_categories + FROM '.CATEGORIES_TABLE.' c INNER JOIN '.USER_CACHE_CATEGORIES_TABLE.' ON id = cat_id and user_id = '.$user['id'].' WHERE id_uppercat '. (!isset($page['category']) ? 'is NULL' : '= '.$page['category']['id']).' @@ -245,8 +243,8 @@ if (count($categories) > 0) array( 'ID' => $category['id'], 'TN_SRC' => $thumbnail_src_of[$category['representative_picture_id']], - 'ALT' => strip_tags($category['name']), - 'ICON' => $icon_ts, + 'TN_ALT' => strip_tags($category['name']), + 'ICON_TS' => $icon_ts, 'URL' => make_index_url( array( diff --git a/include/category_default.inc.php b/include/category_default.inc.php index 8dad04d90..5ee88a275 100644 --- a/include/category_default.inc.php +++ b/include/category_default.inc.php @@ -107,11 +107,11 @@ foreach ($pictures as $row) $tpl_var = array( 'ID' => $row['id'], - 'IMAGE' => $thumbnail_url, - 'IMAGE_ALT' => $row['file'], - 'IMAGE_TITLE' => get_thumbnail_title($row), - 'IMAGE_TS' => get_icon($row['date_available']), - 'U_IMG_LINK' => $url, + 'TN_SRC' => $thumbnail_url, + 'TN_ALT' => $row['file'], + 'TN_TITLE' => get_thumbnail_title($row), + 'ICON_TS' => get_icon($row['date_available']), + 'URL' => $url, ); if ($user['show_nb_hits']) @@ -147,7 +147,7 @@ foreach ($pictures as $row) } } - $tpl_var['ELEMENT_NAME'] = $name; + $tpl_var['NAME'] = $name; } if ( isset($nb_comments_of) ) diff --git a/include/menubar.inc.php b/include/menubar.inc.php index b04a960a8..6e9f73a86 100644 --- a/include/menubar.inc.php +++ b/include/menubar.inc.php @@ -266,6 +266,7 @@ function initialize_menu() $template->assign( array( 'U_LOGIN' => get_root_url().'identification.php', + 'U_LOST_PASSWORD' => get_root_url().'password.php', 'AUTHORIZE_REMEMBERING' => $conf['authorize_remembering'] ) ); diff --git a/template-extension/distributed/samples/my-thumbnails.tpl b/template-extension/distributed/samples/my-thumbnails.tpl index df39ab019..068ec5561 100644 --- a/template-extension/distributed/samples/my-thumbnails.tpl +++ b/template-extension/distributed/samples/my-thumbnails.tpl @@ -6,14 +6,14 @@ <li> <span class="wrap1"> <span class="wrap2"> - <a href="{$thumbnail.U_IMG_LINK}"> - <img class="thumbnail" src="{$thumbnail.IMAGE}" alt="{$thumbnail.IMAGE_ALT}" title="{$thumbnail.IMAGE_TITLE}" /> + <a href="{$thumbnail.URL}"> + <img class="thumbnail" src="{$thumbnail.TN_SRC}" alt="{$thumbnail.TN_ALT}" title="{$thumbnail.TN_TITLE}" /> </a> </span> <span class="thumbLegend" style="color:#F36;"> © 2008 Piwigo<br /> - {if !empty($thumbnail.ELEMENT_NAME)}{$thumbnail.ELEMENT_NAME}{/if} - {if !empty($thumbnail.IMAGE_TS)}{$thumbnail.IMAGE_TS}{/if} + {if !empty($thumbnail.NAME)}{$thumbnail.NAME}{/if} + {if !empty($thumbnail.ICON_TS)}{$thumbnail.ICON_TS}{/if} {if isset($thumbnail.NB_COMMENTS)} <span class="{if 0==$thumbnail.NB_COMMENTS}zero {/if}nb-comments"> diff --git a/template-extension/distributed/samples/my-thumbnails2.tpl b/template-extension/distributed/samples/my-thumbnails2.tpl index 205cc80e8..f65f8f31b 100644 --- a/template-extension/distributed/samples/my-thumbnails2.tpl +++ b/template-extension/distributed/samples/my-thumbnails2.tpl @@ -7,10 +7,10 @@ <li> <fieldset class="fld1"> <legend class="thumbLegend"> - {if !empty($thumbnail.ELEMENT_NAME)}{$thumbnail.ELEMENT_NAME}{/if} + {if !empty($thumbnail.NAME)}{$thumbnail.NAME}{/if} </legend> - <a href="{$thumbnail.U_IMG_LINK}" class="lap2"> - <span><img class="thumbnail" src="{$thumbnail.IMAGE}" alt="{$thumbnail.IMAGE_ALT}" title="{$thumbnail.IMAGE_TITLE}" /></span> + <a href="{$thumbnail.URL}" class="lap2"> + <span><img class="thumbnail" src="{$thumbnail.TN_SRC}" alt="{$thumbnail.TN_ALT}" title="{$thumbnail.TN_TITLE}" /></span> </a> </fieldset> </li> diff --git a/template/yoga/mainpage_categories.tpl b/template/yoga/mainpage_categories.tpl index b28c619fb..226a82c05 100644 --- a/template/yoga/mainpage_categories.tpl +++ b/template/yoga/mainpage_categories.tpl @@ -1,27 +1,29 @@ {* $Id$ *} <ul class="thumbnailCategories"> - {foreach from=$category_thumbnails item=cat} - <li> - <div class="thumbnailCategory"> - <div class="illustration"> - <a href="{$cat.URL}"> - <img src="{$cat.TN_SRC}" alt="{$cat.ALT}" title="{'hint_category'|@translate}"> - </a> - </div> - <div class="description"> - <h3> - <a href="{$cat.URL}">{$cat.NAME}</a> - {$cat.ICON} - </h3> - {if isset($cat.INFO_DATES) } - <p>{$cat.INFO_DATES}</p> - {/if} - <p>{$cat.CAPTION_NB_IMAGES}</p> - <p>{$cat.DESCRIPTION}</p> - </div> - </div> - </li> - {/foreach} +{foreach from=$category_thumbnails item=cat} + <li> + <div class="thumbnailCategory"> + <div class="illustration"> + <a href="{$cat.URL}"> + <img src="{$cat.TN_SRC}" alt="{$cat.TN_ALT}" title="{'hint_category'|@translate}"> + </a> + </div> + <div class="description"> + <h3> + <a href="{$cat.URL}">{$cat.NAME}</a> + {$cat.ICON_TS} + </h3> + {if isset($cat.INFO_DATES) } + <p>{$cat.INFO_DATES}</p> + {/if} + <p>{$cat.CAPTION_NB_IMAGES}</p> + {if not empty($cat.DESCRIPTION)} + <p>{$cat.DESCRIPTION}</p> + {/if} + </div> + </div> + </li> +{/foreach} </ul> diff --git a/template/yoga/thumbnails.tpl b/template/yoga/thumbnails.tpl index 2fd37f649..66829ecec 100644 --- a/template/yoga/thumbnails.tpl +++ b/template/yoga/thumbnails.tpl @@ -6,15 +6,13 @@ <li> <span class="wrap1"> <span class="wrap2"> - <a href="{$thumbnail.U_IMG_LINK}"> - <img class="thumbnail" src="{$thumbnail.IMAGE}" alt="{$thumbnail.IMAGE_ALT}" title="{$thumbnail.IMAGE_TITLE}" /> + <a href="{$thumbnail.URL}"> + <img class="thumbnail" src="{$thumbnail.TN_SRC}" alt="{$thumbnail.TN_ALT}" title="{$thumbnail.TN_TITLE}" /> </a> </span> <span class="thumbLegend"> - - {if !empty($thumbnail.ELEMENT_NAME)}{$thumbnail.ELEMENT_NAME}{/if} - {if !empty($thumbnail.IMAGE_TS)}{$thumbnail.IMAGE_TS}{/if} - + {$thumbnail.NAME|@default} + {$thumbnail.ICON_TS} {if isset($thumbnail.NB_COMMENTS)} <span class="{if 0==$thumbnail.NB_COMMENTS}zero {/if}nb-comments"> <br /> |