Previous Thread
Next Thread
Print Thread
Rate Thread
Joined: Dec 2000
Posts: 1,471
Addict
Addict
Offline
Joined: Dec 2000
Posts: 1,471
I'm running a german board so i noticed that parts of the postlist.php aren't translated. phrases aren't put in the language files but hardcoded in the postlist.php or postlist.tmpl. I modified the files so that you can use them with all languages.
Add in all languages to the file postlist.php:
code:

$ubbt_lang['FORUM_MODS'] = "Moderators";
$ubbt_lang['FORUM_ONLINE'] = "registered and";
$ubbt_lang['FORUM_ONLINE2'] = "anonymous users browse this forum";
$ubbt_lang['B_PERM'] = "Permissions";


Note: i didn't use $ubbt_lang['USER_MOD'] from generic.php because that one is singular and we have more than one moderator on each board, so we needed the plural.

Edit in postlist.php

line 278 change:
// Let's see if the can post or reply
$replyperm = "You cannot reply to topics";
$writeperm = "You cannot start new topics";

for ($i=0; $i<$gsize; $i++) {
if (ereg("-$Grouparray[$i]-",$CanReply) ) {
$replyperm = "You can reply to topics";
$canreply = 1;
}
if (ereg("-$Grouparray[$i]-",$CanWrite) ) {
$writeperm = "You can start new topics";
$canwrite = 1;
}
if (($canwrite) && ($canreply)) {
break;
}
}

if ($Markup == "On") {
$ubbcode = "UBBCode is enabled";
}
else {
$ubbcode = "UBBCode is disabled";
}
if ($HTML == "On") {
$htmlcode = "HTML is enabled";
}
else {
$htmlcode = "HTML is disabled";
}




to:
// Let's see if the can post or reply
$replyperm = "{$ubbt_lang['CANTREPLY']}";
$writeperm = "{$ubbt_lang['CANTWRITE']}";

for ($i=0; $i<$gsize; $i++) {
if (ereg("-$Grouparray[$i]-",$CanReply) ) {
$replyperm = "{$ubbt_lang['CANWRITE']}";
$canreply = 1;
}
if (ereg("-$Grouparray[$i]-",$CanWrite) ) {
$writeperm = "{$ubbt_lang['CANREPLY']}";
$canwrite = 1;
}
if (($canwrite) && ($canreply)) {
break;
}
}

if ($Markup == "On") {
$ubbcode = "${ubbt_lang['UBBCODE']} {$ubbt_lang['ENABLED']}";
}
else {
$ubbcode = "{$ubbt_lang['UBBCODE']} {$ubbt_lang['DISABLED']}";
}
if ($HTML == "On") {
$htmlcode = "{$ubbt_lang['HTMLIS']} {$ubbt_lang['ENABLED']}";
}
else {
$htmlcode = "{$ubbt_lang['HTMLIS']} {$ubbt_lang['DISABLED']}";
}






Edit in postlist.tmpl

Change line 183 from:
$r registered and $a anonymous users are browsing this forum

to:
$r {$ubbt_lang['FORUM_ONLINE']} $a {$ubbt_lang['FORUM_ONLINE2']}

change line 186 from:
{$ubbt_lang['USER_MOD']}: $modlist

to:
{$ubbt_lang['FORUM_MODS']}: $modlist

change line 194 from:
<b>Permissions</b>

to:
<b>{$ubbt_lang['B_PERM']}</b>

change line 211 from:
<b>Legend</b>

to:
<b>{$ubbt_lang['LEGEND']}</b>

change line 215 from:
New posts

to:
{$ubbt_lang['L_NEW']}

change line 219 from:
No new posts

to:
{$ubbt_lang['L_NONEW']}

DONE

Sponsored Links
Joined: Dec 2000
Posts: 1,471
Addict
Addict
Offline
Joined: Dec 2000
Posts: 1,471
i noticed that this also occurs in showflat and showthreaded so that it would be better to put the put the language tags in generic.php.
I'll post the changes for the other 2 files tomorrow.

Joined: May 1999
Posts: 3,039
Guru
Guru
Offline
Joined: May 1999
Posts: 3,039
Whoops. Had it hardcoded when I was developing and forgot to put it into the language files. Thanks for the fix.


UBB.threads Developer
Joined: Dec 2000
Posts: 1,471
Addict
Addict
Offline
Joined: Dec 2000
Posts: 1,471
So, i changed showflat.tmpl and shwothreaded.tmpl aswell.
Important: If you followed the instructions above you'll have to move:
code:
$ubbt_lang['FORUM_MODS'] = "Moderators";
$ubbt_lang['FORUM_ONLINE'] = "registered and";
$ubbt_lang['FORUM_ONLINE2'] = "anonymous users browse this forum";
$ubbt_lang['B_PERM'] = "Permissions";


from postlist.php to generic.php, because we need them in several templates. All other changes are from the posting above are correct, so i won't repost them here.
Here we go for the rest:

showthreaded.tmpl
change line 275 from:
$r registered and $a anonymous users are browsing this forum

to:
$r {$ubbt_lang['FORUM_ONLINE']} $a {$ubbt_lang['FORUM_ONLINE2']}

change line 277 from:
{$ubbt_lang['USER_MOD']}: $modlist

to:
{$ubbt_lang['FORUM_MODS']}: $modlist

change line 284 from:
<b>Permissions</b>

to:
<b>{$ubbt_lang['B_PERM']}</b>

showflat.tmpl

change line 286 from:
$r registered and $a anonymous users are browsing this forum

to:

change line 288 from:
{$ubbt_lang['USER_MOD']}: $modlist

to:
{$ubbt_lang['FORUM_MODS']}: $modlist

change line 298 from:
<b>Permissions</b>

to:
<b>{$ubbt_lang['B_PERM']}</b>

DONE


Link Copied to Clipboard
Donate Today!
Donate via PayPal

Donate to UBBDev today to help aid in Operational, Server and Script Maintenance, and Development costs.

Please also see our parent organization VNC Web Services if you're in the need of a new UBB.threads Install or Upgrade, Site/Server Migrations, or Security and Coding Services.
Recommended Hosts
We have personally worked with and recommend the following Web Hosts:
Stable Host
bluehost
InterServer
Visit us on Facebook
Member Spotlight
hatter
hatter
USA
Posts: 69
Joined: January 2001
Forum Statistics
Forums63
Topics37,573
Posts293,925
Members13,849
Most Online5,166
Sep 15th, 2019
Today's Statistics
Currently Online
Topics Created
Posts Made
Users Online
Birthdays
Top Posters
AllenAyres 21,079
JoshPet 10,369
LK 7,394
Lord Dexter 6,708
Gizmo 5,833
Greg Hard 4,625
Top Posters(30 Days)
Top Likes Received
isaac 82
Gizmo 20
Brett 7
WebGuy 2
Morgan 2
Top Likes Received (30 Days)
None yet
The UBB.Developers Network (UBB.Dev/Threads.Dev) is ©2000-2024 VNC Web Services

 
Powered by UBB.threads™ PHP Forum Software 8.0.0
(Preview build 20221218)