From a0d19ffb7241a1c7a4b85e6d0fd58fbb2f718468 Mon Sep 17 00:00:00 2001 From: Zach Prezkuta Date: Sun, 6 Jan 2013 14:42:51 -0700 Subject: implement Smarty3 --- view/theme/fancyred/php/config.php | 2 +- view/theme/fancyred/php/theme.php | 1 + view/theme/redbasic/php/config.php | 2 +- view/theme/redbasic/php/theme.php | 1 + view/theme/redbasic/tpl/smarty3/lang_selector.tpl | 10 ++++ .../redbasic/tpl/smarty3/moderated_comment.tpl | 61 ++++++++++++++++++++++ view/theme/redbasic/tpl/smarty3/profile_vcard.tpl | 51 ++++++++++++++++++ view/theme/redbasic/tpl/smarty3/prv_message.tpl | 39 ++++++++++++++ 8 files changed, 165 insertions(+), 2 deletions(-) create mode 100644 view/theme/redbasic/tpl/smarty3/lang_selector.tpl create mode 100644 view/theme/redbasic/tpl/smarty3/moderated_comment.tpl create mode 100644 view/theme/redbasic/tpl/smarty3/profile_vcard.tpl create mode 100644 view/theme/redbasic/tpl/smarty3/prv_message.tpl (limited to 'view/theme') diff --git a/view/theme/fancyred/php/config.php b/view/theme/fancyred/php/config.php index 48035f507..833d09050 100644 --- a/view/theme/fancyred/php/config.php +++ b/view/theme/fancyred/php/config.php @@ -65,7 +65,7 @@ function fancyred_form(&$a, $font_size, $line_height, $colour) { 'dark' => 'dark', ); - $t = file_get_contents( dirname(__file__). "/../tpl/theme_settings.tpl" ); + $t = get_markup_template('theme_settings.tpl'); $o .= replace_macros($t, array( '$submit' => t('Submit'), '$baseurl' => $a->get_baseurl(), diff --git a/view/theme/fancyred/php/theme.php b/view/theme/fancyred/php/theme.php index b77664567..1ac6d4d21 100644 --- a/view/theme/fancyred/php/theme.php +++ b/view/theme/fancyred/php/theme.php @@ -1,5 +1,6 @@ set_template_engine('smarty3'); // head_add_js('redbasic.js'); } diff --git a/view/theme/redbasic/php/config.php b/view/theme/redbasic/php/config.php index 1ca9cc5ed..ad5df57ce 100644 --- a/view/theme/redbasic/php/config.php +++ b/view/theme/redbasic/php/config.php @@ -65,7 +65,7 @@ function redbasic_form(&$a, $font_size, $line_height, $colour) { 'dark' => 'dark', ); - $t = file_get_contents( dirname(__file__). "/../tpl/theme_settings.tpl" ); + $t = get_markup_template('theme_settings.tpl'); $o .= replace_macros($t, array( '$submit' => t('Submit'), '$baseurl' => $a->get_baseurl(), diff --git a/view/theme/redbasic/php/theme.php b/view/theme/redbasic/php/theme.php index 47e1df5d1..52e571f0a 100644 --- a/view/theme/redbasic/php/theme.php +++ b/view/theme/redbasic/php/theme.php @@ -1,5 +1,6 @@ set_template_engine('smarty3'); // head_add_js('redbasic.js'); } diff --git a/view/theme/redbasic/tpl/smarty3/lang_selector.tpl b/view/theme/redbasic/tpl/smarty3/lang_selector.tpl new file mode 100644 index 000000000..945cbf51e --- /dev/null +++ b/view/theme/redbasic/tpl/smarty3/lang_selector.tpl @@ -0,0 +1,10 @@ +
+ diff --git a/view/theme/redbasic/tpl/smarty3/moderated_comment.tpl b/view/theme/redbasic/tpl/smarty3/moderated_comment.tpl new file mode 100644 index 000000000..8fbdf4bc4 --- /dev/null +++ b/view/theme/redbasic/tpl/smarty3/moderated_comment.tpl @@ -0,0 +1,61 @@ +
+
+ + + + + + + +
+ {{$mytitle}} +
+
+ +
    +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
+
+ + +
+ + +
+
+ +
diff --git a/view/theme/redbasic/tpl/smarty3/profile_vcard.tpl b/view/theme/redbasic/tpl/smarty3/profile_vcard.tpl new file mode 100644 index 000000000..048c461f4 --- /dev/null +++ b/view/theme/redbasic/tpl/smarty3/profile_vcard.tpl @@ -0,0 +1,51 @@ +
+ +
{{$profile.name}}
+ + + + {{if $pdesc}}
{{$profile.pdesc}}
{{/if}} +
{{$profile.name}}
+ + + + {{if $location}} +
{{$location}}
+
+ {{if $profile.address}}
{{$profile.address}}
{{/if}} + + {{$profile.locality}}{{if $profile.locality}}, {{/if}} + {{$profile.region}} + {{$profile.postal-code}} + + {{if $profile.country-name}}{{$profile.country-name}}{{/if}} +
+
+ {{/if}} + + {{if $gender}}
{{$gender}}
{{$profile.gender}}
{{/if}} + + {{if $profile.pubkey}}{{/if}} + + {{if $marital}}
{{$marital}}
{{$profile.marital}}
{{/if}} + + {{if $homepage}}
{{$homepage}}
{{$profile.homepage}}
{{/if}} + + {{include file="diaspora_vcard.tpl"}} + +
+ +
+ +{{$contact_block}} + + diff --git a/view/theme/redbasic/tpl/smarty3/prv_message.tpl b/view/theme/redbasic/tpl/smarty3/prv_message.tpl new file mode 100644 index 000000000..9023540c4 --- /dev/null +++ b/view/theme/redbasic/tpl/smarty3/prv_message.tpl @@ -0,0 +1,39 @@ + +

{{$header}}

+ +
+
+ +{{$parent}} + +
{{$to}}
+ +{{if $showinputs}} + + +{{else}} +{{$select}} +{{/if}} + +
{{$subject}}
+ + +
{{$yourmessage}}
+ + + +
+ +
+
+
+ +
+ +
+
+
+
+
-- cgit v1.2.3 From 4281a95cbcc6a6bc2eae9ec0b393af9b0ec7b739 Mon Sep 17 00:00:00 2001 From: Zach Prezkuta Date: Sun, 6 Jan 2013 16:08:56 -0700 Subject: rebase and update themes --- view/theme/fancyred/tpl/smarty3/conv_item.tpl | 117 +++++++++++++++++++++ view/theme/fancyred/tpl/smarty3/theme_settings.tpl | 7 ++ view/theme/redbasic/tpl/smarty3/theme_settings.tpl | 7 ++ 3 files changed, 131 insertions(+) create mode 100644 view/theme/fancyred/tpl/smarty3/conv_item.tpl create mode 100644 view/theme/fancyred/tpl/smarty3/theme_settings.tpl create mode 100644 view/theme/redbasic/tpl/smarty3/theme_settings.tpl (limited to 'view/theme') diff --git a/view/theme/fancyred/tpl/smarty3/conv_item.tpl b/view/theme/fancyred/tpl/smarty3/conv_item.tpl new file mode 100644 index 000000000..cf0f02f03 --- /dev/null +++ b/view/theme/fancyred/tpl/smarty3/conv_item.tpl @@ -0,0 +1,117 @@ +{{if $item.comment_firstcollapsed}} +
+ {{$item.num_comments}} {{$item.hide_text}} +
+ {{/if}} diff --git a/view/theme/fancyred/tpl/smarty3/theme_settings.tpl b/view/theme/fancyred/tpl/smarty3/theme_settings.tpl new file mode 100644 index 000000000..72749d9ce --- /dev/null +++ b/view/theme/fancyred/tpl/smarty3/theme_settings.tpl @@ -0,0 +1,7 @@ +{{include file="field_select.tpl" field=$font_size}} + +{{include file="field_select.tpl" field=$line_height}} + +
+ +
diff --git a/view/theme/redbasic/tpl/smarty3/theme_settings.tpl b/view/theme/redbasic/tpl/smarty3/theme_settings.tpl new file mode 100644 index 000000000..27f356b92 --- /dev/null +++ b/view/theme/redbasic/tpl/smarty3/theme_settings.tpl @@ -0,0 +1,7 @@ +{{include file="field_select.tpl" field=$font_size}} + +{{include file="field_select.tpl" field=$line_height}} + +
+ +
-- cgit v1.2.3 From b4a95460e65dbadaf074a414a9e3d9367e109f19 Mon Sep 17 00:00:00 2001 From: Zach Prezkuta Date: Sun, 6 Jan 2013 19:34:54 -0700 Subject: fix show-stopping bugs --- view/theme/redbasic/tpl/smarty3/lang_selector.tpl | 10 ---- .../redbasic/tpl/smarty3/moderated_comment.tpl | 61 ---------------------- view/theme/redbasic/tpl/smarty3/profile_vcard.tpl | 51 ------------------ view/theme/redbasic/tpl/smarty3/prv_message.tpl | 39 -------------- 4 files changed, 161 deletions(-) delete mode 100644 view/theme/redbasic/tpl/smarty3/lang_selector.tpl delete mode 100644 view/theme/redbasic/tpl/smarty3/moderated_comment.tpl delete mode 100644 view/theme/redbasic/tpl/smarty3/profile_vcard.tpl delete mode 100644 view/theme/redbasic/tpl/smarty3/prv_message.tpl (limited to 'view/theme') diff --git a/view/theme/redbasic/tpl/smarty3/lang_selector.tpl b/view/theme/redbasic/tpl/smarty3/lang_selector.tpl deleted file mode 100644 index 945cbf51e..000000000 --- a/view/theme/redbasic/tpl/smarty3/lang_selector.tpl +++ /dev/null @@ -1,10 +0,0 @@ -
- diff --git a/view/theme/redbasic/tpl/smarty3/moderated_comment.tpl b/view/theme/redbasic/tpl/smarty3/moderated_comment.tpl deleted file mode 100644 index 8fbdf4bc4..000000000 --- a/view/theme/redbasic/tpl/smarty3/moderated_comment.tpl +++ /dev/null @@ -1,61 +0,0 @@ -
-
- - - - - - - -
- {{$mytitle}} -
-
- -
    -
  • -
  • -
  • -
  • -
  • -
  • -
  • -
  • -
-
- - -
- - -
-
- -
diff --git a/view/theme/redbasic/tpl/smarty3/profile_vcard.tpl b/view/theme/redbasic/tpl/smarty3/profile_vcard.tpl deleted file mode 100644 index 048c461f4..000000000 --- a/view/theme/redbasic/tpl/smarty3/profile_vcard.tpl +++ /dev/null @@ -1,51 +0,0 @@ -
- -
{{$profile.name}}
- - - - {{if $pdesc}}
{{$profile.pdesc}}
{{/if}} -
{{$profile.name}}
- - - - {{if $location}} -
{{$location}}
-
- {{if $profile.address}}
{{$profile.address}}
{{/if}} - - {{$profile.locality}}{{if $profile.locality}}, {{/if}} - {{$profile.region}} - {{$profile.postal-code}} - - {{if $profile.country-name}}{{$profile.country-name}}{{/if}} -
-
- {{/if}} - - {{if $gender}}
{{$gender}}
{{$profile.gender}}
{{/if}} - - {{if $profile.pubkey}}{{/if}} - - {{if $marital}}
{{$marital}}
{{$profile.marital}}
{{/if}} - - {{if $homepage}}
{{$homepage}}
{{$profile.homepage}}
{{/if}} - - {{include file="diaspora_vcard.tpl"}} - -
- -
- -{{$contact_block}} - - diff --git a/view/theme/redbasic/tpl/smarty3/prv_message.tpl b/view/theme/redbasic/tpl/smarty3/prv_message.tpl deleted file mode 100644 index 9023540c4..000000000 --- a/view/theme/redbasic/tpl/smarty3/prv_message.tpl +++ /dev/null @@ -1,39 +0,0 @@ - -

{{$header}}

- -
-
- -{{$parent}} - -
{{$to}}
- -{{if $showinputs}} - - -{{else}} -{{$select}} -{{/if}} - -
{{$subject}}
- - -
{{$yourmessage}}
- - - -
- -
-
-
- -
- -
-
-
-
-
-- cgit v1.2.3