From e6763be5f32282296c4a76a126d6b67628dbdd04 Mon Sep 17 00:00:00 2001 From: Thomas Willingham Date: Mon, 6 Aug 2012 19:25:09 +0100 Subject: Bring get_theme_screenshot and get_theme_info up to date. --- include/plugin.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/include/plugin.php b/include/plugin.php index 8f6d6ea98..22745835d 100644 --- a/include/plugin.php +++ b/include/plugin.php @@ -266,9 +266,9 @@ function get_theme_info($theme){ if(file_exists("view/theme/$theme/unsupported")) $info['unsupported'] = true; - if (!is_file("view/theme/$theme/theme.php")) return $info; + if (!is_file("view/theme/$theme/php/theme.php")) return $info; - $f = file_get_contents("view/theme/$theme/theme.php"); + $f = file_get_contents("view/theme/$theme/php/theme.php"); $r = preg_match("|/\*.*\*/|msU", $f, $m); @@ -313,8 +313,8 @@ function get_theme_screenshot($theme) { $a = get_app(); $exts = array('.png','.jpg'); foreach($exts as $ext) { - if(file_exists('view/theme/' . $theme . '/screenshot' . $ext)) - return($a->get_baseurl() . '/view/theme/' . $theme . '/screenshot' . $ext); + if(file_exists('view/theme/' . $theme . '/img/screenshot' . $ext)) + return($a->get_baseurl() . '/view/theme/' . $theme . '/img/screenshot' . $ext); } return($a->get_baseurl() . '/images/blank.png'); } -- cgit v1.2.3 From 6fa7fa5ae8ad1b8e7b1854c17e490b7aaae0fcfb Mon Sep 17 00:00:00 2001 From: Thomas Willingham Date: Mon, 6 Aug 2012 19:31:37 +0100 Subject: get_theme_config_file --- mod/settings.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/mod/settings.php b/mod/settings.php index 5e8c78ae7..7c944a149 100644 --- a/mod/settings.php +++ b/mod/settings.php @@ -5,12 +5,12 @@ function get_theme_config_file($theme){ $a = get_app(); $base_theme = $a->theme_info['extends']; - if (file_exists("view/theme/$theme/config.php")){ - return "view/theme/$theme/config.php"; + if (file_exists("view/theme/$theme/php/config.php")){ + return "view/theme/$theme/php/config.php"; } - if (file_exists("view/theme/$base_theme/config.php")){ - return "view/theme/$base_theme/config.php"; - } + //if (file_exists("view/theme/$base_theme/php/config.php")){ + // return "view/theme/$base_theme/php/config.php"; + //} return null; } -- cgit v1.2.3 From fca25c1909efba569837cb3ab9efdbb9b08845d2 Mon Sep 17 00:00:00 2001 From: Thomas Willingham Date: Mon, 6 Aug 2012 19:36:41 +0100 Subject: Theme admin menu. --- mod/admin.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mod/admin.php b/mod/admin.php index c8ed7a53b..b0040f59a 100644 --- a/mod/admin.php +++ b/mod/admin.php @@ -46,8 +46,8 @@ function admin_post(&$a){ break; case 'themes': $theme = $a->argv[2]; - if (is_file("view/theme/$theme/config.php")){ - require_once("view/theme/$theme/config.php"); + if (is_file("view/theme/$theme/php/config.php")){ + require_once("view/theme/$theme/php/config.php"); if (function_exists("theme_admin_post")){ theme_admin_post($a); } -- cgit v1.2.3 From 10cb60195fc37fcd85012b2357c69126f5eca3ce Mon Sep 17 00:00:00 2001 From: Thomas Willingham Date: Mon, 6 Aug 2012 19:41:27 +0100 Subject: Bloody hell, this touches a lot of code. --- mod/admin.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mod/admin.php b/mod/admin.php index b0040f59a..44010efda 100644 --- a/mod/admin.php +++ b/mod/admin.php @@ -937,8 +937,8 @@ function admin_page_themes(&$a){ } $admin_form=""; - if (is_file("view/theme/$theme/config.php")){ - require_once("view/theme/$theme/config.php"); + if (is_file("view/theme/$theme/php/config.php")){ + require_once("view/theme/$theme/php/config.php"); if(function_exists("theme_admin")){ $admin_form = theme_admin($a); } -- cgit v1.2.3 From 62795bb544e946545d5c444e70d318db8577bd2d Mon Sep 17 00:00:00 2001 From: Thomas Willingham Date: Mon, 6 Aug 2012 21:23:47 +0100 Subject: Port Comix - needs some CSS-fu, but works. --- view/theme/comix/css/style.css | 109 +++++++++++++++++++++++++++++++++ view/theme/comix/img/screenshot.jpg | Bin 0 -> 96214 bytes view/theme/comix/php/theme.php | 60 ++++++++++++++++++ view/theme/comix/tpl/comment_item.tpl | 32 ++++++++++ view/theme/comix/tpl/search_item.tpl | 54 ++++++++++++++++ view/theme/comix/tpl/wall_item.tpl | 78 +++++++++++++++++++++++ view/theme/comix/tpl/wallwall_item.tpl | 85 +++++++++++++++++++++++++ 7 files changed, 418 insertions(+) create mode 100644 view/theme/comix/css/style.css create mode 100644 view/theme/comix/img/screenshot.jpg create mode 100644 view/theme/comix/php/theme.php create mode 100644 view/theme/comix/tpl/comment_item.tpl create mode 100644 view/theme/comix/tpl/search_item.tpl create mode 100644 view/theme/comix/tpl/wall_item.tpl create mode 100644 view/theme/comix/tpl/wallwall_item.tpl diff --git a/view/theme/comix/css/style.css b/view/theme/comix/css/style.css new file mode 100644 index 000000000..534e79cf4 --- /dev/null +++ b/view/theme/comix/css/style.css @@ -0,0 +1,109 @@ +@import url('../duepuntozero/style.css'); + +body { + font-family: "Comic Sans MS", sans !important; + font-size: 13px; +} +.wall-item-content-wrapper { + border: none; +} + +.wall-item-content-wrapper.comment { + background: #ffffff !important; + border-left: 1px solid #EEE; +} + +.wall-item-tools { + background: none; +} + +.comment-edit-text-empty, .comment-edit-text-full { + border: none; + border-left: 1px solid #EEE; + background: #EEEEEE; +} + +.comment-edit-wrapper, .comment-wwedit-wrapper { + background: #ffffff !important; +} + +section { + margin: 0px 32px; +} + +aside { + margin-left: 32px; +} +nav { + margin-left: 32px; + margin-right: 32px; +} + +nav #site-location { + top: 80px; + right: 36px; +} + +.wall-item-photo, .photo, .contact-block-img, .my-comment-photo { + border-radius: 3px; + -moz-border-radius: 3px; + margin-top: 15px; +} + +.wall-item-photo.comment { + margin-top: 26px; +} + + +.triangle-isosceles { + position:relative; + padding:15px; + margin:1em 0 3em; + color:#000; + background:#EEEEEE; /* default background for browsers without gradient support */ + /* css3 */ + background:-webkit-gradient(linear, 0 0, 0 100%, from(#EEEEEE), to(#ffffff)); + background:-moz-linear-gradient(#EEEEEE, #ffffff); + background:-o-linear-gradient(#EEEEEE, #ffffff); + background:linear-gradient(#EEEEEE, #ffffff); + -webkit-border-radius:10px; + -moz-border-radius:10px; + border-radius:10px; +} + +/* Variant : for left/right positioned triangle +------------------------------------------ */ + +.triangle-isosceles.left { + margin-left:30px; + background:#F8F8F8; + border: 2px solid #CCCCCC; +} + +/* THE TRIANGLE +------------------------------------------------------------------------------------------------------------------------------- */ + +/* creates triangle */ +.triangle-isosceles:after { + content:""; + position:absolute; + bottom:-8px; /* value = - border-top-width - border-bottom-width */ + left:30px; /* controls horizontal position */ + border-width:15px 15px 0; /* vary these values to change the angle of the vertex */ + border-style:solid; + border-color:#f8f8f8 transparent; + /* reduce the damage in FF3.0 */ + display:block; + width:0; +} + +/* Variant : left +------------------------------------------ */ + +.triangle-isosceles.left:after { + top:12px; /* controls vertical position */ + left:-30px; /* value = - border-left-width - border-right-width */ + bottom:auto; + border-width:10px 30px 10px 0; + border-color:transparent #f8f8f8; +} diff --git a/view/theme/comix/img/screenshot.jpg b/view/theme/comix/img/screenshot.jpg new file mode 100644 index 000000000..5ad46cd8b Binary files /dev/null and b/view/theme/comix/img/screenshot.jpg differ diff --git a/view/theme/comix/php/theme.php b/view/theme/comix/php/theme.php new file mode 100644 index 000000000..e2f7f4db3 --- /dev/null +++ b/view/theme/comix/php/theme.php @@ -0,0 +1,60 @@ + + */ + + +$a->theme_info = array( + 'extends' => 'duepuntozero', +); + +$a->page['htmlhead'] .= <<< EOT + +EOT; diff --git a/view/theme/comix/tpl/comment_item.tpl b/view/theme/comix/tpl/comment_item.tpl new file mode 100644 index 000000000..9c3facaff --- /dev/null +++ b/view/theme/comix/tpl/comment_item.tpl @@ -0,0 +1,32 @@ +
+
+ + + + + + + +
+ $mytitle +
+
+ + {{ if $qcomment }} + {{ for $qcomment as $qc }} + $qc +   + {{ endfor }} + {{ endif }} + +
+ + +
+
+ +
diff --git a/view/theme/comix/tpl/search_item.tpl b/view/theme/comix/tpl/search_item.tpl new file mode 100644 index 000000000..dba289031 --- /dev/null +++ b/view/theme/comix/tpl/search_item.tpl @@ -0,0 +1,54 @@ +
+
+
+
+ + $item.name + menu +
+
    + $item.item_photo_menu +
+
+
+
+
+ {{ if $item.lock }}
$item.lock
+ {{ else }}
{{ endif }} +
$item.location
+
+
+
+ $item.name +
$item.ago
+ +
+
+
$item.title
+
+
$item.body
+
+
+
+ {{ if $item.drop.dropping }}{{ endif }} +
+ {{ if $item.drop.dropping }}{{ endif }} +
+
+
+
+ + +
+ {{ if $item.conv }} + $item.conv.title + {{ endif }} +
+ +
+ +
+ + diff --git a/view/theme/comix/tpl/wall_item.tpl b/view/theme/comix/tpl/wall_item.tpl new file mode 100644 index 000000000..dfcd8ca96 --- /dev/null +++ b/view/theme/comix/tpl/wall_item.tpl @@ -0,0 +1,78 @@ +
+
+
+
+ + $item.name + + menu +
+
    + $item.item_photo_menu +
+
+
+
+
+ {{ if $item.lock }}
$item.lock
+ {{ else }}
{{ endif }} +
$item.location
+
+
+
+ $item.name +
$item.ago
+ +
+
+
$item.title
+
+
$item.body +
+ {{ for $item.tags as $tag }} + $tag + {{ endfor }} +
+
+
+
+ {{ if $item.vote }} + + {{ endif }} + {{ if $item.plink }} + + {{ endif }} + {{ if $item.edpost }} + + {{ endif }} + + {{ if $item.star }} + + + {{ endif }} + {{ if $item.filer }} + + {{ endif }} +
+ {{ if $item.drop.dropping }}{{ endif }} +
+ {{ if $item.drop.dropping }}{{ endif }} +
+
+
+
+ +
$item.dislike
+
+ $item.comment +
+ +
+
diff --git a/view/theme/comix/tpl/wallwall_item.tpl b/view/theme/comix/tpl/wallwall_item.tpl new file mode 100644 index 000000000..abd5967b2 --- /dev/null +++ b/view/theme/comix/tpl/wallwall_item.tpl @@ -0,0 +1,85 @@ +
+
+
+
+ + $item.owner_name +
+
$item.wall
+
+ + $item.name + menu +
+
    + $item.item_photo_menu +
+
+ +
+
+
+ {{ if $item.lock }}
$item.lock
+ {{ else }}
{{ endif }} +
$item.location
+
+
+
+ $item.name $item.to $item.owner_name $item.vwall
+
$item.ago
+
+
+
$item.title
+
+
$item.body +
+ {{ for $item.tags as $tag }} + $tag + {{ endfor }} +
+
+
+
+ {{ if $item.vote }} + + {{ endif }} + {{ if $item.plink }} + + {{ endif }} + {{ if $item.edpost }} + + {{ endif }} + + {{ if $item.star }} + + + {{ endif }} + {{ if $item.filer }} + + {{ endif }} + +
+ {{ if $item.drop.dropping }}{{ endif }} +
+ {{ if $item.drop.dropping }}{{ endif }} +
+
+
+
+ +
$item.dislike
+
+
+ $item.comment +
+ +
+
+ -- cgit v1.2.3 From 49feb09c98aef8133f7f46a74934bef03b32618e Mon Sep 17 00:00:00 2001 From: Thomas Willingham Date: Mon, 6 Aug 2012 21:25:29 +0100 Subject: Port Comix-plain - also needs some CSS-fu, but works. --- view/theme/comix-plain/css/style.css | 105 +++++++++++++++++++++++++++ view/theme/comix-plain/img/screenshot.jpg | Bin 0 -> 96214 bytes view/theme/comix-plain/php/theme.php | 60 +++++++++++++++ view/theme/comix-plain/tpl/comment_item.tpl | 32 ++++++++ view/theme/comix-plain/tpl/search_item.tpl | 54 ++++++++++++++ view/theme/comix-plain/tpl/wall_item.tpl | 78 ++++++++++++++++++++ view/theme/comix-plain/tpl/wallwall_item.tpl | 85 ++++++++++++++++++++++ 7 files changed, 414 insertions(+) create mode 100644 view/theme/comix-plain/css/style.css create mode 100644 view/theme/comix-plain/img/screenshot.jpg create mode 100644 view/theme/comix-plain/php/theme.php create mode 100644 view/theme/comix-plain/tpl/comment_item.tpl create mode 100644 view/theme/comix-plain/tpl/search_item.tpl create mode 100644 view/theme/comix-plain/tpl/wall_item.tpl create mode 100644 view/theme/comix-plain/tpl/wallwall_item.tpl diff --git a/view/theme/comix-plain/css/style.css b/view/theme/comix-plain/css/style.css new file mode 100644 index 000000000..1a89cae7c --- /dev/null +++ b/view/theme/comix-plain/css/style.css @@ -0,0 +1,105 @@ +@import url('../duepuntozero/style.css'); + +.wall-item-content-wrapper { + border: none; +} + +.wall-item-content-wrapper.comment { + background: #ffffff !important; + border-left: 1px solid #EEE; +} + +.wall-item-tools { + background: none; +} + +.comment-edit-text-empty, .comment-edit-text-full { + border: none; + border-left: 1px solid #EEE; + background: #EEEEEE; +} + +.comment-edit-wrapper, .comment-wwedit-wrapper { + background: #ffffff !important; +} + +section { + margin: 0px 32px; +} + +aside { + margin-left: 32px; +} +nav { + margin-left: 32px; + margin-right: 32px; +} + +nav #site-location { + top: 80px; + right: 36px; +} + +.wall-item-photo, .photo, .contact-block-img, .my-comment-photo { + border-radius: 3px; + -moz-border-radius: 3px; + margin-top: 15px; +} + +.wall-item-photo.comment { + margin-top: 26px; +} + + +.triangle-isosceles { + position:relative; + padding:15px; + margin:1em 0 3em; + color:#000; + background:#EEEEEE; /* default background for browsers without gradient support */ + /* css3 */ + background:-webkit-gradient(linear, 0 0, 0 100%, from(#EEEEEE), to(#ffffff)); + background:-moz-linear-gradient(#EEEEEE, #ffffff); + background:-o-linear-gradient(#EEEEEE, #ffffff); + background:linear-gradient(#EEEEEE, #ffffff); + -webkit-border-radius:10px; + -moz-border-radius:10px; + border-radius:10px; +} + +/* Variant : for left/right positioned triangle +------------------------------------------ */ + +.triangle-isosceles.left { + margin-left:30px; + background:#F8F8F8; + border: 2px solid #CCCCCC; +} + +/* THE TRIANGLE +------------------------------------------------------------------------------------------------------------------------------- */ + +/* creates triangle */ +.triangle-isosceles:after { + content:""; + position:absolute; + bottom:-8px; /* value = - border-top-width - border-bottom-width */ + left:30px; /* controls horizontal position */ + border-width:15px 15px 0; /* vary these values to change the angle of the vertex */ + border-style:solid; + border-color:#f8f8f8 transparent; + /* reduce the damage in FF3.0 */ + display:block; + width:0; +} + +/* Variant : left +------------------------------------------ */ + +.triangle-isosceles.left:after { + top:12px; /* controls vertical position */ + left:-30px; /* value = - border-left-width - border-right-width */ + bottom:auto; + border-width:10px 30px 10px 0; + border-color:transparent #f8f8f8; +} diff --git a/view/theme/comix-plain/img/screenshot.jpg b/view/theme/comix-plain/img/screenshot.jpg new file mode 100644 index 000000000..5ad46cd8b Binary files /dev/null and b/view/theme/comix-plain/img/screenshot.jpg differ diff --git a/view/theme/comix-plain/php/theme.php b/view/theme/comix-plain/php/theme.php new file mode 100644 index 000000000..e2f7f4db3 --- /dev/null +++ b/view/theme/comix-plain/php/theme.php @@ -0,0 +1,60 @@ + + */ + + +$a->theme_info = array( + 'extends' => 'duepuntozero', +); + +$a->page['htmlhead'] .= <<< EOT + +EOT; diff --git a/view/theme/comix-plain/tpl/comment_item.tpl b/view/theme/comix-plain/tpl/comment_item.tpl new file mode 100644 index 000000000..9c3facaff --- /dev/null +++ b/view/theme/comix-plain/tpl/comment_item.tpl @@ -0,0 +1,32 @@ +
+
+ + + + + + + +
+ $mytitle +
+
+ + {{ if $qcomment }} + {{ for $qcomment as $qc }} + $qc +   + {{ endfor }} + {{ endif }} + +
+ + +
+
+ +
diff --git a/view/theme/comix-plain/tpl/search_item.tpl b/view/theme/comix-plain/tpl/search_item.tpl new file mode 100644 index 000000000..dba289031 --- /dev/null +++ b/view/theme/comix-plain/tpl/search_item.tpl @@ -0,0 +1,54 @@ +
+
+
+
+ + $item.name + menu +
+
    + $item.item_photo_menu +
+
+
+
+
+ {{ if $item.lock }}
$item.lock
+ {{ else }}
{{ endif }} +
$item.location
+
+
+
+ $item.name +
$item.ago
+ +
+
+
$item.title
+
+
$item.body
+
+
+
+ {{ if $item.drop.dropping }}{{ endif }} +
+ {{ if $item.drop.dropping }}{{ endif }} +
+
+
+
+ + +
+ {{ if $item.conv }} + $item.conv.title + {{ endif }} +
+ +
+ +
+ + diff --git a/view/theme/comix-plain/tpl/wall_item.tpl b/view/theme/comix-plain/tpl/wall_item.tpl new file mode 100644 index 000000000..dfcd8ca96 --- /dev/null +++ b/view/theme/comix-plain/tpl/wall_item.tpl @@ -0,0 +1,78 @@ +
+
+
+
+ + $item.name + + menu +
+
    + $item.item_photo_menu +
+
+
+
+
+ {{ if $item.lock }}
$item.lock
+ {{ else }}
{{ endif }} +
$item.location
+
+
+
+ $item.name +
$item.ago
+ +
+
+
$item.title
+
+
$item.body +
+ {{ for $item.tags as $tag }} + $tag + {{ endfor }} +
+
+
+
+ {{ if $item.vote }} + + {{ endif }} + {{ if $item.plink }} + + {{ endif }} + {{ if $item.edpost }} + + {{ endif }} + + {{ if $item.star }} + + + {{ endif }} + {{ if $item.filer }} + + {{ endif }} +
+ {{ if $item.drop.dropping }}{{ endif }} +
+ {{ if $item.drop.dropping }}{{ endif }} +
+
+
+
+ +
$item.dislike
+
+ $item.comment +
+ +
+
diff --git a/view/theme/comix-plain/tpl/wallwall_item.tpl b/view/theme/comix-plain/tpl/wallwall_item.tpl new file mode 100644 index 000000000..abd5967b2 --- /dev/null +++ b/view/theme/comix-plain/tpl/wallwall_item.tpl @@ -0,0 +1,85 @@ +
+
+
+
+ + $item.owner_name +
+
$item.wall
+
+ + $item.name + menu +
+
    + $item.item_photo_menu +
+
+ +
+
+
+ {{ if $item.lock }}
$item.lock
+ {{ else }}
{{ endif }} +
$item.location
+
+
+
+ $item.name $item.to $item.owner_name $item.vwall
+
$item.ago
+
+
+
$item.title
+
+
$item.body +
+ {{ for $item.tags as $tag }} + $tag + {{ endfor }} +
+
+
+
+ {{ if $item.vote }} + + {{ endif }} + {{ if $item.plink }} + + {{ endif }} + {{ if $item.edpost }} + + {{ endif }} + + {{ if $item.star }} + + + {{ endif }} + {{ if $item.filer }} + + {{ endif }} + +
+ {{ if $item.drop.dropping }}{{ endif }} +
+ {{ if $item.drop.dropping }}{{ endif }} +
+
+
+
+ +
$item.dislike
+
+
+ $item.comment +
+ +
+
+ -- cgit v1.2.3 From 5b1a4100e07db023b0f6dae89aa009e74992b7e6 Mon Sep 17 00:00:00 2001 From: Thomas Willingham Date: Tue, 7 Aug 2012 21:32:19 +0100 Subject: More wrong links --- mod/view.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mod/view.php b/mod/view.php index 15b3733b3..965e18067 100644 --- a/mod/view.php +++ b/mod/view.php @@ -9,8 +9,8 @@ function view_init($a){ if ($a->argc == 4){ $theme = $a->argv[2]; $THEMEPATH = "view/theme/$theme"; - if(file_exists("view/theme/$theme/style.php")) - require_once("view/theme/$theme/style.php"); + if(file_exists("view/theme/$theme/php/style.php")) + require_once("view/theme/$theme/php/style.php"); } killme(); -- cgit v1.2.3