Back to vBulletin 4.x Add-ons

Nexia's Language Driven Forum
Mod Version: 1.0.0, by vbenhancer

vB Version: 4.x.x Rating: (2 votes - 5.00 average) Installs: 9
Released: 05 Sep 2012 Last Update: 05 Sep 2012 Downloads: 28
Not Supported DB Changes Uses Plugins Template Edits Code Changes  

Nexia's Language Driven Forum:

some features:

detect browser language for new visitors *(not regulars, just for first visit)
apply browser language when possible
or default language - will not show other languages
need to choose a language in the language selector to change it!

language selection at registration.
default will be the board's default language.
if the guest have selected a language in the past, that language will be the default.

language forcing in usercp, below the language selection in options page.
will let the user select if he/she wants to see forums that are in other languages.

admincp to select what language a forum will be applyed on.
admincp to select if that language will be forced, so only the members with that language will see.
admincp is inheriting the setting of their parent forum by default.

forums with no language selected are considered displayed to all, overpassing the settings.

sub-forums of a forced language inherit the parent's status
if the parent is hidden because of choices, the subforums do not show - logic!

---- in the screenshots below, you see the forums with language indicators, the "fr", "en", etc... instead of them being hidden... that's the ADMIN side of things, where you, as an admin, see the forums, with the right indicators... it helps navigate thru the forum. as a user, you do not see the forums you're not supposed to see...

######################################################################### STEP 1
What To do to install:

1- UPLOAD via FTP to the root path of your vBulletin forum the files and folders in their originate structure from the folder "UPLOAD_THIS"

2- IMPORT the PRODUCT file included in the "IMPORT_PRODUCT" folder.
take the file with a _three extention for your vBulletin 3.x installation, the _four one for your vB 4.x...

You also need to edit one file at least, via ftp with your code editor - ask a pro if you have no idea what to do!

######################################################################### STEP 2
FILE EDIT:

in the file /includes/functions_forumlist.php

THREE TIME IN THAT FILE YOU WILL FIND:
in vB 3.x: line 53, 177, 481
in vB 4.x: line 67, 201, 544

PHP Code:
$forum $vbulletin->forumcache["$forumid"]; 

EACH TIME, BELOW THAT LINE, ADD THIS BLOCK OF CODE:

PHP Code:
### nexia's lang driven forums
if($forum['languagecode'] AND !($vbulletin->userinfo['permissions']['adminpermissions'] & $vbulletin->bf_ugp_adminpermissions['cancontrolpanel']))
{
    if(
$forum['languagecode_forced'] AND ($forum['languagecode'] != $vbulletin->userinfo['languagecode'])) continue;
    if(
$vbulletin->userinfo['languagecode_forced'] AND ($forum['languagecode'] != $vbulletin->userinfo['languagecode'])) continue;
}
### / nexia's lang driven forums 

######################################################################### STEP 3
optionally, as an admin, if you want to see the different languageid for each forum in the Forum Aanager, do this:

in admincp/forum.php

around line (622 in vB 3.x), (679 in vB 4.x)

FiND (inside the line):

PHP Code:
iif(!empty($forum['password']),'*'
REPLACE WITH:

PHP Code:
iif(!empty($forum['password']),'*') . ($forum['languagecode'] ? ' <span class="smallfont time" style="font-style:italic;"> ' $forum['languagecode'] . ($forum['languagecode_forced'] ? '*' '') . '</span> ' ''
############################################################################ END

Now you go edit your forums in the Forum Manager, in the bottom of the page of each forum, you can choose the language etc...

for other languages, you can import your translations in the Phrases Manager ... see the folder for additional languages when available!

>> by default, vBulletin store its languages by ID, which is based on database entry, and not any identification of language... so if you delete a language and reimport it, it will have a different ID even if it's language code is the same... how problematic if you code for specific languages...

so this script add the languagecode field in the database so we do not have to check every time to see if it is the right language.

vB 3.x version is still available here: Language Driven Forums

Download

File Type: %1$s nex_lang_driven_forum.zip (25.7 KB, 32 downloads)

Screenshots

Click image for larger version
Name:	nex_lang_driven_admin_view_admincp.jpg
Views:	77
Size:	7.1 KB
ID:	141033   Click image for larger version
Name:	nex_lang_driven_admincp.jpg
Views:	85
Size:	38.0 KB
ID:	141034   Click image for larger version
Name:	nex_lang_driven_reg_four.jpg
Views:	83
Size:	76.0 KB
ID:	141035   Click image for larger version
Name:	nex_lang_driven_reg_three.jpg
Views:	75
Size:	68.3 KB
ID:	141036  

Click image for larger version
Name:	nex_lang_driven_usercp_four.jpg
Views:	65
Size:	61.5 KB
ID:	141037   Click image for larger version
Name:	nex_lang_driven_usercp_three.jpg
Views:	68
Size:	49.7 KB
ID:	141038   Click image for larger version
Name:	nex_lang_driven_admin_view_forumlist.jpg
Views:	105
Size:	20.7 KB
ID:	141039  

Similar Mods

Mini Mods Set forum-language automatic to browser-language for first-time-visitors vBulletin 4.x Add-ons
End-User Options Language Driven Forums vBulletin 3.8 Add-ons
Extra page driven by forum templates vBulletin 2.x Full Releases

vblts.ru supports vBulletin®, 2022-2024