This topic is locked

Text in remind.php

10/9/2008 6:07:59 AM
PHPRunner General questions
S
shoppy author

Hi all,
This should be as simple as one and one. <img src='https://asprunner.com/forums/file.php?topicimage=1&fieldname=question&id=9785&image=1&table=forumtopics' class='bbc_emoticon' alt='B)' />

But I cannot find where I can change the text that is send to someone who forgot his password and/or login.
The text is in Englisch and I like to change it in Dutch.
Where can I change it????
thanks,
John

J
Jane 10/10/2008

John,
edit generated remind.php file for this purpose.

S
shoppy author 10/10/2008

Dear Jane,
Here you seen my remind.php

But nowhere I can change:

"Password reminder

You asked to remind your username and password at ....."
Where do I change this? I looked everywhere.
[codebox]<?php

ini_set('SMTP','post.demon.nl');

ini_set("display_errors","1");

ini_set("display_startup_errors","1");

set_magic_quotes_runtime(0);
include("include/dbcommon.php");

include("include/languages.php");
$cEmailField = "email";

$reminded=false;

$strSearchBy="username";
include('libs/Smarty.class.php');

$smarty = new Smarty();
$strUsername="";

$strEmail="";

$strMessage="";
$conn=db_connect();

// Before Process event

if(function_exists("BeforeProcessRemindPwd"))

BeforeProcessRemindPwd($conn);
if (@$_POST["btnSubmit"] == "Remind")

{
$strSearchBy=$_POST["searchby"];

$strUsername=refine(@$_POST["username"]);

$strEmail=refine(@$_POST["email"]);
$rstemp=db_query("select * from `_klant` where 1=0",$conn);
$tosearch=false;

if($strSearchBy!="email")

{

$value=$strUsername;

if((string)$value!="")

$tosearch=true;

if(FieldNeedQuotes($rstemp,$cUserNameField))

$value="'".db_addslashes($value)."'";

else

$value=(0+$value);

$sWhere=AddFieldWrappers($cUserNameField)."=".$value;

}

else

{

$value=$strEmail;

if((string)$value!="")

$tosearch=true;

if(FieldNeedQuotes($rstemp,$cEmailField))

$value="'".db_addslashes($value)."'";

else

$value=(0+$value);

$sWhere=AddFieldWrappers($cEmailField)."=".$value;

}
if($tosearch && function_exists("BeforeRemindPassword"))

$tosearch = BeforeRemindPassword($strUsername,$strEmail);
if($tosearch)

{

$strSQL="select ".AddFieldWrappers($cUserNameField).",".AddFieldWrappers($cPasswordField).",".AddFieldWrappers($cEmailField)." from `_klant` where ".$sWhere;

$rs=db_query($strSQL,$conn);

if($data=db_fetch_numarray($rs))

{

$password=$data[1];

$url = "http://".$_SERVER["SERVER_NAME";];

if($_SERVER["SERVER_PORT"]!=80)

$url.=":".$_SERVER["SERVER_PORT"];

$url.=$_SERVER["SCRIPT_NAME"];

$message=mlang_message("REMIND_MAIL1")."\r\n";

$message.=mlang_message("REMIND_MAIL2")." ".$url."\r\n";

$message.=mlang_message("USERNAME").": ".$data[0]."\r\n";

$message.=mlang_message("PASSWORD").": ".$password."\r\n";

mail($data[2],mlang_message("REMIND_MAIL1"),$message);

$reminded=true;

if(function_exists("AfterRemindPassword"))

AfterRemindPassword($strUsername,$strEmail);

if($strSearchBy!="email")

$smarty->assign("params","username=".rawurlencode($strUsername));

$smarty->display("remind_success.htm");

return;

}

}

if(!$reminded)

{

if($strSearchBy!="email")

$strMessage=mlang_message("USER_NOREG1")." <i>".$strUsername."</i> ".mlang_message("USER_NOREG2");

else

$strMessage=mlang_message("EMAIL_DONT_EXIST");

}

}

$smarty->assign("strSearchBy","value=\"".$strSearchBy."\"");

if($strSearchBy=="username")

{

$smarty->assign("checked_username","checked");

$smarty->assign("checked_email","");

$smarty->assign("searchby_disabled","email");

}

else

{

$smarty->assign("checked_username","");

$smarty->assign("checked_email","checked");

$smarty->assign("searchby_disabled","username");

}

$smarty->assign("strUsername","value=\"".htmlspecialchars($strUsername)."\"");

$smarty->assign("strEmail","value=\"".htmlspecialchars($strEmail)."\"");

$smarty->assign("message",@$strMessage);
$templatefile="remind.htm";

if(function_exists("BeforeShowRemindPwd"))

BeforeShowRemindPwd($smarty,$templatefile);
$smarty->display($templatefile);

[/codebox]

J
Jane 10/13/2008

Hi,
open generated include/languages.php file, then find and edit following lines:

$mlang_messages["English"]["REMIND_MAIL1"] ...

...

$mlang_messages["English"]["REMIND_MAIL2"] ...

S
shoppy author 10/13/2008

Thanks Jane.
Works