Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 3.0 > vBulletin 3.0 Full Releases

Reply
 
Thread Tools
Language-selection for guest Details »»
Language-selection for guest
Version: 1.00, by JoergZ JoergZ is offline
Developer Last Online: Dec 2012 Show Printable Version Email this Page

Version: 3.0.0 Rating:
Released: 01-02-2004 Last Update: 03-08-2004 Installs: 58
Code Changes  
No support by the author.

PLEASE CLICK THE INSTALL BUTTON IF INSTALLED!


Hallo,

the vB3 offers the chance to have multi languages, but at the moment it is unfortunally only for registred / logged-in users possible to select a language. Guests / not logged-in users will see always the default language.


With this modification you can offer your guests / not-logged-in users an option to select a language, so they can see the forum and the registration in the selected language. Further the selected language will be set during the registratin as default for the new user.


Short-description

Language-Selection for not logged-in users


Requirements
  • vB3 RC1 or higher (Tested up to 3.0.7) NOTE !! For installation on 3.0.8 or above read this posting !! Thanks to Khashyar for finding this change !
  • Of cource more than one installed language, otherwise this modification make no sense
Installationtime

about 5 minutes


The use of this modification is as always at your own risk !


J?rg


Update 05. January 2004 (added version 2)

Update 09. March 2004 (added version 3)

Update 27. March 2004: Tested in 3.0.0 Gold



Version 1:

In this version you have to enter for each language a menue-entry manually

Version 2:

This version detects the selectable languages automaticly and the menue-entries are created automaticly too. To get the menue-entries, the function "Use DHTML Popup Menus" must be activated. This version has an additional query with each page-call. If you don't like this, use version 1.

Version 3:

This version is based on version 1, but it detects the browser-language automatic and shows the board in the language of the user. This automatic-detection of the user-language was realised by WildChild. Thanks for this extension of my hack. Note the difference to my version 2: My Version 2 detects the installed languages automatic, version 3 detects the language which is set in the users browser !



Note: A german version of the installation-instructions you will find here at vbulletin-germany.com

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #112  
Old 10-04-2005, 03:35 AM
JoergZ JoergZ is offline
 
Join Date: Jun 2002
Location: Germany
Posts: 127
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hej Fenriz !

Without looking to the code, I don't know how to do that. I am not at home this week, but I will have a look at this next weekend.

Best regards

Jörg
Reply With Quote
  #113  
Old 10-24-2005, 02:44 AM
Khashyar Khashyar is offline
 
Join Date: Jan 2003
Posts: 81
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hi JoergZ,

Thank you for working to create a great hack.

I tried to install it on my VB 3.0.8 board (which has 14 languages), and even though the URL reads correctly- for example: (http://russianmeetingplace.com/forum...stlanguageid=8) - the langauge does not change, and remains English.

I previously installed a hack ("language_per_forum_langforum_vb3.0.7") which forces each foreign language forum into it's specific language, and I wonder if that is interfering with this hack? It makes a change to the global file, which may overside the language selection in sessions.php?

Thanks for your thoughts,

Khashyar
Reply With Quote
  #114  
Old 10-24-2005, 05:10 AM
Khashyar Khashyar is offline
 
Join Date: Jan 2003
Posts: 81
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hi JoergZ,

Do you know whether your hack is compatible with Andreas' "Set language by Forum" hack (which sets a language to a forum by changing the global.php file, which I believe overrides your hack's language settings in sessions.php).

Thank you for any ideas as to how to allow both hacks to co-exist.

Khashyar
Reply With Quote
  #115  
Old 10-24-2005, 05:26 AM
JoergZ JoergZ is offline
 
Join Date: Jun 2002
Location: Germany
Posts: 127
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I will have a look at the other hack. But probably they are not working together.

BR

Jörg
Reply With Quote
  #116  
Old 10-24-2005, 05:30 AM
Khashyar Khashyar is offline
 
Join Date: Jan 2003
Posts: 81
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

That would be great if you had time to look at them....

The other hack really does not change that much code, but it certainly seems to be negating your hack (which I would love to install and use for my foreign language guests).

Khashyar
Reply With Quote
  #117  
Old 10-24-2005, 05:42 AM
Khashyar Khashyar is offline
 
Join Date: Jan 2003
Posts: 81
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hi J?rg,

I tried to reinstall your hack again, and it still is not working for me.

the link http://www.russianmeetingplace.com/f...stlanguageid=2 should change the language to German, but the language is remaining English.

This means that the language Id change is not being recognized or initiated by the seesions.php code.

I wonder why?

I will double-check the changes that I made to the sessions file...

Khashyar
Reply With Quote
  #118  
Old 10-24-2005, 06:08 AM
Khashyar Khashyar is offline
 
Join Date: Jan 2003
Posts: 81
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

The code seems to be o.k. in my sessions.php file.

I installed the browser detect version of your hack (version #3), if that makes any difference.

If you can help me make your hack work in my forum, I would really appreciate it.

Khashyar
Reply With Quote
  #119  
Old 10-24-2005, 06:23 AM
Khashyar Khashyar is offline
 
Join Date: Jan 2003
Posts: 81
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hello J?rg,

In the forum language select hack, there are a couple of code blocks that need moved around, but here is essentially what is added within the global.php file (if this helps you understand what might be the conflict) :

Quote:
// Fetch Language Override if specified
if ($foruminfo['languageid'] AND $foruminfo['languageid'] != $bbuserinfo['languageid'] AND $foruminfo['languageid'] != $vboptions['languageid'])
{
$language = $DB_site->query_first("SELECT languageid" . fetch_language_fields_sql(0) . " FROM " . TABLE_PREFIX . "language WHERE languageid = " . intval($foruminfo['languageid']));
$bbuserinfo = array_merge($bbuserinfo, $language);
I am assuming that I can post small blocks of codes from a hack, as long as the entire hack is not posted.

Thanks again for your help with this,

Khashyar
Reply With Quote
  #120  
Old 10-24-2005, 06:35 AM
Khashyar Khashyar is offline
 
Join Date: Jan 2003
Posts: 81
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I commented out the added code to global.php, and the guest registration hack was still not working, so there must be some other issue involved.

Also, I uninstalled the version 3 hack, and installed the version 1 of the hack, and it was still not displaying the correct languages.

However, when I go into my control panel and change a language used, I am able to do that and the language is visible.

Any ideas would be appreciated.

Thanks,

Khashyar
Reply With Quote
  #121  
Old 10-24-2005, 08:04 PM
Khashyar Khashyar is offline
 
Join Date: Jan 2003
Posts: 81
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hi JoergZ,

I found out why the software was not working on my 3.0.8 version of VB...

In the 3.0.8 sessions.php file, there are 2 instances in the file with this same code:

Quote:
// get default language
$phraseinfo = $DB_site->query_first("
SELECT languageid" . fetch_language_fields_sql(0) . "
FROM " . TABLE_PREFIX . "language
WHERE languageid = " . intval($vboptions['languageid']) . "
");
That code above (which we need to comment out or replace), occurs in the beginning of the 3.0.8 session.php file, as well as in the end.

I replaced that code where it occured in the beginning of the file, rather than at the end of the file, and your hack was not working for me.

However, when I replaced the instance of that code where it occured at the end of the sessions file, and the hack worked for me.

(Perhaps this will help someone else who wants to install the hack in VB 3.0.8).

Your hack is an excellent and useful one, J?rg.

Thanks again for sharing it.

Khashyar
Reply With Quote
Reply

Thread Tools

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 01:18 AM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.04703 seconds
  • Memory Usage 2,304KB
  • Queries Executed 25 (?)
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
  • (2)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (1)pagenav_pagelinkrel
  • (11)post_thanks_box
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (11)postbit_onlinestatus
  • (11)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
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete