diff --git a/app/templates/comments/episodeform.php b/app/templates/comments/episodeform.php index cd66708..b579f76 100755 --- a/app/templates/comments/episodeform.php +++ b/app/templates/comments/episodeform.php @@ -1,12 +1,8 @@ - -

Post a comment

- - - - -
- -TMP; -?> \ No newline at end of file +
+

Post a comment

+ + + + +
+
diff --git a/app/templates/projects/footer.htm b/app/templates/projects/footer.htm deleted file mode 100755 index 5c1ff7b..0000000 --- a/app/templates/projects/footer.htm +++ /dev/null @@ -1,32 +0,0 @@ - - - diff --git a/app/templates/projects/header.htm b/app/templates/projects/header.htm deleted file mode 100755 index c65f9fa..0000000 --- a/app/templates/projects/header.htm +++ /dev/null @@ -1,53 +0,0 @@ - - - - - - Blog | Mad Splash! - - - - - - - - - - - - - -
- - - -
diff --git a/app/templates/projects/main.htm b/app/templates/projects/main.php similarity index 100% rename from app/templates/projects/main.htm rename to app/templates/projects/main.php diff --git a/app/templates/projects/show.php b/app/templates/projects/show.php index 04431f5..5bdc967 100755 --- a/app/templates/projects/show.php +++ b/app/templates/projects/show.php @@ -1,6 +1,3 @@ - document.getElementsByTagName('title')[0].innerHTML = "{{{t}}} | Mad Splash!"; @@ -11,58 +8,55 @@ $template = <<
 
- +
- +
- +
- +
{{{t}}}
- +

{{{d}}}

- +
- +
- +
- +

Other Episodes

- - + +
- + - +
- - - + + +
- +
- +
-TMP; - -?> \ No newline at end of file diff --git a/public/projects/index.php b/public/projects/index.php index efa837c..9180c21 100755 --- a/public/projects/index.php +++ b/public/projects/index.php @@ -1,38 +1,31 @@ EpisodeArray[$epnum - 1]; - - - if($epdata['comments'] == 1) { $oneOrMore = $epdata['comments'] . " Comment"; } else { $oneOrMore = $epdata['comments'] . " Comments"; } - - if($epdata['comments'] == 0) { - + + $oneOrMore = $epdata['comments'] == 1 ? $epdata['comments'] . " Comment" : $epdata['comments'] . " Comments"; + + if ($epdata['comments'] == 0) { $epComments = '

No comments? Be the first to comment on this video!

'; - } else { - $epComments = $episode->GetEpisodeComments($_GET['episode']); - } - - if(!empty($_COOKIE['MadSplashUser'])) { $form = ParseTemplate($CommentForm, array('epid' => $_GET['episode'], 'id' => $_GET['show'])); } else { $form = ''; } - - - - $data = array( + + if(!empty($_COOKIE['MadSplashUser'])) { + $form = render('comments/episodeform', ['epid' => $_GET['episode'], 'id' => $_GET['show']]); + } else { + $form = ''; + } + + echo render('projects/show', [ 't' => $epdata['title'], 'l' => $epdata['embed'], 'd' => $epdata['description'], @@ -40,21 +33,6 @@ 'comments' => $epComments, 'ccount' => $oneOrMore, 'form' => $form - ); - - - include("Pieces/Templates/show.php"); - - foreach($data as $a => $b) { - - $template = str_replace("{{{" . $a . "}}}", $b, $template); - - } - - echo $template; - - - - include("Pieces/footer.htm"); - -?> \ No newline at end of file + ]); + + echo render('footer');