Niko
  • Administrator

      Reputation : 319
      Registered on : 2012-02-22
      Posts : 2366
      School of codes courses: coming soon
    Cookies for Theme

    Description


    Save the cookies for the theme you chose with the theme-selector

    Set up


    First, you have to set up this tutorial: http://forum.forumactif.com/t308631-selecteur-de-style
    Now we can go on...

    First, you should have a default theme, so when there are no Cookies you will see the default theme :bene:
    Now, add this javascript code:
    Code:
    if(my_getcookie("sstyle")) { $("#tstyle").attr("href", my_getcookie('sstyle')); }

    In this code:
    if(my_getcookie("sstyle"))
    $("#tstyle").attr("href", my_getcookie('sstyle'));
    else
    $("#tstyle").attr("href", 'www.domain.com/default.theme.css');

    Customize the tutorial


    Just edit www.domain.com/default.theme.css with your own default theme link

    Technical problems


    The tutorial was tested on this forum and with the browser Google Chrome; If you notice that the tutorial doesn't work for a browser or for a version of forum (PhpBB2, PhpBB3, PunBB, Invision) contact an administrator and we will fill this field with your reporting.

    Thanks, the staff

    For every problem or question please, contact us in the section Support for the tutorials, The staff will answer you as soon as it is possible...


    Friendly,
    The team of the Forum of Codes.



    Niko wants you in the team Guest

    Community manager and Administrator at Forumattivo.com

    Nathan
    • Veteran staff member

        Reputation : 7
        Registered on : 2012-06-26
        Posts : 108
      i can't read on forumctaif i only can read forumotion