diff --git a/include/network.php b/include/network.php
index 23ef50b21..8c678a443 100644
--- a/include/network.php
+++ b/include/network.php
@@ -587,13 +587,14 @@ function fetch_xrd_links($url) {
if(! function_exists('validate_url')) {
function validate_url(&$url) {
- // no naked subdomains
- if(strpos($url,'.') === false)
+
+ // no naked subdomains (allow localhost for tests)
+ if(strpos($url,'.') === false && strpos($url,'/localhost/') === false)
return false;
if(substr($url,0,4) != 'http')
$url = 'http://' . $url;
$h = @parse_url($url);
-
+
if(($h) && (dns_get_record($h['host'], DNS_A + DNS_CNAME + DNS_PTR))) {
return true;
}
diff --git a/include/text.php b/include/text.php
index 4ec59a665..8c8db66a9 100644
--- a/include/text.php
+++ b/include/text.php
@@ -1068,10 +1068,12 @@ function unamp($s) {
if(! function_exists('lang_selector')) {
function lang_selector() {
global $lang;
- $o = '
';
- $o .= '';
- $o .= '
';
+
+ $tpl = get_markup_template("lang_selector.tpl");
+ $o = replace_macros($tpl, array(
+ '$title' => t('Select an alternate language'),
+ '$langs' => array($lang_options, $selected),
+
+ ));
return $o;
}}
@@ -1510,4 +1517,4 @@ function fix_mce_lf($s) {
$s = str_replace("\r\n","\n",$s);
$s = str_replace("\n\n","\n",$s);
return $s;
-}
\ No newline at end of file
+}
diff --git a/mod/admin.php b/mod/admin.php
index 961002786..7386dc5a3 100644
--- a/mod/admin.php
+++ b/mod/admin.php
@@ -40,6 +40,20 @@ function admin_post(&$a){
goaway($a->get_baseurl(true) . '/admin/plugins/' . $a->argv[2] );
return; // NOTREACHED
break;
+ case 'themes':
+ $theme = $a->argv[2];
+ if (is_file("view/theme/$theme/config.php")){
+ require_once("view/theme/$theme/config.php");
+ if (function_exists("theme_admin_post")){
+ theme_admin_post($a);
+ }
+ }
+ info(t('Theme settings updated.'));
+ if(is_ajax()) return;
+
+ goaway($a->get_baseurl(true) . '/admin/themes/' . $theme );
+ return;
+ break;
case 'logs':
admin_page_logs_post($a);
break;
@@ -129,7 +143,13 @@ function admin_content(&$a) {
} else {
$o = admin_page_summary($a);
}
- return $o;
+
+ if(is_ajax()) {
+ echo $o;
+ killme();
+ } else {
+ return $o;
+ }
}
@@ -362,7 +382,7 @@ function admin_page_site(&$a) {
'$sitename' => array('sitename', t("Site name"), htmlentities($a->config['sitename'], ENT_QUOTES), ""),
'$banner' => array('banner', t("Banner/Logo"), $banner, ""),
'$language' => array('language', t("System language"), get_config('system','language'), "", $lang_choices),
- '$theme' => array('theme', t("System theme"), get_config('system','theme'), t("Default system theme - may be over-ridden by user profiles"), $theme_choices),
+ '$theme' => array('theme', t("System theme"), get_config('system','theme'), t("Default system theme - may be over-ridden by user profiles - change theme settings"), $theme_choices),
'$ssl_policy' => array('ssl_policy', t("SSL link policy"), (string) intval(get_config('system','ssl_policy')), t("Determines whether generated links should be forced to use SSL"), $ssl_choices),
'$maximagesize' => array('maximagesize', t("Maximum image size"), get_config('system','maximagesize'), t("Maximum size in bytes of uploaded images. Default is 0, which means no limits.")),
@@ -768,14 +788,22 @@ function admin_page_themes(&$a){
}
$readme=Null;
- if (is_file("view/$theme/README.md")){
- $readme = file_get_contents("view/$theme/README.md");
+ if (is_file("view/theme/$theme/README.md")){
+ $readme = file_get_contents("view/theme/$theme/README.md");
$readme = Markdown($readme);
- } else if (is_file("view/$theme/README")){
- $readme = "". file_get_contents("view/$theme/README") ."
";
+ } else if (is_file("view/theme/$theme/README")){
+ $readme = "". file_get_contents("view/theme/$theme/README") ."
";
}
$admin_form="";
+ if (is_file("view/theme/$theme/config.php")){
+ require_once("view/theme/$theme/config.php");
+ if(function_exists("theme_admin")){
+ $admin_form = theme_admin($a);
+ }
+
+ }
+
$screenshot = array( get_theme_screenshot($theme), t('Screenshot'));
if(! stristr($screenshot[0],$theme))
@@ -793,10 +821,10 @@ function admin_page_themes(&$a){
'$status' => $status,
'$action' => $action,
'$info' => get_theme_info($theme),
- '$function' => 'themes',
+ '$function' => 'themes',
'$admin_form' => $admin_form,
'$str_author' => t('Author: '),
- '$str_maintainer' => t('Maintainer: '),
+ '$str_maintainer' => t('Maintainer: '),
'$screenshot' => $screenshot,
'$readme' => $readme
));
@@ -805,7 +833,7 @@ function admin_page_themes(&$a){
/**
- * List plugins
+ * List themes
*/
$xthemes = array();
diff --git a/view/admin_plugins_details.tpl b/view/admin_plugins_details.tpl
index cbaef2d66..aaa366f65 100644
--- a/view/admin_plugins_details.tpl
+++ b/view/admin_plugins_details.tpl
@@ -17,7 +17,7 @@
{{ if $screenshot }}
-
+
{{ endif }}
{{ if $admin_form }}
diff --git a/view/admin_site.tpl b/view/admin_site.tpl
index ec144fbba..9de6bd9c5 100644
--- a/view/admin_site.tpl
+++ b/view/admin_site.tpl
@@ -1,3 +1,39 @@
+
$title - $page
diff --git a/view/field_themeselect.tpl b/view/field_themeselect.tpl
index f9f99492c..5847d8664 100644
--- a/view/field_themeselect.tpl
+++ b/view/field_themeselect.tpl
@@ -1,4 +1,4 @@
-
+
{{endif}}
- {{ inc $item.template }}{{ endinc }}
-
+ {{ if $item.type == tag }}
+ {{ inc wall_item_tag.tpl }}{{ endinc }}
+ {{ else }}
+ {{ inc $item.template }}{{ endinc }}
+ {{ endif }}
{{ endfor }}
diff --git a/view/theme/quattro/dark/colors.less b/view/theme/quattro/dark/colors.less
index b6d487f92..42fdd34bb 100644
--- a/view/theme/quattro/dark/colors.less
+++ b/view/theme/quattro/dark/colors.less
@@ -38,7 +38,7 @@
@Link: @Blue3;
@LinkHover: @Blue3;
@LinkVisited: @Blue3;
-
+@LinkDimmed: @Blue2;
@ButtonColor: @Grey1;
@ButtonBackgroundColor: @Grey5;
@@ -73,9 +73,13 @@
@FieldHelpColor: @Grey3;
-@ThreadBackgroundColor: #f6f7f8;
+@ThreadBackgroundColor: #eff0f1;
+@ThreadBottomBorderColor: @Grey2;
@ShinyBorderColor: @Yellow1;
+@ItemColor: @Grey5;
+@ItemColorDimmed: @Grey3;
+
@CommentBoxEmptyColor: @Grey3;
@CommentBoxEmptyBorderColor: @Grey3;
@CommentBoxFullColor: @Grey5;
diff --git a/view/theme/quattro/dark/style.css b/view/theme/quattro/dark/style.css
index 16c786d20..1fa03b253 100644
--- a/view/theme/quattro/dark/style.css
+++ b/view/theme/quattro/dark/style.css
@@ -66,6 +66,9 @@
.icon.s10.type-text {
background-image: url("../../../images/icons/10/text.png");
}
+.icon.s10.language {
+ background-image: url("icons/language.png");
+}
.icon.s10.text {
padding: 2px 0px 0px 15px;
}
@@ -121,6 +124,9 @@
.icon.s16.type-text {
background-image: url("../../../images/icons/16/text.png");
}
+.icon.s16.language {
+ background-image: url("icons/language.png");
+}
.icon.s16.text {
padding: 4px 0px 0px 20px;
}
@@ -176,6 +182,9 @@
.icon.s22.type-text {
background-image: url("../../../images/icons/22/text.png");
}
+.icon.s22.language {
+ background-image: url("icons/language.png");
+}
.icon.s22.text {
padding: 10px 0px 0px 25px;
}
@@ -231,6 +240,9 @@
.icon.s48.type-text {
background-image: url("../../../images/icons/48/text.png");
}
+.icon.s48.language {
+ background-image: url("icons/language.png");
+}
/* global */
body {
font-family: Liberation Sans, helvetica, arial, clean, sans-serif;
@@ -314,6 +326,10 @@ code {
float: right;
}
/* popup notifications */
+#jGrowl.top-right {
+ top: 30px;
+ right: 15px;
+}
div.jGrowl div.notice {
background: #511919 url("../../../images/icons/48/notice.png") no-repeat 5px center;
color: #ffffff;
@@ -565,7 +581,7 @@ ul.menu-popup .toolbar a:hover {
color: #9eabb0;
display: block;
}
-/* aside */
+/* aside 230px*/
aside {
display: table-cell;
vertical-align: top;
@@ -772,20 +788,21 @@ aside #profiles-menu {
width: 200px;
top: 18px;
}
-/* section */
+/* section 800px */
section {
display: table-cell;
vertical-align: top;
- width: 800px;
+ width: 770px;
padding: 0px 20px 0px 10px;
}
/* wall item */
.tread-wrapper {
- background-color: #f6f7f8;
+ background-color: #eff0f1;
position: relative;
padding: 10px;
margin-bottom: 20px;
- width: 780px;
+ width: 750px;
+ border-bottom: 1px solid #cccccc;
}
.wall-item-decor {
position: absolute;
@@ -798,7 +815,7 @@ section {
}
.wall-item-container {
display: table;
- width: 780px;
+ width: 750px;
}
.wall-item-container .wall-item-item,
.wall-item-container .wall-item-bottom {
@@ -890,26 +907,42 @@ section {
.wall-item-container .wall-item-actions-tools input {
float: right;
}
-.wall-item-container.comment {
- /*margin-top: 50px;*/
-
+.wall-item-container.comment .contact-photo-wrapper {
+ margin-left: 16px;
}
.wall-item-container.comment .contact-photo {
width: 32px;
height: 32px;
- margin-left: 16px;
- /*background: url(../../../images/icons/22/user.png) no-repeat center center;*/
-
}
.wall-item-container.comment .contact-photo-menu-button {
top: 15px !important;
- left: 15px !important;
+ left: 0px !important;
}
.wall-item-container.comment .wall-item-links {
padding-left: 12px;
}
+/* 'tag' item type */
+.wall-item-container.item-tag .wall-item-content {
+ opacity: 0.5;
+ -webkit-transition: all 0.2s ease-in-out;
+ -moz-transition: all 0.2s ease-in-out;
+ -o-transition: all 0.2s ease-in-out;
+ -ms-transition: all 0.2s ease-in-out;
+ transition: all 0.2s ease-in-out;
+}
+.wall-item-container.item-tag .contact-photo-wrapper {
+ margin-left: 32px;
+}
+.wall-item-container.item-tag .contact-photo {
+ width: 16px;
+ height: 16px;
+}
+.wall-item-container.item-tag .contact-photo-menu-button {
+ top: 15px !important;
+ left: 15px !important;
+}
.wall-item-comment-wrapper {
- margin: 30px 2em 2em 60px;
+ margin: 1em 2em 1em 60px;
}
.wall-item-comment-wrapper .comment-edit-photo {
display: none;
@@ -961,6 +994,9 @@ section {
#jot-preview-content .tread-wrapper {
background-color: #fce94f;
}
+.hide-comments-outer {
+ margin-bottom: 0.8em;
+}
.wall-item-tags {
padding-top: 5px;
}
@@ -1087,7 +1123,7 @@ section {
padding: 0px;
height: 40px;
overflow: none;
- width: 800px;
+ width: 770px;
background-color: #0e232e;
border-bottom: 2px solid #9eabb0;
}
@@ -1162,7 +1198,7 @@ section {
border: 0px;
margin: 0px;
height: 20px;
- width: 700px;
+ width: 500px;
font-weight: bold;
border: 1px solid #ffffff;
}
@@ -1179,13 +1215,26 @@ section {
border: 1px solid #999999;
}
#jot #character-counter {
- width: 80px;
+ width: 40px;
float: right;
text-align: right;
height: 20px;
line-height: 20px;
padding-right: 20px;
}
+#jot #jot-category {
+ border: 0px;
+ margin: 0px;
+ height: 20px;
+ width: 200px;
+ border: 1px solid #ffffff;
+}
+#jot #jot-category:hover {
+ border: 1px solid #999999;
+}
+#jot #jot-category:focus {
+ border: 1px solid #999999;
+}
/** buttons **/
/*input[type="submit"] {
border: 0px;
@@ -1592,44 +1641,19 @@ ul.tabs li .active {
-ms-transition: all 0.2s ease-in-out;
transition: all 0.2s ease-in-out;
}
-/* mail view */
-/*
-.mail-conv-sender,
-.mail-conv-detail {
- float: left;
+/* theme screenshot */
+.screenshot,
+#theme-preview {
+ position: absolute;
+ width: 202px;
+ left: 70%;
+ top: 50px;
}
-.mail-conv-detail {
- margin-left: 20px;
- width: 500px;
+.screenshot img,
+#theme-preview img {
+ width: 200px;
+ height: 150px;
}
-
-.mail-conv-subject {
- font-size: 1.4em;
- margin: 10px 0;
-}
-
-.mail-conv-outside-wrapper-end {
- clear: both;
-}
-
-.mail-conv-outside-wrapper {
- margin-top: 30px;
-}
-
-.mail-conv-delete-wrapper {
- float: right;
- margin-right: 30px;
- margin-top: 15px;
-}
-.mail-conv-break {
- clear: both;
-}
-
-.mail-conv-delete-icon {
- border: none;
-}
-
-*/
/* page footer */
footer {
height: 100px;
diff --git a/view/theme/quattro/green/colors.less b/view/theme/quattro/green/colors.less
index bc78c3fda..1f1df4c55 100644
--- a/view/theme/quattro/green/colors.less
+++ b/view/theme/quattro/green/colors.less
@@ -74,7 +74,8 @@
@FieldHelpColor: @Grey3;
-@ThreadBackgroundColor: #f6f7f8;
+@ThreadBackgroundColor: #eff0f1;
+@ThreadBottomBorderColor: @Grey2;
@ShinyBorderColor: @Green4;
@CommentBoxEmptyColor: @Grey3;
diff --git a/view/theme/quattro/green/style.css b/view/theme/quattro/green/style.css
index df43aa152..317112f6f 100644
--- a/view/theme/quattro/green/style.css
+++ b/view/theme/quattro/green/style.css
@@ -66,6 +66,9 @@
.icon.s10.type-text {
background-image: url("../../../images/icons/10/text.png");
}
+.icon.s10.language {
+ background-image: url("icons/language.png");
+}
.icon.s10.text {
padding: 2px 0px 0px 15px;
}
@@ -121,6 +124,9 @@
.icon.s16.type-text {
background-image: url("../../../images/icons/16/text.png");
}
+.icon.s16.language {
+ background-image: url("icons/language.png");
+}
.icon.s16.text {
padding: 4px 0px 0px 20px;
}
@@ -176,6 +182,9 @@
.icon.s22.type-text {
background-image: url("../../../images/icons/22/text.png");
}
+.icon.s22.language {
+ background-image: url("icons/language.png");
+}
.icon.s22.text {
padding: 10px 0px 0px 25px;
}
@@ -231,6 +240,9 @@
.icon.s48.type-text {
background-image: url("../../../images/icons/48/text.png");
}
+.icon.s48.language {
+ background-image: url("icons/language.png");
+}
/* global */
body {
font-family: Liberation Sans, helvetica, arial, clean, sans-serif;
@@ -314,6 +326,10 @@ code {
float: right;
}
/* popup notifications */
+#jGrowl.top-right {
+ top: 30px;
+ right: 15px;
+}
div.jGrowl div.notice {
background: #511919 url("../../../images/icons/48/notice.png") no-repeat 5px center;
color: #ffffff;
@@ -565,7 +581,7 @@ ul.menu-popup .toolbar a:hover {
color: #9eabb0;
display: block;
}
-/* aside */
+/* aside 230px*/
aside {
display: table-cell;
vertical-align: top;
@@ -772,20 +788,21 @@ aside #profiles-menu {
width: 200px;
top: 18px;
}
-/* section */
+/* section 800px */
section {
display: table-cell;
vertical-align: top;
- width: 800px;
+ width: 770px;
padding: 0px 20px 0px 10px;
}
/* wall item */
.tread-wrapper {
- background-color: #f6f7f8;
+ background-color: #eff0f1;
position: relative;
padding: 10px;
margin-bottom: 20px;
- width: 780px;
+ width: 750px;
+ border-bottom: 1px solid #cccccc;
}
.wall-item-decor {
position: absolute;
@@ -798,7 +815,7 @@ section {
}
.wall-item-container {
display: table;
- width: 780px;
+ width: 750px;
}
.wall-item-container .wall-item-item,
.wall-item-container .wall-item-bottom {
@@ -890,26 +907,42 @@ section {
.wall-item-container .wall-item-actions-tools input {
float: right;
}
-.wall-item-container.comment {
- /*margin-top: 50px;*/
-
+.wall-item-container.comment .contact-photo-wrapper {
+ margin-left: 16px;
}
.wall-item-container.comment .contact-photo {
width: 32px;
height: 32px;
- margin-left: 16px;
- /*background: url(../../../images/icons/22/user.png) no-repeat center center;*/
-
}
.wall-item-container.comment .contact-photo-menu-button {
top: 15px !important;
- left: 15px !important;
+ left: 0px !important;
}
.wall-item-container.comment .wall-item-links {
padding-left: 12px;
}
+/* 'tag' item type */
+.wall-item-container.item-tag .wall-item-content {
+ opacity: 0.5;
+ -webkit-transition: all 0.2s ease-in-out;
+ -moz-transition: all 0.2s ease-in-out;
+ -o-transition: all 0.2s ease-in-out;
+ -ms-transition: all 0.2s ease-in-out;
+ transition: all 0.2s ease-in-out;
+}
+.wall-item-container.item-tag .contact-photo-wrapper {
+ margin-left: 32px;
+}
+.wall-item-container.item-tag .contact-photo {
+ width: 16px;
+ height: 16px;
+}
+.wall-item-container.item-tag .contact-photo-menu-button {
+ top: 15px !important;
+ left: 15px !important;
+}
.wall-item-comment-wrapper {
- margin: 30px 2em 2em 60px;
+ margin: 1em 2em 1em 60px;
}
.wall-item-comment-wrapper .comment-edit-photo {
display: none;
@@ -961,6 +994,9 @@ section {
#jot-preview-content .tread-wrapper {
background-color: #ddffdd;
}
+.hide-comments-outer {
+ margin-bottom: 0.8em;
+}
.wall-item-tags {
padding-top: 5px;
}
@@ -1087,7 +1123,7 @@ section {
padding: 0px;
height: 40px;
overflow: none;
- width: 800px;
+ width: 770px;
background-color: #009100;
border-bottom: 2px solid #9eabb0;
}
@@ -1162,7 +1198,7 @@ section {
border: 0px;
margin: 0px;
height: 20px;
- width: 700px;
+ width: 500px;
font-weight: bold;
border: 1px solid #ffffff;
}
@@ -1179,13 +1215,26 @@ section {
border: 1px solid #999999;
}
#jot #character-counter {
- width: 80px;
+ width: 40px;
float: right;
text-align: right;
height: 20px;
line-height: 20px;
padding-right: 20px;
}
+#jot #jot-category {
+ border: 0px;
+ margin: 0px;
+ height: 20px;
+ width: 200px;
+ border: 1px solid #ffffff;
+}
+#jot #jot-category:hover {
+ border: 1px solid #999999;
+}
+#jot #jot-category:focus {
+ border: 1px solid #999999;
+}
/** buttons **/
/*input[type="submit"] {
border: 0px;
@@ -1592,44 +1641,19 @@ ul.tabs li .active {
-ms-transition: all 0.2s ease-in-out;
transition: all 0.2s ease-in-out;
}
-/* mail view */
-/*
-.mail-conv-sender,
-.mail-conv-detail {
- float: left;
+/* theme screenshot */
+.screenshot,
+#theme-preview {
+ position: absolute;
+ width: 202px;
+ left: 70%;
+ top: 50px;
}
-.mail-conv-detail {
- margin-left: 20px;
- width: 500px;
+.screenshot img,
+#theme-preview img {
+ width: 200px;
+ height: 150px;
}
-
-.mail-conv-subject {
- font-size: 1.4em;
- margin: 10px 0;
-}
-
-.mail-conv-outside-wrapper-end {
- clear: both;
-}
-
-.mail-conv-outside-wrapper {
- margin-top: 30px;
-}
-
-.mail-conv-delete-wrapper {
- float: right;
- margin-right: 30px;
- margin-top: 15px;
-}
-.mail-conv-break {
- clear: both;
-}
-
-.mail-conv-delete-icon {
- border: none;
-}
-
-*/
/* page footer */
footer {
height: 100px;
diff --git a/view/theme/quattro/icons.less b/view/theme/quattro/icons.less
index 3688ae021..24e96b5aa 100644
--- a/view/theme/quattro/icons.less
+++ b/view/theme/quattro/icons.less
@@ -19,6 +19,9 @@
&.type-video{ background-image: url("../../../images/icons/@{size}/video.png"); }
&.type-image{ background-image: url("../../../images/icons/@{size}/image.png"); }
&.type-text { background-image: url("../../../images/icons/@{size}/text.png"); }
+
+ &.language { background-image: url("icons/language.png"); }
+
}
diff --git a/view/theme/quattro/icons/language.png b/view/theme/quattro/icons/language.png
new file mode 100644
index 000000000..8029c0155
Binary files /dev/null and b/view/theme/quattro/icons/language.png differ
diff --git a/view/theme/quattro/jot.tpl b/view/theme/quattro/jot.tpl
index 2f89d4372..95c0ff6b1 100644
--- a/view/theme/quattro/jot.tpl
+++ b/view/theme/quattro/jot.tpl
@@ -1,8 +1,10 @@