The HTML shown is fine. The hard coded HTML of cavstat.php is a problem. It would work better for blogs and web sites if it used CSS formatting. The existing output is:
Code: Select all
<html>
<head></head>
<body style="background-color: #dddddd;">
<span style="font-size: 0.8em"><b><i>Cavern Status:</i></b></span>
<img src="http://www.openuru.org/sitestyle/img/led-green.gif"> Open for exploration! - <a href="http://mystonline.com/play/"> Sign up to play at MystOnline.com!</a><br>
<span style="font-size: 0.8em"><b><i>Developer Message:</i></b></span> Welcome to Myst Online: Uru Live! Riven: The Sequel to Myst is now available on iTunes app store
<div style="font-size: 7pt; float: right;"><a href="http://www.openuru.org/">www.openuru.org</a></div>
<!-- Google analytics -->
<script type="text/javascript">
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-20896922-1']);
_gaq.push(['_setDomainName', 'none']);
_gaq.push(['_setAllowLinker', true]);
_gaq.push(['_trackPageview']);
(function() {
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
var s = document.getElementsByTagName('script')[0];
s.parentNode.insertBefore(ga, s);
})();
</script>
</body>
</html>
I would suggest that something like this be generated:
Code: Select all
<html>
<head></head>
<body>
<span class="urustatus">Cavern Status: </span>
<img src="http://www.openuru.org/sitestyle/img/led-green.gif"> Open for exploration! - <a href="http://mystonline.com/play/"> Sign up to play at MystOnline.com!</a><br>
<span class="urustatus">Developer Message: </span> Welcome to Myst Online: Uru Live! Riven: The Sequel to Myst is now available on iTunes app store
<div id=ouLink"><a href="http://www.openuru.org/">www.openuru.org</a></div>
<!-- Google analytics -->
<script type="text/javascript">
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-20896922-1']);
_gaq.push(['_setDomainName', 'none']);
_gaq.push(['_setAllowLinker', true]);
_gaq.push(['_trackPageview']);
(function() {
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
var s = document.getElementsByTagName('script')[0];
s.parentNode.insertBefore(ga, s);
})();
</script>
</body>
</html>
Obviously this may create a problem for the formatting here. If formatting is included in the page, you then take over control on all the sites. A PHP IF could check to see it the page is appearing inside another site and omit the CSS definitions. But, using CSS allows those using it to format things for their site/blog.
I suggest a separate page that generates an HTML code fragment for use with JQuery apps. Using more DIV tags with CSS Class and ID would allow more use of the feature. Perhaps a page named cavStatAlt.php that generates this:
Code: Select all
<div id="uruStatus">Cavern Status: <img src="http://www.openuru.org/sitestyle/img/led-green.gif"> Open for exploration!</div>
<div id="uruSignup">Sign up to play <a href="http://mystonline.com/play/">Uru Live at MystOnline.com!</a></div>
<div id="uruDevLnk"><p>Developer Message: Welcome to Myst Online: Uru Live!</p><p>Riven: The Sequel to Myst is now available on iTunes app store <a href="http://www.openuru.org/">www.openuru.org</a></p></div>
By using DIV tags to separate the items I can show or hide them as I want. Removal of the Body and HTML tags along with the script allows this fragment to blend into to any part of a page and skips the iframe problem for browsers that don’t support it. (Are there any that don’t?)
Plus this fragment could be used as an include in the cavstat.php page. That would allow one to skip the PHP IF and include a CSS file call in the cavstat.php page.
This pulls all the formatting from the page and code and moves it to a CSS defintion, a best (or in my mind, a better) practice.
If you are interested in stats, I would like to know if you are interested in how many times it is shown (impressions) or how many times it is clicked? The script code can be included. The Google code seems to work with other copies of the script in the page. So, it should not mess up sites that already have Google Analytics code.
If we can have a nice clean fragment page, I might (no promise) build a WordPress Widget to use it. Depends on time. But that would allow those of is with blogs to easily add it. I'm finding more of the SL Uruites starting blogs. So, it could be good promotion.