From 5a2970dea12e7c36ee62054794fe98226324185e Mon Sep 17 00:00:00 2001 From: Thomas Willingham Date: Sun, 10 Mar 2013 21:01:18 +0000 Subject: Redbasic - add stupid mode theme settings. Partial functionality. --- view/theme/redbasic/css/mod_home.css | 2 + view/theme/redbasic/css/mod_profile.css | 40 ++++++ view/theme/redbasic/php/config.php | 15 +- view/theme/redbasic/tpl/basic_theme_settings.tpl | 9 ++ view/theme/redbasic/tpl/profile_advanced.tpl | 171 +++++++++++++++++++++++ 5 files changed, 234 insertions(+), 3 deletions(-) create mode 100644 view/theme/redbasic/css/mod_home.css create mode 100644 view/theme/redbasic/css/mod_profile.css create mode 100644 view/theme/redbasic/tpl/basic_theme_settings.tpl create mode 100644 view/theme/redbasic/tpl/profile_advanced.tpl diff --git a/view/theme/redbasic/css/mod_home.css b/view/theme/redbasic/css/mod_home.css new file mode 100644 index 000000000..e66d343ab --- /dev/null +++ b/view/theme/redbasic/css/mod_home.css @@ -0,0 +1,2 @@ +section {left: 20px;} + diff --git a/view/theme/redbasic/css/mod_profile.css b/view/theme/redbasic/css/mod_profile.css new file mode 100644 index 000000000..d3b546113 --- /dev/null +++ b/view/theme/redbasic/css/mod_profile.css @@ -0,0 +1,40 @@ +body { +background-color: #2e2f2e !important; +color: #fff !important; +} + +aside { +position: relative; +float: right; +margin-right: 15px; +} + +section { +right: 250px; +left: 450px; +} + +.aprofile dt { + background: none; /*#2e302e; */ + color: #eec; + font-weight: bold; +/* box-shadow: 1px 1px 5px 0 #111; */ + margin: 15px 0px 15px; + padding-left: 5px; +/* box-shadow: 5px 5px 5px #000; */ + width: 100%; + } + +.aprofile dd{ + background: #333; + box-shadow: 5px 5px 5px #222 inset; + border-radius: 5px 5px 5px 5px; + margin-left: 120px; + max-width: 100%; + padding: 10px; +} +#profile-extra-links ul { + margin-left: 0px; + padding-left: 0px; + list-style: none; +} \ No newline at end of file diff --git a/view/theme/redbasic/php/config.php b/view/theme/redbasic/php/config.php index 9afc010d7..73d993d6c 100644 --- a/view/theme/redbasic/php/config.php +++ b/view/theme/redbasic/php/config.php @@ -6,8 +6,6 @@ function theme_content(&$a) { // Doesn't yet work for anyone other than the channel owner, and stupid mode isn't finished, so return both for now. if(!local_user()) { return; } - if(! feature_enabled(local_user(),'expert')) {return;} - $font_size = get_pconfig(local_user(),'redbasic', 'font_size' ); $line_height = get_pconfig(local_user(), 'redbasic', 'line_height' ); $colour = get_pconfig(local_user(), 'redbasic', 'colour' ); @@ -141,7 +139,18 @@ function redbasic_form(&$a, $font_size, $line_height, $colour, $shadow, $navcolo '$iconset' => array('redbasic_iconset', t('Icons'), $iconset, '', $iconsets), '$shiny' => array('redbasic_shiny', t('Shiny style'), $shiny, '', $shinys), ));} - + + if(! feature_enabled(local_user(),'expert')) { + $t = get_markup_template('basic_theme_settings.tpl'); + $o .= replace_macros($t, array( + '$submit' => t('Submit'), + '$baseurl' => $a->get_baseurl(), + '$title' => t("Theme settings"), + '$font_size' => array('redbasic_font_size', t('Set font-size for posts and comments'), $font_size, '', $font_sizes), + '$line_height' => array('redbasic_line_height', t('Set line-height for posts and comments'), $line_height, '', $line_heights), + '$colour_scheme' => array('redbasic_colour_scheme', t('Set colour scheme'), $colour_scheme, '', $colour_schemes), + ));} + return $o; } diff --git a/view/theme/redbasic/tpl/basic_theme_settings.tpl b/view/theme/redbasic/tpl/basic_theme_settings.tpl new file mode 100644 index 000000000..6f71a6a1a --- /dev/null +++ b/view/theme/redbasic/tpl/basic_theme_settings.tpl @@ -0,0 +1,9 @@ +{{inc field_select.tpl with $field=$font_size}}{{endinc}} + +{{inc field_select.tpl with $field=$line_height}}{{endinc}} + +{{inc field_select.tpl with $field=$colour_scheme}}{{endinc}} + +
+ +
diff --git a/view/theme/redbasic/tpl/profile_advanced.tpl b/view/theme/redbasic/tpl/profile_advanced.tpl new file mode 100644 index 000000000..cb0cc4d9a --- /dev/null +++ b/view/theme/redbasic/tpl/profile_advanced.tpl @@ -0,0 +1,171 @@ +

$title

+ +
+
+
$profile.fullname.0
+
$profile.fullname.1
+
+ +{{ if $profile.gender }} +
+
$profile.gender.0
+
$profile.gender.1
+
+{{ endif }} + +{{ if $profile.birthday }} +
+
$profile.birthday.0
+
$profile.birthday.1
+
+{{ endif }} + +{{ if $profile.age }} +
+
$profile.age.0
+
$profile.age.1
+
+{{ endif }} + +{{ if $profile.marital }} +
+
$profile.marital.0
+
$profile.marital.1{{ if $profile.marital.with }} ($profile.marital.with){{ endif }}{{ if $profile.howlong }} $profile.howlong{{ endif }}
+
+{{ endif }} + +{{ if $profile.sexual }} +
+
$profile.sexual.0
+
$profile.sexual.1
+
+{{ endif }} + +{{ if $profile.keywords }} +
+
$profile.keywords.0
+
$profile.keywords.1
+
+{{ endif }} + +{{ if $profile.homepage }} +
+
$profile.homepage.0
+
$profile.homepage.1
+
+{{ endif }} + +{{ if $profile.hometown }} +
+
$profile.hometown.0
+
$profile.hometown.1
+
+{{ endif }} + +{{ if $profile.politic }} +
+
$profile.politic.0
+
$profile.politic.1
+
+{{ endif }} + +{{ if $profile.religion }} +
+
$profile.religion.0
+
$profile.religion.1
+
+{{ endif }} + +{{ if $profile.about }} +
+
$profile.about.0
+
$profile.about.1
+
+{{ endif }} + +{{ if $profile.interest }} +
+
$profile.interest.0
+
$profile.interest.1
+
+{{ endif }} + +{{ if $profile.likes }} +
+
$profile.likes.0
+
$profile.likes.1
+
+{{ endif }} + +{{ if $profile.dislikes }} +
+
$profile.dislikes.0
+
$profile.dislikes.1
+
+{{ endif }} + +{{ if $profile.contact }} +
+
$profile.contact.0
+
$profile.contact.1
+
+{{ endif }} + + +{{ if $profile.music }} +
+
$profile.music.0
+
$profile.music.1
+
+{{ endif }} + + +{{ if $profile.book }} +
+
$profile.book.0
+
$profile.book.1
+
+{{ endif }} + + +{{ if $profile.tv }} +
+
$profile.tv.0
+
$profile.tv.1
+
+{{ endif }} + + +{{ if $profile.film }} +
+
$profile.film.0
+
$profile.film.1
+
+{{ endif }} + + +{{ if $profile.romance }} +
+
$profile.romance.0
+
$profile.romance.1
+
+{{ endif }} + + +{{ if $profile.work }} +
+
$profile.work.0
+
$profile.work.1
+
+{{ endif }} + +{{ if $profile.education }} +
+
$profile.education.0
+
$profile.education.1
+
+{{ endif }} +
+ + + -- cgit v1.2.3