By joetomgo on
Looking to make it so that all entries (blogs, event, story, audio, story, etc.) for a given user appear in the users self-selected theme. Can't seem to figure it out. Any help is greatly appreciated.
Looking to make it so that all entries (blogs, event, story, audio, story, etc.) for a given user appear in the users self-selected theme. Can't seem to figure it out. Any help is greatly appreciated.
Comments
Try this in its own module
I haven't tested this, but it's a subset of some stuff that we've used. The key is that you need to set the global $custom_theme variable, and I think it needs to be done pretty early on in the page processing (ie. before any theming functions have been called), so it's important to do it in hook_menu.
Create a new module called user_theme_swapper.module and put this in there:
Then make sure to go to the module administration page and activate the module.
Marc
-------
http://www.funnymonkey.com
Tools for Teachers
Missing a paren
Whoops, I was missing a paren -- here is an actual working version that has been tested:
Marc
-------
http://www.funnymonkey.com
Tools for Teachers
Select theme for visitors
Marc, is it possible that something like this might be used so that anyone viewing the author's content would see it in the author's self-selected theme? Better yet, is it possible to use the value of a CCK field to set the theme for viewing? I'd set an selection list with the themes I'd allow for use.
...
Dummy me: the Taxonomy Theme module gives me this ability! I've been using the module for a while on a different project, but didn't realize this feature existed. I've got a couple features to talk to the developer about...
http://drupal.org/project/taxonomy_theme
Looks good
Taxonomy Theme looks good...
The module code I posted above does what you are asking -- all node pages will appear in the theme selected by the author of the node.
Marc
-------
http://www.funnymonkey.com
Tools for Teachers
blog home page and user page not showing user theme
I installed the userswaptheme.module and activated it.
The user's blog entries appear to be working, but the blog and user home pages are not.
Thanks for the code though. It's probably simple.
http://community.bangordailynews.com/blog/24 doesn't work, but a specific entry: http://community.bangordailynews.com/node/133 does.
Here you go...
-------
http://www.funnymonkey.com
Tools for Teachers
Will this module work with 5.x?
thanks.
Give it a try
Give it a try and let us know... You'll need a .info file, but that should be very easy to create. See the Converting 4.7.x modules to 5.x guide for help if it doesn't work out-of-the-box.
Marc
-------
http://www.funnymonkey.com
Tools for Teachers