mirror of
https://git.friendi.ca/friendica/friendica-addons.git
synced 2025-07-10 02:18:48 +00:00
revert addon Smarty3 templates to non-variable-based includes
This commit is contained in:
parent
75f47b74d2
commit
c12542ef96
53 changed files with 75 additions and 146 deletions
|
@ -78,16 +78,8 @@ function uhremotestorage_settings($a, &$s){
|
|||
'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>'),
|
||||
|
|
6
uhremotestorage/view/settings.tpl
Executable file → Normal file
6
uhremotestorage/view/settings.tpl
Executable file → Normal file
|
@ -1,9 +1,9 @@
|
|||
<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>
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
<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>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue