Merge branch 'master' of github.com:shish/shimmie2

This commit is contained in:
Shish 2012-03-13 08:09:41 +00:00
commit bdf24c1f2a
13 changed files with 308 additions and 356 deletions

View File

@ -27,15 +27,10 @@ class FeaturedTheme extends Themelet {
$h_tip = html_escape($image->get_tooltip());
$tsize = get_thumbnail_size($image->width, $image->height);
return "
<center><div>
<a href='$h_view_link' style='position: relative; height: {$tsize[1]}px; width: {$tsize[0]}px;'>
<img id='thumb_$i_id' title='$h_tip' alt='$h_tip' class='highlighted' style='height: {$tsize[1]}px; width: {$tsize[0]}px;' src='$h_thumb_link'>
</a>
</div></center>
<a href='$h_view_link'>
<img id='thumb_$i_id' title='$h_tip' alt='$h_tip' class='highlighted' style='height: {$tsize[1]}px; width: {$tsize[0]}px;' src='$h_thumb_link'>
</a>
";
}
}

View File

@ -5,12 +5,7 @@ class PrivMsgTheme extends Themelet {
global $user;
$html = "
<script type='text/javascript'>
$(document).ready(function() {
$(\"#pms\").tablesorter();
});
</script>
<table id='pms' class='zebra'>
<table id='pms' class='zebra sortable'>
<thead><tr><th>Subject</th><th>From</th><th>Date</th><th>Action</th></tr></thead>
<tbody>";
$n = 0;
@ -49,8 +44,8 @@ class PrivMsgTheme extends Themelet {
<form action="$post_url" method="POST">
$auth
<input type="hidden" name="to_id" value="$to_id">
<table style="width: 400px;">
<tr><td>Subject:</td><td><input type="text" name="subject" value="$h_subject"></td></tr>
<table style="width: 400px;" class="form">
<tr><th>Subject:</th><td><input type="text" name="subject" value="$h_subject"></td></tr>
<tr><td colspan="2"><textarea style="width: 100%" rows="6" name="message"></textarea></td></tr>
<tr><td colspan="2"><input type="submit" value="Send"></td></tr>
</table>

View File

@ -3,7 +3,7 @@ class QRImageTheme extends Themelet {
public function links_block($link) {
global $page;
$page->add_block( new Block(
"QR Code","<img src='http://chart.apis.google.com/chart?chs=150x150&cht=qr&chl=$link' />","left",50));
"QR Code","<img alt='QR Code' src='http://chart.apis.google.com/chart?chs=150x150&amp;cht=qr&amp;chl=$link' />","left",50));
}
}
?>

View File

@ -284,7 +284,7 @@ class Image {
return $this->parse_link_template($image_ilink);
}
else if($config->get_bool('nice_urls', false)) {
return $this->parse_link_template(make_link('_images/$hash/$id - $tags.$ext'));
return $this->parse_link_template(make_link('_images/$hash/$id%20-%20$tags.$ext'));
}
else {
return $this->parse_link_template(make_link('image/$id.$ext'));

View File

@ -83,6 +83,22 @@ function no_escape($input) {
return $input;
}
// Original PHP code by Chirp Internet: www.chirp.com.au
// Please acknowledge use of this code by including this header.
function truncate($string, $limit, $break=" ", $pad="...") {
// return with no change if string is shorter than $limit
if(strlen($string) <= $limit) return $string;
// is $break present between $limit and the end of the string?
if(false !== ($breakpoint = strpos($string, $break, $limit))) {
if($breakpoint < strlen($string) - 1) {
$string = substr($string, 0, $breakpoint) . $pad;
}
}
return $string;
}
/**
* Turn a human readable filesize into an integer, eg 1KB -> 1024
*

View File

@ -161,7 +161,7 @@ class CommentListTheme extends Themelet {
$h_name = html_escape($comment->owner_name);
$h_poster_ip = html_escape($comment->poster_ip);
$h_timestamp = autodate($comment->posted);
$h_comment = ($trim ? substr($tfe->stripped, 0, 50) . (strlen($tfe->stripped) > 50 ? "..." : "") : $tfe->formatted);
$h_comment = ($trim ? truncate($tfe->stripped, 50) : $tfe->formatted);
$i_comment_id = int_escape($comment->comment_id);
$i_image_id = int_escape($comment->image_id);

View File

@ -5,7 +5,7 @@ class PixelFileHandlerTheme extends Themelet {
global $config;
$u_ilink = $image->get_image_link();
$html = "<img id='main_image' src='$u_ilink'>";
$html = "<img alt='main image' id='main_image' src='$u_ilink'>";
if($config->get_bool("image_show_meta")) {
# FIXME: only read from jpegs?
$exif = @exif_read_data($image->get_image_filename(), 0, true);

View File

@ -6,8 +6,8 @@
width: auto;
}
#wrapper {
opacity : 0.4;
filter: alpha(opacity=40); // msie
opacity: 0.4;
filter: alpha(opacity=40); /* msie */
}
/* This is needed since the theme style.css forcibly sets vertical align to "top". */

View File

@ -1,291 +1,279 @@
.noleft{
padding-left:20px;
}
HEADER {
margin-bottom:1em;
}
HEADER #site-title {
padding:10px 20px 0;
}
HEADER ul#navbar {
margin:0;
padding:5px 20px 2px 10px;
}
HEADER ul#navbar li {
font-size:120%;
margin:0;
padding:0 10px 2px;
}
HEADER ul#navbar li.current-page {
background-color:#F7F7FF;
}
HEADER ul#navbar li.current-page a {
font-weight:bold;
}
HEADER ul#subnavbar {
background-color:#F7F7FF;
margin:0 0 1em;
padding:5px 20px 5px 15px;
}
HEADER ul#subnavbar li {
padding:0 5px;
}
HEADER #site-title {
padding:10px 20px 0;
}
body {
-x-system-font:none;
background-color:#FFFFFF;
font-family:verdana,sans-serif;
font-size:80%;
font-size-adjust:none;
font-stretch:normal;
font-style:normal;
font-variant:normal;
font-weight:normal;
line-height:normal;
}
h1 {
font-size:2em;
margin-bottom:0;
margin-top:0;
padding:2px;
}
h1 a {
color:black;
}
h3 {
font-size:1.2em;
margin-bottom:0;
margin-top:0.5em;
padding:1px;
}
h4 {
font-size:1.4em;
}
h5 {
font-size:1.2em;
}
table.zebra {border-collapse: collapse;border-spacing: 0;}
table.zebra > tbody > tr:hover {background: #FFD;}
table.zebra th {color: #171BB3; padding-right: 8px;}
table.zebra td {border: 1px dotted #EEE;margin: 0;padding-right: 8px;}
table.zebra th {margin: 0;text-align: left;}
thead {
-moz-background-clip:border;
-moz-background-inline-policy:continuous;
-moz-background-origin:padding;
font-weight:bold;
}
td {
vertical-align:top;
}
#subtitle {
border-top:medium none;
font-size:0.75em;
margin:auto;
text-align:center;
width:256px;
}
ARTICLE select {
width:150px;
}
td > input[type="submit"] {width: 100%;}
td > input[type="text"] {width: 100%;}
td > input[type="password"] {width: 100%;}
FOOTER {
clear:both;
color:#CCCCCC;
font-size:0.9em;
padding-left:10px;
padding-top:8px;
}
[onclick] {
cursor:pointer;
}
img {
border:medium none;
}
form {
margin:0;
}
a {
text-decoration:none;
}
a:hover {
text-decoration:underline;
}
NAV {
float:left;
text-align:left;
width:150px;
padding:5px 20px 2px 10px;
}
NAV table {
width:150px;
}
NAV td {
vertical-align:middle;
}
NAV input {
padding:0;
width:100%;
}
NAV select {
padding:0;
width:100%;
}
NAV h3 {
text-align:left;
}
#comments p {
max-width:150px;
overflow:hidden;
text-align:left;
width:150px;
}
.tag_count {
color:#AAAAAA;
}
.more {
content:"More <20>â";
}
.comment {
margin-bottom:8px;
}
.comment .meta {
width: 150px;
color: gray;
}
.comment TD {
text-align: left;
}
.withleft {
margin-left:180px;
}
div#paginator {
clear:both;
display:block;
font-size:1em;
font-weight:bold;
padding:2em 0 1em;
text-align:center;
}
.paginator {
margin:16px;
text-align:center;
}
div#paginator b {
margin:3px;
padding:4px 8px;
}
div#paginator a {
border:1px solid #EEEEEE;
margin:3px;
padding:4px 8px;
}
div#paginator a:hover {
-moz-background-clip:border;
-moz-background-inline-policy:continuous;
-moz-background-origin:padding;
background:blue none repeat scroll 0 0;
border:1px solid #EEEEEE;
color:white;
}
span.thumb {
display:inline-block;
float:left;
height:220px;
text-align:center;
width:220px;
}
#pagelist {
margin-top:32px;
}
#large_upload_form {
width:600px;
}
.setupblock {
border:1px solid #AAAAAA;
margin:16px;
padding:8px;
width:350px;
}
.helpable {
border-bottom:1px dashed gray;
}
.ok {
-moz-background-clip:border;
-moz-background-inline-policy:continuous;
-moz-background-origin:padding;
background:#AAFFAA none repeat scroll 0 0;
}
.bad {
-moz-background-clip:border;
-moz-background-inline-policy:continuous;
-moz-background-origin:padding;
background:#FFAAAA none repeat scroll 0 0;
}
.comment .username {
font-size:1.5em;
font-weight:bold;
}
HEADER {
text-align:left;
}
HEADER h1 {
text-align:left;
}
* {
font-family:verdana,sans-serif;
margin:0;
padding:0;
}
a:link {
color:#006FFA;
text-decoration:none;
}
a:visited {
color:#006FFA;
text-decoration:none;
}
a:hover {
color:#33CFFF;
text-decoration:none;
}
a:active {
color:#006FFA;
text-decoration:none;
}
ul.flat-list {
display:block;
margin:0;
padding:0;
}
ul.flat-list * {
display:inline;
text-align:left;
}
ul.flat-list li {
font-weight:bold;
list-style-type:none;
margin:0 1.3em 0 0;
text-align:left;
}
ul.flat-list li a {
font-weight:normal;
}
#tips {
margin-left:16px;
}
#blotter1 {
margin-left:16px;
margin-right:16px;
font-size: 90%;
position: relative;
}
#blotter2 {
margin-left:16px;
margin-right:16px;
font-size: 90%;
}
.noleft{
padding-left:20px;
}
HEADER {
margin-bottom:1em;
}
HEADER #site-title {
padding:10px 20px 0;
}
HEADER ul#navbar {
margin:0;
padding:5px 20px 2px 10px;
}
HEADER ul#navbar li {
font-size:120%;
margin:0;
padding:0 10px 2px;
}
HEADER ul#navbar li.current-page {
background-color:#F7F7FF;
}
HEADER ul#navbar li.current-page a {
font-weight:bold;
}
HEADER ul#subnavbar {
background-color:#F7F7FF;
margin:0 0 1em;
padding:5px 20px 5px 15px;
}
HEADER ul#subnavbar li {
padding:0 5px;
}
HEADER #site-title {
padding:10px 20px 0;
}
body {
-x-system-font:none;
background-color:#FFFFFF;
font-family:verdana,sans-serif;
font-size:80%;
font-size-adjust:none;
font-stretch:normal;
font-style:normal;
font-variant:normal;
font-weight:normal;
line-height:normal;
}
h1 {
font-size:2em;
margin-bottom:0;
margin-top:0;
padding:2px;
}
h1 a {
color:black;
}
h3 {
font-size:1.2em;
margin-bottom:0;
margin-top:0.5em;
padding:1px;
}
h4 {
font-size:1.4em;
}
h5 {
font-size:1.2em;
}
table.zebra {border-collapse: collapse;border-spacing: 0;}
table.zebra > tbody > tr:hover {background: #FFD;}
table.zebra th {color: #171BB3; padding-right: 8px;}
table.zebra td {border: 1px dotted #EEE;margin: 0;padding-right: 8px;}
table.zebra th {margin: 0;text-align: left;}
thead {
-moz-background-clip:border;
-moz-background-inline-policy:continuous;
-moz-background-origin:padding;
font-weight:bold;
}
td {
vertical-align:top;
}
#subtitle {
border-top:medium none;
font-size:0.75em;
margin:auto;
text-align:center;
width:256px;
}
FOOTER {
clear:both;
color:#CCCCCC;
font-size:0.9em;
padding-left:10px;
padding-top:8px;
}
form {
margin:0;
}
a {
text-decoration:none;
}
a:hover {
text-decoration:underline;
}
NAV {
float:left;
text-align:left;
width:150px;
padding:5px 20px 2px 10px;
}
NAV table {
width:150px;
}
NAV td {
vertical-align:middle;
}
NAV input {
padding:0;
width:100%;
}
NAV select {
padding:0;
width:100%;
}
NAV h3 {
text-align:left;
}
#comments p {
max-width:150px;
overflow:hidden;
text-align:left;
width:150px;
}
.tag_count {
color:#AAAAAA;
}
.more {
content:"More â";
}
.comment {
margin-bottom:8px;
}
.comment .meta {
width: 150px;
color: gray;
}
.comment TD {
text-align: left;
}
.withleft {
margin-left:180px;
}
div#paginator {
clear:both;
display:block;
font-size:1em;
font-weight:bold;
padding:2em 0 1em;
text-align:center;
}
.paginator {
margin:16px;
text-align:center;
}
div#paginator b {
margin:3px;
padding:4px 8px;
}
div#paginator a {
border:1px solid #EEEEEE;
margin:3px;
padding:4px 8px;
}
div#paginator a:hover {
-moz-background-clip:border;
-moz-background-inline-policy:continuous;
-moz-background-origin:padding;
background:blue none repeat scroll 0 0;
border:1px solid #EEEEEE;
color:white;
}
span.thumb {
display:inline-block;
float:left;
height:220px;
text-align:center;
width:220px;
}
#pagelist {
margin-top:32px;
}
#large_upload_form {
width:600px;
}
.setupblock {
border:1px solid #AAAAAA;
margin:16px;
padding:8px;
width:350px;
}
.helpable {
border-bottom:1px dashed gray;
}
.ok {
-moz-background-clip:border;
-moz-background-inline-policy:continuous;
-moz-background-origin:padding;
background:#AAFFAA none repeat scroll 0 0;
}
.bad {
-moz-background-clip:border;
-moz-background-inline-policy:continuous;
-moz-background-origin:padding;
background:#FFAAAA none repeat scroll 0 0;
}
.comment .username {
font-size:1.5em;
font-weight:bold;
}
HEADER {
text-align:left;
}
HEADER h1 {
text-align:left;
}
* {
font-family:verdana,sans-serif;
margin:0;
padding:0;
}
a:link {
color:#006FFA;
text-decoration:none;
}
a:visited {
color:#006FFA;
text-decoration:none;
}
a:hover {
color:#33CFFF;
text-decoration:none;
}
a:active {
color:#006FFA;
text-decoration:none;
}
ul.flat-list {
display:block;
margin:0;
padding:0;
}
ul.flat-list * {
display:inline;
text-align:left;
}
ul.flat-list li {
font-weight:bold;
list-style-type:none;
margin:0 1.3em 0 0;
text-align:left;
}
ul.flat-list li a {
font-weight:normal;
}
#tips {
margin-left:16px;
}
#blotter1 {
margin-left:16px;
margin-right:16px;
font-size: 90%;
position: relative;
}
#blotter2 {
margin-left:16px;
margin-right:16px;
font-size: 90%;
}

View File

@ -45,15 +45,6 @@ TD {
vertical-align: top;
text-align: center;
}
ARTICLE SELECT {width: 150px;}
INPUT, TEXTAREA {box-sizing: border-box;}
TD>INPUT[type="button"] {width: 100%;}
TD>INPUT[type="submit"] {width: 100%;}
TD>INPUT[type="text"] {width: 100%;}
TD>INPUT[type="password"] {width: 100%;}
TD>TEXTAREA {width: 100%;}
TD>SELECT {width: 100%;}
[onclick] {cursor:pointer;}
TABLE.zebra {border-spacing: 0px; border: 2px solid #CCC;}
TABLE.zebra TD, TABLE.zebra TH {vertical-align: middle; padding: 4px;}
@ -63,10 +54,6 @@ TABLE.zebra TR TD {border-bottom: 1px solid #DDD;}
TABLE.zebra TR:nth-child(odd) {background: #EFEFEF;}
TABLE.zebra TR:nth-child(even) {background: #E0E0E0;}
TABLE.form TD, TABLE.form TH {vertical-align: middle;}
TABLE.form TBODY TD {text-align: left;}
TABLE.form TBODY TH {text-align: right; padding-right: 4px;}
FOOTER {
clear: both;
font-size: 0.7em;
@ -75,9 +62,6 @@ FOOTER {
border: 1px solid #AAA;
}
*[onclick] {cursor: pointer;}
IMG {border: none;}
FORM {margin: 0px;}
A {text-decoration: none;}
A:hover {text-decoration: underline;}

View File

@ -28,9 +28,6 @@ FOOTER {
text-align: center;
}
*[onclick] {cursor: pointer;}
IMG {border: none;}
FORM {margin: 0px;}
A, A:visited {text-decoration: none; color: #0000EE;}
A:hover {text-decoration: underline; color: #DD0000;}
HR {border: none; border-top: 1px solid #D9BFB7; height: 0px; clear: both;}

View File

@ -133,13 +133,6 @@ CODE {
border-top: none;
background: #DDD;
}
ARTICLE SELECT {width: 150px;}
TD>INPUT[type="submit"] {width: 100%;}
TD>INPUT[type="text"] {width: 100%;}
TD>INPUT[type="password"] {width: 100%;}
TD>TEXTAREA {width: 100%;}
TD>SELECT {width: 100%;}
[onclick] {cursor:pointer;}
TABLE.zebra {border-spacing: 0px; border: 2px solid #C3D2E0;}
TABLE.zebra TD, TABLE.zebra TH {vertical-align: middle; padding: 4px;}
@ -173,9 +166,6 @@ FOOTER {
background: #E3EFFA;
}
*[onclick] {cursor: pointer;}
IMG {border: none;}
FORM {margin: 0px;}
A {text-decoration: none;}
A:hover {text-decoration: underline;}

View File

@ -1,6 +1,6 @@
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
3 things common to all pages *
* things common to all pages *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
BODY {
@ -50,12 +50,6 @@ CODE {
border-top: none;
background: #DDD;
}
ARTICLE SELECT {width: 150px;}
INPUT, TEXTAREA {box-sizing: border-box;}
TD>INPUT[type="submit"] {width: 100%;}
TD>INPUT[type="text"] {width: 100%;}
TD>INPUT[type="password"] {width: 100%;}
TD>SELECT {width: 100%;}
TABLE.zebra {border-spacing: 0px; border: 1px solid #B89F7C; }
TABLE.zebra TD, TABLE.zebra TH {vertical-align: middle; padding: 4px;}
@ -65,10 +59,6 @@ TABLE.zebra TD {border-top: 1px solid #B89F7C;}
TABLE.zebra TR:nth-child(odd) {background: #FCD9A9;}
TABLE.zebra TR:nth-child(even) {background: #DABC92;}
TABLE.form TD, TABLE.form TH {vertical-align: middle;}
TABLE.form TBODY TD {text-align: left;}
TABLE.form TBODY TH {text-align: right; padding-right: 4px;}
FOOTER {
clear: both;
padding: 8px;
@ -78,9 +68,6 @@ FOOTER {
background: #FCD9A9;
}
*[onclick] {cursor: pointer;}
IMG {border: none;}
FORM {margin: 0px;}
A {color: #665844; text-decoration: none; font-weight: bold;}
A:hover {color: #665844; text-decoration: underline;}
A:visited {color: #665844; text-decoration: none}