- Name: hook_style_id
- Rationale: The mod could select a style for given scenarios. The specific scenario I'm interested in is changing the style when the user is at a specific url (m.mysite.com) to switch to a mobile friendly style. I can easily think of other scenarios, like changing the style on the user's birthday.
- Placement: I did a writeup of how to do this for phpbb3 here: http://www.phpbb.com/community/viewtopi ... #p12879306. Basically there are two spots where the style is set:
style.phpincludes/session.phpCode: Select all
if (!$user) { [u]$id = ($id) ? $id : $config['default_style'];[/u] // Commented out because calls do not always include the SID anymore // $recompile = false; $user = array('user_id' => ANONYMOUS); }
Code: Select all
else { // Set up style [u]$style = ($style) ? $style : ((!$config['override_user_style']) ? $this->data['user_style'] : $config['default_style']);[/u] }
- Input arguments: style id number
- Output format: none
- Output semantics: n/a
- Infrastructure: n/a
- Related: n/a
[RFC] hook_style_id
-
- Registered User
- Posts: 1
- Joined: Fri Jan 14, 2011 2:00 am
[RFC] hook_style_id
Re: hook_style_id
That would be very useful for styles demo mod too.
Formerly known as CyberAlien.
Free phpBB styles | Premium responsive XenForo styles | Iconify - modern open source replacement for glyph fonts
Free phpBB styles | Premium responsive XenForo styles | Iconify - modern open source replacement for glyph fonts