vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   Assigning substyle to language (https://vborg.vbsupport.ru/showthread.php?t=129419)

lapinkulta 10-18-2006 08:41 PM

Assigning substyle to language
 
Hi!

I am running a forum in three languages. The language is selected automatically from the used subdomain. I have "created" a plugin for that reason. Now i wanted that forum titles and descriptions are replaced with the help of replacement variables in each substyle. I haven't found another way to bind languages to styles, so here is how the code of the plugin looks:

Code:

if ($_SERVER['HTTP_HOST'] == "en.domain.com") {
                                $_REQUEST['langid'] = 3;
                                $_REQUEST['styleid'] = 4;
                } elseif ($_SERVER['HTTP_HOST'] == "de.domain.com") {
                                $_REQUEST['langid'] = 2;
                                $_REQUEST['styleid'] = 3;
                } else {
                                $_REQUEST['langid'] = 16;
                                $_REQUEST['styleid'] = 5;
                }

I use the hook "init_startup" without having an idea about the hook system. Anyway it worked with the language selection.

problem a.)
Now the replacement variables only work when user is logged in! When user is browsing as guest variables are not replaced. Maybe wrong hook?

problem b.)
Another problem is vbseo which i use. Even user is logged in (and title/description) is replaced correctly, the path still points to the variable like domain.com/forum/title1 instead of domain.com/forum/animals

Thanks for your help.

lapinkulta


All times are GMT. The time now is 12:02 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.00983 seconds
  • Memory Usage 1,707KB
  • 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_code_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (1)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