2001-03-20 23:40:13 +00:00
|
|
|
<?php
|
|
|
|
|
|
|
|
/*********************************************************************
|
2001-03-24 16:44:21 +00:00
|
|
|
|
2001-03-20 23:40:13 +00:00
|
|
|
Theme: Goofy
|
2001-03-31 11:57:31 +00:00
|
|
|
Author: Steven Wittens (UnConeD)
|
2001-03-20 23:40:13 +00:00
|
|
|
Email: unconed@drop.org
|
2001-03-23 17:10:09 +00:00
|
|
|
Description: Colourful, graphical, orange theme for high-resolutions.
|
2001-03-31 11:57:31 +00:00
|
|
|
Notes: Only boxes on the right, because the graphics take up a lot
|
2001-03-23 17:10:09 +00:00
|
|
|
of horizontal space.
|
2001-03-24 16:44:21 +00:00
|
|
|
|
2001-03-20 23:40:13 +00:00
|
|
|
*********************************************************************/
|
|
|
|
|
2001-06-10 13:53:45 +00:00
|
|
|
class Theme extends BaseTheme {
|
This a rather large commit that needs a lot of fine-tuning. If you
update, you'll break your site as you need switching from structure
to index.module: so this can be considered an intermediate commit.
If you upgrade, and you are welcome to, just create a collection
called "section" (for now) and assign your nodes some attributes
in the described format.
Feedback and bugreports are welcomed. Questions will be answered.
CHANGES:
- comment system:
+ when replying to a node (rather then to a comment), that
node is displayed above the reply form.
+ when replying to a comment (rather then to a node), that
comment is displayd above the reply form.
- removed structure.inc, removed structure.module.
- node.inc:
+ added 2 new node functions called 'node_attribute_edit()' and
'node_attribute_save()' used to 'hook in' any indexing system
including your home-brewed stuff if you'd want to. Currently,
index.module is the facto default index system.
See story.module for usage.
- book.module, story.module, poll.module, page.module, forum.module:
+ added preview functionality to administration section (via node
module).
+ removed all references to structure.inc (category, topic).
- moderate.module:
+ removed all references to structure.inc (category, topic).
- book.module, story.module, page.module, forum.module:
+ increased the sizes of some textareas.
- submit.php:
+ removed all references to structure.inc (category, topic).
- marvin.theme:
+ removed dead code: function story() was depricated.
- unconed.theme:
+ removed hardcoded references to drop.org.
- marvin.theme, unconed.theme, jeroen.theme, yaroon.theme, example.theme:
+ removed all references to structure.inc (category, topic).
TODO:
- file.module, trip_link.module:
+ update preview functionality:
see story.module for example.
+ remove references to 'cid' and 'tid', use 'attribute' instead:
see story.module for example.
- extend and build upon index.module as well as making it configurable
2001-06-10 15:01:20 +00:00
|
|
|
// General colorset that can be used for this theme
|
2001-06-09 19:31:34 +00:00
|
|
|
var $foreground = "#000000";
|
|
|
|
var $background = "#FFFFFF";
|
|
|
|
|
2001-03-20 23:40:13 +00:00
|
|
|
function header() {
|
|
|
|
?>
|
2001-03-24 16:44:21 +00:00
|
|
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
|
|
|
<html>
|
2001-03-20 23:40:13 +00:00
|
|
|
<head>
|
2001-04-06 14:14:16 +00:00
|
|
|
<title><?php echo variable_get(site_name, "drupal"); ?></title>
|
2001-03-23 22:45:36 +00:00
|
|
|
<style type="text/css">
|
2001-03-24 16:44:21 +00:00
|
|
|
<!--
|
2001-03-23 22:45:36 +00:00
|
|
|
body { background-color: #FFFFFF; font-size: 10pt; font-family: tahoma,helvetica,arial; }
|
|
|
|
p,ul,li,div,form,em,blockquote,quote { font-size: 10pt; font-family: tahoma,helvetica,arial; }
|
|
|
|
td { font-family: tahoma,arial,helvetica; font-size: 10pt; }
|
2001-03-24 16:44:21 +00:00
|
|
|
td.oru { background: url("themes/goofy/images/or-u.png"); width: 100%; }
|
|
|
|
td.ord { background: url("themes/goofy/images/or-d.png"); width: 100%; }
|
|
|
|
td.orl { background: url("themes/goofy/images/or-l.png"); }
|
2001-03-23 22:45:36 +00:00
|
|
|
td.orr { background: url("themes/goofy/images/or-r.png"); }
|
2001-03-24 16:44:21 +00:00
|
|
|
td.orcnt { background: #FBC636; width: 100%; font-family: tahoma,arial,helvetica; font-size: 10pt; font-weight: bold; text-align: center; }
|
|
|
|
td.gru { background: url("themes/goofy/images/gr-u.png"); width: 100%; }
|
|
|
|
td.grd { background: url("themes/goofy/images/gr-d.png"); width: 100%; }
|
|
|
|
td.grl { background: url("themes/goofy/images/gr-l.png"); }
|
2001-03-23 22:45:36 +00:00
|
|
|
td.grr { background: url("themes/goofy/images/gr-r.png"); }
|
2001-03-24 16:44:21 +00:00
|
|
|
td.grcnt { background: #C6C6C6; width: 100%; font-family: tahoma,arial,helvetica; font-size: 10pt; }
|
|
|
|
td.lgu { background: url("themes/goofy/images/lg-u.png"); width: 100%; }
|
|
|
|
td.lgd { background: url("themes/goofy/images/lg-d.png"); width: 100%; }
|
|
|
|
td.lgl { background: url("themes/goofy/images/lg-l.png"); }
|
2001-03-23 22:45:36 +00:00
|
|
|
td.lgr { background: url("themes/goofy/images/lg-r.png"); }
|
|
|
|
td.lgcnt { background: #E4E4E4; width: 100%; font-family: tahoma,arial,helvetica; font-size: 10pt; white-space: normal; }
|
2001-03-24 16:44:21 +00:00
|
|
|
|
2001-03-23 22:45:36 +00:00
|
|
|
small { font-size: 8pt; }
|
|
|
|
big { font-size: 12pt; }
|
2001-03-24 16:44:21 +00:00
|
|
|
|
2001-03-23 22:45:36 +00:00
|
|
|
hr { color: #404040; height: 1px; }
|
2001-03-24 16:44:21 +00:00
|
|
|
|
2001-03-23 22:45:36 +00:00
|
|
|
a { color: #804000; text-decoration: none; }
|
|
|
|
a:link { color: #804000; }
|
|
|
|
a:visited { color: #804000; }
|
|
|
|
a:active { color: #804000; }
|
2001-03-24 16:44:21 +00:00
|
|
|
|
2001-03-23 22:45:36 +00:00
|
|
|
-->
|
|
|
|
</style>
|
2001-05-15 18:38:57 +00:00
|
|
|
<script language="JavaScript" type="text/javascript"><!--
|
This is a major rewrite of the Goofy-theme.... the major problem with it was that it required a *lot* of overhead for a simple box, due to the fancy borders. To counter this, I've added simple functions in JavaScript to output the actual boxes, while the PHP functions themselves output simple function calls to them.
The result is an incredible loss of size, especially on larger pages.... on a typical drupal page (header/footer, 1 story box, 1 comment mod box, 4 comments and 1 side box) the difference was 23K vs 15K, which I find quite good. You should also notice how big some pages were in the old version, which are still tiny in the new version.
There are a few problems though:
- You can't use it in some parts of the admin section (preview a story), since admin.php leaves out the header(), so the html-generating functions are not included there.
- Because drop can occasionally insert HTML directly, without going through themes, I have to wrap each box in its own <script> tag. The optimization would benefit even more if i could group all function calls in one <script> tag, but it's not possible at the moment.
I suggest you take a snapshot of an original goofy-page (drop.org) and compare it with the output of this one (cvs-version) to see how it works exactly. And finally, it works on both IE5 and NS4, so I assume it does on most browsers.
2001-05-14 23:27:41 +00:00
|
|
|
function b(title,content) {document.writeln("<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\" width=\"100%\"><tr><td><img src=\"themes/goofy/images/or-ul.png\" alt=\"\"></td><td class=\"oru\" width=\"100%\"><img src=\"themes/goofy/images/null.gif\" alt=\"\"></td><td><img src=\"themes/goofy/images/or-ur.png\" alt=\"\"></td></tr><tr><td class=\"orl\"><img src=\"themes/goofy/images/null.gif\" alt=\"\"></td><td class=\"orcnt\" width=\"100%\" valign=\"top\">" + title + "</td><td class=\"orr\"><img src=\"themes/goofy/images/null.gif\" alt=\"\"></td></tr><tr><td class=\"orl\"><img src=\"themes/goofy/images/null.gif\" alt=\"\"></td><td class=\"orcnt\" width=\"100%\"><img src=\"themes/goofy/images/null.gif\" height=\"5\" alt=\"\"></td><td class=\"orr\"><img src=\"themes/goofy/images/null.gif\" alt=\"\"></td></tr><tr><td class=\"lgl\"><img src=\"themes/goofy/images/null.gif\" alt=\"\"></td><td class=\"lgcnt\" width=\"100%\"><img src=\"themes/goofy/images/null.gif\" height=\"4\" alt=\"\"></td><td class=\"lgr\"><img src=\"themes/goofy/images/null.gif\" alt=\"\"></td></tr><tr><td class=\"lgl\"><img src=\"themes/goofy/images/null.gif\" alt=\"\"></td><td class=\"lgcnt\" width=\"100%\">" + content + "</td><td class=\"lgr\"><img src=\"themes/goofy/images/null.gif\" alt=\"\"></td></tr><tr><td><img src=\"themes/goofy/images/lg-dl.png\" alt=\"\"></td><td class=\"lgd\" width=\"100%\"><img src=\"themes/goofy/images/null.gif\" width=\"150\" height=\"1\" alt=\"\"></td><td><img src=\"themes/goofy/images/lg-dr.png\" alt=\"\"></td></tr></table><br>");}
|
|
|
|
function s(title,subleft,subright,body) {document.writeln("<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\" width=\"100%\"><tr><td><img src=\"themes/goofy/images/or-ul.png\" alt=\"\"></td><td class=\"oru\" width=\"100%\" colspan=\"2\"><img src=\"themes/goofy/images/null.gif\" alt=\"\"></td><td><img src=\"themes/goofy/images/or-ur.png\" alt=\"\"></td></tr><tr><td class=\"orl\"><img src=\"themes/goofy/images/null.gif\" alt=\"\"></td><td class=\"orcnt\" width=\"100%\" valign=\"top\" colspan=\"2\">" + title + "</td><td class=\"orr\"><img src=\"themes/goofy/images/null.gif\" alt=\"\"></td></tr><tr><td class=\"orl\"><img src=\"themes/goofy/images/null.gif\" alt=\"\"></td><td class=\"orcnt\" width=\"100%\" colspan=\"2\"><img src=\"themes/goofy/images/null.gif\" height=\"5\" alt=\"\"></td><td class=\"orr\"><img src=\"themes/goofy/images/null.gif\" alt=\"\"></td></tr><tr><td class=\"lgl\"><img src=\"themes/goofy/images/null.gif\" alt=\"\"></td><td class=\"lgcnt\" width=\"100%\" colspan=\"2\"><img src=\"themes/goofy/images/null.gif\" height=\"4\" alt=\"\"></td><td class=\"lgr\"><img src=\"themes/goofy/images/null.gif\" alt=\"\"></td></tr><tr><td class=\"lgl\"><img src=\"themes/goofy/images/null.gif\" alt=\"\"></td><td class=\"lgcnt\"><small>" + subleft + "</small></td><td class=\"lgcnt\" nowrap><div align=\"right\">" + subright + "</div></td><td class=\"lgr\"><img src=\"themes/goofy/images/null.gif\" alt=\"\"></td></tr><tr><td class=\"lgl\"><img src=\"themes/goofy/images/null.gif\" alt=\"\"></td><td class=\"lgcnt\" width=\"100%\" colspan=\"2\"><hr color=\"#404040\" size=\"1\">" + body + "</div></td><td class=\"lgr\"><img src=\"themes/goofy/images/null.gif\" alt=\"\"></td></tr><tr><td><img src=\"themes/goofy/images/lg-dl.png\" alt=\"\"></td><td class=\"lgd\" width=\"100%\" colspan=\"2\"><img src=\"themes/goofy/images/null.gif\" alt=\"\"></td><td><img src=\"themes/goofy/images/lg-dr.png\" alt=\"\"></td></tr></table><br>");}
|
2001-05-15 18:38:57 +00:00
|
|
|
function c(subject,mod,author,date,body) {document.writeln("<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\" width=\"100%\"><tr><td><img src=\"themes/goofy/images/or-ul.png\" alt=\"\"></td><td class=\"oru\" width=\"100%\" colspan=\"2\"><img src=\"themes/goofy/images/null.gif\" alt=\"\"></td><td><img src=\"themes/goofy/images/or-ur.png\" alt=\"\"></td></tr><tr><td class=\"orl\"><img src=\"themes/goofy/images/null.gif\" alt=\"\"></td><td class=\"orcnt\" width=\"100%\" valign=\"top\" colspan=\"2\"><table border=\"0\" cellpadding=\"0\" cellspacing=\"1\" width=\"100%\"><tr><td valign=\"top\" width=\"5%\"><div align=\"right\"><b><?php echo t("Subject"); ?>:</b> </div></td><td width=\"80%\"><b>" + subject + "</b></td><td rowspan=\"3\" valign=\"middle\" width=\"15%\"><div align=\"right\">" + mod + "</div></td></tr><tr><td valign=\"top\"><div align=\"right\"><?php echo t("Author"); ?>: </div></td><td>" + author + "</td></tr><tr><td><div align=\"right\"><?php echo t("Date"); ?>: </div></td><td>" + date + "</td></tr></table></td><td class=\"orr\"><img src=\"themes/goofy/images/null.gif\" alt=\"\"></td></tr><tr><td class=\"orl\"><img src=\"themes/goofy/images/null.gif\" alt=\"\"></td><td class=\"orcnt\" width=\"100%\" colspan=\"2\"><img src=\"themes/goofy/images/null.gif\" height=\"5\" alt=\"\"></td><td class=\"orr\"><img src=\"themes/goofy/images/null.gif\" alt=\"\"></td></tr><tr><td class=\"lgl\"><img src=\"themes/goofy/images/null.gif\" alt=\"\"></td><td class=\"lgcnt\" width=\"100%\" colspan=\"2\"><img src=\"themes/goofy/images/null.gif\" height=\"4\" alt=\"\"></td><td class=\"lgr\"><img src=\"themes/goofy/images/null.gif\" alt=\"\"></td></tr>");if(body){document.writeln("<tr><td class=\"lgl\"><img src=\"themes/goofy/images/null.gif\" alt=\"\"></td><td class=\"lgcnt\" width=\"100%\" colspan=\"2\">" + body + "</td><td class=\"lgr\"><img src=\"themes/goofy/images/null.gif\" alt=\"\"></td></tr>");};document.writeln("<tr><td><img src=\"themes/goofy/images/lg-dl.png\" alt=\"\"></td><td class=\"lgd\" width=\"100%\" colspan=\"2\"><img src=\"themes/goofy/images/null.gif\" alt=\"\"></td><td><img src=\"themes/goofy/images/lg-dr.png\" alt=\"\"></td></tr></table><br>");}
|
This is a major rewrite of the Goofy-theme.... the major problem with it was that it required a *lot* of overhead for a simple box, due to the fancy borders. To counter this, I've added simple functions in JavaScript to output the actual boxes, while the PHP functions themselves output simple function calls to them.
The result is an incredible loss of size, especially on larger pages.... on a typical drupal page (header/footer, 1 story box, 1 comment mod box, 4 comments and 1 side box) the difference was 23K vs 15K, which I find quite good. You should also notice how big some pages were in the old version, which are still tiny in the new version.
There are a few problems though:
- You can't use it in some parts of the admin section (preview a story), since admin.php leaves out the header(), so the html-generating functions are not included there.
- Because drop can occasionally insert HTML directly, without going through themes, I have to wrap each box in its own <script> tag. The optimization would benefit even more if i could group all function calls in one <script> tag, but it's not possible at the moment.
I suggest you take a snapshot of an original goofy-page (drop.org) and compare it with the output of this one (cvs-version) to see how it works exactly. And finally, it works on both IE5 and NS4, so I assume it does on most browsers.
2001-05-14 23:27:41 +00:00
|
|
|
//-->
|
|
|
|
</script>
|
2001-03-20 23:40:13 +00:00
|
|
|
</head>
|
|
|
|
<body>
|
|
|
|
<table border="0" cellspacing="3" cellpadding="0" width="100%">
|
|
|
|
<tr>
|
2001-04-06 14:14:16 +00:00
|
|
|
<td colspan="2" width="100%"><img src="themes/goofy/images/logo.png" alt=""><br>
|
This is a major rewrite of the Goofy-theme.... the major problem with it was that it required a *lot* of overhead for a simple box, due to the fancy borders. To counter this, I've added simple functions in JavaScript to output the actual boxes, while the PHP functions themselves output simple function calls to them.
The result is an incredible loss of size, especially on larger pages.... on a typical drupal page (header/footer, 1 story box, 1 comment mod box, 4 comments and 1 side box) the difference was 23K vs 15K, which I find quite good. You should also notice how big some pages were in the old version, which are still tiny in the new version.
There are a few problems though:
- You can't use it in some parts of the admin section (preview a story), since admin.php leaves out the header(), so the html-generating functions are not included there.
- Because drop can occasionally insert HTML directly, without going through themes, I have to wrap each box in its own <script> tag. The optimization would benefit even more if i could group all function calls in one <script> tag, but it's not possible at the moment.
I suggest you take a snapshot of an original goofy-page (drop.org) and compare it with the output of this one (cvs-version) to see how it works exactly. And finally, it works on both IE5 and NS4, so I assume it does on most browsers.
2001-05-14 23:27:41 +00:00
|
|
|
<?php $this->linksbar(); ?>
|
2001-03-20 23:40:13 +00:00
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
<tr>
|
2001-03-21 14:00:55 +00:00
|
|
|
<td valign="top" width="100%">
|
2001-03-20 23:40:13 +00:00
|
|
|
<?php
|
|
|
|
} // close header function
|
2001-03-24 16:44:21 +00:00
|
|
|
|
2001-05-15 18:38:57 +00:00
|
|
|
|
|
|
|
|
This is a major rewrite of the Goofy-theme.... the major problem with it was that it required a *lot* of overhead for a simple box, due to the fancy borders. To counter this, I've added simple functions in JavaScript to output the actual boxes, while the PHP functions themselves output simple function calls to them.
The result is an incredible loss of size, especially on larger pages.... on a typical drupal page (header/footer, 1 story box, 1 comment mod box, 4 comments and 1 side box) the difference was 23K vs 15K, which I find quite good. You should also notice how big some pages were in the old version, which are still tiny in the new version.
There are a few problems though:
- You can't use it in some parts of the admin section (preview a story), since admin.php leaves out the header(), so the html-generating functions are not included there.
- Because drop can occasionally insert HTML directly, without going through themes, I have to wrap each box in its own <script> tag. The optimization would benefit even more if i could group all function calls in one <script> tag, but it's not possible at the moment.
I suggest you take a snapshot of an original goofy-page (drop.org) and compare it with the output of this one (cvs-version) to see how it works exactly. And finally, it works on both IE5 and NS4, so I assume it does on most browsers.
2001-05-14 23:27:41 +00:00
|
|
|
function linksbar() { // helper function to prevent double code
|
|
|
|
?>
|
|
|
|
<table border="0" cellspacing="0" cellpadding="0" width="100%">
|
2001-03-20 23:40:13 +00:00
|
|
|
<tr>
|
2001-03-23 17:10:09 +00:00
|
|
|
<td><img src="themes/goofy/images/lg-ul.png" alt=""></td>
|
|
|
|
<td class="lgu" width="100%"><img src="themes/goofy/images/null.gif" alt=""></td>
|
|
|
|
<td><img src="themes/goofy/images/lg-ur.png" alt=""></td>
|
2001-03-20 23:40:13 +00:00
|
|
|
</tr>
|
|
|
|
<tr>
|
2001-03-23 17:10:09 +00:00
|
|
|
<td class="lgl"><img src="themes/goofy/images/null.gif" alt=""></td>
|
2001-07-13 22:19:05 +00:00
|
|
|
<td class="lgcnt" width="100%" valign="top"><div align="center"><?php print $this->links(link_page()); ?></div></td>
|
2001-03-23 17:10:09 +00:00
|
|
|
<td class="lgr"><img src="themes/goofy/images/null.gif" alt=""></td>
|
2001-03-20 23:40:13 +00:00
|
|
|
</tr>
|
|
|
|
<tr>
|
2001-03-23 17:10:09 +00:00
|
|
|
<td><img src="themes/goofy/images/lg-dl.png" alt=""></td>
|
|
|
|
<td class="lgd" width="100%"><img src="themes/goofy/images/null.gif" alt=""></td>
|
|
|
|
<td><img src="themes/goofy/images/lg-dr.png" alt=""></td>
|
2001-03-20 23:40:13 +00:00
|
|
|
</tr>
|
|
|
|
</table>
|
This is a major rewrite of the Goofy-theme.... the major problem with it was that it required a *lot* of overhead for a simple box, due to the fancy borders. To counter this, I've added simple functions in JavaScript to output the actual boxes, while the PHP functions themselves output simple function calls to them.
The result is an incredible loss of size, especially on larger pages.... on a typical drupal page (header/footer, 1 story box, 1 comment mod box, 4 comments and 1 side box) the difference was 23K vs 15K, which I find quite good. You should also notice how big some pages were in the old version, which are still tiny in the new version.
There are a few problems though:
- You can't use it in some parts of the admin section (preview a story), since admin.php leaves out the header(), so the html-generating functions are not included there.
- Because drop can occasionally insert HTML directly, without going through themes, I have to wrap each box in its own <script> tag. The optimization would benefit even more if i could group all function calls in one <script> tag, but it's not possible at the moment.
I suggest you take a snapshot of an original goofy-page (drop.org) and compare it with the output of this one (cvs-version) to see how it works exactly. And finally, it works on both IE5 and NS4, so I assume it does on most browsers.
2001-05-14 23:27:41 +00:00
|
|
|
<?php
|
|
|
|
} // close linksbar function
|
2001-03-24 16:44:21 +00:00
|
|
|
|
2001-03-20 23:40:13 +00:00
|
|
|
|
2001-06-29 22:08:57 +00:00
|
|
|
function node($node, $main = 0) {
|
2001-05-24 10:05:18 +00:00
|
|
|
echo "\n<!-- node: \"$node->title\" -->\n";
|
|
|
|
$title = check_output($node->title);
|
2001-07-25 12:21:48 +00:00
|
|
|
$subleft = strtr(t("Submitted by %a on %b"), array("%a" => format_username($node->userid, $node->name), "%b" => format_date($node->timestamp, "large")));
|
2001-06-11 20:01:13 +00:00
|
|
|
$subright = node_index($node);
|
2001-06-29 22:08:57 +00:00
|
|
|
$body = check_output($node->body, 1) . ($main ? "<hr color=\"#404040\" size=\"1\"><div align=\"right\">[ " . $this->links(link_node($node)) . " ]</div>" : "");
|
This is a major rewrite of the Goofy-theme.... the major problem with it was that it required a *lot* of overhead for a simple box, due to the fancy borders. To counter this, I've added simple functions in JavaScript to output the actual boxes, while the PHP functions themselves output simple function calls to them.
The result is an incredible loss of size, especially on larger pages.... on a typical drupal page (header/footer, 1 story box, 1 comment mod box, 4 comments and 1 side box) the difference was 23K vs 15K, which I find quite good. You should also notice how big some pages were in the old version, which are still tiny in the new version.
There are a few problems though:
- You can't use it in some parts of the admin section (preview a story), since admin.php leaves out the header(), so the html-generating functions are not included there.
- Because drop can occasionally insert HTML directly, without going through themes, I have to wrap each box in its own <script> tag. The optimization would benefit even more if i could group all function calls in one <script> tag, but it's not possible at the moment.
I suggest you take a snapshot of an original goofy-page (drop.org) and compare it with the output of this one (cvs-version) to see how it works exactly. And finally, it works on both IE5 and NS4, so I assume it does on most browsers.
2001-05-14 23:27:41 +00:00
|
|
|
print "<script language=\"JavaScript\"><!--\ns(\"". $this->stripbreaks(addslashes($title)) ."\",\"". $this->stripbreaks(addslashes($subleft)) ."\",\"". $this->stripbreaks(addslashes($subright)) ."\",\"". $this->stripbreaks(addslashes($body)) ."\"); // -->\n</script>\n";
|
2001-05-24 10:05:18 +00:00
|
|
|
} // close node function
|
2001-03-20 23:40:13 +00:00
|
|
|
|
2001-05-15 18:38:57 +00:00
|
|
|
|
2001-03-20 23:40:13 +00:00
|
|
|
function comment($comment, $link = "") {
|
|
|
|
echo "<A NAME=\"$comment->cid\"></A>\n";
|
|
|
|
|
2001-07-25 12:21:48 +00:00
|
|
|
$author = "<b>" . format_username($comment->userid, $comment->name) . "</b>";
|
This is a major rewrite of the Goofy-theme.... the major problem with it was that it required a *lot* of overhead for a simple box, due to the fancy borders. To counter this, I've added simple functions in JavaScript to output the actual boxes, while the PHP functions themselves output simple function calls to them.
The result is an incredible loss of size, especially on larger pages.... on a typical drupal page (header/footer, 1 story box, 1 comment mod box, 4 comments and 1 side box) the difference was 23K vs 15K, which I find quite good. You should also notice how big some pages were in the old version, which are still tiny in the new version.
There are a few problems though:
- You can't use it in some parts of the admin section (preview a story), since admin.php leaves out the header(), so the html-generating functions are not included there.
- Because drop can occasionally insert HTML directly, without going through themes, I have to wrap each box in its own <script> tag. The optimization would benefit even more if i could group all function calls in one <script> tag, but it's not possible at the moment.
I suggest you take a snapshot of an original goofy-page (drop.org) and compare it with the output of this one (cvs-version) to see how it works exactly. And finally, it works on both IE5 and NS4, so I assume it does on most browsers.
2001-05-14 23:27:41 +00:00
|
|
|
if ($comment->userid) {
|
|
|
|
if ($comment->fake_email) $info[] = format_email($comment->fake_email);
|
|
|
|
if (eregi("http://",$comment->url)) $info[] = format_url($comment->url);
|
2001-06-06 19:40:39 +00:00
|
|
|
if ($info) $author .= "<br>[ ". implode(" | ",$info) . " ]";
|
This is a major rewrite of the Goofy-theme.... the major problem with it was that it required a *lot* of overhead for a simple box, due to the fancy borders. To counter this, I've added simple functions in JavaScript to output the actual boxes, while the PHP functions themselves output simple function calls to them.
The result is an incredible loss of size, especially on larger pages.... on a typical drupal page (header/footer, 1 story box, 1 comment mod box, 4 comments and 1 side box) the difference was 23K vs 15K, which I find quite good. You should also notice how big some pages were in the old version, which are still tiny in the new version.
There are a few problems though:
- You can't use it in some parts of the admin section (preview a story), since admin.php leaves out the header(), so the html-generating functions are not included there.
- Because drop can occasionally insert HTML directly, without going through themes, I have to wrap each box in its own <script> tag. The optimization would benefit even more if i could group all function calls in one <script> tag, but it's not possible at the moment.
I suggest you take a snapshot of an original goofy-page (drop.org) and compare it with the output of this one (cvs-version) to see how it works exactly. And finally, it works on both IE5 and NS4, so I assume it does on most browsers.
2001-05-14 23:27:41 +00:00
|
|
|
}
|
|
|
|
$body = check_output($comment->comment, 1) . "<br><hr color=\"#404040\" size=\"1\"><div align=\"right\">[ $link ]</div>";
|
2001-03-24 16:44:21 +00:00
|
|
|
|
2001-05-15 18:38:57 +00:00
|
|
|
print "<script language=\"JavaScript\"><!--\nc(\"". $this->stripbreaks(addslashes(check_output($comment->subject))) ."\",\"". $this->stripbreaks(addslashes(comment_moderation($comment))) ."\",\"". $this->stripbreaks(addslashes($author)) ."\",\"". $this->stripbreaks(addslashes(format_date($comment->timestamp))) ."\",\"". $this->stripbreaks(addslashes($body)) ."\"); // -->\n</script>\n";
|
2001-03-20 23:40:13 +00:00
|
|
|
} // close comment function
|
2001-05-15 18:38:57 +00:00
|
|
|
|
|
|
|
|
This is a major rewrite of the Goofy-theme.... the major problem with it was that it required a *lot* of overhead for a simple box, due to the fancy borders. To counter this, I've added simple functions in JavaScript to output the actual boxes, while the PHP functions themselves output simple function calls to them.
The result is an incredible loss of size, especially on larger pages.... on a typical drupal page (header/footer, 1 story box, 1 comment mod box, 4 comments and 1 side box) the difference was 23K vs 15K, which I find quite good. You should also notice how big some pages were in the old version, which are still tiny in the new version.
There are a few problems though:
- You can't use it in some parts of the admin section (preview a story), since admin.php leaves out the header(), so the html-generating functions are not included there.
- Because drop can occasionally insert HTML directly, without going through themes, I have to wrap each box in its own <script> tag. The optimization would benefit even more if i could group all function calls in one <script> tag, but it's not possible at the moment.
I suggest you take a snapshot of an original goofy-page (drop.org) and compare it with the output of this one (cvs-version) to see how it works exactly. And finally, it works on both IE5 and NS4, so I assume it does on most browsers.
2001-05-14 23:27:41 +00:00
|
|
|
function stripbreaks($a) { // helper function for generating the javascripted boxes
|
|
|
|
return str_replace("\n","\\n",str_replace("\r","\\r",$a));
|
|
|
|
} // close stripbreaks function
|
|
|
|
|
2001-05-15 18:38:57 +00:00
|
|
|
|
2001-07-14 01:01:45 +00:00
|
|
|
function box($subject, $content, $region = "main") {
|
This is a major rewrite of the Goofy-theme.... the major problem with it was that it required a *lot* of overhead for a simple box, due to the fancy borders. To counter this, I've added simple functions in JavaScript to output the actual boxes, while the PHP functions themselves output simple function calls to them.
The result is an incredible loss of size, especially on larger pages.... on a typical drupal page (header/footer, 1 story box, 1 comment mod box, 4 comments and 1 side box) the difference was 23K vs 15K, which I find quite good. You should also notice how big some pages were in the old version, which are still tiny in the new version.
There are a few problems though:
- You can't use it in some parts of the admin section (preview a story), since admin.php leaves out the header(), so the html-generating functions are not included there.
- Because drop can occasionally insert HTML directly, without going through themes, I have to wrap each box in its own <script> tag. The optimization would benefit even more if i could group all function calls in one <script> tag, but it's not possible at the moment.
I suggest you take a snapshot of an original goofy-page (drop.org) and compare it with the output of this one (cvs-version) to see how it works exactly. And finally, it works on both IE5 and NS4, so I assume it does on most browsers.
2001-05-14 23:27:41 +00:00
|
|
|
print "<script language=\"JavaScript\"><!--\nb(\"". $this->stripbreaks(addslashes($subject)) ."\",\"". $this->stripbreaks(addslashes($content)) ."\"); // -->\n</script>\n";
|
2001-03-20 23:40:13 +00:00
|
|
|
} // close box function
|
|
|
|
|
2001-05-15 18:38:57 +00:00
|
|
|
|
2001-03-20 23:40:13 +00:00
|
|
|
function footer() {
|
|
|
|
?>
|
|
|
|
</td>
|
2001-03-21 14:00:55 +00:00
|
|
|
<td valign="top">
|
2001-03-20 23:40:13 +00:00
|
|
|
<?php
|
2001-07-14 01:01:45 +00:00
|
|
|
theme_account("all", $this);
|
2001-03-20 23:40:13 +00:00
|
|
|
theme_blocks("all", $this);
|
2001-03-24 16:44:21 +00:00
|
|
|
?>
|
2001-03-20 23:40:13 +00:00
|
|
|
</td>
|
2001-03-24 16:44:21 +00:00
|
|
|
</tr>
|
This is a major rewrite of the Goofy-theme.... the major problem with it was that it required a *lot* of overhead for a simple box, due to the fancy borders. To counter this, I've added simple functions in JavaScript to output the actual boxes, while the PHP functions themselves output simple function calls to them.
The result is an incredible loss of size, especially on larger pages.... on a typical drupal page (header/footer, 1 story box, 1 comment mod box, 4 comments and 1 side box) the difference was 23K vs 15K, which I find quite good. You should also notice how big some pages were in the old version, which are still tiny in the new version.
There are a few problems though:
- You can't use it in some parts of the admin section (preview a story), since admin.php leaves out the header(), so the html-generating functions are not included there.
- Because drop can occasionally insert HTML directly, without going through themes, I have to wrap each box in its own <script> tag. The optimization would benefit even more if i could group all function calls in one <script> tag, but it's not possible at the moment.
I suggest you take a snapshot of an original goofy-page (drop.org) and compare it with the output of this one (cvs-version) to see how it works exactly. And finally, it works on both IE5 and NS4, so I assume it does on most browsers.
2001-05-14 23:27:41 +00:00
|
|
|
<tr><td colspan="2">
|
|
|
|
<?php $this->linksbar(); ?>
|
|
|
|
</td></tr>
|
2001-03-20 23:40:13 +00:00
|
|
|
</table>
|
|
|
|
</body>
|
|
|
|
</html>
|
|
|
|
<?
|
This is a major rewrite of the Goofy-theme.... the major problem with it was that it required a *lot* of overhead for a simple box, due to the fancy borders. To counter this, I've added simple functions in JavaScript to output the actual boxes, while the PHP functions themselves output simple function calls to them.
The result is an incredible loss of size, especially on larger pages.... on a typical drupal page (header/footer, 1 story box, 1 comment mod box, 4 comments and 1 side box) the difference was 23K vs 15K, which I find quite good. You should also notice how big some pages were in the old version, which are still tiny in the new version.
There are a few problems though:
- You can't use it in some parts of the admin section (preview a story), since admin.php leaves out the header(), so the html-generating functions are not included there.
- Because drop can occasionally insert HTML directly, without going through themes, I have to wrap each box in its own <script> tag. The optimization would benefit even more if i could group all function calls in one <script> tag, but it's not possible at the moment.
I suggest you take a snapshot of an original goofy-page (drop.org) and compare it with the output of this one (cvs-version) to see how it works exactly. And finally, it works on both IE5 and NS4, so I assume it does on most browsers.
2001-05-14 23:27:41 +00:00
|
|
|
} // close footer function
|
|
|
|
} // close theme-class
|
2001-03-20 23:40:13 +00:00
|
|
|
|
|
|
|
?>
|