revert addon Smarty3 templates to non-variable-based includes

pull/89/head
Zach Prezkuta 2012-12-25 13:25:09 -07:00
parent 75f47b74d2
commit c12542ef96
53 changed files with 75 additions and 146 deletions

Binary file not shown.

View File

@ -94,13 +94,7 @@ function altpager_settings(&$a,&$s) {
function altpager_plugin_admin(&$a, &$o){ function altpager_plugin_admin(&$a, &$o){
$t = get_markup_template( "admin.tpl", "addon/altpager/" ); $t = get_markup_template( "admin.tpl", "addon/altpager/" );
$o = replace_macros($t, array(
$includes = array(
'$field_radio' => 'field_radio.tpl',
);
$includes = set_template_includes($a->theme['template_engine'], $includes);
$o = replace_macros($t, $includes + array(
'$submit' => t('Submit'), '$submit' => t('Submit'),
'$global' => array('altpagerchoice', t('Global'), 1, t('Force global use of the alternate pager'), get_config('alt_pager', 'global') == 1), '$global' => array('altpagerchoice', t('Global'), 1, t('Force global use of the alternate pager'), get_config('alt_pager', 'global') == 1),
'$individual' => array('altpagerchoice', t('Individual'), 2, t('Each user chooses whether to use the alternate pager'), get_config('alt_pager', 'global') == 0) '$individual' => array('altpagerchoice', t('Individual'), 2, t('Each user chooses whether to use the alternate pager'), get_config('alt_pager', 'global') == 0)

4
altpager/view/admin.tpl Executable file → Normal file
View File

@ -1,3 +1,3 @@
{{ inc $field_radio with $field=$global }}{{ endinc }} {{ inc field_radio.tpl with $field=$global }}{{ endinc }}
{{ inc $field_radio with $field=$individual }}{{ endinc }} {{ inc field_radio.tpl with $field=$individual }}{{ endinc }}
<div class="submit"><input type="submit" name="page_site" value="$submit" /></div> <div class="submit"><input type="submit" name="page_site" value="$submit" /></div>

View File

@ -1,3 +1,3 @@
{{include file="file:{{$field_radio}}" field=$global}} {{include file="field_radio.tpl" field=$global}}
{{include file="file:{{$field_radio}}" field=$individual}} {{include file="field_radio.tpl" field=$individual}}
<div class="submit"><input type="submit" name="page_site" value="{{$submit}}" /></div> <div class="submit"><input type="submit" name="page_site" value="{{$submit}}" /></div>

Binary file not shown.

View File

@ -95,12 +95,7 @@ function blackout_plugin_admin(&$a, &$o) {
if (! is_string($myurl)) { $myurl = "http://www.example.com"; } if (! is_string($myurl)) { $myurl = "http://www.example.com"; }
$t = get_markup_template( "admin.tpl", "addon/blackout/" ); $t = get_markup_template( "admin.tpl", "addon/blackout/" );
$includes = array( $o = replace_macros($t, array(
'$field_input' => 'field_input.tpl',
);
$includes = set_template_includes($a->theme['template_engine'], $includes);
$o = replace_macros($t, $includes + array(
'$submit' => t('Submit'), '$submit' => t('Submit'),
'$rurl' => array("rurl", "Redirect URL", $myurl, "all your visitors from the web will be redirected to this URL"), '$rurl' => array("rurl", "Redirect URL", $myurl, "all your visitors from the web will be redirected to this URL"),
'$startdate' => array("startdate", "Begin of the Blackout<br />(YYYY-MM-DD hh:mm)", $mystart, "format is <em>YYYY</em> year, <em>MM</em> month, <em>DD</em> day, <em>hh</em> hour and <em>mm</em> minute"), '$startdate' => array("startdate", "Begin of the Blackout<br />(YYYY-MM-DD hh:mm)", $mystart, "format is <em>YYYY</em> year, <em>MM</em> month, <em>DD</em> day, <em>hh</em> hour and <em>mm</em> minute"),

View File

@ -1,6 +1,6 @@
{{ inc $field_input with $field=$startdate }}{{ endinc }} {{ inc field_input.tpl with $field=$startdate }}{{ endinc }}
{{ inc $field_input with $field=$enddate }}{{ endinc }} {{ inc field_input.tpl with $field=$enddate }}{{ endinc }}
{{ inc $field_input with $field=$rurl }}{{ endinc }} {{ inc field_input.tpl with $field=$rurl }}{{ endinc }}
<div style="border: 2px solid #f00; padding: 10px; margin: <div style="border: 2px solid #f00; padding: 10px; margin:
10px;font-size: 1.2em;"><strong>Note</strong>: The redirect will be active from the moment you 10px;font-size: 1.2em;"><strong>Note</strong>: The redirect will be active from the moment you

View File

@ -1,6 +1,6 @@
{{include file="file:{{$field_input}}" field=$startdate}} {{include file="field_input.tpl" field=$startdate}}
{{include file="file:{{$field_input}}" field=$enddate}} {{include file="field_input.tpl" field=$enddate}}
{{include file="file:{{$field_input}}" field=$rurl}} {{include file="field_input.tpl" field=$rurl}}
<div style="border: 2px solid #f00; padding: 10px; margin: <div style="border: 2px solid #f00; padding: 10px; margin:
10px;font-size: 1.2em;"><strong>Note</strong>: The redirect will be active from the moment you 10px;font-size: 1.2em;"><strong>Note</strong>: The redirect will be active from the moment you

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -91,13 +91,7 @@ function gravatar_plugin_admin (&$a, &$o) {
// output Gravatar settings // output Gravatar settings
$o .= '<input type="hidden" name="form_security_token" value="' .get_form_security_token("gravatarsave") .'">'; $o .= '<input type="hidden" name="form_security_token" value="' .get_form_security_token("gravatarsave") .'">';
$o .= replace_macros( $t, array(
$includes = array(
'$field_select' => 'field_select.tpl',
);
$includes = set_template_includes($a->theme['template_engine'], $includes);
$o .= replace_macros( $t, $includes + array(
'$submit' => t('Submit'), '$submit' => t('Submit'),
'$default_avatar' => array('avatar', t('Default avatar image'), $default_avatar, t('Select default avatar image if none was found at Gravatar. See README'), $default_avatars), '$default_avatar' => array('avatar', t('Default avatar image'), $default_avatar, t('Select default avatar image if none was found at Gravatar. See README'), $default_avatars),
'$rating' => array('rating', t('Rating of images'), $rating, t('Select the appropriate avatar rating for your site. See README'), $ratings), '$rating' => array('rating', t('Rating of images'), $rating, t('Select the appropriate avatar rating for your site. See README'), $ratings),

View File

@ -1,3 +1,3 @@
{{ inc $field_select with $field=$default_avatar}}{{ endinc }} {{ inc field_select.tpl with $field=$default_avatar}}{{ endinc }}
{{ inc $field_select with $field=$rating }}{{ endinc }} {{ inc field_select.tpl with $field=$rating }}{{ endinc }}
<div class="submit"><input type="submit" value="$submit" /></div> <div class="submit"><input type="submit" value="$submit" /></div>

View File

@ -1,3 +1,3 @@
{{include file="file:{{$field_select}}" field=$default_avatar}} {{include file="field_select.tpl" field=$default_avatar}}
{{include file="file:{{$field_select}}" field=$rating}} {{include file="field_select.tpl" field=$rating}}
<div class="submit"><input type="submit" value="{{$submit}}" /></div> <div class="submit"><input type="submit" value="{{$submit}}" /></div>

Binary file not shown.

View File

@ -79,14 +79,7 @@ function impressum_plugin_admin_post (&$a) {
} }
function impressum_plugin_admin (&$a, &$o) { function impressum_plugin_admin (&$a, &$o) {
$t = get_markup_template( "admin.tpl", "addon/impressum/" ); $t = get_markup_template( "admin.tpl", "addon/impressum/" );
$o = replace_macros($t, array(
$includes = array(
'$field_input' => 'field_input.tpl',
'$field_textarea' => 'field_textarea.tpl',
);
$includes = set_template_includes($a->theme['template_engine'], $includes);
$o = replace_macros($t, $includes + array(
'$submit' => t('Submit'), '$submit' => t('Submit'),
'$owner' => array('owner', t('Site Owner'), get_config('impressum','owner'), t('The page operators name.')), '$owner' => array('owner', t('Site Owner'), get_config('impressum','owner'), t('The page operators name.')),
'$ownerprofile' => array('ownerprofile', t('Site Owners Profile'), get_config('impressum','ownerprofile'), t('Profile address of the operator.')), '$ownerprofile' => array('ownerprofile', t('Site Owners Profile'), get_config('impressum','ownerprofile'), t('Profile address of the operator.')),

12
impressum/view/admin.tpl Executable file → Normal file
View File

@ -1,7 +1,7 @@
{{ inc $field_input with $field=$owner }}{{ endinc }} {{ inc field_input.tpl with $field=$owner }}{{ endinc }}
{{ inc $field_input with $field=$ownerprofile }}{{ endinc }} {{ inc field_input.tpl with $field=$ownerprofile }}{{ endinc }}
{{ inc $field_textarea with $field=$postal }}{{ endinc }} {{ inc field_textarea.tpl with $field=$postal }}{{ endinc }}
{{ inc $field_textarea with $field=$notes }}{{ endinc }} {{ inc field_textarea.tpl with $field=$notes }}{{ endinc }}
{{ inc $field_input with $field=$email }}{{ endinc }} {{ inc field_input.tpl with $field=$email }}{{ endinc }}
{{ inc $field_textarea with $field=$footer_text }}{{ endinc }} {{ inc field_textarea.tpl with $field=$footer_text }}{{ endinc }}
<div class="submit"><input type="submit" name="page_site" value="$submit" /></div> <div class="submit"><input type="submit" name="page_site" value="$submit" /></div>

View File

@ -1,7 +1,7 @@
{{include file="file:{{$field_input}}" field=$owner}} {{include file="field_input.tpl" field=$owner}}
{{include file="file:{{$field_input}}" field=$ownerprofile}} {{include file="field_input.tpl" field=$ownerprofile}}
{{include file="file:{{$field_textarea}}" field=$postal}} {{include file="field_textarea.tpl" field=$postal}}
{{include file="file:{{$field_textarea}}" field=$notes}} {{include file="field_textarea.tpl" field=$notes}}
{{include file="file:{{$field_input}}" field=$email}} {{include file="field_input.tpl" field=$email}}
{{include file="file:{{$field_textarea}}" field=$footer_text}} {{include file="field_textarea.tpl" field=$footer_text}}
<div class="submit"><input type="submit" name="page_site" value="{{$submit}}" /></div> <div class="submit"><input type="submit" name="page_site" value="{{$submit}}" /></div>

Binary file not shown.

View File

@ -95,13 +95,7 @@ function libravatar_plugin_admin (&$a, &$o) {
// output Libravatar settings // output Libravatar settings
$o .= '<input type="hidden" name="form_security_token" value="' .get_form_security_token("libravatarsave") .'">'; $o .= '<input type="hidden" name="form_security_token" value="' .get_form_security_token("libravatarsave") .'">';
$o .= replace_macros( $t, array(
$includes = array(
'$field_input' => 'field_input.tpl',
);
$includes = set_template_includes($a->theme['template_engine'], $includes);
$o .= replace_macros( $t, $includes + array(
'$submit' => t('Submit'), '$submit' => t('Submit'),
'$default_avatar' => array('avatar', t('Default avatar image'), $default_avatar, t('Select default avatar image if none was found. See README'), $default_avatars), '$default_avatar' => array('avatar', t('Default avatar image'), $default_avatar, t('Select default avatar image if none was found. See README'), $default_avatars),
)); ));

View File

@ -1,2 +1,2 @@
{{ inc $field_select with $field=$default_avatar}}{{ endinc }} {{ inc field_select.tpl with $field=$default_avatar}}{{ endinc }}
<div class="submit"><input type="submit" value="$submit" /></div> <div class="submit"><input type="submit" value="$submit" /></div>

View File

@ -1,2 +1,2 @@
{{include file="file:{{$field_select}}" field=$default_avatar}} {{include file="field_select.tpl" field=$default_avatar}}
<div class="submit"><input type="submit" value="{{$submit}}" /></div> <div class="submit"><input type="submit" value="{{$submit}}" /></div>

Binary file not shown.

View File

@ -71,12 +71,7 @@ function mathjax_plugin_admin (&$a, &$o) {
set_config('mathjax','baseurl','http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML'); set_config('mathjax','baseurl','http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML');
} }
$includes = array( $o = replace_macros( $t, array(
'$field_input' => 'field_input.tpl',
);
$includes = set_template_includes($a->theme['template_engine'], $includes);
$o = replace_macros( $t, $includes + array(
'$baseurl' => array('baseurl', t('MathJax Base URL'), get_config('mathjax','baseurl' ), t('The URL for the javascript file that should be included to use MathJax. Can be either the MathJax CDN or another installation of MathJax.')), '$baseurl' => array('baseurl', t('MathJax Base URL'), get_config('mathjax','baseurl' ), t('The URL for the javascript file that should be included to use MathJax. Can be either the MathJax CDN or another installation of MathJax.')),
)); ));
} }

View File

@ -1,2 +1,2 @@
{{ inc $field_input with $field=$baseurl }}{{endinc }} {{ inc field_input.tpl with $field=$baseurl }}{{endinc }}
<div class="submit"><input type="submit" name="page_site" value="$submit" /></div> <div class="submit"><input type="submit" name="page_site" value="$submit" /></div>

View File

@ -1,2 +1,2 @@
{{include file="file:{{$field_input}}" field=$baseurl}} {{include file="field_input.tpl" field=$baseurl}}
<div class="submit"><input type="submit" name="page_site" value="{{$submit}}" /></div> <div class="submit"><input type="submit" name="page_site" value="{{$submit}}" /></div>

Binary file not shown.

View File

@ -58,7 +58,6 @@ function openstreetmap_location($a, &$item) {
function openstreetmap_plugin_admin (&$a, &$o) { function openstreetmap_plugin_admin (&$a, &$o) {
# $t = file_get_contents( dirname(__file__)."/admin.tpl");
$t = get_markup_template( "admin.tpl", "addon/openstreetmap/" ); $t = get_markup_template( "admin.tpl", "addon/openstreetmap/" );
$tmsserver = get_config('openstreetmap','tmsserver'); $tmsserver = get_config('openstreetmap','tmsserver');
if(! $tmsserver) if(! $tmsserver)
@ -67,12 +66,7 @@ function openstreetmap_plugin_admin (&$a, &$o) {
if(! $zoom) if(! $zoom)
$zoom = 17; $zoom = 17;
$includes = array( $o = replace_macros( $t, array(
'$field_input' => 'field_input.tpl',
);
$includes = set_template_includes($a->theme['template_engine'], $includes);
$o = replace_macros( $t, $includes + array(
'$submit' => t('Submit'), '$submit' => t('Submit'),
'$tmsserver' => array('tmsserver', t('Tile Server URL'), $tmsserver, t('A list of <a href="http://wiki.openstreetmap.org/wiki/TMS" target="_blank">public tile servers</a>')), '$tmsserver' => array('tmsserver', t('Tile Server URL'), $tmsserver, t('A list of <a href="http://wiki.openstreetmap.org/wiki/TMS" target="_blank">public tile servers</a>')),
'$zoom' => array('zoom', t('Default zoom'), $zoom, t('The default zoom level. (1:world, 18:highest)')), '$zoom' => array('zoom', t('Default zoom'), $zoom, t('The default zoom level. (1:world, 18:highest)')),

View File

@ -1,3 +1,3 @@
{{ inc $field_input with $field=$tmsserver }}{{ endinc }} {{ inc field_input.tpl with $field=$tmsserver }}{{ endinc }}
{{ inc $field_input with $field=$zoom }}{{ endinc }} {{ inc field_input.tpl with $field=$zoom }}{{ endinc }}
<div class="submit"><input type="submit" name="page_site" value="$submit" /></div> <div class="submit"><input type="submit" name="page_site" value="$submit" /></div>

View File

@ -1,3 +1,3 @@
{{include file="file:{{$field_input}}" field=$tmsserver}} {{include file="field_input.tpl" field=$tmsserver}}
{{include file="file:{{$field_input}}" field=$zoom}} {{include file="field_input.tpl" field=$zoom}}
<div class="submit"><input type="submit" name="page_site" value="{{$submit}}" /></div> <div class="submit"><input type="submit" name="page_site" value="{{$submit}}" /></div>

BIN
page.tgz

Binary file not shown.

BIN
piwik.tgz

Binary file not shown.

View File

@ -84,16 +84,8 @@ function piwik_analytics($a,&$b) {
} }
} }
function piwik_plugin_admin (&$a, &$o) { function piwik_plugin_admin (&$a, &$o) {
# $t = file_get_contents( dirname(__file__)."/admin.tpl");
$t = get_markup_template( "admin.tpl", "addon/piwik/" ); $t = get_markup_template( "admin.tpl", "addon/piwik/" );
$o = replace_macros( $t, array(
$includes = array(
'$field_input' => 'field_input.tpl',
'$field_checkbox' => 'field_select.tpl',
);
$includes = set_template_includes($a->theme['template_engine'], $includes);
$o = replace_macros( $t, $includes + array(
'$submit' => t('Submit'), '$submit' => t('Submit'),
'$baseurl' => array('baseurl', t('Piwik Base URL'), get_config('piwik','baseurl' ), t('Absolute path to your Piwik installation. (without protocol (http/s), with trailing slash)')), '$baseurl' => array('baseurl', t('Piwik Base URL'), get_config('piwik','baseurl' ), t('Absolute path to your Piwik installation. (without protocol (http/s), with trailing slash)')),
'$siteid' => array('siteid', t('Site ID'), get_config('piwik','siteid' ), ''), '$siteid' => array('siteid', t('Site ID'), get_config('piwik','siteid' ), ''),

8
piwik/view/admin.tpl Executable file → Normal file
View File

@ -1,5 +1,5 @@
{{ inc $field_input with $field=$baseurl }}{{ endinc }} {{ inc field_input.tpl with $field=$baseurl }}{{ endinc }}
{{ inc $field_input with $field=$siteid }}{{ endinc }} {{ inc field_input.tpl with $field=$siteid }}{{ endinc }}
{{ inc $field_checkbox with $field=$optout }}{{ endinc }} {{ inc field_checkbox.tpl with $field=$optout }}{{ endinc }}
{{ inc $field_checkbox with $field=$async }}{{ endinc }} {{ inc field_checkbox.tpl with $field=$async }}{{ endinc }}
<div class="submit"><input type="submit" name="page_site" value="$submit" /></div> <div class="submit"><input type="submit" name="page_site" value="$submit" /></div>

View File

@ -1,5 +1,5 @@
{{include file="file:{{$field_input}}" field=$baseurl}} {{include file="field_input.tpl" field=$baseurl}}
{{include file="file:{{$field_input}}" field=$siteid}} {{include file="field_input.tpl" field=$siteid}}
{{include file="file:{{$field_checkbox}}" field=$optout}} {{include file="field_checkbox.tpl" field=$optout}}
{{include file="file:{{$field_checkbox}}" field=$async}} {{include file="field_checkbox.tpl" field=$async}}
<div class="submit"><input type="submit" name="page_site" value="{{$submit}}" /></div> <div class="submit"><input type="submit" name="page_site" value="{{$submit}}" /></div>

Binary file not shown.

Binary file not shown.

View File

@ -191,15 +191,8 @@ function remote_permissions_content($a, $item_copy) {
} }
function remote_permissions_plugin_admin(&$a, &$o){ function remote_permissions_plugin_admin(&$a, &$o){
// $t = file_get_contents( "addon/remote_permissions/admin.tpl" );
$t = get_markup_template( "admin.tpl", "addon/remote_permissions/" ); $t = get_markup_template( "admin.tpl", "addon/remote_permissions/" );
$o = replace_macros($t, array(
$includes = array(
'$field_radio' => 'field_radio.tpl',
);
$includes = set_template_includes($a->theme['template_engine'], $includes);
$o = replace_macros($t, $includes + array(
'$submit' => t('Submit'), '$submit' => t('Submit'),
'$global' => array('remotepermschoice', t('Global'), 1, t('The posts of every user on this server show the post recipients'), get_config('remote_perms', 'global') == 1), '$global' => array('remotepermschoice', t('Global'), 1, t('The posts of every user on this server show the post recipients'), get_config('remote_perms', 'global') == 1),
'$individual' => array('remotepermschoice', t('Individual'), 2, t('Each user chooses whether his/her posts show the post recipients'), get_config('remote_perms', 'global') == 0) '$individual' => array('remotepermschoice', t('Individual'), 2, t('Each user chooses whether his/her posts show the post recipients'), get_config('remote_perms', 'global') == 0)

View File

@ -1,3 +1,3 @@
{{ inc $field_radio with $field=$global }}{{ endinc }} {{ inc field_radio.tpl with $field=$global }}{{ endinc }}
{{ inc $field_radio with $field=$individual }}{{ endinc }} {{ inc field_radio.tpl with $field=$individual }}{{ endinc }}
<div class="submit"><input type="submit" name="page_site" value="$submit" /></div> <div class="submit"><input type="submit" name="page_site" value="$submit" /></div>

Binary file not shown.

View File

@ -699,14 +699,7 @@ function statusnet_plugin_admin(&$a, &$o){
$t = get_markup_template( "admin.tpl", "addon/statusnet/" ); $t = get_markup_template( "admin.tpl", "addon/statusnet/" );
$o = replace_macros($t, array(
$includes = array(
'$field_input' => 'field_input.tpl',
'$field_checkbox' => 'field_checkbox.tpl',
);
$includes = set_template_includes($a->theme['template_engine'], $includes);
$o = replace_macros($t, $includes + array(
'$submit' => t('Submit'), '$submit' => t('Submit'),
'$sites' => $sitesform, '$sites' => $sitesform,

10
statusnet/view/admin.tpl Executable file → Normal file
View File

@ -1,10 +1,10 @@
{{ for $sites as $s }} {{ for $sites as $s }}
{{ inc $field_input with $field=$s.sitename }}{{ endinc }} {{ inc field_input.tpl with $field=$s.sitename }}{{ endinc }}
{{ inc $field_input with $field=$s.apiurl }}{{ endinc }} {{ inc field_input.tpl with $field=$s.apiurl }}{{ endinc }}
{{ inc $field_input with $field=$s.secret }}{{ endinc }} {{ inc field_input.tpl with $field=$s.secret }}{{ endinc }}
{{ inc $field_input with $field=$s.key }}{{ endinc }} {{ inc field_input.tpl with $field=$s.key }}{{ endinc }}
{{ if $s.delete }} {{ if $s.delete }}
{{ inc $field_checkbox with $field=$s.delete }}{{ endinc }} {{ inc field_checkbox.tpl with $field=$s.delete }}{{ endinc }}
<hr> <hr>
{{ else }} {{ else }}
<p>Fill this form to add a new site</p> <p>Fill this form to add a new site</p>

View File

@ -1,10 +1,10 @@
{{foreach $sites as $s}} {{foreach $sites as $s}}
{{include file="file:{{$field_input}}" field=$s.sitename}} {{include file="field_input.tpl" field=$s.sitename}}
{{include file="file:{{$field_input}}" field=$s.apiurl}} {{include file="field_input.tpl" field=$s.apiurl}}
{{include file="file:{{$field_input}}" field=$s.secret}} {{include file="field_input.tpl" field=$s.secret}}
{{include file="file:{{$field_input}}" field=$s.key}} {{include file="field_input.tpl" field=$s.key}}
{{if $s.delete}} {{if $s.delete}}
{{include file="file:{{$field_checkbox}}" field=$s.delete}} {{include file="field_checkbox.tpl" field=$s.delete}}
<hr> <hr>
{{else}} {{else}}
<p>Fill this form to add a new site</p> <p>Fill this form to add a new site</p>

Binary file not shown.

Binary file not shown.

4
twitter/view/admin.tpl Executable file → Normal file
View File

@ -1,3 +1,3 @@
{{ inc $field_input with $field=$consumerkey }}{{ endinc }} {{ inc field_input.tpl with $field=$consumerkey }}{{ endinc }}
{{ inc $field_input with $field=$consumersecret }}{{ endinc }} {{ inc field_input.tpl with $field=$consumersecret }}{{ endinc }}
<div class="submit"><input type="submit" name="page_site" value="$submit" /></div> <div class="submit"><input type="submit" name="page_site" value="$submit" /></div>

View File

@ -1,3 +1,3 @@
{{include file="file:{{$field_input}}" field=$consumerkey}} {{include file="field_input.tpl" field=$consumerkey}}
{{include file="file:{{$field_input}}" field=$consumersecret}} {{include file="field_input.tpl" field=$consumersecret}}
<div class="submit"><input type="submit" name="page_site" value="{{$submit}}" /></div> <div class="submit"><input type="submit" name="page_site" value="{{$submit}}" /></div>

Binary file not shown.

View File

@ -78,16 +78,8 @@ function uhremotestorage_settings($a, &$s){
'Dropbox' => 'Dropbox', 'Dropbox' => 'Dropbox',
); );
*/ */
// $tpl = file_get_contents(dirname(__file__)."/settings.tpl");
$tpl = get_markup_template("settings.tpl", "addon/uhremotestorage/"); $tpl = get_markup_template("settings.tpl", "addon/uhremotestorage/");
$s .= replace_macros($tpl, array(
$includes = array(
'$field_input' => 'field_input.tpl',
'$field_select' => 'field_select.tpl',
);
$includes = set_template_includes($a->theme['template_engine'], $includes);
$s .= replace_macros($tpl, $includes + array(
'$title' => 'Unhosted remote storage', '$title' => 'Unhosted remote storage',
'$desc' => sprintf( t('Allow to use your friendica id (%s) to connecto to external unhosted-enabled storage (like ownCloud). See <a href="http://www.w3.org/community/unhosted/wiki/RemoteStorage#WebFinger">RemoteStorage WebFinger</a>'), $uid ), '$desc' => sprintf( t('Allow to use your friendica id (%s) to connecto to external unhosted-enabled storage (like ownCloud). See <a href="http://www.w3.org/community/unhosted/wiki/RemoteStorage#WebFinger">RemoteStorage WebFinger</a>'), $uid ),
'$url' => array( 'unhoestedurl', t('Template URL (with {category})'), $url, 'If your are using ownCloud, your unhosted url will be like <tt>http://<i>HOST</i>/apps/remoteStorage/WebDAV.php/<i>USER</i>/remoteStorage/{category}</tt>'), '$url' => array( 'unhoestedurl', t('Template URL (with {category})'), $url, 'If your are using ownCloud, your unhosted url will be like <tt>http://<i>HOST</i>/apps/remoteStorage/WebDAV.php/<i>USER</i>/remoteStorage/{category}</tt>'),

6
uhremotestorage/view/settings.tpl Executable file → Normal file
View File

@ -1,9 +1,9 @@
<div class="settings-block"> <div class="settings-block">
<h3>$title</h3> <h3>$title</h3>
<p>$desc</p> <p>$desc</p>
{{ inc $field_input with $field=$url }}{{ endinc }} {{ inc field_input.tpl with $field=$url }}{{ endinc }}
{{ inc $field_input with $field=$auth }}{{ endinc }} {{ inc field_input.tpl with $field=$auth }}{{ endinc }}
{{ inc $field_select with $field=$api }}{{ endinc }} {{ inc field_select.tpl with $field=$api }}{{ endinc }}
<div class="submit"><input type="submit" name="page_site" value="$submit" /></div> <div class="submit"><input type="submit" name="page_site" value="$submit" /></div>
</div> </div>

View File

@ -1,9 +1,9 @@
<div class="settings-block"> <div class="settings-block">
<h3>{{$title}}</h3> <h3>{{$title}}</h3>
<p>{{$desc}}</p> <p>{{$desc}}</p>
{{include file="file:{{$field_input}}" field=$url}} {{include file="field_input.tpl" field=$url}}
{{include file="file:{{$field_input}}" field=$auth}} {{include file="field_input.tpl" field=$auth}}
{{include file="file:{{$field_select}}" field=$api}} {{include file="field_select.tpl" field=$api}}
<div class="submit"><input type="submit" name="page_site" value="{{$submit}}" /></div> <div class="submit"><input type="submit" name="page_site" value="{{$submit}}" /></div>
</div> </div>

Binary file not shown.