www/adium.im 180:ea070e95f29a: Add an option for "forInclude" to...

commits at adium.im commits at adium.im
Tue May 5 21:57:45 UTC 2009


details:	http://hg.adium.im/www/adium.im/rev/ea070e95f29a
revision:	180:ea070e95f29a
author:		Zachary West <zacw at adium.im>
date:		Tue May 05 17:57:40 2009 -0400

Add an option for "forInclude" to display prettily on the wiki.

diffstat:

 beta/index.php |  46 +++++++++++++++++++++++++++-------------------
 1 files changed, 27 insertions(+), 19 deletions(-)

diffs (76 lines):

diff -r ab1164920dac -r ea070e95f29a beta/index.php
--- a/beta/index.php	Sun May 03 22:42:45 2009 -0400
+++ b/beta/index.php	Tue May 05 17:57:40 2009 -0400
@@ -48,29 +48,35 @@
 
 // If we're asked to not display the main website, this is being displayed in Sparkle.
 $noTemplate = (isset($_GET['notemplate']));
+$forInclude = (isset($_GET['forinclude']));
 
 $latest = $versions[0];
 
-?>
-<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"
-	"http://www.w3.org/TR/html4/strict.dtd">
-<html>
-<head>
+if (!$forInclude) {
+	?>
+	<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"
+		"http://www.w3.org/TR/html4/strict.dtd">
+	<html>
+	<head>
 	<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
 	<?php
-		if(!$noTemplate) {
-	?>
-	<title>Adium Beta - <?=$latest['ver']?></title>
-	<link rel="stylesheet" type="text/css" href="http://adium.im/styles/layoutstyle.css">
-	<link rel="stylesheet" type="text/css" href="http://adium.im/styles/defaultstyle.css">
-	<link rel="shortcut icon" href="http://adium.im/favicon.ico">
-	<?php
-		}
+	if(!$noTemplate) {
+		?>
+		<title>Adium Beta - <?=$latest['ver']?></title>
+		<link rel="stylesheet" type="text/css" href="http://adium.im/styles/layoutstyle.css">
+		<link rel="stylesheet" type="text/css" href="http://adium.im/styles/defaultstyle.css">
+		<link rel="shortcut icon" href="http://adium.im/favicon.ico">
+		<?php
+	}
+}
 	?>
 	<link rel="stylesheet" type="text/css" href="http://adium.im/styles/beta.css">
-</head>
-<body>
+	
 <?php
+	if (!$forInclude) {
+		echo('</head><body>');
+	}
+
 	if(!$noTemplate) {
 ?>
 	<div id="container">
@@ -88,7 +94,7 @@
 	if (count($versions) === 0) {
 		?><p>You can find the current version of Adium at the <a href="http://adium.im">main website</a>.</p><?php
 	} else {
-		if(!$noTemplate) {
+		if(!$noTemplate || $forInclude) {
 ?>			
 		<h2><?=$latest["ver"]?></h2>
 		<p id="download">
@@ -140,6 +146,8 @@
 	</script>
 <?php
 	}
-?>
-</body>
-</html>
+	
+	if (!$forInclude) {
+		echo('</body></html>');
+	}
+?>
\ No newline at end of file




More information about the commits mailing list