Problem insertion block last active topics on viewforum

Download and support for PhpBB3 Top Stats Mod
Locked
User avatar
systemcrack
BBCoder II
BBCoder II
Posts: 24
Joined: 21 Jun 2010, 18:49
BBCodes: 25
Location: Italy
Contact:

Problem insertion block last active topics on viewforum

Post by systemcrack »

Hello guys, I'm trying to insert the block last active topics in vieforum and in viewtopic.
So I opened the viewtopic.php and I modified it like this:

Code: Select all

//-- mod: Top Stats ---------------------------------------------------------//
   include($phpbb_root_path . 'includes/functions_top_stats.' . $phpEx);
//-- end: Top Stats ---------------------------------------------------------//

// Output the page
page_header($user->lang['VIEW_TOPIC'] . ' - ' . $topic_data['topic_title'], true, $forum_id);

$template->set_filenames(array(
	'body' => ($view == 'print') ? 'viewtopic_print.html' : 'viewtopic_body.html')
);
make_jumpbox(append_sid("{$phpbb_root_path}viewforum.$phpEx"), $forum_id);

page_footer();

?>
I opened the viewforum.php and I modified it like this:

Code: Select all

//-- mod: Top Stats ---------------------------------------------------------//
   include($phpbb_root_path . 'includes/functions_top_stats.' . $phpEx);
//-- end: Top Stats ---------------------------------------------------------//

page_footer();

?>
I opened the viewtopic_body.html and I modified it like this:

Code: Select all

<!-- INCLUDE overall_header.html -->

<!-- IF S_TSRAT_ENABLE -->
<!-- INCLUDE recent_active_body.html -->
<!-- ENDIF -->

<!-- IF U_MCP --><p>[&nbsp;<a href="{U_MCP}">{L_MCP}</a>&nbsp;]</p><!-- ENDIF -->
<h2><a href="{U_VIEW_TOPIC}">{TOPIC_TITLE}</a></h2>
I opened the viewforum_body.html and I modified it like this:

Code: Select all

<!-- INCLUDE overall_header.html -->

<!-- IF S_TSRAT_ENABLE -->
<!-- INCLUDE recent_active_body.html -->
<!-- ENDIF -->

<!-- IF U_MCP --><p>[&nbsp;<a href="{U_MCP}">{L_MCP}</a>&nbsp;]</p><!-- ENDIF -->
<h2><a href="{U_VIEW_FORUM}">{FORUM_NAME}</a></h2>
The problem lies in the fact appear the following errors on overall_header:

Code: Select all

[phpBB Debug] PHP Notice: in file [ROOT]/includes/functions_top_stats.php on line 204: Undefined variable: total_posts
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions_top_stats.php on line 204: Division by zero
could you help me understand where I'm wrong please.
Last edited by systemcrack on 19 Jun 2014, 10:01, edited 2 times in total.
Sorry form my terrible English
User avatar
Stoker
Site Admin
Site Admin
Posts: 3536
Joined: 12 May 2008, 23:26
BBCodes: 239
Favourite BBCode: Anipro
Favourite MOD: PrettyPhoto
Location: Denmark
Contact:

Problem insertion block last active topics

Post by Stoker »

You need some of the code from index.php on the other pages.
Board rules! No PM support
User avatar
systemcrack
BBCoder II
BBCoder II
Posts: 24
Joined: 21 Jun 2010, 18:49
BBCodes: 25
Location: Italy
Contact:

Problem insertion block last active topics

Post by systemcrack »

Stoker wrote:You need some of the code from index.php on the other pages.
Hi Stoker,
Have you looked at the code I posted before? if you talk about this code:

Code: Select all

//-- mod: Top Stats ---------------------------------------------------------//
   include($phpbb_root_path . 'includes/functions_top_stats.' . $phpEx);
//-- end: Top Stats ---------------------------------------------------------//
I've already added it.. on viewtopic.php and viewforum.php, and this:

Code: Select all

<!-- IF S_TSRAT_ENABLE -->
<!-- INCLUDE recent_active_body.html -->
<!-- ENDIF -->
in vietopic_body.html and vieforum_body.html, but you already know what is my result.
You could be a little more specific please.. ;)

Image

maybe a picture might help you to understand .. the block appears in viewforum, but also the errors appear and distort the display of the menu.

I can't understand where could be the problem. :coffee:
Attachments
vieforum&viewtopic.rar
viewtopic.php, viewtopic_body.html, viewforum.php, viewforum_body.html
(33.68 KiB) Downloaded 130 times
Sorry form my terrible English
User avatar
Stoker
Site Admin
Site Admin
Posts: 3536
Joined: 12 May 2008, 23:26
BBCodes: 239
Favourite BBCode: Anipro
Favourite MOD: PrettyPhoto
Location: Denmark
Contact:

Problem insertion block last active topics on viewforum

Post by Stoker »

Im not at home with my pc these days, sorry.
Board rules! No PM support
User avatar
systemcrack
BBCoder II
BBCoder II
Posts: 24
Joined: 21 Jun 2010, 18:49
BBCodes: 25
Location: Italy
Contact:

Problem insertion block last active topics on viewforum

Post by systemcrack »

No problem Stoker, we're not talking about blood transfusions .. ahahahaha! :D I am here and do not run away. ;)
Sorry form my terrible English
User avatar
systemcrack
BBCoder II
BBCoder II
Posts: 24
Joined: 21 Jun 2010, 18:49
BBCodes: 25
Location: Italy
Contact:

Problem insertion block last active topics on viewforum

Post by systemcrack »

up
Sorry form my terrible English
User avatar
Stoker
Site Admin
Site Admin
Posts: 3536
Joined: 12 May 2008, 23:26
BBCodes: 239
Favourite BBCode: Anipro
Favourite MOD: PrettyPhoto
Location: Denmark
Contact:

Problem insertion block last active topics on viewforum

Post by Stoker »

First you need to upload this file to the includes folder
functions_recent_taf.zip
(1.52 KiB) Downloaded 129 times
open viewforum.php
find:

Code: Select all

// Dump out the page header and load viewforum template
add before

Code: Select all

//-- mod: Top Stats ---------------------------------------------------------//
	include($phpbb_root_path . 'includes/functions_recent_taf.' . $phpEx);
//-- end: Top Stats ---------------------------------------------------------//
open viewtopic.php
Find

Code: Select all

// Output the page
add before

Code: Select all

//-- mod: Top Stats ---------------------------------------------------------//
	include($phpbb_root_path . 'includes/functions_recent_taf.' . $phpEx);
//-- end: Top Stats ---------------------------------------------------------//
The html you have added should be fine
Board rules! No PM support
User avatar
systemcrack
BBCoder II
BBCoder II
Posts: 24
Joined: 21 Jun 2010, 18:49
BBCodes: 25
Location: Italy
Contact:

Problem insertion block last active topics on viewforum

Post by systemcrack »

You are simply great... Thanks Stoker!
Sorry form my terrible English
Locked