Forum Replies Created

Viewing 1 replies (of 1 total)
  • Thread Starter donki

    (@donki)

    I use multilingual plugin first time.

    1. Installed simplesplash plugin.
    2. Create splash site. Splash works on mydomain.com
    3. Installed qtranslated X. After I install it I still got address for home site mydomain.com for default language and splash works. After someone change the language to German it stored that on memory and redirect always to mydomain.com/de. If someone close the browser and next day go to maindomain.com it redirect him directly to mydomain.com/de (because he selected before that language) and splash doesn’t show.

    I made some modification on simplesplash PHP code and now it works after refresh any site by broweser button. But I wonder how to made that only on mydomain.com and mydomain.com/de

    function simplesplash() {
    		// Check the relation between the referer and WordPress-Home-Url.
    		// Also the requested URL should be the WordPress-Startpage.
    
    		if( (strpos($_SERVER['HTTP_REFERER'], get_bloginfo('home')) === false) &&
    		        get_bloginfo('wpurl').'/' == 'http://mydomain.com/')
    		add_action('send_headers', array('simplesplash', 'display_splash'));
    	}

    I think it will be easy duplicate that code for both sites, but I am not PHP programmer just analyze it like in other programming language.

Viewing 1 replies (of 1 total)