Go Back   vb.org Archive > vBulletin Modifications > vBulletin 4.x Modifications > vBulletin 4.x Add-ons
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Nexia's Language Driven Forum Details »»
Nexia's Language Driven Forum
Version: 1.0.0, by vbenhancer vbenhancer is offline
Developer Last Online: Nov 2012 Show Printable Version Email this Page

Category: Forum Display Enhancements - Version: 4.x.x Rating:
Released: 09-04-2012 Last Update: 09-04-2012 Installs: 9
DB Changes Uses Plugins Template Edits
Code Changes  
No support by the author.

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: https://vborg.vbsupport.ru/showthread.php?t=230899

Download Now

File Type: zip nex_lang_driven_forum.zip (25.7 KB, 30 views)

Screenshots

File Type: jpg nex_lang_driven_admin_view_admincp.jpg (7.1 KB, 0 views)
File Type: jpg nex_lang_driven_admincp.jpg (38.0 KB, 0 views)
File Type: jpg nex_lang_driven_reg_four.jpg (76.0 KB, 0 views)
File Type: jpg nex_lang_driven_reg_three.jpg (68.3 KB, 0 views)
File Type: jpg nex_lang_driven_usercp_four.jpg (61.5 KB, 0 views)
File Type: jpg nex_lang_driven_usercp_three.jpg (49.7 KB, 0 views)
File Type: jpg nex_lang_driven_admin_view_forumlist.jpg (20.7 KB, 0 views)

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.
Благодарность от:
sweetpotato

Comments
  #2  
Old 09-05-2012, 03:42 PM
vbenhancer's Avatar
vbenhancer vbenhancer is offline
 
Join Date: Dec 2009
Location: Qu?bec city, Canada
Posts: 740
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

The release indicate "not supported"...

for official support, follow the link in my signature!
Reply With Quote
  #3  
Old 09-05-2012, 05:07 PM
Scanu's Avatar
Scanu Scanu is offline
 
Join Date: Nov 2010
Posts: 829
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Good work! Really a useful mod
Reply With Quote
  #4  
Old 09-06-2012, 01:13 PM
sweetpotato sweetpotato is offline
 
Join Date: Oct 2010
Posts: 239
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Great Work! This is really useful for my site which has multi-language forums. Rated for 5 stars and nominated MOTM.
Thank you so much,
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 10:36 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.03650 seconds
  • Memory Usage 2,288KB
  • Queries Executed 18 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (4)bbcode_php
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (4)navbar_link
  • (120)option
  • (4)post_thanks_box
  • (1)post_thanks_box_bit
  • (4)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (1)post_thanks_postbit
  • (4)post_thanks_postbit_info
  • (3)postbit
  • (8)postbit_attachment
  • (4)postbit_onlinestatus
  • (4)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • fetch_musername
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • post_thanks_function_fetch_thanks_bit_start
  • post_thanks_function_show_thanks_date_start
  • post_thanks_function_show_thanks_date_end
  • post_thanks_function_fetch_thanks_bit_end
  • post_thanks_function_fetch_post_thanks_template_start
  • post_thanks_function_fetch_post_thanks_template_end
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_attachment
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete