mirror of
https://git.friendi.ca/friendica/friendica-addons.git
synced 2025-07-07 00:48:55 +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
|
@ -1,3 +0,0 @@
|
|||
{{ 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>
|
|
@ -39,7 +39,8 @@ function remote_permissions_settings(&$a,&$o) {
|
|||
|
||||
/* Add some HTML to the existing form */
|
||||
|
||||
$t = file_get_contents("addon/remote_permissions/settings.tpl" );
|
||||
// $t = file_get_contents("addon/remote_permissions/settings.tpl" );
|
||||
$t = get_markup_template("settings.tpl", "addon/remote_permissions/" );
|
||||
$o .= replace_macros($t, array(
|
||||
'$remote_perms_title' => t('Remote Permissions Settings'),
|
||||
'$remote_perms_label' => t('Allow recipients of your private posts to see the other recipients of the posts'),
|
||||
|
@ -190,8 +191,15 @@ function remote_permissions_content($a, $item_copy) {
|
|||
}
|
||||
|
||||
function remote_permissions_plugin_admin(&$a, &$o){
|
||||
$t = file_get_contents( "addon/remote_permissions/admin.tpl" );
|
||||
$o = replace_macros($t, array(
|
||||
// $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(
|
||||
'$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)
|
||||
|
|
3
remote_permissions/view/admin.tpl
Normal file
3
remote_permissions/view/admin.tpl
Normal file
|
@ -0,0 +1,3 @@
|
|||
{{ inc $field_radio with $field=$global }}{{ endinc }}
|
||||
{{ inc $field_radio with $field=$individual }}{{ endinc }}
|
||||
<div class="submit"><input type="submit" name="page_site" value="$submit" /></div>
|
3
remote_permissions/view/smarty3/admin.tpl
Normal file
3
remote_permissions/view/smarty3/admin.tpl
Normal file
|
@ -0,0 +1,3 @@
|
|||
{{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>
|
8
remote_permissions/view/smarty3/settings.tpl
Normal file
8
remote_permissions/view/smarty3/settings.tpl
Normal file
|
@ -0,0 +1,8 @@
|
|||
<div class="settings-block">
|
||||
<h3>{{$remote_perms_title}}</h3>
|
||||
<div id="remote-perms-wrapper">
|
||||
<label id="remote-perms-label" for="remote-perms">{{$remote_perms_label}}</label>
|
||||
<input id="remote-perms-input" type="checkbox" name="remote-perms" value="1" {{$checked}} />
|
||||
</div><div class="clear"></div>
|
||||
<div class="settings-submit-wrapper" ><input type="submit" name="remote-perms-submit" class="settings-submit" value="{{$submit}}" /></div></div>
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue