Zikula: A Flexible Open Source Content Management System
home | forum | contact us

Dizkus

Goto page: [-1] 1 - 2

Bottom
Diff themes per group?
  • Posted: 03.12.2004, 19:31
     
    InvalidResponse
    rank:
    Professional Professional
    registered:
     September 2003
    Status:
    offline
    last visit:
    21.10.07
    Posts:
    2423
    hahahha.. i didn't think about a user in multiple groups.. hahaha.. yeah, that'll cause some issues :)

    2) yes, below function head() in header.php

    3) yes, actually.. change it to:

    Code

    if($groupname == 'Admins'){
       $newtheme = 'Aqua3'; // must be active available themes
       }
    if($groupname == 'Users'){
           $newtheme = 'K_web_os';
       }
    if($groupname == 'test'){
           $newtheme = 'ExtraLight';
       }

    ..it'll take some playing with, but the majority of what you'll need is here .. hope it works out for you :)

    --
    http://www.invalidresponse.com
  • Posted: 03.12.2004, 19:33
     
    Not_Public
    rank:
    Helper Helper
    registered:
     December 1969
    Status:
    offline
    last visit:
    28.02.06
    Posts:
    159
    ok, so the end result: it works! mostly.

    • [*:73b174a96a]I can't get the "test" group to show. it shows the "Users" group theme am i on crack and missing the obvious? (my best-case-scenerio would have four groups)
    • [*:73b174a96a]upon login, it shows the theme of the previous login for the index.php- it will correct it self if you click through on a link, but that initial page, it based on whoever was previously logged in. I had a Konqueror window open- logged in admin; opened firefox, logged in as a user, and the index was in the Admins group theme. the reverse worked the same. if the user was logged in first, the admin's initial index was

    how would unregistered users be handled? by the default theme set in the administration>settings field?
  • Posted: 03.12.2004, 19:58
     
    rank:
    Moderator Moderator
    registered:
     March 2002
    Status:
    offline
    last visit:
    26.08.08
    Posts:
    7720
    This does sound like an interesting and useful feature. For a generic solution the requirement would be that the existing API - pnUserGetTheme - returns the theme based on the group membership. If this isn't the case then any solution would only be considered a hack given that the existing API would return the wrong value.

    A potential avenue to explore would be adding a field to the existing groups table for the theme. The pnUserGetTheme API should check this value. I'd work with the .8x groups module since it's API compliant and add extraction of this field to the getall and get module API's. Make the results of these API static to prevent extra SQL calls.

    -Mark
  • Posted: 03.12.2004, 20:19
     
    InvalidResponse
    rank:
    Professional Professional
    registered:
     September 2003
    Status:
    offline
    last visit:
    21.10.07
    Posts:
    2423
    ..it's definitely a hack.. one that needs a good, long bathing icon_lol ..but, the basics are there to be toiled with. we'll leave the credit to Not_Public ;) ..I just connected the dots haphazardly.

    --
    http://www.invalidresponse.com
  • Posted: 03.12.2004, 20:23
     
    rank:
    Moderator Moderator
    registered:
     March 2002
    Status:
    offline
    last visit:
    26.08.08
    Posts:
    7720
    Devin

    It wasn't a criticism of you at all (don't take it that way if it came across as such) but this is something i'd like to see end up as a feature that can be added to core code. However in order for this to be possible it needs to be done 'right'.

    -Mark
  • Posted: 03.12.2004, 20:30
     
    Not_Public
    rank:
    Helper Helper
    registered:
     December 1969
    Status:
    offline
    last visit:
    28.02.06
    Posts:
    159
    ARRRGGGHHH!
    //stabs himself in the eye with a pencil repeatedly//
    "Damn you case sensitivity! damn you lack of caffiene and sleep!"

    guess what my problem was? icon_redface

    now to figure out a way to avoid users from seeing their theme change after their intital log in...

    THANK YOU IR!

    as to the credit- I don't want no stinking credit.. just happy to be slowly learning what pushing these button thingys can do. not to mention.. uh.. well- I obviously didn't _do_ anything.. :wink: again, thank you IR

    as to what Mark mentioned.. *whoosh* right over my head... but it sounds like this type of function may be accomplished in a less "hackish" way in .8? maybe something that would survive an upgrade to .9? ( I know this won't.. but I'm taking notes!)
  • Posted: 03.12.2004, 20:51
     
    InvalidResponse
    rank:
    Professional Professional
    registered:
     September 2003
    Status:
    offline
    last visit:
    21.10.07
    Posts:
    2423

    markwest

    It wasn't a criticism of you at all (don't take it that way if it came across as such) but this is something i'd like to see end up as a feature that can be added to core code. However in order for this to be possible it needs to be done 'right'.

    ..no offense taken ;) ..none at all, I knew it was dirty before posting it, even hesitated due to that fact.. as for adding the feature to the core (a 'cleaner' version :) ).. I suppose some might find use in it.

    you're welcome Not_Public.. ;)

    --
    http://www.invalidresponse.com

Goto page: [-1] 1 - 2

Extensions Moderation

Main Menu

Extensions Database

Documentation

Development

Login

Donate to Zikula