vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.5 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=113)
-   -   Set forum-language automatic to browser-language for first-visitors (https://vborg.vbsupport.ru/showthread.php?t=97261)

berberber 10-03-2005 04:19 PM

yes, but Search engines, have no language set, and some Browsers not as well, so it would make sense for me, that in first place, it would depend on users choice, but then, on forum admins choice.

For example on my forums, i Have a french area, I would like to be seen like french as default. KirbyDE already said its not possible via plugins, I tried, but did not get it.
Bernhard

GrendelKhan{TSU 10-03-2005 08:02 PM

Quote:

Originally Posted by JoergZ
No, of course the user can change it.

This automatic detected language is only used, as long the user don't select another one or he has a cookie from an earlier vist. So it is really for users, that come the first time to your site, or has logged out, so the cookies were deleted.

When the users select another language, the selected language is taken and is not switched back to the automatic detected, because then there is an entry in the cookie.

Currently I am trying to use the standard-hooks, so no code-changes are needed at all. Maybe this evening there is an update for my hack.


J?rg


EDIT: I have updated the hack, so no more code-modification is necessary. Thanks very much to KirbyDE for his help.

cool!!

<< installed. thanks!! ^^

betablue 10-05-2005 05:01 AM

Thank you, great idea. I just installed this, however it seems to have a glitch:
My Borwser language is set to EN-US & En (in Firefox) and to En-Ca in IE.

When i go to the forum without a cookie set (logged out), then the forum language auto-sets to Spanish - Mexico. The forums' Default Language is EN-US and it has following language packs installed: Chinese, Chinese-TW, German (Du & Sie), English-US (Default), Spanish - MX and Polish - PL

Any ideas?

berberber 10-05-2005 05:43 AM

Hello, are you sure you set it correctly up, just edit the plugin, in the plugin manager, to make sure you set the right languageids.

JoergZ 10-06-2005 08:44 PM

@betablue: Did you checked the code in the plugin, that all language-assignments are correct as berberber wrote ?

For detecting EN-US, you need e.g. an entry like this:


PHP Code:

case 'en-us'
        
$_REQUEST['langid'] = X
        break; 

X must be replacced by the language-id in your forum.

The same you must do for all other languages that you want to have detected and assigned to an installed language.

I will test it with en-us setting in Explorer at the weekend, when I am back at home.


J?rg

GrendelKhan{TSU 10-13-2005 03:22 PM

AHHHHH....

I upgrade vb, then tried reinstall this.....
now I get huge error and my board is down:(

Quote:

Fatal error: Cannot redeclare rk_getenvvar() (previously declared in /home/MYSITE/public_html/forums/includes/init.php(273) : eval()'d code:54) in /home/MYSITE/public_html/forums/includes/init.php(273) : eval()'d code on line 185
any ideas? HALPP!!!

JoergZ 10-13-2005 03:34 PM

Quote:

Originally Posted by GrendelKhan{TSU
I upgrade vb, then tried reinstall this.....

From which vB-version to which vB-version did you upgraded your board ?

Why have you re-installed the hack after you upgraded your board ? When you had the first version of the hack installed, did you removed it before ?

Quote:

Originally Posted by GrendelKhan{TSU
...and my board is down

Did you not tested it on a test-installaton ?

Quote:

Originally Posted by GrendelKhan{TSU
any ideas?

At the moment not, sorry, because I just re-installed the hack in a test-board, and it works.

Did you changed by mistake something in the plugin-code except in the area where you define your language-id's ?


J?rg

GrendelKhan{TSU 10-13-2005 03:34 PM

oh no!! can't even log into my admin cp!!!

how do i fix this??!?!!?!? +_+

JoergZ 10-13-2005 03:39 PM

Oh man.. what have you done ?

Deactivate the plugin via phpMyAdmin.

Select the table "plugin" and select the record with the title "Set automatic forumlanguage to browserlanguage" for edit.

Then set the value for the field "active" to 0 (see screenshot)


Then the plugin is deactivated.


Jörg

GrendelKhan{TSU 10-13-2005 03:40 PM

I'm on 3.5.0 Gold .

well... I thought I had installed it before....but didn't seem to be working.... and so I wasn't sure as its late and I'm pretty tired and stupid. :(

so after looking through the plug-in manager, I didn't see it, so thought it was safe to just install again. didn't back up first. +_+

I ddin't change ANYTHING just downloaded the file and installed via PLUGIN upload/download.


man..I was so about to go to sleep...but now my board is COMPLETELY down so I'm freakin out. o_0

any other help would be very very appricated.


All times are GMT. The time now is 03:55 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.01098 seconds
  • Memory Usage 1,745KB
  • 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
  • (1)bbcode_php_printable
  • (5)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (3)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