MyBB Community Forums

Full Version: Statistics on a custom page.
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I have tried looking and searching other threads for this but I cannot see any concrete "Tutorial" or such like on how to do this, I am trying to create a "Home Page" for my site (www.eavoc.com) where at the moment the homepage is index.php, this is fine for the time being until I change it to home.php through .htaccess. but I want to build my homepage first.

What I am looking for is basically this (I have explained on the page what I want there.) http://www.eavoc.com/home.php

I really appreciate any help

To create home.php I have copied the index.php, renamed it, and changed the following:

define('THIS_SCRIPT', 'index.php');

to

define('THIS_SCRIPT', 'home.php');

AND

eval("\$index = \"".$templates->get("index")."\";");
output_page($index);

to

eval("\$home = \"".$templates->get("home")."\";");
output_page($home);

I have also created a template in global templates called "home" which is where I am entering all the html code etc to show the page I can show this upon request
Would be good idea if you look at http://www.eavoc.com/portal.php first
Then look at code of 'Latest forum discussions' within portal.php which should give you some clue.
Whats more, you have alot of additional stuff allready done there. Just browsing it can give you tons of useful, working examples.
I disabled my portal which is why you cannot view it. But I'll have a Look thanks
(2013-11-05, 12:37 PM)daza110 Wrote: [ -> ]I disabled my portal which is why you cannot view it.

um.. perhaps not because before i replied i viewed it and it looks good.

What i meant is 'why not remake portal.php into home page',
while its 'almost ready waiting for it' with lots of useful code and examples.
I rerouted portal.php to go to index.php? if you go to www.eavoc.com/portal.php it wont allow you to, it re directs you to index.php. I didnt like the look of portal.php which is why I re directed it.



EDIT: I have 2 different themes and I have re routed it in the custom theme but not default theme DOH! So you CAN view portal.php atm ill have a look now

OK so I have now amended portal.php to show a few things. But, still not exactly what I want, I need a few custom "queries" i suppose, one to pull up all the Threads in a Certain Forum and another to show the same as what the stats.php shows under most viewed threads. Anyone give a heads up?

<table width="100%" cellspacing="0" cellpadding="{$theme['tablespace']}" border="0" align="center">
<tr><td valign="top" width="200">
{$welcome}
{$pms}
{$search}
{$stats}
{$whosonline}
{$latestthreads}

</td>
<td>&nbsp;</td>
<td valign="top">
{$announcements}
</td>
</tr>
</table>

In the above table on the portal template where are the things in italic "pulled from". EG {$welcome} where is this located, so if I want to edit it I can or say i want to create a new one, eg {mostpopular}, where would I create this for it to populate in here?

bump, any one able to shed some light on this please??