major theme re-org, only duepuntozero and slackr working atm

This commit is contained in:
friendica 2012-08-01 05:02:43 -07:00
parent 7a08942872
commit dcbc0c0c95
237 changed files with 108 additions and 67 deletions

View File

@ -589,7 +589,7 @@ if(! class_exists('App')) {
function init_pagehead() { function init_pagehead() {
$this->page['title'] = $this->config['sitename']; $this->page['title'] = $this->config['sitename'];
$this->page['htmlhead'] = file_get_contents('view/head.tpl'); $this->page['htmlhead'] = get_markup_template('head.tpl');
} }
function set_curl_code($code) { function set_curl_code($code) {
@ -1070,7 +1070,7 @@ if(! function_exists('profile_load')) {
* load/reload current theme info * load/reload current theme info
*/ */
$theme_info_file = "view/theme/".current_theme()."/theme.php"; $theme_info_file = "view/theme/".current_theme()."/php/theme.php";
if (file_exists($theme_info_file)){ if (file_exists($theme_info_file)){
require_once($theme_info_file); require_once($theme_info_file);
} }
@ -1469,17 +1469,17 @@ if(! function_exists('current_theme')) {
} }
if($theme_name && if($theme_name &&
(file_exists('view/theme/' . $theme_name . '/style.css') || (file_exists('view/theme/' . $theme_name . '/css/style.css') ||
file_exists('view/theme/' . $theme_name . '/style.php'))) file_exists('view/theme/' . $theme_name . '/php/style.php')))
return($theme_name); return($theme_name);
foreach($app_base_themes as $t) { foreach($app_base_themes as $t) {
if(file_exists('view/theme/' . $t . '/style.css')|| if(file_exists('view/theme/' . $t . '/css/style.css')||
file_exists('view/theme/' . $t . '/style.php')) file_exists('view/theme/' . $t . '/php/style.php'))
return($t); return($t);
} }
$fallback = array_merge(glob('view/theme/*/style.css'),glob('view/theme/*/style.php')); $fallback = array_merge(glob('view/theme/*/css/style.css'),glob('view/theme/*/php/style.php'));
if(count($fallback)) if(count($fallback))
return (str_replace('view/theme/','', substr($fallback[0],0,-10))); return (str_replace('view/theme/','', substr($fallback[0],0,-10)));
@ -1494,9 +1494,9 @@ if(! function_exists('current_theme_url')) {
function current_theme_url() { function current_theme_url() {
global $a; global $a;
$t = current_theme(); $t = current_theme();
if (file_exists('view/theme/' . $t . '/style.php')) if (file_exists('view/theme/' . $t . '/php/style.php'))
return($a->get_baseurl() . '/view/theme/' . $t . '/style.pcss'); return($a->get_baseurl() . '/view/theme/' . $t . '/php/style.pcss');
return($a->get_baseurl() . '/view/theme/' . $t . '/style.css'); return($a->get_baseurl() . '/view/theme/' . $t . '/css/style.css');
} }
} }

View File

@ -430,10 +430,16 @@ function get_markup_template($s) {
$a=get_app(); $a=get_app();
$theme = current_theme(); $theme = current_theme();
if(file_exists("view/theme/$theme/$s")) if(file_exists("view/theme/$theme/tpl/$s"))
return file_get_contents("view/theme/$theme/tpl/$s");
elseif(file_exists("view/theme/$theme/$s"))
return file_get_contents("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"]."/tpl/$s"))
return file_get_contents("view/theme/".$a->theme_info["extends"]."/tpl/$s");
elseif (x($a->theme_info,"extends") && file_exists("view/theme/".$a->theme_info["extends"]."/$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"); return file_get_contents("view/theme/".$a->theme_info["extends"]."/$s");
elseif(file_exists("view/tpl/$s"))
return file_get_contents("view/tpl/$s");
else else
return file_get_contents("view/$s"); return file_get_contents("view/$s");
@ -1633,7 +1639,7 @@ function undo_post_tagging($s) {
function fix_mce_lf($s) { function fix_mce_lf($s) {
$s = str_replace("\r\n","\n",$s); $s = str_replace("\r\n","\n",$s);
$s = str_replace("\n\n","\n",$s); // $s = str_replace("\n\n","\n",$s);
return $s; return $s;
} }

View File

@ -357,13 +357,13 @@ if($a->module != 'install') {
*/ */
$page_css = 'view/theme/' . current_theme() . '/' $page_css = 'view/theme/' . current_theme() . '/css/'
. ((x($a->page,'template')) ? $a->page['template'] : 'default' ) . '.css'; . ((x($a->page,'template')) ? $a->page['template'] : 'default' ) . '.css';
if(! file_exists($page_css)) if(! file_exists($page_css))
$page_css = str_replace('theme/' . current_theme() . '/', '', $page_css); $page_css = str_replace('theme/' . current_theme() . '/', '', $page_css);
$module_css = 'view/theme/' . current_theme() . '/mod_' . $a->module . '.css'; $module_css = 'view/theme/' . current_theme() . '/css/mod_' . $a->module . '.css';
if(! file_exists($module_css)) if(! file_exists($module_css))
$module_css = str_replace('theme/' . current_theme() . '/', '', $module_css); $module_css = str_replace('theme/' . current_theme() . '/', '', $module_css);
@ -420,7 +420,7 @@ $profile = $a->profile;
header("Content-type: text/html; charset=utf-8"); header("Content-type: text/html; charset=utf-8");
$template = 'view/theme/' . current_theme() . '/' $template = 'view/theme/' . current_theme() . '/php/'
. ((x($a->page,'template')) ? $a->page['template'] : 'default' ) . '.php'; . ((x($a->page,'template')) ? $a->page['template'] : 'default' ) . '.php';
if(file_exists($template)) if(file_exists($template))

View File

@ -16,15 +16,7 @@ function display_content(&$a) {
$o = '<div id="live-display"></div>' . "\r\n"; $o = '<div id="live-display"></div>' . "\r\n";
$a->page['htmlhead'] .= <<<EOT $a->page['htmlhead'] .= get_markup_template('display-head.tpl');
<script>
$(document).ready(function() {
$(".comment-edit-wrapper textarea").contact_autocomplete(baseurl+"/acl");
// make auto-complete work in more places
$(".wall-item-comment-wrapper textarea").contact_autocomplete(baseurl+"/acl");
});
</script>
EOT;
$nick = (($a->argc > 1) ? $a->argv[1] : ''); $nick = (($a->argc > 1) ? $a->argv[1] : '');

View File

@ -27,8 +27,8 @@ function poke_init(&$a) {
if(! $contact_id) if(! $contact_id)
return; return;
$parent = ((x($_GET,'parent')) ? intval($_GET['parent']) : 0);
$private = ((x($_GET,'private')) ? intval($_GET['private']) : 0);
logger('poke: verb ' . $verb . ' contact ' . $contact_id, LOGGER_DEBUG); logger('poke: verb ' . $verb . ' contact ' . $contact_id, LOGGER_DEBUG);
@ -45,6 +45,35 @@ function poke_init(&$a) {
$target = $r[0]; $target = $r[0];
if($parent) {
$r = q("select uri, private, allow_cid, allow_gid, deny_cid, deny_gid
from item where id = %d and parent = %d and uid = %d limit 1",
intval($parent),
intval($parent),
intval($uid)
);
if(count($r)) {
$parent_uri = $r[0]['uri'];
$private = $r[0]['private'];
$allow_cid = $r[0]['allow_cid'];
$allow_gid = $r[0]['allow_gid'];
$deny_cid = $r[0]['deny_cid'];
$deny_gid = $r[0]['deny_gid'];
}
}
else {
$private = ((x($_GET,'private')) ? intval($_GET['private']) : 0);
$allow_cid = (($private) ? '<' . $target['id']. '>' : $a->user['allow_cid']);
$allow_gid = (($private) ? '' : $a->user['allow_gid']);
$deny_cid = (($private) ? '' : $a->user['deny_cid']);
$deny_gid = (($private) ? '' : $a->user['deny_gid']);
}
$poster = $a->contact; $poster = $a->contact;
$uri = item_new_uri($a->get_hostname(),$owner_uid); $uri = item_new_uri($a->get_hostname(),$owner_uid);
@ -53,7 +82,7 @@ function poke_init(&$a) {
$arr['uid'] = $uid; $arr['uid'] = $uid;
$arr['uri'] = $uri; $arr['uri'] = $uri;
$arr['parent-uri'] = $uri; $arr['parent-uri'] = (($parent_uri) ? $parent_uri : $uri);
$arr['type'] = 'activity'; $arr['type'] = 'activity';
$arr['wall'] = 1; $arr['wall'] = 1;
$arr['contact-id'] = $poster['id']; $arr['contact-id'] = $poster['id'];
@ -64,10 +93,10 @@ function poke_init(&$a) {
$arr['author-link'] = $poster['url']; $arr['author-link'] = $poster['url'];
$arr['author-avatar'] = $poster['thumb']; $arr['author-avatar'] = $poster['thumb'];
$arr['title'] = ''; $arr['title'] = '';
$arr['allow_cid'] = (($private) ? '<' . $target['id']. '>' : $a->user['allow_cid']); $arr['allow_cid'] = $allow_cid;
$arr['allow_gid'] = (($private) ? '' : $a->user['allow_gid']); $arr['allow_gid'] = $allow_gid;
$arr['deny_cid'] = (($private) ? '' : $a->user['deny_cid']); $arr['deny_cid'] = $deny_cid;
$arr['deny_gid'] = (($private) ? '' : $a->user['deny_gid']); $arr['deny_gid'] = $deny_gid;
$arr['last-child'] = 1; $arr['last-child'] = 1;
$arr['visible'] = 1; $arr['visible'] = 1;
$arr['verb'] = $activity; $arr['verb'] = $activity;
@ -132,12 +161,12 @@ function poke_content(&$a) {
<script>$(document).ready(function() { <script>$(document).ready(function() {
var a; var a;
a = $("#recip").autocomplete({ a = $("#poke-recip").autocomplete({
serviceUrl: '$base/acl', serviceUrl: '$base/acl',
minChars: 2, minChars: 2,
width: 350, width: 350,
onSelect: function(value,data) { onSelect: function(value,data) {
$("#recip-complete").val(data); $("#poke-recip-complete").val(data);
} }
}); });
a.setOptions({ params: { type: 'a' }}); a.setOptions({ params: { type: 'a' }});
@ -148,6 +177,9 @@ function poke_content(&$a) {
</script> </script>
EOT; EOT;
$parent = ((x($_GET,'parent')) ? intval($_GET['parent']) : '0');
$verbs = get_poke_verbs(); $verbs = get_poke_verbs();
@ -164,6 +196,7 @@ EOT;
'$clabel' => t('Recipient'), '$clabel' => t('Recipient'),
'$choice' => t('Choose what you wish to do to recipient'), '$choice' => t('Choose what you wish to do to recipient'),
'$verbs' => $shortlist, '$verbs' => $shortlist,
'$parent' => $parent,
'$prv_desc' => t('Make this post private'), '$prv_desc' => t('Make this post private'),
'$submit' => t('Submit'), '$submit' => t('Submit'),
'$name' => $name, '$name' => $name,

View File

@ -9,7 +9,7 @@ body {
font-family: helvetica,arial,freesans,clean,sans-serif; font-family: helvetica,arial,freesans,clean,sans-serif;
font-size: 12px; font-size: 12px;
background-color: #ffffff; background-color: #ffffff;
background-image: url(head.jpg); // background-image: url(../img/head.jpg);
background-repeat: repeat-x; background-repeat: repeat-x;
color: #000000; color: #000000;
margin: 0px; margin: 0px;
@ -32,7 +32,7 @@ input {
img { border :0px; } img { border :0px; }
#id_openid_url, .openid input { #id_openid_url, .openid input {
background: url(login-bg.gif) no-repeat; background: url(../img/login-bg.gif) no-repeat;
background-position: 0 50%; background-position: 0 50%;
padding-left: 18px; padding-left: 18px;
} }
@ -180,7 +180,7 @@ aside {
min-height: 112px; min-height: 112px;
margin-left: 10%; margin-left: 10%;
padding: 1em; padding: 1em;
background-image: url(border.jpg); background-image: url(../img/border.jpg);
background-position: top left; background-position: top left;
background-repeat: no-repeat; background-repeat: no-repeat;
} }
@ -193,7 +193,7 @@ aside {
border-radius: 5px; border-radius: 5px;
padding: 5px; padding: 5px;
font-weight: bold; font-weight: bold;
background: #3465a4 url('friendika-16.png') no-repeat 95% center; background: #3465a4 url('../img/friendika-16.png') no-repeat 95% center;
} }
#wallmessage-link { #wallmessage-link {
display: block; display: block;
@ -212,14 +212,14 @@ section {
padding-top: 1em; padding-top: 1em;
padding-right: 1em; padding-right: 1em;
background-color: #ffffff; background-color: #ffffff;
background-image: url(border.jpg); background-image: url(../img/border.jpg);
background-position: top right; background-position: top right;
background-repeat: no-repeat; background-repeat: no-repeat;
} }
.tabs { .tabs {
height: 27px; height: 27px;
background-image: url(head.jpg); background-image: url(../img/head.jpg);
background-repeat: repeat-x; background-repeat: repeat-x;
background-position: 0px -20px; background-position: 0px -20px;
border-bottom: 1px solid #babdb6; border-bottom: 1px solid #babdb6;
@ -250,7 +250,7 @@ footer {
} }
div.wall-item-content-wrapper.shiny { div.wall-item-content-wrapper.shiny {
background-image: url('shiny.png'); background-image: url('../img/shiny.png');
background-position: -5px 30px; background-position: -5px 30px;
background-repeat:no-repeat; background-repeat:no-repeat;
} }
@ -436,7 +436,7 @@ div.wall-item-content-wrapper.shiny {
input#dfrn-url { input#dfrn-url {
float: left; float: left;
background: url(friendika-16.png) no-repeat; background: url(../img/friendika-16.png) no-repeat;
background-position: 2px center; background-position: 2px center;
font-size: 17px; font-size: 17px;
padding-left: 21px; padding-left: 21px;
@ -962,7 +962,7 @@ input#dfrn-url {
.wall-item-photo-menu-button { .wall-item-photo-menu-button {
display: block; display: block;
position: absolute; position: absolute;
background-image: url("photo-menu.jpg"); background-image: url("../img/photo-menu.jpg");
background-position: top left; background-position: top left;
background-repeat: no-repeat; background-repeat: no-repeat;
margin: 0px; padding: 0px; margin: 0px; padding: 0px;
@ -1155,7 +1155,7 @@ input#dfrn-url {
.wall-item-tools { .wall-item-tools {
clear: both; clear: both;
background-image: url("head.jpg"); background-image: url("../img/head.jpg");
background-position: 0 -20px; background-position: 0 -20px;
background-repeat: repeat-x; background-repeat: repeat-x;
padding: 5px 10px 0px; padding: 5px 10px 0px;
@ -1591,7 +1591,7 @@ input#dfrn-url {
.contact-photo-menu-button { .contact-photo-menu-button {
position: absolute; position: absolute;
background-image: url("photo-menu.jpg"); background-image: url("../img/photo-menu.jpg");
background-position: top left; background-position: top left;
background-repeat: no-repeat; background-repeat: no-repeat;
margin: 0px; padding: 0px; margin: 0px; padding: 0px;
@ -1660,7 +1660,7 @@ input#dfrn-url {
} }
#acl-search { #acl-search {
float:right; float:right;
background: #ffffff url("../../../images/search_18.png") no-repeat right center; background: #ffffff url("../../../../images/search_18.png") no-repeat right center;
padding-right:20px; padding-right:20px;
} }
#acl-showall { #acl-showall {
@ -1669,7 +1669,7 @@ input#dfrn-url {
width: auto; width: auto;
height: 18px; height: 18px;
background-color: #cccccc; background-color: #cccccc;
background-image: url("../../../images/show_all_off.png"); background-image: url("../../../../images/show_all_off.png");
background-position: 7px 7px; background-position: 7px 7px;
background-repeat: no-repeat; background-repeat: no-repeat;
padding: 7px 5px 0px 30px; padding: 7px 5px 0px 30px;
@ -1681,7 +1681,7 @@ input#dfrn-url {
#acl-showall.selected { #acl-showall.selected {
color: #000000; color: #000000;
background-color: #ff9900; background-color: #ff9900;
background-image: url("../../../images/show_all_on.png"); background-image: url("../../../../images/show_all_on.png");
} }
#acl-list { #acl-list {
@ -1729,18 +1729,18 @@ input#dfrn-url {
text-decoration: none; text-decoration: none;
color:#000000; color:#000000;
} }
.acl-button-show { background-image: url("../../../images/show_off.png"); } .acl-button-show { background-image: url("../../../../images/show_off.png"); }
.acl-button-hide { background-image: url("../../../images/hide_off.png"); } .acl-button-hide { background-image: url("../../../../images/hide_off.png"); }
.acl-button-show.selected { .acl-button-show.selected {
color: #000000; color: #000000;
background-color: #9ade00; background-color: #9ade00;
background-image: url("../../../images/show_on.png"); background-image: url("../../../../images/show_on.png");
} }
.acl-button-hide.selected { .acl-button-hide.selected {
color: #000000; color: #000000;
background-color: #ff4141; background-color: #ff4141;
background-image: url("../../../images/hide_on.png"); background-image: url("../../../../images/hide_on.png");
} }
.acl-list-item.groupshow { border-color: #9ade00; } .acl-list-item.groupshow { border-color: #9ade00; }
.acl-list-item.grouphide { border-color: #ff4141; } .acl-list-item.grouphide { border-color: #ff4141; }
@ -2276,7 +2276,7 @@ aside input[type='text'] {
} }
.sparkle { .sparkle {
cursor: url('lock.cur'), pointer; cursor: url('../img/lock.cur'), pointer;
/* cursor: pointer !important; */ /* cursor: pointer !important; */
} }
@ -2483,7 +2483,7 @@ aside input[type='text'] {
} }
.event-description:before { .event-description:before {
content: url('../../../images/calendar.png'); content: url('../../../../images/calendar.png');
margin-right: 15px; margin-right: 15px;
} }
@ -2839,7 +2839,7 @@ aside input[type='text'] {
.field .onoff a { .field .onoff a {
display: block; display: block;
border:1px solid #666666; border:1px solid #666666;
background-image:url("../../../images/onoff.jpg"); background-image:url("../../../../images/onoff.jpg");
background-repeat: no-repeat; background-repeat: no-repeat;
padding: 4px 2px 2px 2px; padding: 4px 2px 2px 2px;
height: 16px; height: 16px;
@ -2971,7 +2971,7 @@ aside input[type='text'] {
margin: 10px; margin: 10px;
} }
.oauthapp img.noicon { .oauthapp img.noicon {
background-image: url("../../../images/icons/48/plugin.png"); background-image: url("../../../../images/icons/48/plugin.png");
background-position: center center; background-position: center center;
background-repeat: no-repeat; background-repeat: no-repeat;
} }
@ -2988,7 +2988,7 @@ aside input[type='text'] {
.icon { .icon {
display: block; width: 16px; height: 16px; display: block; width: 16px; height: 16px;
background-image: url('../../../images/icons.png'); background-image: url('../../../../images/icons.png');
} }
.article { background-position: 0px 0px;} .article { background-position: 0px 0px;}
.audio { background-position: -16px 0px;} .audio { background-position: -16px 0px;}
@ -3032,7 +3032,7 @@ aside input[type='text'] {
.filer-icon { .filer-icon {
display: block; width: 16px; height: 16px; display: block; width: 16px; height: 16px;
background-image: url('file.gif'); background-image: url('../img/file.gif');
} }
.icon.dim { opacity: 0.3;filter:alpha(opacity=30); } .icon.dim { opacity: 0.3;filter:alpha(opacity=30); }
@ -3054,7 +3054,7 @@ aside input[type='text'] {
display: inline-block; display: inline-block;
width: 16px; width: 16px;
height: 16px; height: 16px;
background-image: url(bbedit.png); background-image: url(../img/bbedit.png);
background-color: #fff; background-color: #fff;
text-decoration: none; text-decoration: none;
} }
@ -3113,7 +3113,7 @@ aside input[type='text'] {
.attachtype { .attachtype {
display: block; width: 20px; height: 23px; display: block; width: 20px; height: 23px;
float: left; float: left;
background-image: url('../../../images/content-types.png'); background-image: url('../../../../images/content-types.png');
} }
.body-attach { .body-attach {
@ -3150,12 +3150,12 @@ aside input[type='text'] {
/* popup notifications */ /* popup notifications */
div.jGrowl div.notice { div.jGrowl div.notice {
background: #511919 url("../../../images/icons/48/notice.png") no-repeat 5px center; background: #511919 url("../../../../images/icons/48/notice.png") no-repeat 5px center;
color: #ffffff; color: #ffffff;
padding-left: 58px; padding-left: 58px;
} }
div.jGrowl div.info { div.jGrowl div.info {
background: #364e59 url("../../../images/icons/48/info.png") no-repeat 5px center; background: #364e59 url("../../../../images/icons/48/info.png") no-repeat 5px center;
color: #ffffff; color: #ffffff;
padding-left: 58px; padding-left: 58px;
} }

View File

Before

Width:  |  Height:  |  Size: 2.1 KiB

After

Width:  |  Height:  |  Size: 2.1 KiB

View File

Before

Width:  |  Height:  |  Size: 342 B

After

Width:  |  Height:  |  Size: 342 B

View File

Before

Width:  |  Height:  |  Size: 6.2 KiB

After

Width:  |  Height:  |  Size: 6.2 KiB

View File

Before

Width:  |  Height:  |  Size: 644 B

After

Width:  |  Height:  |  Size: 644 B

View File

Before

Width:  |  Height:  |  Size: 615 B

After

Width:  |  Height:  |  Size: 615 B

View File

Before

Width:  |  Height:  |  Size: 699 B

After

Width:  |  Height:  |  Size: 699 B

View File

Before

Width:  |  Height:  |  Size: 383 B

After

Width:  |  Height:  |  Size: 383 B

View File

Before

Width:  |  Height:  |  Size: 4.2 KiB

After

Width:  |  Height:  |  Size: 4.2 KiB

View File

Before

Width:  |  Height:  |  Size: 237 B

After

Width:  |  Height:  |  Size: 237 B

View File

Before

Width:  |  Height:  |  Size: 459 B

After

Width:  |  Height:  |  Size: 459 B

View File

Before

Width:  |  Height:  |  Size: 71 KiB

After

Width:  |  Height:  |  Size: 71 KiB

View File

Before

Width:  |  Height:  |  Size: 362 B

After

Width:  |  Height:  |  Size: 362 B

View File

@ -1,4 +1,4 @@
@import url('../duepuntozero/style.css'); @import url('../../duepuntozero/css/style.css');
nav #banner #logo-text a { nav #banner #logo-text a {
color: #ff0000; color: #ff0000;

View File

Before

Width:  |  Height:  |  Size: 6.2 KiB

After

Width:  |  Height:  |  Size: 6.2 KiB

View File

Before

Width:  |  Height:  |  Size: 74 KiB

After

Width:  |  Height:  |  Size: 74 KiB

View File

@ -5,6 +5,6 @@
{{ for $events as $event }} {{ for $events as $event }}
<div class="birthday-list" id="birthday-$event.id"></a> <a href="$event.link">$event.title</a> $event.date </div> <div class="birthday-list" id="birthday-$event.id"></a> <a href="$event.link">$event.title</a> $event.date </div>
{{ endfor }} {{ endfor }}
</div></div> </div>
{{ endif }} {{ endif }}

Some files were not shown because too many files have changed in this diff Show More