More template gore!

This commit is contained in:
fabrixxm 2014-09-07 12:29:13 +02:00
commit 5997fb19ee
32 changed files with 86 additions and 866 deletions

View file

@ -4,6 +4,8 @@
* Friendica admin
*/
require_once("include/remoteupdate.php");
require_once("include/enotify.php");
require_once("include/text.php");
/**
@ -752,7 +754,7 @@ function admin_page_users_post(&$a){
if (!($nu_name==="") && !($nu_email==="") && !($nu_nickname==="")) {
require_once('include/user.php');
require_once('include/email.php');
$result = create_user( array('username'=>$nu_name, 'email'=>$nu_email, 'nickname'=>$nu_nickname, 'verified'=>1) );
if(! $result['success']) {
notice($result['message']);
@ -761,7 +763,7 @@ function admin_page_users_post(&$a){
$nu = $result['user'];
$preamble = deindent(t('
Dear %1$s,
the administrator of %2$s has set up an account for you.');
the administrator of %2$s has set up an account for you.'));
$body = deindent(t('
The login details are as follows:
@ -786,7 +788,7 @@ function admin_page_users_post(&$a){
If you are new and do not know anybody here, they may help
you to make some new and interesting friends.
Thank you and welcome to %4$s.');
Thank you and welcome to %4$s.'));
$preamble = sprintf($preamble, $nu['username'], $a->config['sitename']);
$body = sprintf($body, $a->get_baseurl(), $nu['email'], $result['password'], $a->config['sitename']);

View file

@ -2,6 +2,7 @@
require_once('include/email.php');
require_once('include/enotify.php');
require_once('include/text.php');
function lostpass_post(&$a) {

View file

@ -2,6 +2,7 @@
require_once('include/email.php');
require_once('include/bbcode.php');
require_once('include/user.php');
if(! function_exists('register_post')) {
function register_post(&$a) {
@ -45,7 +46,7 @@ function register_post(&$a) {
$verified = 0;
break;
}
require_once('include/user.php');
@ -62,7 +63,7 @@ function register_post(&$a) {
}
$user = $result['user'];
if($netpublish && $a->config['register_policy'] != REGISTER_APPROVE) {
$url = $a->get_baseurl() . '/profile/' . $user['nickname'];
proc_run('php',"include/directory.php","$url");
@ -80,20 +81,12 @@ function register_post(&$a) {
set_pconfig($user['uid'],'system','invites_remaining',$num_invites);
}
$email_tpl = get_intltext_template("register_open_eml.tpl");
$email_tpl = replace_macros($email_tpl, array(
'$sitename' => $a->config['sitename'],
'$siteurl' => $a->get_baseurl(),
'$username' => $user['username'],
'$email' => $user['email'],
'$password' => $result['password'],
'$uid' => $user['uid'] ));
$res = mail($user['email'], email_header_encode( sprintf( t('Registration details for %s'), $a->config['sitename']),'UTF-8'),
$email_tpl,
'From: ' . 'Administrator' . '@' . $_SERVER['SERVER_NAME'] . "\n"
. 'Content-type: text/plain; charset=UTF-8' . "\n"
. 'Content-transfer-encoding: 8bit' );
send_register_open_eml(
$user['email'],
$a->config['sitename'],
$a->get_baseurl(),
$user['username'],
$result['password']);
if($res) {

View file

@ -1,6 +1,6 @@
<?php
require_once('include/email.php');
require_once('include/enotify.php');
function user_allow($hash) {
@ -41,21 +41,12 @@ function user_allow($hash) {
push_lang($register[0]['language']);
$email_tpl = get_intltext_template("register_open_eml.tpl");
$email_tpl = replace_macros($email_tpl, array(
'$sitename' => $a->config['sitename'],
'$siteurl' => $a->get_baseurl(),
'$username' => $user[0]['username'],
'$email' => $user[0]['email'],
'$password' => $register[0]['password'],
'$uid' => $user[0]['uid']
));
$res = mail($user[0]['email'], email_header_encode( sprintf(t('Registration details for %s'), $a->config['sitename']), 'UTF-8'),
$email_tpl,
'From: ' . 'Administrator' . '@' . $_SERVER['SERVER_NAME'] . "\n"
. 'Content-type: text/plain; charset=UTF-8' . "\n"
. 'Content-transfer-encoding: 8bit' );
send_register_open_eml(
$user[0]['email'],
$a->config['sitename'],
$a->get_baseurl(),
$user[0]['username'],
$register[0]['password']);
pop_lang();