mirror of
https://git.friendi.ca/friendica/friendica-addons.git
synced 2025-07-10 18:38:49 +00:00
update addons to support Smarty3
This commit is contained in:
parent
66334ec5cb
commit
3da6f1471c
62 changed files with 778 additions and 468 deletions
|
@ -93,8 +93,14 @@ function blackout_plugin_admin(&$a, &$o) {
|
|||
if (! is_string($myend)) { $myend = "YYYY-MM-DD:hhmm"; }
|
||||
$myurl = get_config('blackout','url');
|
||||
if (! is_string($myurl)) { $myurl = "http://www.example.com"; }
|
||||
$t = file_get_contents( dirname(__file__)."/admin.tpl" );
|
||||
$o = replace_macros($t, array(
|
||||
$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(
|
||||
'$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"),
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{{ inc field_input.tpl with $field=$startdate }}{{ endinc }}
|
||||
{{ inc field_input.tpl with $field=$enddate }}{{ endinc }}
|
||||
{{ inc field_input.tpl with $field=$rurl }}{{ endinc }}
|
||||
{{ inc $field_input with $field=$startdate }}{{ endinc }}
|
||||
{{ inc $field_input with $field=$enddate }}{{ endinc }}
|
||||
{{ inc $field_input 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
|
11
blackout/view/smarty3/admin.tpl
Normal file
11
blackout/view/smarty3/admin.tpl
Normal file
|
@ -0,0 +1,11 @@
|
|||
{{include file="file:{{$field_input}}" field=$startdate}}
|
||||
{{include file="file:{{$field_input}}" field=$enddate}}
|
||||
{{include file="file:{{$field_input}}" 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
|
||||
press the submit button. Users currently logged in will <strong>not</strong> be
|
||||
thrown out but can't login again after logging out should the blackout is
|
||||
still in place.</div>
|
||||
|
||||
<div class="submit"><input type="submit" name="page_site" value="{{$submit}}" /></div>
|
Loading…
Add table
Add a link
Reference in a new issue