packages: phorum/translate-macros.patch - update other macros

glen glen at pld-linux.org
Wed Nov 3 17:47:39 CET 2010


Author: glen                         Date: Wed Nov  3 16:47:39 2010 GMT
Module: packages                      Tag: HEAD
---- Log message:
- update other macros

---- Files affected:
packages/phorum:
   translate-macros.patch (1.3 -> 1.4) 

---- Diffs:

================================================================
Index: packages/phorum/translate-macros.patch
diff -u packages/phorum/translate-macros.patch:1.3 packages/phorum/translate-macros.patch:1.4
--- packages/phorum/translate-macros.patch:1.3	Thu Oct 21 23:55:52 2010
+++ packages/phorum/translate-macros.patch	Wed Nov  3 17:47:34 2010
@@ -3,22 +3,8 @@
 - $PHORUM['file_space_quota'] -> %file_space_quota%
 - str_replace(";", ", ", $PHORUM['file_types']) -> %file_types%
 - $PHORUM['max_file_size'] -> %max_file_size%
-
-still todo:
 - $PHORUM[title] -> %phorum_title%
-        "EmailVerifyBody"       =>
-        "LostPassEmailSubject"  =>
-        "LostPassEmailBody1"    =>
-        "LostPassEmailBody2"    =>
-        "PMNotifyMessage"       =>
-        "PMNotifySubject"       =>
-        "RegApprovedEmailBody"  =>
-        "VerifyRegEmailBody1"   =>
-        "VerifyRegEmailBody2"   =>
 - phorum_get_url(PHORUM_LOGIN_URL) -> %login_url%
-        "LostPassEmailBody2"    =>
-        "RegApprovedEmailBody"  =>
-        "VerifyRegEmailBody2"   =>
 
 --- phorum-5.2.15a/include/api/file.php	2010-10-22 00:35:13.428590924 +0300
 +++ phorum-5.2.15a/include/api/file.php	2010-10-22 00:46:32.460815378 +0300
@@ -73,3 +59,81 @@
  }
  
  if($PHORUM["file_space_quota"]){
+--- phorum-5.2.15a/include/email_functions.php~	2010-11-03 17:22:38.000000000 +0200
++++ phorum-5.2.15a/include/email_functions.php	2010-11-03 18:40:12.594189789 +0200
+@@ -280,6 +280,7 @@
+         "full_body"      => $message["message"],
+         "plain_body"     => wordwrap(phorum_strip_body($message["message"]),72),
+         "read_url"       => phorum_get_url_no_uri_auth(PHORUM_PM_URL, "page=read", "pm_id=" . $message["pm_message_id"]),
++        "phorum_title"   => $PHORUM['title'],
+ 
+         // For email_user_start.
+         "mailmessagetpl" => 'PMNotifyMessage',
+--- phorum-5.2.15a/include/controlcenter/users.php~	2010-11-03 17:22:37.000000000 +0200
++++ phorum-5.2.15a/include/controlcenter/users.php	2010-11-03 18:42:43.376258562 +0200
+@@ -51,6 +51,8 @@
+                 // send reg approved message
+                 $maildata["mailsubject"]=$PHORUM["DATA"]["LANG"]["RegApprovedSubject"];
+                 $maildata["mailmessage"]=wordwrap($PHORUM["DATA"]["LANG"]["RegApprovedEmailBody"], 72);
++                $maildata["login_url"]=phorum_get_url(PHORUM_LOGIN_URL);
++                $maildata["phorum_title"]=$PHORUM['title'];
+                 phorum_email_user(array($user["email"]), $maildata);
+                 
+             }
+--- phorum-5.2.15a/include/controlcenter/email.php~	2010-11-03 17:22:38.000000000 +0200
++++ phorum-5.2.15a/include/controlcenter/email.php	2010-11-03 18:23:56.130121394 +0200
+@@ -64,8 +64,9 @@
+             $conf_code= mt_rand ( 1000000, 9999999);
+             $_POST['email_temp']=$_POST['email']."|".$conf_code;
+             // ... send email ... //
++            $email_message = str_replace("%phorum_title%",  $PHORUM['title'], $PHORUM['DATA']['LANG']['EmailVerifyBody']);
+             $maildata=array(
+-                'mailmessage'   => wordwrap($PHORUM['DATA']['LANG']['EmailVerifyBody'], 72),
++                'mailmessage'   => wordwrap($email_message, 72),
+                 'mailsubject'   => $PHORUM['DATA']['LANG']['EmailVerifySubject'],
+                 'uname'         => $PHORUM['DATA']['PROFILE']['username'],
+                 'newmail'       => $_POST['email'],
+--- phorum-5.2.15a/htdocs/login.php	2010-11-03 18:26:22.469689876 +0200
++++ phorum-5.2.15a/htdocs/login.php	2010-11-03 18:34:26.970474420 +0200
+@@ -169,11 +169,16 @@
+ 
+                 // Mail the new confirmation code to the user.
+                 $verify_url = phorum_get_url(PHORUM_REGISTER_URL, "approve=".$tmp_user["password_temp"]."$uid");
++                $replace = array(
++                    "%phorum_title%" => $PHORUM['title'],
++                    "%login_url%" => phorum_get_url(PHORUM_LOGIN_URL),
++                );
++
+                 $maildata["mailsubject"] = $PHORUM["DATA"]["LANG"]["VerifyRegEmailSubject"];
+                 $maildata["mailmessage"] =
+-                   wordwrap($PHORUM["DATA"]["LANG"]["VerifyRegEmailBody1"],72).
++                   wordwrap(str_replace(array_keys($replace), array_values($replace), $PHORUM["DATA"]["LANG"]["VerifyRegEmailBody1"]),72).
+                    "\n\n$verify_url\n\n".
+-                   wordwrap($PHORUM["DATA"]["LANG"]["VerifyRegEmailBody2"],72);
++                   wordwrap(str_replace(array_keys($replace), array_values($replace), $PHORUM["DATA"]["LANG"]["VerifyRegEmailBody2"]),72);
+                 phorum_email_user(array($user["email"]), $maildata);
+ 
+                 $okmsg = $PHORUM["DATA"]["LANG"]["RegVerifyEmail"];
+@@ -199,14 +204,19 @@
+                 // Mail the new password.
+                 $user = phorum_api_user_get($uid);
+                 $maildata = array();
++                $replace = array(
++                    "%phorum_title%" => $PHORUM['title'],
++                    "%login_url%" => phorum_get_url(PHORUM_LOGIN_URL),
++                );
++
+                 $maildata['mailmessage'] =
+-                   wordwrap($PHORUM["DATA"]["LANG"]["LostPassEmailBody1"],72).
++                   wordwrap(str_replace(array_keys($replace), array_values($replace), $PHORUM["DATA"]["LANG"]["LostPassEmailBody1"]),72).
+                    "\n\n".
+                    $PHORUM["DATA"]["LANG"]["Username"] .": $user[username]\n".
+                    $PHORUM["DATA"]["LANG"]["Password"] .": $newpass".
+                    "\n\n".
+-                   wordwrap($PHORUM["DATA"]["LANG"]["LostPassEmailBody2"],72);
+-                $maildata['mailsubject'] = $PHORUM["DATA"]["LANG"]["LostPassEmailSubject"];
++                   wordwrap(str_replace(array_keys($replace), array_values($replace), $PHORUM["DATA"]["LANG"]["LostPassEmailBody2"]),72);
++                $maildata['mailsubject'] = str_replace(array_keys($replace), array_values($replace), $PHORUM["DATA"]["LANG"]["LostPassEmailSubject"]);
+                 phorum_email_user(array( 0 => $user['email'] ), $maildata);
+ 
+                 $okmsg = $PHORUM["DATA"]["LANG"]["LostPassSent"];
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/phorum/translate-macros.patch?r1=1.3&r2=1.4&f=u



More information about the pld-cvs-commit mailing list