webmaster Posted July 29, 2009 Share Posted July 29, 2009 I have recently deployed phpbb on a site and noticed in the template file some weird code. The files are plain HTML, and as far as I know no special handlers were added. What kind of code is this? I don't recognize it as php. <ul class="linklist"> <li class="icon-home"><a accesskey="h" href="{U_INDEX}">{L_INDEX}</a></li> <!-- IF not S_IS_BOT --> <!-- IF S_WATCH_FORUM_LINK --> <li><!-- IF S_WATCHING_FORUM -->class="icon-unsubscribe"<!-- ELSE -->class="icon-subscribe"<!-- ENDIF -->><a title="{S_WATCH_FORUM_TITLE}" href="{S_WATCH_FORUM_LINK}">{S_WATCH_FORUM_TITLE}</a></li> <!-- ENDIF --> <!-- IF U_WATCH_TOPIC --> <li><!-- IF S_WATCHING_TOPIC -->class="icon-unsubscribe"<!-- ELSE -->class="icon-subscribe"<!-- ENDIF -->><a title="{L_WATCH_TOPIC}" href="{U_WATCH_TOPIC}">{L_WATCH_TOPIC}</a></li> <!-- ENDIF --> <!-- IF U_BOOKMARK_TOPIC --> <li class="icon-bookmark"><a title="{L_BOOKMARK_TOPIC}" href="{U_BOOKMARK_TOPIC}">{L_BOOKMARK_TOPIC}</a></li> <!-- ENDIF --> <!-- IF U_BUMP_TOPIC --> <li class="icon-bump"><a title="{L_BUMP_TOPIC}" href="{U_BUMP_TOPIC}">{L_BUMP_TOPIC}</a></li> <!-- ENDIF --> <!-- ENDIF --> <li class="rightside"><!-- IF U_TEAM --><a href="{U_TEAM}">{L_THE_TEAM}</a> • <!-- ENDIF --><!-- IF not S_IS_BOT --><a href="{U_DELETE_COOKIES}">{L_DELETE_COOKIES}</a> • <!-- ENDIF -->{S_TIMEZONE}</li></ul><span class="corners-bottom" /></div></div> Link to comment Share on other sites More sharing options...
Synook Posted July 29, 2009 Share Posted July 29, 2009 It's just a custom template markup system - that code will then be parsed by a PHP script into proper HTML, substituting all the tokens with actual content. Link to comment Share on other sites More sharing options...
webmaster Posted July 29, 2009 Author Share Posted July 29, 2009 So how would you go about making a script that parses that? Link to comment Share on other sites More sharing options...
Ingolme Posted July 29, 2009 Share Posted July 29, 2009 It's nothing really simple. If you want to get an idea of how complicated it is, look within the include files of PHPBB for template.php and look at the source code. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.