Skip to content

Instantly share code, notes, and snippets.

@travismillerweb
Created August 11, 2012 02:17
Show Gist options
  • Save travismillerweb/3320021 to your computer and use it in GitHub Desktop.
Save travismillerweb/3320021 to your computer and use it in GitHub Desktop.
PHP - Page Class Template
<html>
<head>
<title>#title#</title>
</head>
<body>
<h3>Hello #name#!</h3>
<p>The time is: #datetime#</p>
<? echo "<p>Embedded PHP works too!</p>"; ?>
</body>
</html>
<html>
<head>
<title>Image over Opacity</title>
<link rel = "stylesheet" href = "">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script>
<script type = "text/javascript">
jQuery(function(){
$("img").bind({
mouseover:function() {$(this).stop(true).fadeTo(300, 1.0);},
mouseout: function() {$(this).stop(true).fadeTo(300, 0);}
});
$("message").fadeIn().delay(200).queue(function(next){
$(this).text("WAKA FLOCKA");
next();
}).animate({borderWidth:"+=10px;"});
});
</script>
<script type = "text/css">
</script>
</head>
<body>
<h1> Image over Opacity </h1>
<img src = "http://www.mobilechilli.com/images/bc/gb/products/J/138979.gif" alt = "Casper" title = "Casper" class = "casper" />
<div id = "message">BLAH</div>
</body>
</html>
<?
include "template.class.php";
$template = new Template;
$template->load("design.html");
$template->replace("title", "My Template Class");
$template->replace("name", "William");
$template->replace("datetime", date("m/d/y"));
$template->publish();
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment