diff --git a/include/text.php b/include/text.php index ea64a3d282..656cd8809c 100644 --- a/include/text.php +++ b/include/text.php @@ -388,11 +388,13 @@ function get_intltext_template($s) { if(! function_exists('get_markup_template')) { function get_markup_template($s) { - + $a=get_app(); $theme = current_theme(); if(file_exists("view/theme/$theme/$s")) return file_get_contents("view/theme/$theme/$s"); + elseif (x($a->theme_info,"extends") && file_exists("view/theme/".$a->theme_info["extends"]."/$s")) + return file_get_contents("view/theme/".$a->theme_info["extends"]."/$s"); else return file_get_contents("view/$s"); diff --git a/index.php b/index.php index 98733c4c82..25fdb4f8c3 100644 --- a/index.php +++ b/index.php @@ -218,6 +218,13 @@ if(strlen($a->module)) { } } +/** + * load current theme info + */ +$theme_info_file = "view/theme/".current_theme()."/theme.php"; +if (file_exists($theme_info_file)){ + require_once($theme_info_file); +} /* initialise content region */ diff --git a/view/theme/clean/nav.tpl b/view/theme/clean/nav.tpl deleted file mode 100644 index 2cd29a7c29..0000000000 --- a/view/theme/clean/nav.tpl +++ /dev/null @@ -1,51 +0,0 @@ - diff --git a/view/theme/clean/theme.php b/view/theme/clean/theme.php new file mode 100644 index 0000000000..47b43cf131 --- /dev/null +++ b/view/theme/clean/theme.php @@ -0,0 +1,4 @@ +theme_info = array( + 'extends' => 'loozah', +); diff --git a/view/theme/darkness/nav.tpl b/view/theme/darkness/nav.tpl deleted file mode 100644 index 2cd29a7c29..0000000000 --- a/view/theme/darkness/nav.tpl +++ /dev/null @@ -1,51 +0,0 @@ - diff --git a/view/theme/darkness/theme.php b/view/theme/darkness/theme.php new file mode 100644 index 0000000000..47b43cf131 --- /dev/null +++ b/view/theme/darkness/theme.php @@ -0,0 +1,4 @@ +theme_info = array( + 'extends' => 'loozah', +); diff --git a/view/theme/darkzero/nav.tpl b/view/theme/darkzero/nav.tpl deleted file mode 100644 index 2cd29a7c29..0000000000 --- a/view/theme/darkzero/nav.tpl +++ /dev/null @@ -1,51 +0,0 @@ - diff --git a/view/theme/darkzero/theme.php b/view/theme/darkzero/theme.php new file mode 100644 index 0000000000..338f40cbfb --- /dev/null +++ b/view/theme/darkzero/theme.php @@ -0,0 +1,4 @@ +theme_info = array( + 'extends' => 'duepuntozero', +); diff --git a/view/theme/duepuntozero/profile_vcard.tpl b/view/theme/duepuntozero/profile_vcard.tpl new file mode 100644 index 0000000000..b3f5cc50d6 --- /dev/null +++ b/view/theme/duepuntozero/profile_vcard.tpl @@ -0,0 +1,47 @@ +
+ +
$profile.name
+ + + + {{ if $pdesc }}
$profile.pdesc
{{ endif }} +
$profile.name
+ + + + {{ if $location }} +
$location
+
+ {{ if $profile.address }}
$profile.address
{{ endif }} + + $profile.locality{{ if $profile.locality }}, {{ endif }} + $profile.region + $profile.postal-code + + {{ if $profile.country-name }}$profile.country-name{{ endif }} +
+
+ {{ endif }} + + {{ if $gender }}
$gender
$profile.gender
{{ endif }} + + {{ if $profile.pubkey }}{{ endif }} + + {{ if $marital }}
$marital
$profile.marital
{{ endif }} + + {{ if $homepage }}
$homepage
$profile.homepage
{{ endif }} + + {{ inc diaspora_vcard.tpl }}{{ endinc }} + + +
+ +$contact_block + + diff --git a/view/theme/duepuntozero/theme.php b/view/theme/duepuntozero/theme.php new file mode 100644 index 0000000000..ebced7b9b8 --- /dev/null +++ b/view/theme/duepuntozero/theme.php @@ -0,0 +1,2 @@ +theme_info = array(); diff --git a/view/theme/easterbunny/nav.tpl b/view/theme/easterbunny/nav.tpl deleted file mode 100644 index 2cd29a7c29..0000000000 --- a/view/theme/easterbunny/nav.tpl +++ /dev/null @@ -1,51 +0,0 @@ - diff --git a/view/theme/easterbunny/theme.php b/view/theme/easterbunny/theme.php new file mode 100644 index 0000000000..47b43cf131 --- /dev/null +++ b/view/theme/easterbunny/theme.php @@ -0,0 +1,4 @@ +theme_info = array( + 'extends' => 'loozah', +); diff --git a/view/theme/goldenrod/nav.tpl b/view/theme/goldenrod/nav.tpl deleted file mode 100644 index 2cd29a7c29..0000000000 --- a/view/theme/goldenrod/nav.tpl +++ /dev/null @@ -1,51 +0,0 @@ - diff --git a/view/theme/goldenrod/theme.php b/view/theme/goldenrod/theme.php new file mode 100644 index 0000000000..47b43cf131 --- /dev/null +++ b/view/theme/goldenrod/theme.php @@ -0,0 +1,4 @@ +theme_info = array( + 'extends' => 'loozah', +); diff --git a/view/theme/greenzero/nav.tpl b/view/theme/greenzero/nav.tpl deleted file mode 100644 index 2cd29a7c29..0000000000 --- a/view/theme/greenzero/nav.tpl +++ /dev/null @@ -1,51 +0,0 @@ - diff --git a/view/theme/greenzero/theme.php b/view/theme/greenzero/theme.php new file mode 100644 index 0000000000..338f40cbfb --- /dev/null +++ b/view/theme/greenzero/theme.php @@ -0,0 +1,4 @@ +theme_info = array( + 'extends' => 'duepuntozero', +); diff --git a/view/theme/loozah/profile_vcard.tpl b/view/theme/loozah/profile_vcard.tpl new file mode 100644 index 0000000000..b3f5cc50d6 --- /dev/null +++ b/view/theme/loozah/profile_vcard.tpl @@ -0,0 +1,47 @@ +
+ +
$profile.name
+ + + + {{ if $pdesc }}
$profile.pdesc
{{ endif }} +
$profile.name
+ + + + {{ if $location }} +
$location
+
+ {{ if $profile.address }}
$profile.address
{{ endif }} + + $profile.locality{{ if $profile.locality }}, {{ endif }} + $profile.region + $profile.postal-code + + {{ if $profile.country-name }}$profile.country-name{{ endif }} +
+
+ {{ endif }} + + {{ if $gender }}
$gender
$profile.gender
{{ endif }} + + {{ if $profile.pubkey }}{{ endif }} + + {{ if $marital }}
$marital
$profile.marital
{{ endif }} + + {{ if $homepage }}
$homepage
$profile.homepage
{{ endif }} + + {{ inc diaspora_vcard.tpl }}{{ endinc }} + + +
+ +$contact_block + + diff --git a/view/theme/purplezero/nav.tpl b/view/theme/purplezero/nav.tpl deleted file mode 100644 index 2cd29a7c29..0000000000 --- a/view/theme/purplezero/nav.tpl +++ /dev/null @@ -1,51 +0,0 @@ - diff --git a/view/theme/purplezero/theme.php b/view/theme/purplezero/theme.php new file mode 100644 index 0000000000..338f40cbfb --- /dev/null +++ b/view/theme/purplezero/theme.php @@ -0,0 +1,4 @@ +theme_info = array( + 'extends' => 'duepuntozero', +); diff --git a/view/theme/shady/nav.tpl b/view/theme/shady/nav.tpl deleted file mode 100644 index 2cd29a7c29..0000000000 --- a/view/theme/shady/nav.tpl +++ /dev/null @@ -1,51 +0,0 @@ - diff --git a/view/theme/shady/theme.php b/view/theme/shady/theme.php new file mode 100644 index 0000000000..47b43cf131 --- /dev/null +++ b/view/theme/shady/theme.php @@ -0,0 +1,4 @@ +theme_info = array( + 'extends' => 'loozah', +); diff --git a/view/theme/three-d/nav.tpl b/view/theme/three-d/nav.tpl deleted file mode 100644 index 2cd29a7c29..0000000000 --- a/view/theme/three-d/nav.tpl +++ /dev/null @@ -1,51 +0,0 @@ - diff --git a/view/theme/three-d/theme.php b/view/theme/three-d/theme.php new file mode 100644 index 0000000000..47b43cf131 --- /dev/null +++ b/view/theme/three-d/theme.php @@ -0,0 +1,4 @@ +theme_info = array( + 'extends' => 'loozah', +);