Introduce yourself here! In order to avoid spam, new users must first comment on the discussion in the 'Introductions' before they become 'full members'
User themes
  • I’ve created a coloring book for LAttilaD.org. Going there and clicking on the image icon, you can try it.
    Here’s how did I do it. The coloring book is a static page with some PHP code (by [exec]) to list available themes and styles, and to call a tiny script that send the cookies out. Now, I’ve added a check in core.theme.php, function theme_loadsettings, just after the global statement:

    if(isset($_COOKIE['privatetheme']))
    {
        $fp_config['general']['theme']=$_COOKIE['privatetheme'];
    if(isset($_COOKIE['privatestyle']))
    $fp_config['general']['style']=$_COOKIE['privatestyle'];
            else unset($fp_config['general']['style']);
    }

    That’s all, and every user can see the site in their own skin and style.
  • that's a funny little feature. It's how the old themes.flatpress.org worked.

    However, you can avoid modifying core.theme.php by adding your custom code to a plugin that hooks the 'init' event. 

    Have fun! :)
  • It's like the Mobile plugin, too.
    However be careful with this function when you save configurations of your blog, otherwise the theme you've selected with cookies will be saved as default :-)
Start a New Discussion

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

In this Discussion