Browse files

updated examples layout slightly

  • Loading branch information...
1 parent 29af34c commit 2ad1dbdb99bd458b3a204c47cf3098665459fd58 @cowboy cowboy committed Nov 18, 2009
View
1 examples/bug-chrome-back-button/index.php
@@ -109,6 +109,7 @@ function handler() {
ob_start();
?>
+<?= $shell['donate'] ?>
<p>First, open this page in a new window or tab, to clear any current window or tab history. Make your window wide enough so that you can see the full URL in the address bar, with some extra space left over.</p>
View
1 examples/bug-firefox-remote-xhr/index.php
@@ -188,6 +188,7 @@ function callback_href_kluge( idx ) {
ob_start();
?>
+<?= $shell['donate'] ?>
<p>
First, open this page in a new window or tab, to clear any current window or tab history. Make your window wide enough so that you can see the full URL in the address bar, with some extra space left over.
View
1 examples/deparam/index.php
@@ -112,6 +112,7 @@
ob_start();
?>
+<?= $shell['donate'] ?>
<p>
<a href="http://benalman.com/projects/jquery-bbq-plugin/">jQuery BBQ</a> includes a powerful jQuery.deparam method that is capable of fully deserializing not only any params string that jQuery.param can create, but that PHP and Rails (and hopefully everything else) can create. And even though only the query string is being parsed this example, methods for parsing a params string out of the fragment (hash) as well parsing any stand-alone params string are included. jQuery BBQ can also be used to merge params from multiple URLs or objects into a new URL, even within element attributes. See <a href="../../docs/">the documentation</a> for a full list of methods!
View
BIN examples/donate.gif
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
1 examples/fragment-advanced/index.php
@@ -215,6 +215,7 @@
ob_start();
?>
+<?= $shell['donate'] ?>
<p>
With <a href="http://benalman.com/projects/jquery-bbq-plugin/">jQuery BBQ</a> you can keep track of state, history and allow bookmarking while dynamically modifying the page via AJAX and/or DHTML.. just click the links, use your browser's back and next buttons, reload the page.. and when you're done playing, check out the code!
View
1 examples/fragment-basic/index.php
@@ -178,6 +178,7 @@
ob_start();
?>
+<?= $shell['donate'] ?>
<p>
With <a href="http://benalman.com/projects/jquery-bbq-plugin/">jQuery BBQ</a> you can keep track of state, history and allow bookmarking while dynamically modifying the page via AJAX and/or DHTML.. just click the links, use your browser's back and next buttons, reload the page.. and when you're done playing, check out the code!
View
1 examples/fragment-jquery-ui-tabs/index.php
@@ -140,6 +140,7 @@
ob_start();
?>
+<?= $shell['donate'] ?>
<p>
With <a href="http://benalman.com/projects/jquery-bbq-plugin/">jQuery BBQ</a> you can keep track of state, history and allow bookmarking multiple <a href="http://jqueryui.com/demos/tabs/">jQuery UI tab</a> widgets simultaneously.. just click some tabs, use your browser's back and next buttons, reload the page.. and when you're done playing, check out the code!
View
24 examples/index.css
@@ -399,6 +399,28 @@ a:hover {
color: #FF7F00;
}
+#donate {
+ color: #000;
+ background: #fff;
+ border: 1px solid #3D942F;
+ font-size: 80%;
+ padding: 0.5em;
+ float: right;
+ width: 11em;
+ margin: 0 0 1.5em 2em;
+ -moz-box-shadow: 0 0 6px #3D942F;
+ -webkit-box-shadow: 0 0 6px #3D942F;
+ box-shadow: 0 0 6px #3D942F;
+}
+
+#donate form {
+ text-align: center;
+}
+
+#donate .submit {
+ width: 74px;
+ height: 21px;
+}
pre {
overflow-x: auto;
@@ -412,11 +434,13 @@ pre code {
/* ROUNDED BORDERS */
+#donate,
pre,
.syntaxhighlighter,
.syntaxhighlighter .toolbar {
-moz-border-radius: 10px;
-webkit-border-radius: 10px;
+ border-radius: 10px;
}
/* PRE/CODE BLOCKS, SYNTAX HIGHLIGHTING */
View
27 examples/index.php
@@ -8,6 +8,22 @@
include 'config.php';
+ob_start();
+?>
+ <div id="donate">
+ <p>Your generous donation allows me to continue developing and updating my code!</p>
+ <form action="https://www.paypal.com/cgi-bin/webscr" method="post">
+ <input type="hidden" name="cmd" value="_s-xclick">
+ <input type="hidden" name="hosted_button_id" value="5791421">
+ <input class="submit" type="image" src="../donate.gif" name="submit" alt="PayPal - The safer, easier way to pay online!">
+ <img alt="" border="0" src="https://www.paypal.com/en_US/i/scr/pixel.gif" width="1" height="1">
+ </form>
+ <div class="clear"></div>
+ </div>
+<?
+$shell['donate'] = ob_get_contents();
+ob_end_clean();
+
function draw_shell() {
global $shell, $base;
@@ -75,15 +91,6 @@ function draw_shell() {
<p>
All original code is Copyright © 2009 "Cowboy" Ben Alman and dual licensed under the MIT and GPL licenses. View the <a href="http://benalman.com/about/license/">license page</a> for more details.
</p>
- <div class="donate">
- <p>Let me know how much you appreciate my work with a small donation!</p>
- <form action="https://www.paypal.com/cgi-bin/webscr" method="post">
- <input type="hidden" name="cmd" value="_s-xclick">
- <input type="hidden" name="hosted_button_id" value="5791421">
- <input type="image" src="https://www.paypal.com/en_US/i/btn/btn_donate_SM.gif" name="submit" alt="PayPal - The safer, easier way to pay online!">
- <img alt="" border="0" src="https://www.paypal.com/en_US/i/scr/pixel.gif" width="1" height="1">
- </form>
- </div>
</div>
</div>
@@ -104,7 +111,7 @@ function draw_shell() {
foreach ( $files as $file ) {
if ( $file != '.' && $file != '..' && file_exists( "$file/index.php" ) ) {
$file_contents = file_get_contents( "$file/index.php" );
- $title = preg_replace( '/^.*\$shell\[\'title3\'\]\s*=\s*"(.*)";.*$/s', '$1', $file_contents );
+ $title = preg_replace( '/^.*\$shell\[\'title3\'\]\s*=\s*"(.*?)";.*$/s', '$1', $file_contents );
$title = $title == $file_contents ? $file : stripcslashes( $title );
$shell['html_body'] .= "<a href=\"$file/\">$title</a><br>";
}

0 comments on commit 2ad1dbd

Please sign in to comment.