diff options
author | Jeroen Bensch <jeroen@44.no-reply.drupal.org> | 2001-04-16 02:45:17 +0000 |
---|---|---|
committer | Jeroen Bensch <jeroen@44.no-reply.drupal.org> | 2001-04-16 02:45:17 +0000 |
commit | 9505251f0d4b133481b7321bc105b7629127fb79 (patch) | |
tree | aafa513898a2f16e371e5350c1f6d9582d9d9b53 | |
parent | 1f0565806b1809b4c0c0a157f7fbfb4ac611e16a (diff) | |
download | brdo-9505251f0d4b133481b7321bc105b7629127fb79.tar.gz brdo-9505251f0d4b133481b7321bc105b7629127fb79.tar.bz2 |
Hey,
Again, a nightly commit :) The last one because tomorrow I'll be in bed at a reasonable time since the morning after school starts... I wish they had a pill for _that_ ;) I think it's ready for release. Added more stability concerning the navigation box. It should now handle all possible URL's on a drupal site. To make sure I catch them all I implemented something that check whether a value is not set to one. It is set to one when the URL matches an option in the list. I saw that we also have a ?mod=moderation (which should only be visible to people that are logged in so I couldn't put it in the list standard) and for the rest nodes. Therefore, when in moderation/a node page it displays Moderation/Node in the list, else not. If I didn't do this Main would be set to the default value... we had that problem before... I needed to use $REQUEST_URI for the modules because it gives you the whole URL, $PHP_SELF only gives you a string until the first ? in the URL... This way I couldn't make up whether you were on the diary or book page. (module.php?mod=book and module.php?mod=diary) With a substr($REQUEST_URI,12,9) I could. Dries told me today that $REQUEST_URI isn't as good as $PHP_SELF, but this is an easy way to fix it. Voila I think that's it. (now that I think of it, I don't even have to do a substr() for the book module since there isn't anything that can be put behind it. With diary for example I have to do the substring because things like &op=add can be put behind it, but that's not the case with the book...) After this change I think that everything is fixed. Oh yes I also fixed a rather flagrant allignment bug. I align the big right td centered which would cause the comment's tree to be centered too so there wasn't much left of a tree anymore. ;) Added one table that fixed this. OK, I think the theme is ready for release. The only problem still is the vertical spacer which is fat in NS 4.76. If someone knows why or finds any other bugs in my theme please let me know. But for me, it's finished, until the next block code is stable and released, I'm planning to get rid of the account box too and expand the navigation menu somewhat. with indented options etc... but that's for later... Now I am going to sleep (after some more fixes I already have in mind) Bye!
Jeroen.
(I'm not sending the mail right away, first the fixes.) OK, it's 04.32. I did some other nice thing IMO, but it's not going to work anymore one we have more than 1000 nodes... Ack.. Just click a story or comment somewhere and check out the navigation box... Goodmorning. ;)
-rw-r--r-- | themes/yaroon/jeroen2.theme | 78 |
1 files changed, 42 insertions, 36 deletions
diff --git a/themes/yaroon/jeroen2.theme b/themes/yaroon/jeroen2.theme index 21086cb77..27b7b0541 100644 --- a/themes/yaroon/jeroen2.theme +++ b/themes/yaroon/jeroen2.theme @@ -13,8 +13,11 @@ function header() { + global $PHP_SELF; global $REQUEST_URI; + $true = 0; + switch (rand(0,8)) { case 0: $color = "#c4a2a2"; break; case 1: $color = "#a2c4a7"; break; @@ -33,20 +36,21 @@ <head> <title><?php echo variable_get(site_name, "drupal"); ?></title> <style type="text/css"> - a { text-decoration: none; color: #24677f } - a.active { color: #24677f } - a.visited { color: #24677f } - a:hover { color: <?php echo $color; ?> } - td { font-family: Arial; font-size: 10pt } - .spacer1 { background-color: #000000 } - .small { font-family: Arial; font-size: 10pt } - .box { font-size: 12pt } + a { text-decoration: none; color: #24677f; } + a:active { color: #24677f; } + a:visited { color: #24677f; } + a:hover { color: <?php echo $color; ?>; } + td { font-family: Arial,Helvetica; font-size: 10pt; } + .spacer1 { background-color: #000000; } + .small { font-family: Arial; font-size: 10pt; } + .box { font-size: 12pt; } </style> <script language="JavaScript"> <!-- function do_nav() { - if (document.navform.navdrop.options[document.navform.navdrop.selectedIndex].value != "none") { - location = document.navform.navdrop.options[document.navform.navdrop.selectedIndex].value; + navdrop = document.navform.navdrop; + if (navdrop.options[navdrop.selectedIndex].value != "none") { + location = navdrop.options[navdrop.selectedIndex].value; } } --> @@ -56,21 +60,24 @@ <body bgcolor="#878787" topmargin="0" leftmargin="0" marginwidth="0" marginheight="0" link="#24677f" alink="#24677f" vlink="#24677f"> <table border="0" cellpadding="0" cellspacing="0" width="100%"> <tr> - <td align="left" valign="middle" width="20%" class="header"> - <font face="Helvetica" size="+1"> - <b><a href="http://drop.org/">drop.org</a></b> + <td align="left" valign="middle" width="20%"> + <font size="+1"> + <b><a href="<?php echo variable_get(site_url, +"http://drupal/"); ?> "><?php echo variable_get(site_name, "drupal"); ?></a></b> </font> </td> - <td class="spacer1"><img src="themes/jeroen2/images/pixel.gif" width="1" height="1" alt="" border="0" /></td> + <td class="spacer1" width="1" height="1"><img src="themes/jeroen2/images/pixel.gif" width="1" height="1" alt="" border="0" /></td> <form name="navform" action="" method="get"> <td align="right" valign="top" width="80%"> <select name="navdrop" onChange="do_nav()" class="small"> - <option value="index.php" <?php if ($REQUEST_URI == "/index.php") echo "selected"; ?>>Main</option> - <option value="account.php" <?php if ($REQUEST_URI == "/account.php") echo "selected"; ?>>Account</option> - <option value="module.php?mod=diary" <?php if ($REQUEST_URI == "/module.php?mod=diary") echo "selected"; ?>>Diary</option> - <option value="module.php?mod=book" <?php if ($REQUEST_URI == "/module.php?mod=book") echo "selected"; ?>>Handbook</option> - <option value="submit.php" <?php if ($REQUEST_URI == "/submit.php") echo "selected"; ?>>Submit news</option> - <option value="search.php" <?php if ($REQUEST_URI == "/search.php") echo "selected"; ?>>Search</option> + <option value="index.php" <?php if ($PHP_SELF == "/index.php") { echo "selected"; $true = 1; } ?>>Main</option> + <option value="account.php" <?php if ($PHP_SELF == "/account.php") { echo "selected"; $true = 1; } ?>>Account</option> + <option value="module.php?mod=diary" <?php if (substr($REQUEST_URI,12,9) == "mod=diary") { echo "selected"; $true = 1; } ?>>Diary</option> + <option value="module.php?mod=book" <?php if ($REQUEST_URI == "/module.php?mod=book") { echo "selected"; $true = 1; } ?>>Handbook</option> + <option value="submit.php" <?php if ($PHP_SELF == "/submit.php") { echo "selected"; $true = 1; } ?>>Submit news</option> + <option value="search.php" <?php if ($PHP_SELF == "/search.php") { echo "selected"; $true = 1; } ?>>Search</option> + <?php if ($REQUEST_URI == "/module.php?mod=moderation") echo "<option selected>Moderation</option>"; + if (!$true) { echo "<option selected>Node "; $id = substr($REQUEST_URI,strlen($REQUEST_URI) - 3); if (is_int((int) $id)) echo $id; echo"</option>"; } ?> </select> <noscript><input type="submit" value="Go!"></noscript> </td> @@ -89,10 +96,12 @@ ?> </td> - <td class="spacer1"><img src="themes/jeroen2/images/pixel.gif" width="1" height="1" alt="" border="0" /></td> <td align="center" valign="top" bgcolor="#f4f4f4" width="80%" height="100%"> <br /> + <table border="0" cellpadding="0" cellspacing="0" width="95%"> + <tr> + <td> <?php @@ -113,12 +122,11 @@ ?> - <table border="0" cellpadding="0" cellspacing="1" width="95%" height="100%"> + <table border="0" cellpadding="0" cellspacing="1" width="100%"> <tr> <td> - <a href="search.php?category=<?php echo urlencode($story->section); ?>"><img src="themes/jeroen2/images/<?php echo $img; ?>" border="0" /></a> <font face="Helvetica"><b style="font-size: 12pt"><?php echo check_output($story->title); ?></b> + <a href="search.php?category=<?php echo urlencode($story->section); ?>"><img src="themes/jeroen2/images/<?php echo $img; ?>" border="0" /></a> <b style="font-size: 12pt"><?php echo check_output($story->title); ?></b> <?php echo strtr(t("by %a on %b"), array("%a" => format_username($story->userid), "%b" => format_date($story->timestamp), "small")); ?> - </font> </td> </tr> <tr><td bgcolor="<?php echo $color; ?>"><img src="themes/jeroen2/images/pixel.gif" width="1" height="1" alt="" border="0" /></td></tr> @@ -127,14 +135,14 @@ <?php - echo "<br /><font face=\"Helvetica\">". check_output($story->abstract, 1) ."<br />"; + echo "<br />". check_output($story->abstract, 1) ."<br />"; if ($reply && $story->body) - echo "<br />". check_output($story->body, 1) ."</font><br />"; + echo "<br />". check_output($story->body, 1) ."<br />"; echo" </td> </tr> <tr> <td align=\"right\"> - <font face=\"Helvetica\" color=\"". $color ."\">"; + <font color=\"". $color ."\">"; if (!$reply) echo "". theme_morelink($this, $story) .""; else @@ -160,7 +168,7 @@ <tr> <td class="box"> <img src="themes/jeroen2/images/square.gif" /> <b><?php echo check_output($comment->subject); ?></b> - <font face="Helvetica" size="-1"><?php echo strtr(t(" by %a on %b"), array("%a" => format_username($comment->userid), "%b" => format_date($comment->timestamp), "small")); ?></font> + <font size="-1"><?php echo strtr(t(" by %a on %b"), array("%a" => format_username($comment->userid), "%b" => format_date($comment->timestamp), "small")); ?></font> </td> <td align="right"><?php echo comment_moderation($comment); ?></td> </tr> @@ -201,15 +209,13 @@ <table width="90%" border="0" cellpadding="0" cellspacing="1"> <tr> - <td class="box"><img src="themes/jeroen2/images/square.gif" /> <b><font face="Helvetica"><?php echo $subject; ?></font></b></td> + <td class="box"><img src="themes/jeroen2/images/square.gif" /> <b><?php echo $subject; ?></b></td> </tr> <tr><td class="spacer1"><img src="themes/jeroen2/images/pixel.gif" width="1" height="1" alt="" border="0" /><br></td></tr> <tr> <td> <br /> - <font face="Helvetica"> <?php echo $content; ?> - </font> </td> </tr> <tr><td align="right" class="box"><img src="themes/jeroen2/images/<?php echo $img; ?>" /><br /> </td></tr> @@ -223,22 +229,22 @@ ?> + </td> + </tr> + </table> <!-- I call this the super-space, withouth it, the comment section looks crappy at the bottom :) --> </td> </tr> <tr><td colspan="3" class="spacer1"><img src="themes/jeroen2/images/pixel.gif" width="1" height="1" alt="" border="0" /></td></tr> <tr> <td align="left"> - <font face="Helvetica"> - <a href="mailto:info@drop.org">info@drop.org</a> + <a href="mailto:<?php echo variable_get(site_email,"root@localhost"); ?>"><?php echo variable_get(site_email,"root@localhost"); ?></a> </font> </td> <td class="spacer1"><img src="themes/jeroen2/images/pixel.gif" width="1" height="1" alt="" border="0" /></td> <td align="right"> - <font face="Helvetica"> - The weblog for a dynamic community powered by Drupal - </font> + <?php echo variable_get(site_footer, ""); ?> </td> </tr> </table> |