aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--admin/extend_for_templates.php27
-rw-r--r--admin/template/goto/default-layout.css2
-rw-r--r--admin/template/goto/extend_for_templates.tpl4
-rw-r--r--include/template.class.php3
-rw-r--r--language/de_DE/admin.lang.php1
-rw-r--r--language/de_DE/help/extend_for_templates.html6
-rw-r--r--language/en_UK/admin.lang.php1
-rw-r--r--language/en_UK/help/extend_for_templates.html6
-rw-r--r--language/es_ES/admin.lang.php1
-rw-r--r--language/es_ES/help/extend_for_templates.html3
-rw-r--r--language/fr_FR/admin.lang.php1
-rw-r--r--language/fr_FR/help/extend_for_templates.html2
-rw-r--r--language/it_IT/admin.lang.php1
-rw-r--r--language/it_IT/help/extend_for_templates.html3
-rw-r--r--language/nl_NL/admin.lang.php1
-rw-r--r--language/nl_NL/help/extend_for_templates.html6
16 files changed, 53 insertions, 15 deletions
diff --git a/admin/extend_for_templates.php b/admin/extend_for_templates.php
index 30b21f277..01a24b478 100644
--- a/admin/extend_for_templates.php
+++ b/admin/extend_for_templates.php
@@ -102,7 +102,13 @@ $eligible_templates = array(
'slideshow.tpl' => 'slideshow',
'tags.tpl' => 'tags',
'upload.tpl' => 'upload',);
- $flip_templates = array_flip($eligible_templates);
+
+$flip_templates = array_flip($eligible_templates);
+
+$available_templates = array_merge(
+ array('N/A' => '----------'),
+ get_dirs(PHPWG_ROOT_PATH.'template'));
+
// +-----------------------------------------------------------------------+
// | selected templates |
// +-----------------------------------------------------------------------+
@@ -118,9 +124,11 @@ if (isset($_POST['submit']) and !is_adviser())
$handle = $eligible_templates[$original];
$url_keyword = $_POST['url'][$i];
if ($url_keyword == '----------') $url_keyword = 'N/A';
+ $bound_tpl = $_POST['bound'][$i];
+ if ($bound_tpl == '----------') $bound_tpl = 'N/A';
if ($handle != 'N/A')
{
- $replacements[$newtpl] = array($handle, $url_keyword);
+ $replacements[$newtpl] = array($handle, $url_keyword, $bound_tpl);
}
$i++;
}
@@ -150,7 +158,7 @@ foreach ($tpl_extension as $file => $conditions)
}
foreach ($new_extensions as $file)
{
- $tpl_extension[$file] = array('N/A', 'N/A');
+ $tpl_extension[$file] = array('N/A', 'N/A', 'N/A');
}
$template->set_filenames(array('extend_for_templates'
@@ -167,14 +175,17 @@ foreach ($tpl_extension as $file => $conditions)
{
$handle = $conditions[0];
$url_keyword = $conditions[1];
+ $bound_tpl = $conditions[2];
{
$template->append('extents',
array(
- 'replacer' => $file,
- 'url_parameter' => $relevant_parameters,
- 'original_tpl' => array_keys($eligible_templates),
- 'selected_tpl' => $flip_templates[$handle],
- 'selected_url' => $url_keyword,)
+ 'replacer' => $file,
+ 'url_parameter' => $relevant_parameters,
+ 'original_tpl' => array_keys($eligible_templates),
+ 'bound_tpl' => $available_templates,
+ 'selected_tpl' => $flip_templates[$handle],
+ 'selected_url' => $url_keyword,
+ 'selected_bound' => $bound_tpl,)
);
}
}
diff --git a/admin/template/goto/default-layout.css b/admin/template/goto/default-layout.css
index fc5cb3c2a..05ca38cf1 100644
--- a/admin/template/goto/default-layout.css
+++ b/admin/template/goto/default-layout.css
@@ -7,7 +7,7 @@ TABLE.table2 {
padding: 0;
}
-TABLE.table2 TD {
+TABLE.table2 TD, TABLE.table2 TH {
padding: 0 5px;
}
diff --git a/admin/template/goto/extend_for_templates.tpl b/admin/template/goto/extend_for_templates.tpl
index 2e9c4766b..dae6903a5 100644
--- a/admin/template/goto/extend_for_templates.tpl
+++ b/admin/template/goto/extend_for_templates.tpl
@@ -9,6 +9,7 @@
<th>{'Replacers'|@translate}</th>
<th>{'Original templates'|@translate}</th>
<th>{'Optional URL keyword'|@translate}</th>
+ <th>{'Bound template'|@translate}</th>
</tr>
{foreach from=$extents item=tpl name=extent_loop}
<tr class="{if $smarty.foreach.extent_loop.index is odd}row1{else}row2{/if}">
@@ -22,6 +23,9 @@
<td>
{html_options name=url[] output=$tpl.url_parameter values=$tpl.url_parameter selected=$tpl.selected_url}
</td>
+ <td>
+ {html_options name=bound[] output=$tpl.bound_tpl values=$tpl.bound_tpl selected=$tpl.selected_bound}
+ </td>
</tr>
{/foreach}
</table>
diff --git a/include/template.class.php b/include/template.class.php
index e641d3cb8..86d5a1062 100644
--- a/include/template.class.php
+++ b/include/template.class.php
@@ -186,11 +186,13 @@ class Template {
{
$handle = $value[0];
$param = $value[1];
+ $tpl = $value[2];
}
elseif (is_string($value))
{
$handle = $value;
$param = 'N/A';
+ $tpl = 'N/A';
}
else
{
@@ -198,6 +200,7 @@ class Template {
}
if ((stripos(implode('/',array_flip($_GET)), $param) > 0 or $param == 'N/A')
+ and (preg_match('/'.preg_quote($tpl,'/').'$/', $this->get_template_dir()) or $tpl == 'N/A')
and (!isset($this->extents[$handle]) or $overwrite)
and file_exists($dir . $filename))
{
diff --git a/language/de_DE/admin.lang.php b/language/de_DE/admin.lang.php
index 56cf48dc0..7a6a7849c 100644
--- a/language/de_DE/admin.lang.php
+++ b/language/de_DE/admin.lang.php
@@ -644,4 +644,5 @@ $lang['Note: Only deletes photos added with pLoader'] = 'Bitte beachten: Nur üb
$lang['Delete selected photos'] = 'Fotos löschen';
$lang['%d photo was deleted'] = '%d Foto wurde gelöscht';
$lang['%d photos were deleted'] = '%d Fotos wurden gelöscht';
+/* TODO */ $lang['Bound template'] = 'Bound template';
?>
diff --git a/language/de_DE/help/extend_for_templates.html b/language/de_DE/help/extend_for_templates.html
index f0cb68bdb..c75842a0e 100644
--- a/language/de_DE/help/extend_for_templates.html
+++ b/language/de_DE/help/extend_for_templates.html
@@ -64,8 +64,10 @@ class="Dateiname">template-extension/my-extension/video.tpl</span>.</p>
werden jeweils nur auf Seiten mit diesem Keyword. Zum Beispiel: <span
class="pwgScreen">index.php? /<strong> most_visited</strong></span></p>
-<p>Advanced-User nutzen werden Dauerlinks als <strong>optional URL
- Keyword</strong>.</p>
+<p>Advanced-User nutzen werden Dauerlinks als <strong>optional URL Keyword</strong>.</p>
+
+<!-- TODO -->
+<p>If you select a <strong>Bound template</strong> then replacements will be operate only on this template.</p>
<h3>Wie kann ich deaktivieren meine "replacers"?</h3>
<ul>
diff --git a/language/en_UK/admin.lang.php b/language/en_UK/admin.lang.php
index 9c45f1d63..276cb6111 100644
--- a/language/en_UK/admin.lang.php
+++ b/language/en_UK/admin.lang.php
@@ -644,4 +644,5 @@ $lang['Note: Only deletes photos added with pLoader'] = 'Note: Only deletes phot
$lang['Delete selected photos'] = 'Delete selected photos';
$lang['%d photo was deleted'] = '%d photo was deleted';
$lang['%d photos were deleted'] = '%d photos were deleted';
+$lang['Bound template'] = 'Bound template';
?>
diff --git a/language/en_UK/help/extend_for_templates.html b/language/en_UK/help/extend_for_templates.html
index 8e2c7ac6b..dfe124615 100644
--- a/language/en_UK/help/extend_for_templates.html
+++ b/language/en_UK/help/extend_for_templates.html
@@ -64,8 +64,10 @@ class="filename">template-extension/my-extension/video.tpl</span>.</p>
will be operate only on pages with this keyword. For example: <span
class="pwgScreen">index.php?/<strong>most_visited</strong></span></p>
-<p>Advanced users will use permalinks as <strong>optional URL
- keyword</strong>. </p>
+<p>Advanced users will use permalinks as <strong>optional URL keyword</strong>. </p>
+
+<p>If you select a <strong>Bound template</strong> then replacements will be operate only on this template.</p>
+
<h3>How can I deactivate my "replacers"?</h3>
<ul>
<li>Unselect related "Original templates".</li>
diff --git a/language/es_ES/admin.lang.php b/language/es_ES/admin.lang.php
index f6ac154de..660e6b1f6 100644
--- a/language/es_ES/admin.lang.php
+++ b/language/es_ES/admin.lang.php
@@ -641,4 +641,5 @@ $lang['Note: Only deletes photos added with pLoader'] = 'Nota: las únicas las f
$lang['Delete selected photos'] = 'Suprimir las fotos';
$lang['%d photo was deleted'] = '%d foto ha sido suprimida';
$lang['%d photos were deleted'] = '%d fotos han sido suprimidas';
+/* TODO */ $lang['Bound template'] = 'Bound template';
?>
diff --git a/language/es_ES/help/extend_for_templates.html b/language/es_ES/help/extend_for_templates.html
index 54e306689..7cd4b7ff6 100644
--- a/language/es_ES/help/extend_for_templates.html
+++ b/language/es_ES/help/extend_for_templates.html
@@ -70,6 +70,9 @@ class="filename">template-extension/my-extension/video.tpl</span>.</p>
<p>Los usuarios avanzados utilizarán el permalinks (permaliens, lazos permanentes) como strong> parámetro facultativo del URL </strong>. </p>
+<!-- TODO -->
+<p>If you select a <strong>Bound template</strong> then replacements will be operate only on this template.</p>
+
<h3>¿ Cómo puedo desactivar mi "sustitutos"?</h3>
<ul>
<li>Deselectionner " template de origen ".</li>
diff --git a/language/fr_FR/admin.lang.php b/language/fr_FR/admin.lang.php
index 6ef5eaf96..89417f588 100644
--- a/language/fr_FR/admin.lang.php
+++ b/language/fr_FR/admin.lang.php
@@ -643,4 +643,5 @@ $lang['Note: Only deletes photos added with pLoader'] = 'Note: seules les photos
$lang['Delete selected photos'] = 'Supprimer les photos';
$lang['%d photo was deleted'] = '%d photo a été supprimée';
$lang['%d photos were deleted'] = '%d photos ont été supprimées';
+$lang['Bound template'] = 'Template rattaché';
?>
diff --git a/language/fr_FR/help/extend_for_templates.html b/language/fr_FR/help/extend_for_templates.html
index bbc8b4bf0..c173b3467 100644
--- a/language/fr_FR/help/extend_for_templates.html
+++ b/language/fr_FR/help/extend_for_templates.html
@@ -67,6 +67,8 @@ ne seront réalisés que sur les pages utilisant ce mot clé. Par exemple: <span
<p>Les utilisateurs avancés utiliseront les permalinks (permaliens, liens permanents) en tant que
<strong>paramètre facultatif de l'URL</strong>. </p>
+<p>Si vous sélectionnez un <strong>Template rattaché</strong> alors les remplacements ne seront réalisés que sur ce template.</p>
+
<h3>Comment puis-je désactiver mes "replacers"?</h3>
<ul>
<li>Déselectionner le "template d'origine".</li>
diff --git a/language/it_IT/admin.lang.php b/language/it_IT/admin.lang.php
index c4e7f8c75..2ea0e92e8 100644
--- a/language/it_IT/admin.lang.php
+++ b/language/it_IT/admin.lang.php
@@ -643,4 +643,5 @@ $lang['Note: Only deletes photos added with pLoader'] = 'Nota: solo le foto agiu
$lang['Delete selected photos'] = 'Cancellare le foto';
$lang['%d photo was deleted'] = '%d foto cancellata';
$lang['%d photos were deleted'] = '%d foto cancellate';
+/* TODO */ $lang['Bound template'] = 'Bound template';
?>
diff --git a/language/it_IT/help/extend_for_templates.html b/language/it_IT/help/extend_for_templates.html
index 71df2604b..38cde9ccb 100644
--- a/language/it_IT/help/extend_for_templates.html
+++ b/language/it_IT/help/extend_for_templates.html
@@ -65,6 +65,9 @@ unicamente sulle pagine con questa parola chiave. Per esempio: <span
<p>Gli utenti esperti useranno i permalinks come <strong>parametro facoltativo del URL</strong>. </p>
+<!-- TODO -->
+<p>If you select a <strong>Bound template</strong> then replacements will be operate only on this template.</p>
+
<h3>Come posso disattivare mio "rimpiazzante"?</h3>
<ul>
<li>Deselezzionare il "templete originale".</li>
diff --git a/language/nl_NL/admin.lang.php b/language/nl_NL/admin.lang.php
index 2f2f5e84f..b4856936d 100644
--- a/language/nl_NL/admin.lang.php
+++ b/language/nl_NL/admin.lang.php
@@ -639,4 +639,5 @@ $lang['edit category informations'] = 'bewerk categorie informatie';
/* TODO */ $lang['Delete selected photos'] = 'Delete selected photos';
/* TODO */ $lang['%d photo was deleted'] = '%d photo was deleted';
/* TODO */ $lang['%d photos were deleted'] = '%d photos were deleted';
+/* TODO */ $lang['Bound template'] = 'Bound template';
?>
diff --git a/language/nl_NL/help/extend_for_templates.html b/language/nl_NL/help/extend_for_templates.html
index 8e2c7ac6b..dfe124615 100644
--- a/language/nl_NL/help/extend_for_templates.html
+++ b/language/nl_NL/help/extend_for_templates.html
@@ -64,8 +64,10 @@ class="filename">template-extension/my-extension/video.tpl</span>.</p>
will be operate only on pages with this keyword. For example: <span
class="pwgScreen">index.php?/<strong>most_visited</strong></span></p>
-<p>Advanced users will use permalinks as <strong>optional URL
- keyword</strong>. </p>
+<p>Advanced users will use permalinks as <strong>optional URL keyword</strong>. </p>
+
+<p>If you select a <strong>Bound template</strong> then replacements will be operate only on this template.</p>
+
<h3>How can I deactivate my "replacers"?</h3>
<ul>
<li>Unselect related "Original templates".</li>