I am going over/studying the facebook code that was leaked in 2007,
I notice 1 function they call several times on on all the pages is this tpl_set(param1,param2) function
I am going to assume this is something to do with templates, The function has 2 parameters/variables passed into it, it looks like the first 1 is the name of the template and the second one determines if it is on or off maybe? That is just my guess as only part of the code was available. This is just for study purposes, Based on something like below, what kind of code could be wrote for that function to show a certain area of the page? I am thinking about doing some sort of template system for the learning experience which is why I do not want to use smarty.
Please give me your ideas on how to do this?
<php
tpl_set('home_announcement', $home_announcement_tpl);
tpl_set('hide_announcement_bit', $HIDE_ANNOUNCEMENT_BIT);
tpl_set('orientation_info', $orientation_info);
tpl_set('feed_stories', $feed_stories);
if ($show_friend_finder && (user_get_friend_count($user) > 20)) {
tpl_set('friend_finder_hide_options', array('text' => 'close', 'onclick' => "return clearFriendFinder()"));
}
//end of page has this
render_template($_SERVER['PHP_ROOT'] . '/html/home.phpt');
?>