[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[or-cvs] r14723: (ticket:73) adding banner support (in torstatus/trunk: . web)
Author: kasimir
Date: 2008-05-25 01:39:24 -0400 (Sun, 25 May 2008)
New Revision: 14723
Modified:
torstatus/trunk/README
torstatus/trunk/install.sql
torstatus/trunk/web/config_template.php
torstatus/trunk/web/index.php
Log:
(ticket:73) adding banner support
Modified: torstatus/trunk/README
===================================================================
--- torstatus/trunk/README 2008-05-25 05:32:35 UTC (rev 14722)
+++ torstatus/trunk/README 2008-05-25 05:39:24 UTC (rev 14723)
@@ -167,6 +167,10 @@
'Valid'
'V2Dir'
+-- $BannerHTML: The HTML that, if defined, will be placed in a banner on the top of the TorStatus page. It may include any HTML desired.
+
+-- $BannerWidth, $BannerHeight: These are the widths and heights, respectively, of the banner that will be created given a defined $BannerHTML.
+
-- $LocalTimeZone: This is simply a string where you can specify your time
zone, so that the "Cache Last Updated" field at the bottom of the page makes
sense to users in other time zones, since that field is in local time.
Modified: torstatus/trunk/install.sql
===================================================================
--- torstatus/trunk/install.sql 2008-05-25 05:32:35 UTC (rev 14722)
+++ torstatus/trunk/install.sql 2008-05-25 05:39:24 UTC (rev 14723)
@@ -194,7 +194,18 @@
`ORPort` int(10) NOT NULL,
`DirPort` int(10) NOT NULL,
`CountryCode` varchar(4) NOT NULL,
- `Flags` smallint(6) unsigned NOT NULL,
+ `FAuthority` tinyint(1) unsigned default NULL,
+ `FBadDirectory` tinyint(1) unsigned default NULL,
+ `FBadExit` tinyint(1) unsigned default NULL,
+ `FExit` tinyint(1) unsigned default NULL,
+ `FFast` tinyint(1) unsigned default NULL,
+ `FGuard` tinyint(1) unsigned default NULL,
+ `FNamed` tinyint(1) unsigned default NULL,
+ `FStable` tinyint(1) unsigned default NULL,
+ `FRunning` tinyint(1) unsigned default NULL,
+ `FValid` tinyint(1) unsigned default NULL,
+ `FV2Dir` tinyint(1) unsigned default NULL,
+ `FHSDir` tinyint(1) unsigned default NULL,
PRIMARY KEY (`ID`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;
@@ -220,7 +231,18 @@
`ORPort` int(10) NOT NULL,
`DirPort` int(10) NOT NULL,
`CountryCode` varchar(4) NOT NULL,
- `Flags` smallint(6) unsigned NOT NULL,
+ `FAuthority` tinyint(1) unsigned default NULL,
+ `FBadDirectory` tinyint(1) unsigned default NULL,
+ `FBadExit` tinyint(1) unsigned default NULL,
+ `FExit` tinyint(1) unsigned default NULL,
+ `FFast` tinyint(1) unsigned default NULL,
+ `FGuard` tinyint(1) unsigned default NULL,
+ `FNamed` tinyint(1) unsigned default NULL,
+ `FStable` tinyint(1) unsigned default NULL,
+ `FRunning` tinyint(1) unsigned default NULL,
+ `FValid` tinyint(1) unsigned default NULL,
+ `FV2Dir` tinyint(1) unsigned default NULL,
+ `FHSDir` tinyint(1) unsigned default NULL,
PRIMARY KEY (`ID`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;
Modified: torstatus/trunk/web/config_template.php
===================================================================
--- torstatus/trunk/web/config_template.php 2008-05-25 05:32:35 UTC (rev 14722)
+++ torstatus/trunk/web/config_template.php 2008-05-25 05:39:24 UTC (rev 14723)
@@ -109,6 +109,11 @@
'Contact'
);
+// If you wish to include a web banner, uncomment the following lines
+//$BannerHTML = "Your banner here.";
+//$BannerHeight = "50px";
+//$BannerWidth = "400px";
+
// }}}
// ++++++++++ Other ++++++++++ {{{
Modified: torstatus/trunk/web/index.php
===================================================================
--- torstatus/trunk/web/index.php 2008-05-25 05:32:35 UTC (rev 14722)
+++ torstatus/trunk/web/index.php 2008-05-25 05:39:24 UTC (rev 14723)
@@ -2229,6 +2229,26 @@
<?php
}
+// Determine whether the user has a banner or not
+if ($BannerHTML)
+{
+ ?>
+<div class="dropcontainer" style="width: <?php echo $BannerWidth; ?>; height: <?php echo $BannerHeight; ?>;">
+<div class="dropshadow2" style="width: <?php echo $BannerWidth; ?>;">
+<div class="innerbox">
+
+<table class="torcheck" cellpadding="0" cellspacing="0" style="width: <?php echo $BannerWidth; ?>; height: <?php echo $BannerHeight; ?>;">
+<tr><td>
+<div style="padding: 3px; text-align: center;">
+<?php echo $BannerHTML; ?>
+</div>
+</td></tr>
+</table>
+
+</div></div></div>
+ <?php
+}
+
?>
<table cellspacing="2" cellpadding="2" class="body">