vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   How to check Language (https://vborg.vbsupport.ru/showthread.php?t=129531)

Sergio68 10-20-2006 11:41 AM

How to check Language
 
I'd like to built something to check the language an user is using on the forum and show some image related to it.

Something like :

Code:

<IF $lang="ENG" >
<img="a1.gif>
</IF>

<IF $lang="ITA" >
<img="b2.gif>
</IF>

Can you tell me the variable name please ?

Anybody ?

rahimt 09-09-2007 09:42 AM

I am interested in an answer as well. Is there such a variable for a conditional?
Many thanks in advance!

Paul M 09-09-2007 09:53 AM

In templates it's $bbuserinfo['languageid']

In plugins, $vbulletin->userinfo['languageid']

Sergio68 09-09-2007 04:48 PM

Wow, thanks Paul :D

jerx 10-27-2008 05:12 AM

Thank you!

I needed this to link to an external script. I used this:
Code:

<a href="$vboptions[bburl]/externalscript/index.php?lang=
<if condition="$bbuserinfo['languageid'] == 1">
language1
<else />
language2
</if>
">$vbphrase[script]</a>

Here is all you need to know of template conditionals:
http://www.vbulletin.com/docs/html/t...e_conditionals


All times are GMT. The time now is 09:49 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.01105 seconds
  • Memory Usage 1,712KB
  • 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
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (5)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
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete