Jump to content

templates


SyncViews

Recommended Posts

How do templatesa like the one from "phpbb3/styles/prosilver/template/viewforum_body.html" work?

<!-- INCLUDE overall_header.html -->
<!-- IF U_MCP --><p>[ <a href="{U_MCP}">{L_MCP}</a> ]</p><!-- ENDIF -->
<h2><a href="{U_VIEW_FORUM}">{FORUM_NAME}</a></h2>

<!-- IF FORUM_DESC or MODERATORS or U_MCP -->
<p>
<!-- NOTE: remove the style="display: none" when you want to have the forum description on the forum body -->
<!-- IF FORUM_DESC --><span style="display: none">{FORUM_DESC}<br /></span><!-- ENDIF -->
<!-- IF MODERATORS --><strong><!-- IF S_SINGLE_MODERATOR -->{L_MODERATOR}<!-- ELSE -->{L_MODERATORS}<!-- ENDIF -->:</strong> {MODERATORS}<!-- ENDIF -->
</p>
<!-- ENDIF -->

<!-- IF S_FORUM_RULES -->
<div class="rules">
	<div class="inner"><span class="corners-top"><span></span></span>

	<!-- IF U_FORUM_RULES -->
		<a href="{U_FORUM_RULES}">{L_FORUM_RULES}</a>
	<!-- ELSE -->
		<strong>{L_FORUM_RULES}</strong><br />
		{FORUM_RULES}
	<!-- ENDIF -->

	<span class="corners-bottom"><span></span></span></div>
</div>
<!-- ENDIF -->
...

I looked in the php filers and found that it defines all thosde varibles but I'm not sure how it actualy uses it to make the final page...

 

 

view_forum.php

...
// Send vars to template
$template->assign_block_vars('topicrow', array(
'FORUM_ID' => $forum_id,
'TOPIC_ID' => $topic_id,
'TOPIC_AUTHOR' => get_username_string('username', $row['topic_poster'], $row['topic_first_poster_name'], $row['topic_first_poster_colour']),
'TOPIC_AUTHOR_COLOUR' => get_username_string('colour', $row['topic_poster'], $row['topic_first_poster_name'], $row['topic_first_poster_colour']),
'TOPIC_AUTHOR_FULL' => get_username_string('full', $row['topic_poster'], $row['topic_first_poster_name'], $row['topic_first_poster_colour']),
'FIRST_POST_TIME' => $user->format_date($row['topic_time']),
'LAST_POST_SUBJECT' => censor_text($row['topic_last_post_subject']),
'LAST_POST_TIME' => $user->format_date($row['topic_last_post_time']),
'LAST_VIEW_TIME' => $user->format_date($row['topic_last_view_time']),
'LAST_POST_AUTHOR' => get_username_string('username', $row['topic_last_poster_id'], $row['topic_last_poster_name'], $row['topic_last_poster_colour']),
'LAST_POST_AUTHOR_COLOUR' => get_username_string('colour', $row['topic_last_poster_id'], $row['topic_last_poster_name'], $row['topic_last_poster_colour']),
'LAST_POST_AUTHOR_FULL'	 => get_username_string('full', $row['topic_last_poster_id'], $row['topic_last_poster_name'], $row['topic_last_poster_colour']),
...

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.