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() {
$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) {
@ -1070,7 +1070,7 @@ if(! function_exists('profile_load')) {
* 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)){
require_once($theme_info_file);
}
@ -1469,17 +1469,17 @@ if(! function_exists('current_theme')) {
}
if($theme_name &&
(file_exists('view/theme/' . $theme_name . '/style.css') ||
file_exists('view/theme/' . $theme_name . '/style.php')))
(file_exists('view/theme/' . $theme_name . '/css/style.css') ||
file_exists('view/theme/' . $theme_name . '/php/style.php')))
return($theme_name);
foreach($app_base_themes as $t) {
if(file_exists('view/theme/' . $t . '/style.css')||
file_exists('view/theme/' . $t . '/style.php'))
if(file_exists('view/theme/' . $t . '/css/style.css')||
file_exists('view/theme/' . $t . '/php/style.php'))
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))
return (str_replace('view/theme/','', substr($fallback[0],0,-10)));
@ -1494,9 +1494,9 @@ if(! function_exists('current_theme_url')) {
function current_theme_url() {
global $a;
$t = current_theme();
if (file_exists('view/theme/' . $t . '/style.php'))
return($a->get_baseurl() . '/view/theme/' . $t . '/style.pcss');
return($a->get_baseurl() . '/view/theme/' . $t . '/style.css');
if (file_exists('view/theme/' . $t . '/php/style.php'))
return($a->get_baseurl() . '/view/theme/' . $t . '/php/style.pcss');
return($a->get_baseurl() . '/view/theme/' . $t . '/css/style.css');
}
}

View file

@ -430,10 +430,16 @@ function get_markup_template($s) {
$a=get_app();
$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");
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"))
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
return file_get_contents("view/$s");
@ -1633,7 +1639,7 @@ function undo_post_tagging($s) {
function fix_mce_lf($s) {
$s = str_replace("\r\n","\n",$s);
$s = str_replace("\n\n","\n",$s);
// $s = str_replace("\n\n","\n",$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';
if(! file_exists($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))
$module_css = str_replace('theme/' . current_theme() . '/', '', $module_css);
@ -420,7 +420,7 @@ $profile = $a->profile;
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';
if(file_exists($template))

View file

@ -16,15 +16,7 @@ function display_content(&$a) {
$o = '<div id="live-display"></div>' . "\r\n";
$a->page['htmlhead'] .= <<<EOT
<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;
$a->page['htmlhead'] .= get_markup_template('display-head.tpl');
$nick = (($a->argc > 1) ? $a->argv[1] : '');

View file

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

View file

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

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