How do I force a style?

How do I force a style?

by Edward Beckmann -
Number of replies: 3

 

Hi

I must be missing something simple because loads of demo sites have a simple theme selector! I use a few courses with different themes, which people get into from different parent sites. Think of it as a college where each department has its own pages written in html and styled in its own way, and a login button takes people to their specific course, which carries on that look and feel.

I would like to solve one or both of the following:

  • on pressing 'logout' the 'are you sure?' dialogue box comes up in the site theme. I'd like it to be in the theme one is just logging out of (for info I am using loginlogout.php from Mary Evans' great studio theme)

A few constraints:

  • each department having their own moodle instance is not an option
  • it needs to work in ie6
  • I know that the 'logout' button could simply be a link to the conventional site they came in from that leaves the connection 'hanging', but am looking for a definite logout

I have tried adding '?&theme=my_theme' to the end of the link within logout.php, but get 'sesskey parameter missing'.

Any hints please?

Thanks

Ed

Average of ratings: -
In reply to Edward Beckmann

Re: How do I force a style?

by Mary Evans -
Picture of Core developers Picture of Documentation writers Picture of Peer reviewers Picture of Plugin developers Picture of Testers

Hi Ed,

I've not had any problem logging out of Studio theme and still being in the same session, as it were, if it's set as a session theme that is. Perhaps this is where you are going wrong. Before using a session theme you need to add a line of code in the config.php in your Moodle root directory first (for Moodle Version 1.9 and earlier).

$CFG->allowthemechangeonurl = true;

In Moodle 2.0 it's easier as you can set this in Theme Settings page.

Here's a link which explains all... 

Mary

In reply to Mary Evans

Re: How do I force a style?

by Edward Beckmann -

Mary

Utterly brilliant! Thank you - worked first time even without learning from the link (sorry, it's the way I learn ...).

Thank you

Ed

p.s. how did you post this several hours ahead of current time?

In reply to Edward Beckmann

Re: How do I force a style?

by Mary Evans -
Picture of Core developers Picture of Documentation writers Picture of Peer reviewers Picture of Plugin developers Picture of Testers

Glad you got the Session Theme to work. Also...since you are using Afterburner too in your theme selection, I'm working on a new layout which is simpler than the one Patrick uses. Also a different type of menu which brings in Categories & Courses.

By the way...talking of themes, and session themes in particualr, you do know you can set a selection of themes in the Theme Settings page, thus allowing students to choose their own theme in their profile if you enable that option. You can also set course themes too...but perhaps you know all this.

Cheers

Mary

PS: I think the timestamp on the forum works independently of local time.

GMT = 23:10 right now...lets see the time on the post!