O'Reilly logo

PHP 5 Social Networking by Michael Peacock

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Views

Now we need our template files to provide us with the view.

Main template

The main template contains an outer template loop, which is populated based on the cached status IDs. Once this is populated, we have a unique template tag for each status, ready for the status template to be inserted. It also generates three inner loops—one for comments, one for likes, and one for dislikes.

<div id="main">
<div id="rightside">
</div>
<div id="content">
<h1>Updates in your network</h1>
<!-- START stream --> {stream-{status_id}} <!-- START comments-{status_id} --> <p>&nbsp;{comment} by {commenter}</p> <!-- END comments-{status_id} --> <!-- START likes-{status_id} --> <p>{iker} likes this</p> <!-- END likes-{status_id} --> <!-- START dislikes-{status_id} ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required