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
  #42  
Old 07-23-2004, 05:32 AM
Merjawy's Avatar
Merjawy Merjawy is offline
 
Join Date: Sep 2002
Location: USA
Posts: 505
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Now to the strange part

I did install the first part of the hack, edited sessions.php and register.php and I stopped right there for now

I change the default to other than en and also did that somewhere little down the hack,

anyway
now everything looks cool, but while I was still admin I ponited my browser to the forum adding the ?&guestlanguageid=1 and then 2
ofcourse I am not a guest so that didn't do nothing

I loged out, now I did that again and it worked, BUT when I used 1 I get english which is not the default language and not #1 in sessions.php and when I do 2 I get the default lang... now thats fine I can live with it and I am sure I can fix it too

this is what made me post now
I noticed in my nabar now I have 2 new links
Mark all forums as read
Open buddly list

now why they showing up in nav bar now?
I checked navar and they are there and uncommented but they never show up in my navbar on two sites, now after this hack they show in all tempates on this one site

so for now I had to comment them out in my navbar till I figure out why they showing


I looked at both sites and the navra is the same

non the less, this hack is great and I am gonna use it even if my name pops in navbar


Reply With Quote
  #43  
Old 07-23-2004, 06:00 AM
Merjawy's Avatar
Merjawy Merjawy is offline
 
Join Date: Sep 2002
Location: USA
Posts: 505
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Its me.. I knew it

I was messing with settings, and I disabled the use of DHTML menu under vB options and I got a phone call, took me away from what I was doing when I came back, I installed the hack and thats when I saw what I did before the hack

so nevermind, the problem is fixed
Reply With Quote
  #44  
Old 07-23-2004, 10:05 PM
Merjawy's Avatar
Merjawy Merjawy is offline
 
Join Date: Sep 2002
Location: USA
Posts: 505
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

All systems good to go mate thanks

theres one little issue, for now I managed to over come it but it needs fix
I use a portal (vBadvanaced CMPS) in the root and my forum in a directory under it, all work fine but when a guest is on portal (root) they change language link won't work, it will just take them to my root directroy where I have index.html as a front-end loader (which will load index.php of the portal once clicked).

a guest in forum, they click the lang change, the URL will be /forum/index.php?guestXXXXX

a geust in portal, they click the lang change, the URL will be /?guestlanguageXXXXXXXXX

that might work if I only had 1 index in my root, but I have 2 index.html loads first then it loads index.php once clicked


I managed to temp fix it by adding a "/" at the begining of the varialble ($vboptions[forumhome].php?XXXXXXXXXXXXXXXXXXXXXX)

This makes it take the guest to the main root index.php (portal) no matter where the guest clicked the lingo change (in portal or forum)

I hope that made any sence but for now it works non the less

thnx again

next step is installing the change for members .. can't wait
Reply With Quote
  #45  
Old 07-23-2004, 10:14 PM
Merjawy's Avatar
Merjawy Merjawy is offline
 
Join Date: Sep 2002
Location: USA
Posts: 505
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by JoergZ
O.k., here we go:

To change the language use the following line in the navbar template:

PHP Code:
 <tr><td class="vbmenu_option"><a href="changelanguage.php?$session[sessionurl]languageid=1">Name of language 1</a></td></tr
<
tr><td class="vbmenu_option"><a href="changelanguage.php?$session[sessionurl]languageid=2">Name of language 2</a></td></tr


J?rg

can I change Name of language 1 / Name of language 2 to
$vbphrase[lang01] / $vbphrase[lang02] ?


thnx
Reply With Quote
  #46  
Old 07-23-2004, 10:17 PM
JoergZ JoergZ is offline
 
Join Date: Jun 2002
Location: Germany
Posts: 127
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Yes of course ! It was only an example

Nice to hear, that it works for you. Concerning the portal-thing, sorry, but I have no portal, so I don't thought about, that the link won't work in this case
Reply With Quote
  #47  
Old 07-24-2004, 12:59 AM
Merjawy's Avatar
Merjawy Merjawy is offline
 
Join Date: Sep 2002
Location: USA
Posts: 505
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thank you sir , well done... just that little thing about portal as most people do use portals, and for me I use 2 indexes ..

Installed on one site and soon on another
Reply With Quote
  #48  
Old 07-24-2004, 10:52 PM
Merjawy's Avatar
Merjawy Merjawy is offline
 
Join Date: Sep 2002
Location: USA
Posts: 505
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Sweet..
I managed to make it a drop down menu for memeber/guests as I have about 6 languages and can't put them all in navbar

The link will show always, but the options for guests will show to guests and will only show member options for members love it
Reply With Quote
  #49  
Old 07-24-2004, 11:03 PM
JoergZ JoergZ is offline
 
Join Date: Jun 2002
Location: Germany
Posts: 127
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Fine.. I think for members it is not really necessary, because no one changes the language after he selected it once, but I think for guests it should be standard... Well, maybe in 3.1.0
Reply With Quote
  #50  
Old 07-31-2004, 12:35 AM
alexisbellido alexisbellido is offline
 
Join Date: Apr 2002
Location: Lima, Peru
Posts: 5
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thank you very much JoergZ for such a useful hack. I have just installed in my english / spanish forums.

Best regards!
Reply With Quote
  #51  
Old 08-11-2004, 10:06 AM
Eagle Creek's Avatar
Eagle Creek Eagle Creek is offline
 
Join Date: Jan 2004
Location: Netherlands
Posts: 742
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

PERFECT, GREAT, FANTASTIC!! I was so hard looking for this
!
!
Thank you!
¡
¡
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:51 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.04818 seconds
  • Memory Usage 2,315KB
  • 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
  • (1)bbcode_php
  • (1)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
  • (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