By mwork on
Hi,
I'm somewhat new to Drupal and so far it's been easy to customize and install modules.
I'm able to give a user the ability to choose a theme - however this only affects the way they see the site when logged in. What I'd like to do, is let the user choose a theme which would become the main theme for their profile page, regardless of who's looking at it (un-registered users, admin, etc.). So in turn, each user can change the appearance of their profile page to whatever theme they choose.
Is it possible to do with an existing module or setting?
Thanks in advance
Comments
I did it!
I just solved this tonight! I created a little module that lets the user determine the theme in which their profile is viewed. It also sets the front page to default, and everything else to the user's theme. I tried working through the template.php, but I had to make a module to get the $custom_theme to work. I'm not sure it's exactly right, but I'm sure it works!
I hope this helps you. I also added the following to mytheme_preprocess_user_picture in my template.php file (at the end of the first if-statement). It returns a theme-specific default picture.
Have fun!
Thanks for this
Thanks for the work around - I'm really new to Drupal and not sure where I should paste this function (in which file and where). In addition to pasting this into the document, do I also have to call the function at some point?
The first part stands alone
The first part stands alone in a file called sites/all/modules/lulu_theme/lulu_theme.module (lulu is my base/default theme). In addition, it needs an info file in the same directory (e.g. lulu_theme.info) that looks like this:
Then you have to enable it in the Admin (site building/modules, I think). It doesn't add any menus for admin UI or anything. If you want to change the themes, you have to do it in the code. Clear the cache. Please let me know if/how it works for you.
As for the default picture, you can find the rest of that code here:
http://api.drupal.org/api/function/template_preprocess_user_picture/6
Drupal API is your friend!
Forgot admin theme
The above code will set the admin theme to the user theme. To keep the admin theme, add this bit.