2012-10-09, 05:41 AM
Well right now my custom page looks like this:
http://www.coding-forums.com/postactivity.php?uid=1
I read this tutorial on creating custom pages and giving them the design of your theme: http://community.mybb.com/thread-116225.html
But what I don't understand, is how would I do this? Right now, I'm using PHP to write all the html to the document, because there are multiple things I have to loop through. So how would I implement this in the template?
Here's an example of my PHP code:
Do you see what I mean? I'm looping through an array and printing the results, that's basically my question. How could I loop through this array and print the results in the template? Because it's going to be different for every user.
I'm not sure how I would do this.
Thanks for any help, sorry if I'm not describing this well.
http://www.coding-forums.com/postactivity.php?uid=1
I read this tutorial on creating custom pages and giving them the design of your theme: http://community.mybb.com/thread-116225.html
But what I don't understand, is how would I do this? Right now, I'm using PHP to write all the html to the document, because there are multiple things I have to loop through. So how would I implement this in the template?
Here's an example of my PHP code:
<!DOCTYPE html>
<html>
<head>
<title>Member Post Activity</title>
</head>
<body>
<table border="0" cellspacing="1" cellpadding="4" class="tborder">
<tr>
<td class="thead" colspan="2"><strong>Member Post Activity</strong></td>
</tr>
<tr>
<td class="tcat"><span class="smalltext"><strong>Forum</strong></span></td>
<td class="tcat" align="center"><span class="smalltext"><strong>Post Count</strong></span></td>
</tr>
<?
foreach ($numPosts as $fid => $count)
{
$forum = get_forum($fid);
$fName = $forum['name'];
print "<tr>
<td width=\"85%\" class=\"trow1\"><a href=\"forumdisplay.php?fid=$fid\">$fName</a></td>
<td class=\"trow1\">$count</td>
</tr>";
}
?>
</table>
</body>
</html>
Do you see what I mean? I'm looping through an array and printing the results, that's basically my question. How could I loop through this array and print the results in the template? Because it's going to be different for every user.
I'm not sure how I would do this.
Thanks for any help, sorry if I'm not describing this well.