Claudio Well-known member Nov 5, 2011 #1 I want to set a customized style for the userid 4... which is the query I should execute?
alexD Well-known member Nov 5, 2011 #2 I guess you should edit that user's preferences via the adminCP. Go to: /admin.php?users/4/edit Click on the Preferences tab Select the customized style Save -The executed code can be found in the corresponding controller: XenForo_ControllerAdmin_User->actionSave() Is this what you meant with query? Upvote 0 Downvote
I guess you should edit that user's preferences via the adminCP. Go to: /admin.php?users/4/edit Click on the Preferences tab Select the customized style Save -The executed code can be found in the corresponding controller: XenForo_ControllerAdmin_User->actionSave() Is this what you meant with query?
F Floris Guest Nov 5, 2011 #3 Changing that does mean that the user can go into the preferences and change it back again though. (just fyi) Upvote 0 Downvote
Changing that does mean that the user can go into the preferences and change it back again though. (just fyi)
Claudio Well-known member Nov 5, 2011 #4 Floris said: Changing that does mean that the user can go into the preferences and change it back again though. (just fyi) Click to expand... thanks It was to do him a joke (he has preferences with hot woman haha) Upvote 0 Downvote
Floris said: Changing that does mean that the user can go into the preferences and change it back again though. (just fyi) Click to expand... thanks It was to do him a joke (he has preferences with hot woman haha)
Jake Bunce Well-known member Nov 5, 2011 #7 Here is a simple addon for that. You need to specify the user_id and style_id in the code: library/ForceStyleForUser/Listen.php Rich (BB code): <?php class ForceStyleForUser_Listen { public static function listen(XenForo_Visitor &$visitor) { if ($visitor['user_id'] == 1) { $visitor['style_id'] = 3; } } } Attachments ForceStyleForUser.zip ForceStyleForUser.zip 4.6 KB · Views: 0 Upvote 0 Downvote
Here is a simple addon for that. You need to specify the user_id and style_id in the code: library/ForceStyleForUser/Listen.php Rich (BB code): <?php class ForceStyleForUser_Listen { public static function listen(XenForo_Visitor &$visitor) { if ($visitor['user_id'] == 1) { $visitor['style_id'] = 3; } } }
Claudio Well-known member Nov 5, 2011 #8 thanks jame, I wanted to force him to view the style first (not to force him for ever) so the suggest of alexD was the best Upvote 0 Downvote
thanks jame, I wanted to force him to view the style first (not to force him for ever) so the suggest of alexD was the best