Commit 830e775a authored by sept_7's avatar sept_7

[MOD] Modify {tr} so that _0, _1 etc. be used instead of 0, 1 for variable...

[MOD] Modify {tr} so that _0, _1 etc. be used instead of 0, 1 for variable content in translations... (This is required for Smarty3 upgrade)
[FIX] Fix some templates syntax to be compatible with both Smarty3 and Smarty2
[FIX] Fix somme missing php function in smarty secure mode.
All templates were check with the syntax checker in Smarty2 and Smarty3
parent 87f7c678
......@@ -48,11 +48,11 @@ class Smarty_Tiki extends Smarty
$this->security_settings['MODIFIER_FUNCS'] = array_merge(
$this->security_settings['MODIFIER_FUNCS'],
array('addslashes', 'ucfirst', 'ucwords', 'urlencode', 'md5', 'implode', 'explode', 'is_array', 'htmlentities', 'var_dump', 'strip_tags', 'json_encode')
array('addslashes', 'ucfirst', 'ucwords', 'urlencode', 'md5', 'implode', 'explode', 'is_array', 'htmlentities', 'var_dump', 'strip_tags', 'json_encode', 'stristr' )
);
$this->security_settings['IF_FUNCS'] = array_merge(
$this->security_settings['IF_FUNCS'],
array('tra', 'strlen', 'strstr', 'strtolower', 'basename', 'ereg', 'array_key_exists', 'preg_match', 'in_array', 'json_encode')
array('tra', 'strlen', 'strstr', 'strtolower', 'basename', 'ereg', 'array_key_exists', 'preg_match', 'in_array', 'json_encode', 'stristr', 'is_numeric' )
);
$this->secure_dir = array(
'img/icons',
......
......@@ -35,8 +35,8 @@ function smarty_block_tr($params, $content, &$smarty) {
$args = array();
foreach( $params as $key => $value ) {
if( is_int( $key ) )
$args[$key] = $value;
if( preg_match( '/_([[:digit:]])+/', $key, $matches ) )
$args[$matches[1]] = $value;
}
if (empty($params['interactive']) || $params['interactive'] == 'y')
......
......@@ -35,7 +35,7 @@
{tab name="{tr}Bytecode Cache{/tr}"}
{if $opcode_cache}
<p>{tr 0=$opcode_cache}Using <strong>%0</strong>.These stats affect all PHP applications running on the server.{/tr}</p>
<p>{tr _0=$opcode_cache}Using <strong>%0</strong>.These stats affect all PHP applications running on the server.{/tr}</p>
{if $opcode_stats.warning_xcache_blocked}
<p>{tr}Configuration setting <em>xcache.admin.enable_auth</em> prevents from accessing statistics. This will also prevent the cache from being cleared when clearing template cache.{/tr}</p>
......@@ -51,7 +51,7 @@
{/if}
{if $opcode_stats.warning_ratio}
<p>{tr 0=$opcode_cache}Low hit ratio. %0 may be misconfigured and not used.{/tr}</p>
<p>{tr _0=$opcode_cache}Low hit ratio. %0 may be misconfigured and not used.{/tr}</p>
{/if}
{if $opcode_stats.warning_starve}
......@@ -59,14 +59,14 @@
{/if}
{if $opcode_stats.warning_low}
<p>{tr 0=$opcode_cache}Small amount of memory allocated to %0. Verify the configuration.{/tr}</p>
<p>{tr _0=$opcode_cache}Small amount of memory allocated to %0. Verify the configuration.{/tr}</p>
{/if}
{if $opcode_stats.warning_check}
<p>
{tr 0=$stat_flag}Configuration <em>%0</em> is enabled. Disabling modification checks can improve performance, but will require manual clear on file updates.{/tr}
{tr _0=$stat_flag}Configuration <em>%0</em> is enabled. Disabling modification checks can improve performance, but will require manual clear on file updates.{/tr}
{if $opcode_stats.warning_xcache_blocked}
{tr 0=$stat_flag}<em>%0</em> should not be disabled due to authentication on XCache.{/tr}
{tr _0=$stat_flag}<em>%0</em> should not be disabled due to authentication on XCache.{/tr}
{/if}
</p>
{/if}
......
......@@ -107,11 +107,11 @@
<fieldset class="admin">
<legend>{$info.name|escape}</legend>
<div class="adminoptionbox">
<strong>{$plugin|escape}</strong>: {$info.description|escape}{assign var=pref value=wikiplugin_$plugin}{help url="Plugin$plugin"}
<strong>{$plugin|escape}</strong>: {$info.description|escape}{assign var=pref value="wikiplugin_$plugin"}{help url="Plugin$plugin"}
</div>
{if in_array( $pref, $info.prefs)}
{assign var=pref value=wikiplugin_$plugin}
{assign var=pref_inline value=wikiplugininline_$plugin}
{assign var=pref value="wikiplugin_$plugin"}
{assign var=pref_inline value="wikiplugininline_$plugin"}
{preference name=$pref label="{tr}Enable{/tr}"}
{preference name=$pref_inline label="{tr}Disable edit plugin icon (make plugin inline){/tr}"}
{/if}
......
......@@ -8,9 +8,9 @@
{tr}Leave a comment{/tr}
{else}
{if $post_info.comments == 1}
{tr 0=$post_info.comments}%0 comment{/tr}
{tr _0=$post_info.comments}%0 comment{/tr}
{else}
{tr 0=$post_info.comments}%0 comments{/tr}
{tr _0=$post_info.comments}%0 comments{/tr}
{/if}
{/if}
</a>
......
{if ! $parentId && $allow_lock}
{self_link controller=comment action=lock type=$type objectId=$objectId _icon=lock _class=confirm-prompt _confirm="{tr}Do you really want to lock comments?{/tr}}{tr}Lock{/tr}{/self_link}
{self_link controller=comment action=lock type=$type objectId=$objectId _icon=lock _class=confirm-prompt _confirm="{tr}Do you really want to lock comments?{/tr}"}{tr}Lock{/tr}{/self_link}
{/if}
{if ! $parentId && $allow_unlock}
......@@ -27,9 +27,9 @@
{self_link action=moderate do=reject threadId=$comment.threadId _icon=comment_reject _class=confirm-prompt _confirm="{tr}Are you sure you want to reject this comment?{/tr}"}{tr}Reject{/tr}{/self_link}
{/if}
</div>
<h6>{tr 0=$comment.userName|userlink 1=$comment.commentDate|tiki_long_datetime}Comment posted by %0 on %1{/tr}</h6>
<h6>{tr _0=$comment.userName|userlink _1=$comment.commentDate|tiki_long_datetime}Comment posted by %0 on %1{/tr}</h6>
<div class="body">
<span class="avatar">{comment.userName|avatarize}</span>
<span class="avatar">{$comment.userName|avatarize}</span>
{$comment.parsed}
</div>
......
......@@ -4,9 +4,9 @@
{if $tiki_p_forum_read eq 'y'}
{* This section (comment) is only displayed * }
{* if a reply to it is being composed * }
{* The $parent_com is only set in this case *}
{* This section (comment) is only displayed *}
{* if a reply to it is being composed *}
{* The $parent_com is only set in this case*}
{* WARNING: when previewing a new reply to a forum post, $parent_com is also set *}
{if $comments_cant gt 0}
......@@ -61,7 +61,7 @@
{if $prefs.forum_thread_user_settings eq 'y'}
{if $comments_cant > 0 and $section eq 'blogs'}
{* displaying just for blogs only because I'm not sure if this is useful for other sections *}
{capture name=comments_cant_title}{if $comments_cant == 1}{tr 0=$comments_cant}%0 comment{/tr}{else}{tr 0=$comments_cant}%0 comments{/tr}{/if}{/capture}
{capture name=comments_cant_title}{if $comments_cant == 1}{tr _0=$comments_cant}%0 comment{/tr}{else}{tr _0=$comments_cant}%0 comments{/tr}{/if}{/capture}
<h3>{$smarty.capture.comments_cant_title}</h3>
{/if}
<div class="forum_actions">
......@@ -70,13 +70,13 @@
<span class="action">
<label for="comments-maxcomm">{tr}Messages:{/tr}</label>
<select name="comments_per_page" id="comments-maxcomm">
<option value="10" {if $comments_per_page eq 10 }selected="selected"{/if}>10</option>
<option value="20" {if $comments_per_page eq 20 }selected="selected"{/if}>20</option>
<option value="30" {if $comments_per_page eq 30 }selected="selected"{/if}>30</option>
<option value="999999" {if $comments_per_page eq 999999 }selected="selected"{/if}>{tr}All{/tr}</option>
<option value="10" {if $comments_per_page eq 10}selected="selected"{/if}>10</option>
<option value="20" {if $comments_per_page eq 20}selected="selected"{/if}>20</option>
<option value="30" {if $comments_per_page eq 30}selected="selected"{/if}>30</option>
<option value="999999" {if $comments_per_page eq 999999}selected="selected"{/if}>{tr}All{/tr}</option>
</select>
{if $forum_info.is_flat neq 'y' }
{if $forum_info.is_flat neq 'y'}
<label for="comments-style">{tr}Style:{/tr}</label>
<select name="thread_style" id="comments-style">
<option value="commentStyle_plain" {if $thread_style eq 'commentStyle_plain'}selected="selected"{/if}>{tr}Plain{/tr}</option>
......
......@@ -208,7 +208,7 @@
</label>
{/if}
{if !empty($find_other) }
{if !empty($find_other)}
<label class="find_other" for="find_other">
{tr}{$find_other}{/tr}
<input type="text" name="find_other" id="find_other" value="{$find_other_val|escape}"/>
......
......@@ -4,11 +4,13 @@
{if !isset($module_ord)}{assign var=module_ord value=' '}{/if}
{capture name=name}{$module_name|replace:"+":"_"|cat:$module_position|cat:$module_ord|escape}{/capture}
{if $module_nobox neq 'y'}
{if $prefs.feature_layoutshadows eq 'y'}<div class="box-shadow">{$prefs.box_shadow_start}{/if}
{if $prefs.feature_layoutshadows eq 'y'}
<div class="box-shadow">{$prefs.box_shadow_start}
{/if}
{if !isset($moduleId)}{assign var=moduleId value=' '}{/if}
<div id="module_{$moduleId}" class="box box-{$module_name}{if $module_type eq 'cssmenu'} cssmenubox{/if} module"{if !empty($tpl_module_style)} style="{$tpl_module_style}"{/if}>
{if $module_decorations ne 'n'}
<h3 class="box-title clearfix"{if !empty($module_params.bgcolor)} style="background-color:{$module_params.bgcolor};"{/if}>
<h3 class="box-title clearfix" {if !empty($module_params.bgcolor)} style="background-color:{$module_params.bgcolor};"{/if}>
{if isset($user) and $user and $prefs.user_assigned_modules == 'y' and $prefs.feature_modulecontrols eq 'y'}
<span class="modcontrols">
<a title="{tr}Move module up{/tr}" href="{$current_location|escape}{$mpchar|escape}mc_up={$module_name}">
......@@ -79,7 +81,7 @@
</div>
</div>
{if $prefs.feature_layoutshadows eq 'y'}{$prefs.box_shadow_end}</div>{/if}
{if $prefs.feature_layoutshadows eq 'y'}{$prefs.box_shadow_end}</div>{/if}
{else}
</div>
</div>
......
......@@ -10,13 +10,13 @@
<div id="trans{$trans.transitionId|escape}">
{foreach item=reason from=$trans.explain}
{if $reason.class eq 'missing'}
<p>{tr 0=$reason.count}Missing %0 of the following categories:{/tr}</p>
<p>{tr _0=$reason.count}Missing %0 of the following categories:{/tr}</p>
{elseif $reason.class eq 'extra'}
<p>{tr 0=$reason.count}%0 extra of the following categories:{/tr}</p>
<p>{tr _0=$reason.count}%0 extra of the following categories:{/tr}</p>
{elseif $reason.class eq 'unknown'}
<p>{tr 0=$reason.count}Unknown comparison:{/tr}</p>
<p>{tr _0=$reason.count}Unknown comparison:{/tr}</p>
{elseif $reason.class eq 'invalid'}
<p>{tr 0=$reason.count}Impossible condition, %0 of:{/tr}</p>
<p>{tr _0=$reason.count}Impossible condition, %0 of:{/tr}</p>
{/if}
<ul>
{foreach from=$reason.set item=state}
......
......@@ -2,10 +2,10 @@
{if $prefs.feature_file_galleries eq 'y'}
{if !isset($tpl_module_title)}
{if isset($module_rows) && $module_rows gt 0 }
{eval var="{tr}Last `$module_rows` Podcasts{/tr}" assign="tpl_module_title"}
{if isset($module_rows) && $module_rows gt 0}
{capture assign=tpl_module_title}{tr _0=$module_rows}Last %0 Podcasts{/tr}{/capture}
{else}
{eval var="{tr}Newest Podcasts{/tr}" assign="tpl_module_title"}
{assign value="{tr}Newest Podcasts{/tr}" var="tpl_module_title"}
{/if}
{/if}
{tikimodule error=$module_params.error title=$tpl_module_title name="last_podcasts" flip=$module_params.flip decorations=$module_params.decorations nobox=$module_params.nobox notitle=$module_params.notitle}
......
......@@ -113,8 +113,8 @@ function doChallengeResponse() {
{/if}
{if !empty($error_login)}
{remarksbox type='errors' title="{tr}Error{/tr}"}
{if $error_login == -5 {*USER_NOT_FOUND (define does not work on old php)*}}{tr}Invalid username{/tr}
{elseif $error_login == -3 {*PASSWORD_INCORRECT*}}{tr}Invalid password{/tr}
{if $error_login == -5}{tr}Invalid username{/tr}
{elseif $error_login == -3}{tr}Invalid password{/tr}
{else}{$error_login|escape}{/if}
{/remarksbox}
{/if}
......
......@@ -65,7 +65,7 @@
{* Show user message in style according to 'tooltip' module parameter *}
{assign var=cdate value=$smarty.capture.date}
{if $tooltip == 1}{* TODO: Improve $userlink modifier one day to handle other attibutes better? *}
<b>{strip}{$userlink|replace:"\" href=":"&lt;br /&gt;&lt;em&gt;{tr}Shout date:{/tr} `$cdate`&lt;/em&gt;\" href="}{/strip}</b>:
<b>{strip}{$userlink|replace:"\" href=":"&lt;br /&gt;&lt;em&gt;{tr}Shout date:{/tr} $cdate&lt;/em&gt;\" href="}{/strip}</b>:
{else}
<b>{strip}{$userlink}{/strip}</b>, {$cdate}:
{/if}
......
......@@ -65,7 +65,7 @@
{else}
<div class="separator"><a class="separator" href="javascript:flip('{$cname}');">{$slvn_item.count}&nbsp;{$slvn_item.label}</a></div>
{/if}
{assign var=showcname value=show_$cname}
{assign var=showcname value="show_"|cat:$cname}
{if $pos eq 'trackers' or $pos eq 'utrackers'}
<div id="{$cname}" style="display:{if !isset($cookie.$showcname) or $cookie.$showcname eq 'y'}{$default_folding}{else}{$opposite_folding}{/if};">
......@@ -74,7 +74,7 @@
{foreach key=tp item=tracker from=$slvn_item.tid}
{assign var=tcname value=$tracker.cname}
<div class="separator" style="margin-left: 10px; display:{if !isset($cookie.$showcname) or $cookie.$showcname eq 'y'}{$default_folding}{else}{$opposite_folding}{/if};">
{assign var=showtcname value=show_$tcname}
{assign var=showtcname value="show_"|cat:$tcname}
<a class="separator" href="javascript:flip('{$tcname}');">{$tracker.count}&nbsp;{$tracker.label|escape}</a>
<div id="{$tcname}" style="display:{if !isset($cookie.$showtcname) or $cookie.$showtcname eq 'y'}{$default_folding}{else}{$opposite_folding}{/if};">
{if $nonums != 'y'}<ol>{else}<ul>{/if}
......
......@@ -3,7 +3,7 @@
{if isset($module_params.date_format)}
{assign var=date_format value=$module_params.date_format}
{else}
{assign var=date_format value="`$prefs.short_date_format` `$prefs.short_time_format`"}
{assign var=date_format value=$prefs.short_date_format|cat:' '|cat:$prefs.short_time_format}
{/if}
<table border="0" cellpadding="{if isset($module_params.cellpadding)}{$module_params.cellpadding}{else}0{/if}" cellspacing="{if isset($module_params.cellspacing)}{$module_params.cellspacing}{else}0{/if}">
{section name=ix loop=$modUpcomingEvents}
......
......@@ -43,7 +43,7 @@
{if isset($module_params.date_format)}
{assign var=date_format value=$module_params.date_format}
{else}
{assign var=date_format value="`$prefs.short_date_format` `$prefs.short_time_format`"}
{assign var=date_format value=$prefs.short_date_format|cat:' '|cat:$prefs.short_time_format}
{/if}
{section name=ix loop=$webmail_list}
{assign var='date_value' value=$webmail_list[ix].timestamp|tiki_date_format:$date_format}
......@@ -88,7 +88,9 @@
{else}
<span class="mod_webmail_from">{$sender.email|truncate:20:"...":true}</span>
{/if}
{assign var=tit value="<span class='webmail_tip_title'><strong>$subject</strong><br /></span>|{tr}From:{/tr} <em>`$sender.name`</em> &nbsp; <tt>&amp;lt;`$sender.email`&amp;gt;</tt><br /><small>[$date_value]</small>"}
{capture assign=tit}{strip}
<span class='webmail_tip_title'><strong>{$subject}</strong><br /></span>|{tr}From:{/tr} <em>{$sender.name}</em> &nbsp; <tt>&amp;lt;{$sender.email}&amp;gt;</tt><br /><small>[{$date_value}]</small>
{/strip}{/capture}
{self_link _script='tiki-webmail.php' msgid=$webmail_list[ix].msgid locSection='read' _noauto='y' _class='clearfix linkmodule tips300 webmail_subject' _title=$tit}
{if $maxlen > 0}{* default value for maxlen param eq 26 *}
{$subject|truncate:$maxlen:"...":true}
......
......@@ -33,7 +33,7 @@
<div id="fixedwidth" class="fixedwidth"> {* enables fixed-width layouts *}
{if $prefs.feature_layoutshadows eq 'y'}<div id="main-shadow">{eval var=$prefs.main_shadow_start}{/if}
<div id="main">
{if ($prefs.feature_fullscreen != 'y' or $smarty.session.fullscreen != 'y') }
{if ($prefs.feature_fullscreen != 'y' or $smarty.session.fullscreen != 'y')}
{if $prefs.module_zones_top eq 'fixed' or ($prefs.module_zones_top ne 'n' && $top_modules|@count > 0)}
{if $prefs.feature_layoutshadows eq 'y'}<div id="header-shadow">{eval var=$prefs.header_shadow_start}{/if}
......
......@@ -53,7 +53,7 @@
{if $module_flip eq 'y' and $prefs.javascript_enabled ne 'n'}
<span id="moduleflip-{$smarty.capture.name}">
<a title="{tr}Toggle module contents{/tr}" class="flipmodtitle" href="javascript:icntoggle('mod-{$smarty.capture.name}','module.png');">
{assign var=name value=`icnmod-$smarty.capture.name`}
{assign var=name value="icnmod-"|cat:$smarty.capture.name}
{capture name=name}
icnmod-{$smarty.capture.name}
{/capture}
......
......@@ -8,87 +8,79 @@
{if $edit_page neq 'y'}
{* Check that page is not locked and edit permission granted. SandBox can be edited w/o perm *}
{if ($editable and ($tiki_p_edit eq 'y' or $page|lower eq 'sandbox') or (!$user and $prefs.wiki_encourage_contribution eq 'y')) or $tiki_p_admin_wiki eq 'y'}
{assign var=thisPageName value=$thispage}
{if $page_ref_id}
{assign var=thisPageRefId value="&amp;page_ref_id=$page_ref_id"}
{else}
{assign var=thisPageRefId value=""}
{/if}
{if $beingEdited eq 'y'}
{assign var=thisPageClass value='+highlight'}
{else}
{assign var=thisPageClass value=''}
{/if}
{if $prefs.flaggedrev_approval neq 'y' or ! $revision_approval or $lastVersion eq $revision_displayed}
{button href="tiki-editpage.php?page="|cat:$thisPageName|cat:$thisPageRefId _class=$thisPageClass _text="{tr}Edit this page{/tr}"}
{button _keepall='y' href="tiki-editpage.php" page=$thispage page_ref_id=$page_ref_id _class=$thisPageClass _text="{tr}Edit this page{/tr}"}
{elseif $tiki_p_wiki_view_latest eq 'y'}
<span class="button">{self_link latest=1}{tr}View latest version before editing{/tr}{/self_link}</span>
{/if}
{/if}
{if $prefs.feature_source eq 'y' and $tiki_p_wiki_view_source eq 'y'}
{button href="tiki-pagehistory.php?page=$thispage&amp;source=0" _text="{tr}Source{/tr}"}
{button _keepall='y' href="tiki-pagehistory.php" page=$thispage source="0" _text="{tr}Source{/tr}"}
{/if}
{if $page|lower ne 'sandbox'}
{if $tiki_p_remove eq 'y' && $editable}
{button href="tiki-removepage.php?page=$thispage&amp;version=last" _text="{tr}Remove{/tr}"}
{button _keepall='y' href="tiki-removepage.php" page=$thispage version="last" _text="{tr}Remove{/tr}"}
{/if}
{if $tiki_p_rename eq 'y' && $editable}
{button href="tiki-rename_page.php?page=$thispage" _text="{tr}Rename{/tr}"}
{button _keepall='y' href="tiki-rename_page.php" page=$thispage _text="{tr}Rename{/tr}"}
{/if}
{if $prefs.feature_wiki_usrlock eq 'y' and ( $tiki_p_admin_wiki eq 'y' or ($user and $user eq $page_user and $tiki_p_lock eq 'y') )}
{if $lock}
{button href="tiki-index.php?page=$thispage&amp;action=unlock" _text="{tr}Unlock{/tr}"}
{button _keepall='y' href="tiki-index.php" page=$thispage action="unlock" _text="{tr}Unlock{/tr}"}
{else}
{button href="tiki-index.php?page=$thispage&amp;action=lock" _text="{tr}Lock{/tr}"}
{button _keepall='y' href="tiki-index.php" page=$thispage action="lock" _text="{tr}Lock{/tr}"}
{/if}
{/if}
{if $tiki_p_admin_wiki eq 'y' or $tiki_p_assign_perm_wiki_page eq 'y'}
{button href="tiki-objectpermissions.php?objectId=$thispage&amp;objectName=$thispage&amp;objectType=wiki+page&amp;permType=wiki" _text="{tr}Permissions{/tr}"}
{button _keepall='y' href="tiki-objectpermissions.php" objectId=$thispage objectName=$thispage objectType="wiki+page" permType="wiki" _text="{tr}Permissions{/tr}"}
{/if}
{if $prefs.feature_history eq 'y' and $tiki_p_wiki_view_history eq 'y'}
{button href="tiki-pagehistory.php?page=$thispage" _text="{tr}History{/tr}"}
{button _keepall='y' href="tiki-pagehistory.php" page=$thispage _text="{tr}History{/tr}"}
{/if}
{if $prefs.feature_page_contribution eq 'y' and $tiki_p_page_contribution_view eq 'y'}
{button href="tiki-page_contribution.php?page=$thispage" _text="{tr}Contributions by author{/tr}"}
{button _keepall='y' href="tiki-page_contribution.php" page=$thispage _text="{tr}Contributions by author{/tr}"}
{/if}
{/if}
{if $prefs.feature_likePages eq 'y' and $tiki_p_wiki_view_similar eq 'y'}
{button href="tiki-likepages.php?page=$thispage" _text="{tr}Similar{/tr}"}
{button _keepall='y' href="tiki-likepages.php" page=$thispage _text="{tr}Similar{/tr}"}
{/if}
{if $prefs.feature_wiki_undo eq 'y' and $canundo eq 'y'}
{button href="tiki-index.php?page=$thispage&amp;undo=1" _text="{tr}Undo{/tr}"}
{button _keepall='y' href="tiki-index.php" page=$thispage undo="1" _text="{tr}Undo{/tr}"}
{/if}
{if $prefs.feature_wiki_make_structure eq 'y' and $tiki_p_edit_structures eq 'y' and $editable and $structure eq 'n' and count($showstructs) eq 0}
{button href="tiki-index.php?page=$thispage&amp;convertstructure=1" _text="{tr}Make Structure{/tr}"}
{button _keepall='y' href="tiki-index.php" page=$thispage convertstructure="1" _text="{tr}Make Structure{/tr}"}
{/if}
{if $prefs.wiki_uses_slides eq 'y'}
{if $show_slideshow eq 'y'}
{button href="tiki-slideshow.php?page=$thispage" _text="{tr}Slides{/tr}"}
{button _keepall='y' href="tiki-slideshow.php" page=$thispage _text="{tr}Slides{/tr}"}
{elseif $structure eq 'y'}
{assign var=thispage_info value=$page_info.page_ref_id}
{button href="tiki-slideshow2.php?page_ref_id=$thispage_info" _text="{tr}Slides{/tr}"}
{button _keepall='y' href="tiki-slideshow2.php" page_ref_id=$page_info.page_ref_id _text="{tr}Slides{/tr}"}
{/if}
{/if}
{if $prefs.feature_wiki_export eq 'y' and ( $tiki_p_admin_wiki eq 'y' or $tiki_p_export_wiki eq 'y' )}
{button href="tiki-export_wiki_pages.php?page=$thispage" _text="{tr}Export{/tr}"}
{button _keepall='y' href="tiki-export_wiki_pages.php" page=$thispage _text="{tr}Export{/tr}"}
{/if}
{if $prefs.feature_wiki_discuss eq 'y' && $show_page eq 'y' && $tiki_p_forum_post eq 'y'}
{capture name='wiki_discussion_string'}{include file='wiki-discussion.tpl'}{/capture}
{assign var=thiswiki_discussion_string value=$smarty.capture.wiki_discussion_string|escape:"url"}
{button href="tiki-view_forum.php?forumId=`$prefs.wiki_forum_id`&amp;comments_postComment=post&amp;comments_title=$thispage&amp;comments_data=$thiswiki_discussion_string%3A+%5Btiki-index.php%3Fpage=$thispage%7C$thispage%5D&amp;comment_topictype=n" _text="{tr}Discuss{/tr}"}
{capture assign='wiki_discussion_string'}{include file='wiki-discussion.tpl'}+[tiki-index.php?page={$thispage}|{$thispage}]{/capture}
{button _keepall='y' href="tiki-view_forum.php" forumId=$prefs.wiki_forum_id comments_postComment="post" comments_title=$thispage comments_data=$wiki_discussion_string|escape:"url" comment_topictype="n" _text="{tr}Discuss{/tr}"}
{/if}
{if $show_page == 'y'} {* Show this buttons only if page view mode *}
......@@ -131,11 +123,11 @@
{/if}{* attachments *}
{if $prefs.feature_multilingual eq 'y' and ($tiki_p_edit eq 'y' or (!$user and $prefs.wiki_encourage_contribution eq 'y')) and !$lock}
{button href="tiki-edit_translation.php?page=$thispage" _text="{tr}Translate{/tr}"}
{button _keepall='y' href="tiki-edit_translation.php" page=$thispage _text="{tr}Translate{/tr}"}
{/if}
{if $tiki_p_admin_wiki eq 'y' && $prefs.wiki_keywords eq 'y'}
{button href="tiki-admin_keywords.php" page=$page _text="{tr}Keywords{/tr}"}
{button _keepall='y' href="tiki-admin_keywords.php" page=$page _text="{tr}Keywords{/tr}"}
{/if}
{/if}
{/if}
......
......@@ -41,7 +41,7 @@
{tr}Found in:{/tr}
{$tg_item.contexts}
{if $tg_item.old neq $tg_item.new}
{tr 0=$tg_item.old 1=$tg_item.new}Changed from %0 to %1{/tr}
{tr _0=$tg_item.old _1=$tg_item.new}Changed from %0 to %1{/tr}
{else}
{tr}Unchanged{/tr}
{/if}">
......
......@@ -11,6 +11,6 @@
{/foreach}
</div>
{else}
<p>{tr 0=$accountId 1=$account.accountName}Successfully deleted account %0 %1.{/tr}</p>
<p>{tr _0=$accountId _1=$account.accountName}Successfully deleted account %0 %1.{/tr}</p>
{/if}
{button href="tiki-accounting.php?bookId=$bookId" _text="{tr}Return to main accounting page{/tr}"}
{button _keepall='y' href="tiki-accounting.php" bookId=$bookId _text="{tr}Return to main accounting page{/tr}"}
......@@ -3,7 +3,7 @@
{title help="$helpUrl"}{$admintitle}{/title}
{if $prefs.sender_email eq ''}
{tr 0="tiki-admin.php?lm_criteria=sender_email&highlight=sender_email"}Your sender email is not set. You can set it <a href="%0">here<a/>{/tr}
{tr _0="tiki-admin.php?lm_criteria=sender_email&highlight=sender_email"}Your sender email is not set. You can set it <a href="%0">here<a/>{/tr}
{/if}
<form method="post" action="">
......
......@@ -128,7 +128,7 @@
<form method="post" action="tiki-admin_transitions.php?action={if $selected_transition}edit{else}new{/if}&amp;cookietab=2" style="text-align: left;">
{if $selected_transition}
<h2>
{tr 0=$selected_transition.name}Edit <em>%0</em>{/tr}
{tr _0=$selected_transition.name}Edit <em>%0</em>{/tr}
<input type="hidden" name="transitionId" value="{$selected_transition.transitionId|escape}"/>
(<a href="tiki-admin_transitions.php">{tr}Create new{/tr}</a>)
</h2>
......
......@@ -164,7 +164,7 @@
<td class="text">
{if $users[user].currentLogin eq ''}
{capture name=when}{$users[user].age|duration_short}{/capture}
{tr}Never{/tr} <em>({tr 0=$smarty.capture.when}Registered %0 ago{/tr})</em>
{tr}Never{/tr} <em>({tr _0=$smarty.capture.when}Registered %0 ago{/tr})</em>
{else}
{$users[user].currentLogin|tiki_long_datetime}
{/if}
......@@ -176,7 +176,7 @@
</td>
<td class="icon">
<a class="link" href="tiki-assignuser.php?assign_user={$users[user].user|escape:url}" title="{tr}Assign to group{/tr}">{icon _id='group_key' alt="{tr}Assign{/tr} `$username` {tr}to groups{/tr} "}</a>
<a class="link" href="tiki-assignuser.php?assign_user={$users[user].user|escape:url}" title="{tr}Assign to group{/tr}">{capture assign=alt}{tr _0=$username}Assign{/tr} %0 {tr}to groups{/tr}{/capture}{*FIXME*}{icon _id='group_key' alt=$alt}</a>
</td>
<td class="text">
......@@ -185,7 +185,8 @@
{if $grs != "Anonymous" and ($tiki_p_admin eq 'y' || in_array($grs, $all_groups))}
{if $what ne 'included' and $grs != "Registered"}
{capture assign=grse}{$grs|escape}{/capture}
{self_link _class='link' user=$users[user].user action='removegroup' group=$grs _icon='cross' _title="{tr}Remove{/tr} `$username` {tr}from{/tr} $grse"}{/self_link}
{capture assign=title}{tr _0=$username _1=$grse}Remove %0 from %1{/tr}{/capture}{*FIXME*}
{self_link _class='link' user=$users[user].user action='removegroup' group=$grs _icon='cross' _title=$title}{/self_link}
{else}
{icon _id='bullet_white'}
{/if}
......@@ -206,21 +207,23 @@
</td>
<td class="action">
{self_link _class="link" user=`$users[user].userId` _icon="page_edit" _title="{tr}Edit Account Settings:{/tr} `$username`"}{/self_link}
{capture assign=title}{tr _0=$username}Edit Account Settings: %0{/tr}{/capture}{*FIXME*}
{self_link _class="link" user=$users[user].userId _icon="page_edit" _title=$title}{/self_link}
{if $prefs.feature_userPreferences eq 'y' || $user eq 'admin'}
<a class="link" href="tiki-user_preferences.php?userId={$users[user].userId}" title="{tr}Change user preferences:{/tr} {$username}">{icon _id='wrench' alt="{tr}Change user preferences:{/tr} `$username`"}</a>
<a class="link" href="tiki-user_preferences.php?userId={$users[user].userId}" title="{tr _0=$username}Change user preferences: %0{/tr}">{capture assign=alt}{tr _0=$username}Change user preferences: %0{/tr}{/capture}{icon _id='wrench' alt=$alt}</a>
{/if}
{if $users[user].user eq $user or $users[user].user_information neq 'private' or $tiki_p_admin eq 'y'}
<a class="link" href="tiki-user_information.php?userId={$users[user].userId}" title="{tr}User Information:{/tr} {$username}"{if $users[user].user_information eq 'private'} style="opacity:0.5;"{/if}>{icon _id='help' alt="{tr}User Information:{/tr} `$username`"}</a>
{capture assign=title}{tr _0=$username}User Information: %0{/tr}{/capture}{*FIXME*}
<a class="link" href="tiki-user_information.php?userId={$users[user].userId}" title="{$title}"{if $users[user].user_information eq 'private'} style="opacity:0.5;"{/if}>{icon _id='help' alt=$title}</a>
{/if}
{if $users[user].user ne 'admin'}
<a class="link" href="{$smarty.server.PHP_SELF}?{query action=delete user=$users[user].user}" title="{tr}Delete{/tr}">{icon _id='cross' alt="{tr}Delete{/tr}"}</a>
{if $users[user].waiting eq 'a'}
<a class="link" href="tiki-login_validate.php?user={$users[user].user|escape:url}&amp;pass={$users[user].valid|escape:url}" title="{tr}Validate user:{/tr} {$users[user].user|username}">{icon _id='accept' alt="{tr}Validate user:{/tr} `$username`"}</a>
<a class="link" href="tiki-login_validate.php?user={$users[user].user|escape:url}&amp;pass={$users[user].valid|escape:url}" title="{tr _0=$users[user].user|username}Validate user: %0{/tr}">{capture assign=alt}{tr _0=$users[user].user|username}Validate user: %0{/tr}{/capture}{*FIXME*}{icon _id='accept' alt=$alt}</a>
{/if}
{if $users[user].waiting eq 'u'}
<a class="link" href="tiki-confirm_user_email.php?user={$users[user].user|escape:url}&amp;pass={$users[user].provpass|md5|escape:url}" title="{tr}Confirm user email:{/tr} {$users[user].user|username}">{icon _id='email_go' alt="{tr}Confirm user email:{/tr} `$username`"}</a>
<a class="link" href="tiki-confirm_user_email.php?user={$users[user].user|escape:url}&amp;pass={$users[user].provpass|md5|escape:url}" title="{tr _0=$users[user].user|username}Confirm user email: %0{/tr}">{capture assign=alt}{tr _0=$username}Confirm user email: %0{/tr}{/capture}{*FIXME*}{icon _id='email_go' alt=$alt}</a>
{/if}
{if $prefs.email_due > 0 and $users[user].waiting ne 'u' and $users[user].waiting ne 'a'}
<a class="link" href="tiki-adminusers.php?user={$users[user].user|escape:url}&amp;action=email_due" title="{tr}Invalid email{/tr}">{icon _id='email_cross' alt="{tr}Invalid email{/tr}"}</a>
......
......@@ -159,7 +159,7 @@
<a class="gallink" href="tiki-edit_image.php?galleryId={$galleryId}&amp;edit={$item.imageId}" title="{tr}Edit{/tr}">{icon _id='page_edit'}</a>
{/if}
<a class="gallink" href="tiki-browse_image.php?galleryId={$galleryId}&amp;sort_mode={$sort_mode}&amp;imageId={$item.imageId}&amp;scalesize={$defaultscale}" {if $prefs.gal_image_mouseover neq 'n'}{popup fullhtml="1" text=$over_info.$key|escape:"javascript"|escape:"html"}{/if}>{icon _id='magnifier' alt="{tr}Details{/tr}"}</a>
<a {jspopup href="tiki-browse_image.php?galleryId=$galleryId&amp;sort_mode=$sort_mode&amp;imageId=`$item.imageId`&amp;scalesize=$defaultscale&amp;popup=1"} class="gallink">
<a {jspopup href="tiki-browse_image.php?galleryId=$galleryId&amp;sort_mode=$sort_mode&amp;imageId="|cat:$item.imageId|cat:"&amp;scalesize=$defaultscale&amp;popup=1"} class="gallink">
{icon _id='layers' alt="{tr}popup{/tr}"}</a>
<br />
</small>
......
......@@ -11,11 +11,11 @@
{if $evt.result.allday}
{tr}All day{/tr}
{else}
{if ($evt.endTimeStamp - $evt.startTimeStamp < 86400)}
{if $evt.endTimeStamp - $evt.startTimeStamp < 86400}
{$evt.startTimeStamp|tiki_short_time} &gt {$evt.endTimeStamp|tiki_short_time}
{else}
{$evt.startTimeStamp|tiki_short_date}&nbsp;({{$evt.startTimeStamp|tiki_short_time}) &gt
{$evt.endTimeStamp|tiki_short_date}&nbsp;({{$evt.endTimeStamp|tiki_short_time})
{$evt.startTimeStamp|tiki_short_date}&nbsp;({$evt.startTimeStamp|tiki_short_time}) &gt
{$evt.endTimeStamp|tiki_short_date}&nbsp;({$evt.endTimeStamp|tiki_short_time})
{/if}
{/if}
</strong>
......
......@@ -24,7 +24,7 @@
<tr>
<td>
{tr}CSV File{/tr}
{capture name=help}{tr}Column names on the first line:{/tr}<br />name,description,start&nbsp;date,start&nbsp;time,end&nbsp;date,end&nbsp;time,status,lang,categoryId,locationId,priority,url,categoryId<br /><i>{tr 0=subject 1=name}%0 column name can be used instead of %1{/tr}</i><br />{tr}Date format:{/tr} {tr}See:{/tr} http://php.net/strtotime{/capture}
{capture name=help}{tr}Column names on the first line:{/tr}<br />name,description,start&nbsp;date,start&nbsp;time,end&nbsp;date,end&nbsp;time,status,lang,categoryId,locationId,priority,url,categoryId<br /><i>{tr _0=subject _1=name}%0 column name can be used instead of %1{/tr}</i><br />{tr}Date format:{/tr} {tr}See:{/tr} http://php.net/strtotime{/capture}
<a {popup text=$smarty.capture.help|escape}>{icon _id='help'}</a>
</td>
<td>
......
......@@ -41,7 +41,7 @@
<tr>
<td>{tr}Message:{/tr}</td>
<td>
{textarea rows="20" name="body" cols="80" _simple='y' _toolbars='n' }{$body}{/textarea}
{textarea rows="20" name="body" cols="80" _simple='y' _toolbars='n'}{$body}{/textarea}
</td>
</tr>
{if $prefs.feature_antibot eq 'y' && $user eq ''}
......
......@@ -11,11 +11,11 @@
{if isset($page_badchars_display)}
{if $prefs.wiki_badchar_prevent eq 'y'}
{remarksbox type=errors title="{tr}Invalid page name{/tr}"}
{tr 0=$page_badchars_display|escape}The page name specified contains unallowed characters. It will not be possible to save the page until those are removed: <strong>%0</strong>{/tr}
{tr _0=$page_badchars_display|escape}The page name specified contains unallowed characters. It will not be possible to save the page until those are removed: <strong>%0</strong>{/tr}
{/remarksbox}
{else}
{remarksbox type=tip title="{tr}Tip{/tr}"}
{tr 0=$page_badchars_display|escape}The page name specified contains characters that may render the page hard to access. You may want to consider removing those: <strong>%0</strong>{/tr}
{tr _0=$page_badchars_display|escape}The page name specified contains characters that may render the page hard to access. You may want to consider removing those: <strong>%0</strong>{/tr}
{/remarksbox}
<input type="hidden" name="badname" value="{$newname|escape}" />
<input type="submit" name="confirm" value="{tr}Use this name anyway{/tr}" />
......
......@@ -118,7 +118,7 @@
<tr class="last">
<td colspan="2">
{if isset($item.user) && isset($item.lastModif)}
{tr 0=$item.user|userlink 1=$item.lastModif|tiki_short_date}Last changed by %0 on %1{/tr}
{tr _0=$item.user|userlink _1=$item.lastModif|tiki_short_date}Last changed by %0 on %1{/tr}
{/if}
</td>
</tr>
......
......@@ -69,7 +69,9 @@
{if $subtree[ix].pos eq ''}
<th><a class='link' href='{sefurl page=$subtree[ix].pageName structure=$structure_name page_ref_id=$subtree[ix].page_ref_id}' title="{tr}View{/tr}">{icon _id='magnifier' alt="{tr}View{/tr}"}</a>
{if $editable == 'y'}
{if $subtree[ix].flag == 'L'}{icon _id='lock' alt="locked" title="locked by `$subtree[ix].user`"}
{if $subtree[ix].flag == 'L'}
{capture assign=title}{tr _0=$subtree[ix].user}locked by %0{/tr}{/capture}
{icon _id='lock' alt="{tr}Locked{/tr}" title=$title}
{else}<a class="link" href='tiki-editpage.php?page={$subtree[ix].pageName|escape:"url"}'>{icon _id='page_edit'}</a>{/if}
{/if}
{if $tiki_p_watch_structure eq 'y'}
......@@ -94,7 +96,9 @@
{if $editable == 'y'}<a href='tiki-edit_structure.php?page_ref_id={$subtree[ix].page_ref_id}&amp;move_node=1'>{icon _id='resultset_previous' alt="{tr}Promote{/tr}"}</a><a href='tiki-edit_structure.php?page_ref_id={$subtree[ix].page_ref_id}&amp;move_node=4'>{icon _id='resultset_next' alt="{tr}Demote{/tr}"}</a><a href='tiki-edit_structure.php?page_ref_id={$subtree[ix].page_ref_id}&amp;move_node=2'>{icon _id='resultset_up' alt="{tr}Previous{/tr}"}</a><a href='tiki-edit_structure.php?page_ref_id={$subtree[ix].page_ref_id}&amp;move_node=3'>{icon _id='resultset_down' style="margin-right:10px;" alt="{tr}Next{/tr}"}{/if}</a>
{if $subtree[ix].viewable == 'y'}<a class='link' href='{sefurl page=$subtree[ix].pageName structure=$structure_name page_ref_id=$subtree[ix].page_ref_id}' title="{tr}View{/tr}">{icon _id='magnifier' alt="{tr}View{/tr}"}</a>{else}&nbsp;{/if}
{if $subtree[ix].editable == 'y'}
{if $subtree[ix].flag == 'L'}{icon _id='lock' alt="locked" title="locked by `$subtree[ix].user`"}
{if $subtree[ix].flag == 'L'}
{capture assign=title}{tr