Recent Topics

1 Jan 28, 2012 17:45    

I've decided to use my blogs under subdomains of each but i am having some problems.

I have a modal ad appearing on 1st visit on the site only, if ad is clicked it sets a cookie to not to display the same ad over again.But when you go to another blog, subdomain.domain.tld, the ad shows up again.

How should i manage the cookies so that all blogs under subdomains use same cookies ?
I've done some reading here and there like;
http://forums.b2evolution.net/viewtopic.php?t=21243&highlight=subdomains

But with no chance.

Also i am getting some javascript erros in that modal window too, such as;

Unsafe JavaScript attempt to access frame with URL http://ozlusozler.tilqi.com/ from frame with URL http://www.tilqi.com/skins/chita/reklam.html. Domains, protocols and ports must match.
Uncaught TypeError: Cannot read property 'fancybox' of undefined
(anonymous function)

2 Jan 28, 2012 23:54

Set $cookie_path = '/'; in /conf/_advanced.php

Also note that AJAX forms will not work on subdomains :( this should be fixed in b2evo 5.

3 Jan 29, 2012 05:19

sam2kb wrote:

Set $cookie_path = '/'; in /conf/_advanced.php

Also note that AJAX forms will not work on subdomains :( this should be fixed in b2evo 5.

I did, like suggested in the topic, but same again.any other ideas ?

Btw, i also read that page cache doesnt work with subdomains too, is this the one in the theme settings or global settings one ? And what happens if i leave it on by mistake

4 Jan 29, 2012 17:19

Page cache depends on AJAX forms and can't be enabled either. If you leave it on comment forms would not load.

We are talking about options on Blog settings > Advanced page.

How do you set/read cookies, post the code here.

5 Jan 29, 2012 18:16

sam2kb wrote:

Page cache depends on AJAX forms and can't be enabled either. If you leave it on comment forms would not load.

We are talking about options on Blog settings > Advanced page.

How do you set/read cookies, post the code here.


    if(jQuery.cookie("modal") != 'true')
    {    
        jQuery('.newsletter').fancybox(
        {  
   ....
            }
        ).trigger('click');
         jQuery.cookie("modal", "true", { path: '/', expires: 15 });
   }    


At the very end of the advanced.php i have these


	$cookie_domain = '.tilqi.com'; 
$cookie_path = '/';

6 Jan 29, 2012 21:36

Add the 'domain' param

jQuery.cookie("modal", "true", { path: '/', expires: 15, domain: "tilqi.com" });

7 Feb 01, 2012 22:25

sam2kb wrote:

Add the 'domain' param

jQuery.cookie("modal", "true", { path: '/', expires: 15, domain: "tilqi.com" });

That didnt work unfortunately.No change.Any other ideas ? Btw, my conf/advanced.php still has the 2 liner change above.Should i revert it back to original ?

Mind you, my all 7 blogs ( 7 subdomains) use the same skin, and i include that in html.head.php so all of the blogs get effected.


Form is loading...