function altpager_plugin_admin(&$a, &$o){
$t = get_markup_template( "admin.tpl", "addon/altpager/" );
-
- $includes = array(
- '$field_radio' => 'field_radio.tpl',
- );
- $includes = set_template_includes($a->theme['template_engine'], $includes);
-
- $o = replace_macros($t, $includes + array(
+ $o = replace_macros($t, array(
'$submit' => t('Submit'),
'$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)
-{{ inc $field_radio with $field=$global }}{{ endinc }}
-{{ inc $field_radio with $field=$individual }}{{ endinc }}
+{{ inc field_radio.tpl with $field=$global }}{{ endinc }}
+{{ inc field_radio.tpl with $field=$individual }}{{ endinc }}
<div class="submit"><input type="submit" name="page_site" value="$submit" /></div>
-{{include file="file:{{$field_radio}}" field=$global}}
-{{include file="file:{{$field_radio}}" field=$individual}}
+{{include file="field_radio.tpl" field=$global}}
+{{include file="field_radio.tpl" field=$individual}}
<div class="submit"><input type="submit" name="page_site" value="{{$submit}}" /></div>
if (! is_string($myurl)) { $myurl = "http://www.example.com"; }
$t = get_markup_template( "admin.tpl", "addon/blackout/" );
- $includes = array(
- '$field_input' => 'field_input.tpl',
- );
- $includes = set_template_includes($a->theme['template_engine'], $includes);
-
- $o = replace_macros($t, $includes + array(
+ $o = replace_macros($t, array(
'$submit' => t('Submit'),
'$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"),
-{{ inc $field_input with $field=$startdate }}{{ endinc }}
-{{ inc $field_input with $field=$enddate }}{{ endinc }}
-{{ inc $field_input with $field=$rurl }}{{ endinc }}
+{{ inc field_input.tpl with $field=$startdate }}{{ endinc }}
+{{ inc field_input.tpl with $field=$enddate }}{{ endinc }}
+{{ inc field_input.tpl with $field=$rurl }}{{ endinc }}
<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
-{{include file="file:{{$field_input}}" field=$startdate}}
-{{include file="file:{{$field_input}}" field=$enddate}}
-{{include file="file:{{$field_input}}" field=$rurl}}
+{{include file="field_input.tpl" field=$startdate}}
+{{include file="field_input.tpl" field=$enddate}}
+{{include file="field_input.tpl" field=$rurl}}
<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
// output Gravatar settings
$o .= '<input type="hidden" name="form_security_token" value="' .get_form_security_token("gravatarsave") .'">';
-
- $includes = array(
- '$field_select' => 'field_select.tpl',
- );
- $includes = set_template_includes($a->theme['template_engine'], $includes);
-
- $o .= replace_macros( $t, $includes + array(
+ $o .= replace_macros( $t, array(
'$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),
'$rating' => array('rating', t('Rating of images'), $rating, t('Select the appropriate avatar rating for your site. See README'), $ratings),
-{{ inc $field_select with $field=$default_avatar}}{{ endinc }}
-{{ inc $field_select with $field=$rating }}{{ endinc }}
+{{ inc field_select.tpl with $field=$default_avatar}}{{ endinc }}
+{{ inc field_select.tpl with $field=$rating }}{{ endinc }}
<div class="submit"><input type="submit" value="$submit" /></div>
-{{include file="file:{{$field_select}}" field=$default_avatar}}
-{{include file="file:{{$field_select}}" field=$rating}}
+{{include file="field_select.tpl" field=$default_avatar}}
+{{include file="field_select.tpl" field=$rating}}
<div class="submit"><input type="submit" value="{{$submit}}" /></div>
}
function impressum_plugin_admin (&$a, &$o) {
$t = get_markup_template( "admin.tpl", "addon/impressum/" );
-
- $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(
+ $o = replace_macros($t, array(
'$submit' => t('Submit'),
'$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.')),
-{{ inc $field_input with $field=$owner }}{{ endinc }}
-{{ inc $field_input with $field=$ownerprofile }}{{ endinc }}
-{{ inc $field_textarea with $field=$postal }}{{ endinc }}
-{{ inc $field_textarea with $field=$notes }}{{ endinc }}
-{{ inc $field_input with $field=$email }}{{ endinc }}
-{{ inc $field_textarea with $field=$footer_text }}{{ endinc }}
+{{ inc field_input.tpl with $field=$owner }}{{ endinc }}
+{{ inc field_input.tpl with $field=$ownerprofile }}{{ endinc }}
+{{ inc field_textarea.tpl with $field=$postal }}{{ endinc }}
+{{ inc field_textarea.tpl with $field=$notes }}{{ endinc }}
+{{ inc field_input.tpl with $field=$email }}{{ endinc }}
+{{ inc field_textarea.tpl with $field=$footer_text }}{{ endinc }}
<div class="submit"><input type="submit" name="page_site" value="$submit" /></div>
-{{include file="file:{{$field_input}}" field=$owner}}
-{{include file="file:{{$field_input}}" field=$ownerprofile}}
-{{include file="file:{{$field_textarea}}" field=$postal}}
-{{include file="file:{{$field_textarea}}" field=$notes}}
-{{include file="file:{{$field_input}}" field=$email}}
-{{include file="file:{{$field_textarea}}" field=$footer_text}}
+{{include file="field_input.tpl" field=$owner}}
+{{include file="field_input.tpl" field=$ownerprofile}}
+{{include file="field_textarea.tpl" field=$postal}}
+{{include file="field_textarea.tpl" field=$notes}}
+{{include file="field_input.tpl" field=$email}}
+{{include file="field_textarea.tpl" field=$footer_text}}
<div class="submit"><input type="submit" name="page_site" value="{{$submit}}" /></div>
// output Libravatar settings
$o .= '<input type="hidden" name="form_security_token" value="' .get_form_security_token("libravatarsave") .'">';
-
- $includes = array(
- '$field_input' => 'field_input.tpl',
- );
- $includes = set_template_includes($a->theme['template_engine'], $includes);
-
- $o .= replace_macros( $t, $includes + array(
+ $o .= replace_macros( $t, array(
'$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),
));
-{{ 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>
-{{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>
set_config('mathjax','baseurl','http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML');
}
- $includes = array(
- '$field_input' => 'field_input.tpl',
- );
- $includes = set_template_includes($a->theme['template_engine'], $includes);
-
- $o = replace_macros( $t, $includes + array(
+ $o = replace_macros( $t, 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.')),
));
}
-{{ 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>
-{{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>
function openstreetmap_plugin_admin (&$a, &$o) {
-# $t = file_get_contents( dirname(__file__)."/admin.tpl");
$t = get_markup_template( "admin.tpl", "addon/openstreetmap/" );
$tmsserver = get_config('openstreetmap','tmsserver');
if(! $tmsserver)
if(! $zoom)
$zoom = 17;
- $includes = array(
- '$field_input' => 'field_input.tpl',
- );
- $includes = set_template_includes($a->theme['template_engine'], $includes);
-
- $o = replace_macros( $t, $includes + array(
+ $o = replace_macros( $t, array(
'$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>')),
'$zoom' => array('zoom', t('Default zoom'), $zoom, t('The default zoom level. (1:world, 18:highest)')),
-{{ inc $field_input with $field=$tmsserver }}{{ endinc }}
-{{ inc $field_input with $field=$zoom }}{{ endinc }}
+{{ inc field_input.tpl with $field=$tmsserver }}{{ endinc }}
+{{ inc field_input.tpl with $field=$zoom }}{{ endinc }}
<div class="submit"><input type="submit" name="page_site" value="$submit" /></div>
-{{include file="file:{{$field_input}}" field=$tmsserver}}
-{{include file="file:{{$field_input}}" field=$zoom}}
+{{include file="field_input.tpl" field=$tmsserver}}
+{{include file="field_input.tpl" field=$zoom}}
<div class="submit"><input type="submit" name="page_site" value="{{$submit}}" /></div>
}
}
function piwik_plugin_admin (&$a, &$o) {
-# $t = file_get_contents( dirname(__file__)."/admin.tpl");
$t = get_markup_template( "admin.tpl", "addon/piwik/" );
-
- $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(
+ $o = replace_macros( $t, array(
'$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)')),
'$siteid' => array('siteid', t('Site ID'), get_config('piwik','siteid' ), ''),
-{{ inc $field_input with $field=$baseurl }}{{ endinc }}
-{{ inc $field_input with $field=$siteid }}{{ endinc }}
-{{ inc $field_checkbox with $field=$optout }}{{ endinc }}
-{{ inc $field_checkbox with $field=$async }}{{ endinc }}
+{{ inc field_input.tpl with $field=$baseurl }}{{ endinc }}
+{{ inc field_input.tpl with $field=$siteid }}{{ endinc }}
+{{ inc field_checkbox.tpl with $field=$optout }}{{ endinc }}
+{{ inc field_checkbox.tpl with $field=$async }}{{ endinc }}
<div class="submit"><input type="submit" name="page_site" value="$submit" /></div>
-{{include file="file:{{$field_input}}" field=$baseurl}}
-{{include file="file:{{$field_input}}" field=$siteid}}
-{{include file="file:{{$field_checkbox}}" field=$optout}}
-{{include file="file:{{$field_checkbox}}" field=$async}}
+{{include file="field_input.tpl" field=$baseurl}}
+{{include file="field_input.tpl" field=$siteid}}
+{{include file="field_checkbox.tpl" field=$optout}}
+{{include file="field_checkbox.tpl" field=$async}}
<div class="submit"><input type="submit" name="page_site" value="{{$submit}}" /></div>
}
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/" );
-
- $includes = array(
- '$field_radio' => 'field_radio.tpl',
- );
- $includes = set_template_includes($a->theme['template_engine'], $includes);
-
- $o = replace_macros($t, $includes + array(
+ $o = replace_macros($t, array(
'$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),
'$individual' => array('remotepermschoice', t('Individual'), 2, t('Each user chooses whether his/her posts show the post recipients'), get_config('remote_perms', 'global') == 0)
-{{ inc $field_radio with $field=$global }}{{ endinc }}
-{{ inc $field_radio with $field=$individual }}{{ endinc }}
+{{ inc field_radio.tpl with $field=$global }}{{ endinc }}
+{{ inc field_radio.tpl with $field=$individual }}{{ endinc }}
<div class="submit"><input type="submit" name="page_site" value="$submit" /></div>
$t = get_markup_template( "admin.tpl", "addon/statusnet/" );
-
- $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(
+ $o = replace_macros($t, array(
'$submit' => t('Submit'),
'$sites' => $sitesform,
{{ for $sites as $s }}
- {{ inc $field_input with $field=$s.sitename }}{{ endinc }}
- {{ inc $field_input with $field=$s.apiurl }}{{ endinc }}
- {{ inc $field_input with $field=$s.secret }}{{ endinc }}
- {{ inc $field_input with $field=$s.key }}{{ endinc }}
+ {{ inc field_input.tpl with $field=$s.sitename }}{{ endinc }}
+ {{ inc field_input.tpl with $field=$s.apiurl }}{{ endinc }}
+ {{ inc field_input.tpl with $field=$s.secret }}{{ endinc }}
+ {{ inc field_input.tpl with $field=$s.key }}{{ endinc }}
{{ if $s.delete }}
- {{ inc $field_checkbox with $field=$s.delete }}{{ endinc }}
+ {{ inc field_checkbox.tpl with $field=$s.delete }}{{ endinc }}
<hr>
{{ else }}
<p>Fill this form to add a new site</p>
{{foreach $sites as $s}}
- {{include file="file:{{$field_input}}" field=$s.sitename}}
- {{include file="file:{{$field_input}}" field=$s.apiurl}}
- {{include file="file:{{$field_input}}" field=$s.secret}}
- {{include file="file:{{$field_input}}" field=$s.key}}
+ {{include file="field_input.tpl" field=$s.sitename}}
+ {{include file="field_input.tpl" field=$s.apiurl}}
+ {{include file="field_input.tpl" field=$s.secret}}
+ {{include file="field_input.tpl" field=$s.key}}
{{if $s.delete}}
- {{include file="file:{{$field_checkbox}}" field=$s.delete}}
+ {{include file="field_checkbox.tpl" field=$s.delete}}
<hr>
{{else}}
<p>Fill this form to add a new site</p>
-{{ inc $field_input with $field=$consumerkey }}{{ endinc }}
-{{ inc $field_input with $field=$consumersecret }}{{ endinc }}
+{{ inc field_input.tpl with $field=$consumerkey }}{{ endinc }}
+{{ inc field_input.tpl with $field=$consumersecret }}{{ endinc }}
<div class="submit"><input type="submit" name="page_site" value="$submit" /></div>
-{{include file="file:{{$field_input}}" field=$consumerkey}}
-{{include file="file:{{$field_input}}" field=$consumersecret}}
+{{include file="field_input.tpl" field=$consumerkey}}
+{{include file="field_input.tpl" field=$consumersecret}}
<div class="submit"><input type="submit" name="page_site" value="{{$submit}}" /></div>
'Dropbox' => 'Dropbox',
);
*/
-// $tpl = file_get_contents(dirname(__file__)."/settings.tpl");
$tpl = get_markup_template("settings.tpl", "addon/uhremotestorage/");
-
- $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(
+ $s .= replace_macros($tpl, array(
'$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 ),
'$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>'),
<div class="settings-block">
<h3>$title</h3>
<p>$desc</p>
- {{ inc $field_input with $field=$url }}{{ endinc }}
- {{ inc $field_input with $field=$auth }}{{ endinc }}
- {{ inc $field_select with $field=$api }}{{ endinc }}
+ {{ inc field_input.tpl with $field=$url }}{{ endinc }}
+ {{ inc field_input.tpl with $field=$auth }}{{ endinc }}
+ {{ inc field_select.tpl with $field=$api }}{{ endinc }}
<div class="submit"><input type="submit" name="page_site" value="$submit" /></div>
</div>
<div class="settings-block">
<h3>{{$title}}</h3>
<p>{{$desc}}</p>
- {{include file="file:{{$field_input}}" field=$url}}
- {{include file="file:{{$field_input}}" field=$auth}}
- {{include file="file:{{$field_select}}" field=$api}}
+ {{include file="field_input.tpl" field=$url}}
+ {{include file="field_input.tpl" field=$auth}}
+ {{include file="field_select.tpl" field=$api}}
<div class="submit"><input type="submit" name="page_site" value="{{$submit}}" /></div>
</div>