Hi
Where can I find a block that allows you to change theme directly from the homepage?
Here is an example: http://theme.classroomrevolution.com/
Thanks in advance
Hi
Where can I find a block that allows you to change theme directly from the homepage?
Here is an example: http://theme.classroomrevolution.com/
Thanks in advance
Hi David
Cool block, which we were looking for to change our contrast themes. How do we make the block available to guests? We would like this on our homepage (constantly) without a user logging into Moodle.
Thanks,
Ali.
Hi Ali,
Line 32 of block_theme_switcher.php...
if ($USER->loggedin or !isguest()) { // Show the block
...limits the visibility of the block to logged in users/users who are not guests. But I don't know if the guest account has the ability to set a preferred theme, and if it does, it will probably affect all guests simultaneously.
The other method you could try is to use session themes. Instead of the form which saves data to the database, session themes work via the URL eg.
http://www.yoursite/index.php?theme=cooltheme
The block could be modified something like...
$themes = get_list_of_themes();
...
foreach($themes as $theme){
$this->content->text .= "<a href='http://yoursite/index.php?theme=$theme'>$theme</a><br />";
}
Of course, you dont really need a whole block to do that. Some hard coded links in your banner would suffice.