more templates

This commit is contained in:
Friendika 2011-04-07 18:00:35 -07:00
commit 338ba48554
30 changed files with 123 additions and 302 deletions

View file

@ -147,17 +147,13 @@ function notifications_content(&$a) {
LEFT JOIN `contact` ON `register`.`uid` = `contact`.`uid`
LEFT JOIN `user` ON `register`.`uid` = `user`.`uid`;");
if(($r !== false) && (count($r))) {
$tpl = load_view_file("view/registrations.tpl");
$o .= '<ul>';
foreach($r as $rr) {
$o .= "<ul>";
$o .= replace_macros($tpl, array(
'$fullname' => $rr['name'],
'$email' => $rr['email'],
'$approvelink' => "regmod/allow/".$rr['hash'],
'$denylink' => "regmod/deny/".$rr['hash'],
));
$o .= "</ul>";
$o .= '<li>' . sprintf('%s (%s) : ', $rr['name'],$rr['email'])
. '<a href="regmod/allow/' . $rr['hash'] .'">' . t('Approve')
. '</a> - <href="regmod/deny/' . $rr['hash'] . '">' . t('Deny') . '</a></li>' . "\r\n";
}
$o .= "</ul>";
}
else
notice( t('No registrations.') . EOL);

View file

@ -351,6 +351,9 @@ function profiles_content(&$a) {
$opt_tpl = load_view_file("view/profile-hide-friends.tpl");
$hide_friends = replace_macros($opt_tpl,array(
'$desc' => t('Hide my contact/friend list from viewers of this profile?'),
'$yes_str' => t('Yes'),
'$no_str' => t('No'),
'$yes_selected' => (($r[0]['hide-friends']) ? " checked=\"checked\" " : ""),
'$no_selected' => (($r[0]['hide-friends'] == 0) ? " checked=\"checked\" " : "")
));
@ -410,7 +413,14 @@ function profiles_content(&$a) {
local_user());
if(count($r)) {
$o .= load_view_file('view/profile_listing_header.tpl');
$tpl_header = load_view_file('view/profile_listing_header.tpl');
$o .= replace_macros($tpl_header,array(
'$header' => t('Profiles'),
'$chg_photo' => t('Change profile photo'),
'$cr_new' => t('Create New Profile')
));
$tpl_default = load_view_file('view/profile_entry_default.tpl');
$tpl = load_view_file('view/profile_entry.tpl');

View file

@ -285,6 +285,9 @@ function settings_content(&$a) {
else {
$opt_tpl = load_view_file("view/profile-in-directory.tpl");
$profile_in_dir = replace_macros($opt_tpl,array(
'$desc' => t('Publish your default profile in site directory?'),
'$yes_str' => t('Yes'),
'$no_str' => t('No'),
'$yes_selected' => (($profile['publish']) ? " checked=\"checked\" " : ""),
'$no_selected' => (($profile['publish'] == 0) ? " checked=\"checked\" " : "")
));
@ -294,6 +297,9 @@ function settings_content(&$a) {
$opt_tpl = load_view_file("view/profile-in-netdir.tpl");
$profile_in_net_dir = replace_macros($opt_tpl,array(
'$desc' => t('Publish your default profile in global social directory?'),
'$yes_str' => t('Yes'),
'$no_str' => t('No'),
'$yes_selected' => (($profile['net-publish']) ? " checked=\"checked\" " : ""),
'$no_selected' => (($profile['net-publish'] == 0) ? " checked=\"checked\" " : "")
));