vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.0 Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=33)
-   -   Language-selection for guest (https://vborg.vbsupport.ru/showthread.php?t=59564)

JoergZ 03-27-2004 08:15 AM

Yes, I have written a soloution for that, because a german user asked me the same. I will post it this afternoon here.

But can you tell me for what this make sense ? Which user switches the language after he selected it once ?

(I am using it only in my local test-board so I can check the translations without always going the long way via the user-settings).


Jörg

JoergZ 03-27-2004 09:48 AM

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


Add to the phrasegroup Front-End Redirect Messages the following 2 phrases:

Varname: changelanguage
Text: Boardlanguage was changed

Varname: nochangelanguage
Text: Language was not changed


Save the changelanguage.php I have attached in the main board directory (where you have your index.php).

That's all.



Best Regards

J?rg

AZone 04-08-2004 06:25 PM

This is a great hack! Easy and very usefull! Thank you a lot!

ricoche 04-24-2004 02:11 PM

Hello,

Thanks for the hack.

Any idea why I might be getting this error on line 76?

Code:

Parse error: parse error, expecting `']'' in /home/username/public_html/forums/changelanguage.php on line 76
Here is the code from line 75 to line 79. Is there anything missing or incorrect here?

Code:

        if (($check_language == '')  or ($check_language[
        {
                $url = "$vboptions[forumhome].php?$session[sessionurl]";
                eval(print_standard_redirect('nochangelanguage'));
        }

Thanks.

JoergZ 04-24-2004 04:52 PM

Sorry, don't know how this garbage came into the changelanguge.php

I have corrected the attachment.

You can solve the problem like this:

Change this line
PHP Code:

 if (($check_language == '') or ($check_language

to this

PHP Code:

 if ($check_language == ''


J?rg

jluerken 05-06-2004 07:02 PM

Hi Joerg,

many thanks for this Hack.

I installed it and via a condition in the header template only GUESTS have the choice. This is working on all pages at not only on forumhome. Its also working on the vbAdvance Portal page...

See screenshots :D

Bobbo 07-01-2004 12:51 PM

Great hack, thanks for your efforts. I had to do a little monkeying around with it since I am using VBA CMPS and the main index resides outside the forums directory.

However with a few minor modifications and some conditionals it is now working for both registered/logged in users as well as for guests from both the forum home as well as from VBA CMPS home page.

Thanks again.

Merjawy 07-22-2004 12:17 AM

Very nice indeed and pretty much needed for many

thanks,

one question, you have ver. 1, 2 and 3,, which do I need to install? all? :) forgive my asking just confused a little

I do know the logic in doing things ,, but this one did confuse me a bit sorry :)

JoergZ 07-22-2004 07:47 AM

You need only to install one of the versions.


The different is:

Version 1:
You must define a new navbar-menue-item everytime you install a new language and want to make it selectable in the navbar

Version 2:
The installed and selectable languages are detected automatic, no need to add new navbar-item when a new language is installed

Version 3:
One of your languages is the default-language. Every visitor who comes first time to your board will see the board in this default-language. Version 3 detects the language-settings of the users browser and automatic set the vB-language to this language if available. Example: Default is English, you have installed English, German, French, Spanish. A user with French language-setting in browser come first time to your board, he will see it in French. No need for him to select the language of your board manually.

I hope your confusion is gone now :)

Best regards

J?rg

Merjawy 07-22-2004 10:29 PM

Indeed gone now :) thnx a lot mate


All times are GMT. The time now is 08:42 AM.

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.01242 seconds
  • Memory Usage 1,746KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (2)bbcode_code_printable
  • (3)bbcode_php_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.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/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.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
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete