 |
 |
 |
 |
#217147 - 06/03/02 04:27 PM
Re: PM on moved thread hack
[Re: -Fusion-]
|
Enthusiast
Registered: 01/17/01
Posts: 449
|
Hi Asteran,<br />thanks for the new version. It's getting pretty cool.<br /><br />You have some Denglish (German/English mix) in it, did you realize that? <img src="/forum/images/icons/wink.gif" alt="" /><br /><br />By the way, I tried to find a way to address a user in their language, as I am running a bi-langual website. In your code I changed this:<br /> [:"green"]<br />$Sender = $user['U_Username'];<br /> $To = $poster;<br /> <br /> //Hack in Hack, additionally: Language!<br /> If ($Sprache == "German") {<br /> <br /> if ($Reason != "") {<br /> $Message2 ="<br /><br />Anmerkung: <br><br> $Reason";<br /> }<br /> $Subject = "Dein Thread \"$mSubject\" wurde verschoben.";<br /> $mess = "Dein Thread \"$mSubject\" wurde von \"$boardin\" in's \"$boardm\" Board verchoben. Der Thread kann jetzt <br /> <a href=\"$config[phpurl]/showthreaded.php?Cat=$Cat&Board=$Keyword_q&Number=$number\">hier</a> gefunden werden.$Message2";<br /> <br /> } else {<br /> <br /> if ($Reason != "") {<br /> $Message2 ="<br /><br />Annotation: <br><br> $Reason";<br /> }<br /> $Subject = "Your thread \"$mSubject\" has been moved";<br /> $mess = "Your thread \"$mSubject\" has been moved from \"$boardin\" to \"$boardm\". The thread can be found<br /> <a href=\"$config[phpurl]/showthreaded.php?Cat=$Cat&Board=$Keyword_q&Number=$number\">here</a>.$Message2";<br /><br /> }<br /> // End Hack in Hack<br /> $html -> send_message ($Sender,$To,$Subject,$mess);<br /> [/]<br /><br />How to I get the variable $Sprache?<br />On the admin part, I added a selection. So the admin, while moving the thread, decides in what language he wants to address the user with the "reason":<br /><br /> [:"green"]<br /> echo "</br /></br /><br /> <p><b>Automatic Info-Message to the user who started the thread: </b></p><br /> <p> <br /> a) Choose language of the User: <i><input type=\"radio\" name=\"Sprache\" value=\"German\" checked=\"checked\" border=\"0\" />German <input type=\"radio\" name=\"Sprache\" value=\"English\" border=\"0\" />English</i><br /> </p><p> <br /> b) Give a reason (optional): <input type=\"text\" name=Reason size=\"24\" border=\"0\" class=\"formboxes\" /><br /> </p> <br /> "; <br /> [/]<br /><br /><br />But there is probably a better way: to pick the stored language-variable for each user from the database.<br />But I am not so good in MySQL so I did it the other way.<br /><br />If you like the idea, you will probably come up with a better solution, I'm sure <img src="/forum/images/icons/wink.gif" alt="" /><br /><br />
_________________________
Carl Colour-Ize-Forums (test entry: user: 'test' pw: 'test2')
|
|
Top
|
|
|
|
 |
 |
 |
 |
|
|