Simple Machines Community Forum

SMF Support => SMF 2.0.x Support => Topic started by: kibersyn on November 29, 2016, 06:59:48 PM

Title: How to make Stats page on fronted (homepage)?
Post by: kibersyn on November 29, 2016, 06:59:48 PM
Hi friends!

How to add or make first Stats page on fronted (home page)

... index.php?action=stats

or add stats page on bottom home page?
Title: Re: How to make Stats page on fronted (homepage)?
Post by: Kindred on November 29, 2016, 09:51:34 PM
WHAT stats?   Why would you want a stats page as your front page?

Title: Re: How to make Stats page on fronted (homepage)?
Post by: Pipke on December 02, 2016, 08:06:26 AM
Show the forumstats on the boardindex(=Frontpage if no portal installed)

- Upload the attachment wich in included on this post to your Sources folder
- Find in file Themes/{your_theme}/BoardIndex.template.php(around line 475)
Code (find) Select

<span class="lowerframe"><span></span></span>';


add after:

Code (add after) Select

global $sourcedir;
require_once($sourcedir . '/ShowStats.php');



Title: Re: How to make Stats page on fronted (homepage)?
Post by: nend on December 02, 2016, 10:39:43 AM
@Pipke

That probably isn't the best solution as the board index has quite a few queries already. Also loading of a source file in a template may have a few undesirable effects.
Title: Re: How to make Stats page on fronted (homepage)?
Post by: Pipke on December 02, 2016, 01:33:29 PM
Quote from: nend on December 02, 2016, 10:39:43 AM
@Pipke
That probably isn't the best solution
True, but it is the easiest and simplified way to tell the OP what needs to be done to get the things it wants. What the OP wants is not easy to tell him if you want it the right way of coding, if then it could be the best way to make it a mod, wich i'm not intend and willing todo.

Quote
Also loading of a source file in a template may have a few undesirable effects.
Proof me wrong? The code i posted has in my eyes no vulnerable effects!

Title: Re: How to make Stats page on fronted (homepage)?
Post by: Kindred on December 02, 2016, 06:45:16 PM
well, for one, it violates smf coding standards...