Closed (fixed)
Project:
Blog Theme
Version:
master
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
17 Apr 2005 at 05:30 UTC
Updated:
6 May 2005 at 20:31 UTC
Check that node is type blog, Is a good idea...
Comments
Comment #1
plue@asterx.upc.es commenteda example wold be this new blog theme module (copied and modified from the original module):
function blog_theme_help($section) {
switch ($section) {
case 'admin/modules#description':
// This description is shown in the listing at admin/modules.
return t('this module changes the theme used to display a users blog to the users default');
}
}
function blog_theme_init() {
global $custom_theme;
$nid = arg(1);
$node = node_load(array('nid' => $nid));
if (arg(0)=='blog' && arg(1) != '') {
$uid = arg(1);
$themes = list_themes();
$account = user_load(array((is_numeric($uid) ? 'uid' : 'name') => $uid, 'status' => 1));
$custom_theme = $account->theme && $themes[$account->theme]->status ? $account->theme : variable_get('theme_default', 'bluemarine');
}
else if (arg(0)=='node' && is_numeric(arg(1)) && $node->type=="blog") {
$themes = list_themes();
$uid = $node->uid;
$account = user_load(array('uid' => $uid,'status' => 1));
$custom_theme = $account->theme && $themes[$account->theme]->status ? $account->theme : variable_get('theme_default', 'bluemarine');
}
}
Comment #2
tatonca commentedI'm not sure what the request is, or what exactly you have modified. To help me out, could you indicate what you have modified, and for what reason? I'm thinking maybe this was from a forum thread somewhere?
Thanks a bunch
~Tat~
Comment #3
tatonca commentedWIthout more information, I will have to close this issue for now. If someone can point out what has changed I will be happy to have a look. Unfortunately I don't have time to go through and compare things bit for bit right now.
Thanks
~Tat~