ThWboard Support-Forum (Archiv)

Ort: / Boardübersicht / English support board / English thwboard283


Seite 1 von 1

fingers schrieb am 01.12.2003 um 12:30 Uhr

Ive put together an english translation of 283 upto todays date CSV. It has no extras just a direct translation and will send to anyone interested
dave

Hockey007 schrieb am 02.12.2003 um 14:52 Uhr

me me ! :P

fingers schrieb am 02.12.2003 um 15:25 Uhr

Hockey007
have sent zip to you registered address
if you have installed original 283 then just copy over all files xcept config
dave

fingers schrieb am 03.12.2003 um 04:13 Uhr

I have created a couple of redirector php files that should allow a simple multilanguage site ( using two sets of files but the same database, so no it doesnt translate the posts only the forum interface but it would be easy to use 2 databases for complete seperation)
in requires the config.inc.php file to be copied after install to the other languages install

I have it installed in this way,
/root/thwb/(then the seperate language files folder)
ie http://www.site.root/thwb/283e/englishTransFiles
and
http://www.site.root/thwb/283d/Deutschfiles

and the two files (in the thwb folder) are
index.php

<HTML>
<HEAD>
<title>4Ts Forum Selector</title>
<meta http-equiv="expires" content="0">
<style type="text/css">
  a:link         { color#c6241c; text-decoration: none }
  a:visited      { color:#c6241c; text-decoration: none }
  a:active       { color:#c6241c; text-decoration: none }
  a:hover        { color:#990000; text-decoration: none }

  a.bglink:link    { color:#FFFFFF; text-decoration: underline}
  a.bglink:visited { color:#FFFFFF; text-decoration: underline}
  a.bglink:active  { color:#FFFFFF; text-decoration: underline}
  a.bglink:hover   { color:#FFFFFF; text-decoration: none }

  a.hefo:link    { color:#ECECEC; text-decoration: underline}
  a.hefo:visited { color:#ECECEC; text-decoration: underline}
  a.hefo:active  { color:#ECECEC; text-decoration: underline}
  a.hefo:hover   { color:#ECECEC; text-decoration: none }

  .tbinput     { font-family: Verdana; font-size: 8pt; background-color: #eeeeee }
  .tbbutton     { font-family: Verdana; font-size: 8pt }
  .tbselect    { font-family: Verdana; font-size: 8pt; background-color: #eeeeee }
  .tbtextarea  { font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 10pt; background-color: #eeeeee }

  .smaller input, .smaller select {font-size: 85%;}
  .smtbbutton { font-family: Verdana; font-size: 5pt }

</style>
  <SCRIPT LANGUAGE="JavaScript1.2">
<!-- Begin
if (navigator.appName == 'Netscape')
var language = navigator.language;
else
var language = navigator.browserLanguage;

/*-------------------------------------------------------------
Netscape instructions:  
In Netscape, find the language you want to redirect by going to

Edit Menu --> Preferences...

Then click the '+' box next to 'Navigator' and click 'Languages'
Click 'Add' then find the languages you want and add them below.

---------------------------------------------------------------

Microsoft Internet Explorer instructions:  
In MSIE, find the language you want to redirect by going to

Tools Menu --> Internet Options...

Then click the 'Languages' button near the bottom of the page.
Click 'Add' then find the languages you want and add them below.

-------------------------------------------------------------*/

if (language.indexOf('en') > -1) document.location.href = './283e/';
else if (language.indexOf('nl') > -1) document.location.href = './283e/';
else if (language.indexOf('fr') > -1) document.location.href = './283e/';
else if (language.indexOf('de') > -1) document.location.href = './283d/';
else if (language.indexOf('ja') > -1) document.location.href = './283e/';
else if (language.indexOf('it') > -1) document.location.href = './283e/';
else if (language.indexOf('pt') > -1) document.location.href = './283e/';
else if (language.indexOf('es') > -1) document.location.href = './283e/';
else if (language.indexOf('sv') > -1) document.location.href = './283e/';
else if (language.indexOf('zh') > -1) document.location.href = './283e/';
else 
document.location.href = './283e/';
// End -->
</script>

</HEAD>
<body bgcolor="#454545" text="#FFFFFF">
      <table width="100%" border="0" cellspacing="1" cellpadding="3">
        <tr bgcolor="#FF0000"> <TD><B><font face="Tahoma, Helvetica" color="#ECECEC" size="4"><center>4Ts Redirector</center></font></B></TD></TR>
        <TR bgcolor="#121212"><TD>
<B>  <font face="Verdana, Helvetica">
If the browser was not automatically redirected please, <br>
Select your desired Language and Click Go!<br> </font>
</B><font face="Verdana, Helvetica" size="2">
<FORM method="POST" action="do_redirect.php">

<P>Send me to:

<SELECT name="location">
<option value="./283e/index.php">English
<option value="./283d/index.php">German
<option value="./283e/index.php">French
<option value="./283e/index.php">Italian
<option value="./283e/index.php">Spanish
</SELECT>

<INPUT type="submit" name="submit" value="Go!">

</form> </font>
</TD></TR><tr bgcolor="#DADADA"><TD><font face="Verdana, Helvetica" size="3">
<a href="./index.php">Reload</a>  </font>
</TD></TR></TABLE>
</BODY></HTML>

and do_redirect.php

<?php

if ($location == "") {
header("Location: index.php");
exit;
} else {
header("Location: $location");
exit;
}

?>

if anyone interested
ps its a simple solution!

fingers schrieb am 03.12.2003 um 15:12 Uhr

edited

fingers schrieb am 06.12.2003 um 00:42 Uhr

edited

fingers schrieb am 02.01.2004 um 19:05 Uhr

a quick fix to calendar not showing any tags in 283 is to add a function such as

function bbcode2html($message) {
  $preg = array(
    '/\[color="([a-zA-Z0-9# ]+)"\](.*)\[\/color\]/Uis'        => "<span style=\"color:\\1\">\\2</span>",
    '/\[face=\"([a-zA-Z0-9# ]+)\"\](.*)\[\/face\]/Uis'        => "<font face=\"\\1\">\\2</font>",
    '/\[b\](.*)\[\/b\]/Uis'                                   => "<b>\\1</b>",
    '/\[i\](.*)\[\/i\]/Uis'                                   => "<i>\\1</i>",
    '/\[u\](.*)\[\/u\]/Uis'                                   => "<u>\\1</u>",
    '/\[-\](.*)\[\/-\]/Uis'                                   => "<s>\\1</s>",
    '/\[glow="*([a-zA-Z0-9# ]{7,7}) *,* *([0-9]*)"\](.*)\[\/glow\]/Usi'          =>"<span style=\"height=1px; filter:Glow(color= \\1, strength= \\2)\">\\3</span>"
  );
  $message = preg_replace(array_keys($preg), array_values($preg), $message);
  return $message;
}

and changing the line

$calendar['eventtext'] = parse_code($calendar['eventtext'], 1);

to

$calendar['eventtext'] = bbcode2html($calendar['eventtext'], 1);

in showevent.php
it might not be secure i dont know but it maybe a starting point for someone else

edit: as shown below dont use this idea!!!

theDon schrieb am 03.01.2004 um 15:55 Uhr

$calendar['eventtext'] = parse_code($calendar['eventtext'], 1, 1, 1);

is the `official' fix. ;)

fingers schrieb am 04.01.2004 um 03:29 Uhr

thanx!
is there also a way to get smilies working in the view as well?
dave

theDon schrieb am 04.01.2004 um 04:19 Uhr

$calendar['eventtext'] = parse_code($calendar['eventtext'], 1, 1, 1, 1);

would do it.

fingers schrieb am 04.01.2004 um 04:26 Uhr

thanks again :)
a quick question. Is this not standard for thwb?
dave

theDon schrieb am 04.01.2004 um 05:01 Uhr

official solution for upcoming 2.84 is: thwbcode, no smilies.

fingers schrieb am 04.01.2004 um 10:39 Uhr

i had some major problems with the CVS latest changes to header.inc.php with both the Style <span> changes and the session changes neither worked for me, did all changes in all files! even the change change again in thwbcode.inc.php


All the other CVS file changes have not caused probs! just the header.inc.php lossing sessions and not having the <span> recognised
dave

MrNase schrieb am 04.01.2004 um 12:15 Uhr

We made changes to the header.inc.php because we re-worked the templates to get rid of the <font>-Tags.

Seite 1 von 1