Project

General

Profile

Feature #6110

Add template selector setting

Added by Yannick Warnier about 6 years ago. Updated over 3 years ago.

Status:
New
Priority:
Normal
Assignee:
-
Category:
Installation / Migration
Target version:
Start date:
20/04/2013
Due date:
% Done:

0%

Estimated time:
Complexity:
Normal
SCRUM pts - complexity:
?

Description

In the stylesheet section of Chamilo platform settings, add a themes selector, based on the directories available in main/template/ and affecting directly the constructor in main/inc/lib/template.lib.php to enable the selector there.

This would be the "default" theme.

Also add a theme filter, allowing you to define (in a textarea, one per line) a serie of User-Agents regular expressions to check for a specific device and trigger the use of a specific template.
These settings should all be changeable by multi-url.
The setting in template.lib.php would still be "default" by default (just in case we cannot connect to the database and have to print an error message).

This would be like:

  • Default platform theme: default
    • This theme will be used for all users not matching any of the user-agents below
  • Specific platform theme 1 by user-agent: mobile
    • This theme will be used for all users with a browser matching the user-agents below
  • User agents for theme 1: Android
    • This list (one string per line) will be check against the users' user-agents, using Perl-syntax regular expressions (case-insensitive, accepting .*, between others).

The settings to be added:
INSERT INTO settings_current
(variable, subkey, type, category, selected_value, title, comment, scope, subkeytext, access_url_changeable)
VALUES
('template_default', NULL, 'textfield','stylesheets','default','SettingDefaultTemplateTitle','SettingDefaultTemplateComment', NULL, NULL, 1),
('template_var1', NULL, 'textfield','stylesheets','','SettingTemplate1Title','SettingTemplate1Comment', NULL, NULL, 1),
('template_var1_regexp', NULL, 'textarea','stylesheets','','SettingTemplate1RegexpTitle','SettingTemplate1RegexpComment', NULL, NULL, 1);


Related issues

Related to Chamilo LMS - Feature #6111: JQuery Mobile templateAssigned20/04/2013

Actions

History

#1

Updated by Yannick Warnier about 6 years ago

Ideally, we should have a link to WURFL / TeraWURFL link: http://dbapi.scientiamobile.com/wiki/index.php/Remote_Webservice, but this can come in a later feature (open one before closing this one)

#2

Updated by Yannick Warnier about 6 years ago

  • Subject changed from Add theme selector setting to Add template selector setting
#3

Updated by Yannick Warnier over 3 years ago

  • Target version changed from 2.0 to 3.0

Also available in: Atom PDF