Skip to content

Commit

Permalink
Template rewrite propogation. Performance benefits from removing scri…
Browse files Browse the repository at this point in the history
…pts from head
  • Loading branch information
jaseemabid committed Oct 16, 2011
1 parent cd8044e commit da3c876
Show file tree
Hide file tree
Showing 7 changed files with 107 additions and 147 deletions.
85 changes: 27 additions & 58 deletions contribute.php
Expand Up @@ -2,82 +2,51 @@
<html>
<head>
<title>Paathshaala Contribute</title>

<?php

include 'source.php';
include 'functions/ui.php';
echo $header;
?>
<script src='js/like.js' type='text/javascript'></script>
<script src='js/video.js' type='text/javascript'></script>
<script src='js/parsevideo.js' type='text/javascript'></script>
<link rel='stylesheet' href='css/video-js.css'>
<link rel='stylesheet' href='css/video.css'>

<script type='text/javascript'>
$(document).ready(function() {
getVideoHtml();
});

function getActiveUser() {
<?php echo "return \"" .$_SESSION['uid']. "\"" ; ?> ;
}

</script>
</head>
<body>
<div id='topbar'></div>
<img src="pics/load.gif" id='loading'/ style='display:none;'>

<div id='container'>
<?php echo $topNotLoggedIn;
<?php echo $topBar;
echo $feedback; ?>

<span style='font-size:24px; color:#3A75AF'> Contribute to paathshaala</span> <span id="helpTrigger" style='font-size:14px'> [help] </span>

<div id='helpMessage' class='message' style='border:0px; display:none'>
We have a lot of unpublished videos with us which is not yet searchable. Your contribution will make this video public and useful for others.<i>One small step for a student, one giant leap for student kind.</i><br />
Please dont mess up !
</div>


<span style='font-size:24px; color:#3A75AF'> Contribute to paathshaala</span> <span id="helpTrigger" style='font-size:14px'> [help] </span>
<div id='helpMessage' class='message' style='border:0px; display:none'>
We have a lot of unpublished videos with us which is not yet searchable. Your contribution will make this video public and useful for others.<i>One small step for a student, one giant leap for student kind.</i><br />Please dont mess up !
</div>
<div class='mainLeft'>
<div class='videodiv'></div>
</div> <!--/ main left -->

<div class='mainRight'>



<div class='message' id='helpLog' >
Describe video details along
</div>


<form class='newVideoSubmit'>

<input type="text" id="title" placeholder="Enter a title for your new video"/>
<input type="text" id="tags" placeholder="Now few comma seperated tags"/>
<textarea id='desc' placeholder="Now add a good description to make this video searchable and useful for others"></textarea>

<div class='newVideoSubmitButton'>Submit video to paathshaala :)</div>

</form>



<div class='mainRight'>
<div class='message' id='helpLog' >
Describe video details along
</div>
<form class='newVideoSubmit'>
<input type="text" id="title" placeholder="Enter a title for your new video"/>
<input type="text" id="tags" placeholder="Now few comma seperated tags"/>
<textarea id='desc' placeholder="Now add a good description to make this video searchable and useful for others"></textarea>
<div class='newVideoSubmitButton'>Submit video to paathshaala :)</div>
</form>
</div> <!-- /main right -->



</div><!-- /container -->
<?php
echo $bottomBar;
echo $scripts;
echo $piwik;
?>
<script src='js/video.js' type='text/javascript'></script>
<script src='js/comment.js' type='text/javascript'></script>
<script type='text/javascript'>
$(document).ready(function() {
getVideoHtml();
});
</script>



<?php echo $bottomBar; ?>
<div id="bottombar"></div>
<script src='js/ui.js' type='text/javascript' ></script>
<?php echo $piwik; ?>
</body>
</html>
13 changes: 6 additions & 7 deletions faq.php
Expand Up @@ -4,7 +4,6 @@
<title>Paathshaala FAQ</title>

<?php

include 'source.php';
echo $header;
?>
Expand All @@ -21,7 +20,7 @@


<div id='container'>
<?php echo $topNotLoggedIn;
<?php echo $topBar;
echo $feedback; ?>

<div class='mainLeft'>
Expand Down Expand Up @@ -109,11 +108,11 @@
</div>

</div><!-- /container -->

<?php echo $bottomBar; ?>
<div id="bottombar"></div>
<script src='js/ui.js' type='text/javascript' ></script>
<?php echo $piwik; ?>
<?php
echo $bottomBar;
echo $scripts;
echo $piwik;
?>
</body>
</html>

13 changes: 8 additions & 5 deletions index.php
Expand Up @@ -10,23 +10,26 @@
<body>
<div id='topbar'></div>
<div id='container'>
<?php echo $topNotLoggedIn;
<?php echo $topBar;
echo $feedback; ?>
<div id="indexMesssage">
We pay our tribute to our <a href="video.php?video=261"><em>inspiration</em></a>. RIP Steve Jobs (February 24, 1955 – October 5, 2011).<span id="cross" class="news">X</span>
</div>
</div><!-- /container -->
<?php echo $bottomBar; ?>
<div id="bottombar"></div>

<?php
echo $bottomBar;
echo $scripts;
echo $piwik;
?>
<script type="text/javascript">
$(document).ready(function() {
updateStoryBox('Featured')
updateStoryBox('Popular')
updateStoryBox('TopRated')
});
</script>
<script src='js/ui.js' type='text/javascript'></script>
<?php echo $piwik; ?>

</body>
</html>

34 changes: 16 additions & 18 deletions profile.php
Expand Up @@ -2,7 +2,6 @@
<html>
<head>
<title>Paathshaala Profile</title>

<?php
include_once 'source.php';
include_once 'functions/functions.php';
Expand All @@ -14,23 +13,15 @@
}
echo $header;
?>

<link rel='stylesheet' href='css/profile.css'>
<script type="text/javascript">
$(document).ready(function() {
updateStoryBox('Uploads');
updateStoryBox('Liked');
updateStoryBox('Disliked');
});
</script>
</head>
<body>
<div id='topbar'></div>
<img src="pics/load.gif" id='loading' style='display:none;'>
<div id='container'>
<?php echo $topNotLoggedIn;
echo $feedback; ?>

<?php echo $topBar;
echo $feedback;
?>
<div id='editProfile'></div>

<div id='profileBox'>
Expand All @@ -43,15 +34,22 @@
I am : <span id=''><?php echo $u->getFullname(); ?></span><br />
email : <?php echo $u->getEmail(); ?> <br />
here I am called : <span id='profileUsername'><?php echo $u->getUsername(); ?></span><br />
Insti Roll : <?php echo $u->getRoll(); ?> (Helps us to give you better suggestions )<br />
Insti Roll : <?php echo $u->getRoll(); ?> (Helps us to give you better suggestions)<br />
</div>
</div>

</div><!-- /container -->

<?php echo $bottomBar; ?>
<div id="bottombar"></div>
<script src='js/ui.js' type='text/javascript' ></script>
<?php echo $piwik; ?>
<?php
echo $bottomBar;
echo $scripts;
echo $piwik;
?>
<script type="text/javascript">
$(document).ready(function() {
updateStoryBox('Uploads');
updateStoryBox('Liked');
updateStoryBox('Disliked');
});
</script>
</body>
</html>
46 changes: 23 additions & 23 deletions search.php
@@ -1,30 +1,22 @@
<!DOCTYPE HTML>
<html>
<head>
<title>Paathshaala Search</title>

<?php
include 'source.php';
echo $header;
?>

<script type='text/javascript'>
$(document).ready(function() {
var q = getUrlVars()['q'];
var tag = getUrlVars()['tag'];
update( q , tag ,++activePage);
});
</script>

<link rel="stylesheet" href="css/video.css" />
<link rel="stylesheet" href="css/search.css" />
<title>Paathshaala Search</title>
<?php
include 'source.php';
echo $header;
?>
<link rel="stylesheet" href="css/video.css" />
<link rel="stylesheet" href="css/search.css" />
</head>
<body>
<div id='topbar'></div>
<img src="pics/load.gif" id='loading' style='display:none;'>
<div id='container'>
<?php echo $topNotLoggedIn;
echo $feedback; ?>
<?php
echo $topBar;
echo $feedback;
?>
<div class='mainLeft'>
<span class='smallSubtitle'>Search Results</span>
<div id=findStuff></div>
Expand All @@ -34,11 +26,19 @@
<div class='mainRight'>
</div>
</div><!-- /container -->
<?php echo $bottomBar; ?>
<div id="bottombar"></div>
<script src='js/ui.js' type='text/javascript' ></script>
<?php
echo $bottomBar;
echo $scripts;
echo $piwik;
?>
<script src='js/search.js' type='text/javascript' ></script>
<?php echo $piwik; ?>
<script type='text/javascript'>
$(document).ready(function() {
var q = getUrlVars()['q'];
var tag = getUrlVars()['tag'];
update( q , tag ,++activePage);
});
</script>
</body>
</html>

16 changes: 9 additions & 7 deletions template.php
Expand Up @@ -13,14 +13,16 @@
<div id='topbar'></div>
<img src="pics/load.gif" id='loading' style='display:none;'>
<div id='container'>
<?php echo $topNotLoggedIn;
echo $feedback; ?>
<?php
echo $topBar;
echo $feedback;
?>
</div><!-- /container -->

<?php echo $bottomBar; ?>
<div id="bottombar"></div>
<script src='js/ui.js' type='text/javascript' ></script>
<?php echo $piwik; ?>
<?php
echo $bottomBar;
echo $scripts;
echo $piwik;
?>
</body>
</html>

0 comments on commit da3c876

Please sign in to comment.