[2.0.7] Printer-friendly topic mod

The cleanup is complete. This forum is now read only.

Rating:

Excellent!
48
45%
Very Good
26
25%
Good
11
10%
Fair
9
8%
Poor
12
11%
 
Total votes: 106

User avatar
cardude
Registered User
Posts: 67
Joined: Sat May 07, 2005 2:06 am

Post by cardude »

I just installed this (by hand) on my board, v 2.0.17, and when I go into a thread it just says - Template->loadfile(): No files found for handle qrbody

User avatar
scape
Registered User
Posts: 6
Joined: Fri Nov 11, 2005 1:50 am

Post by scape »

woah!

gandalf_blanc
Registered User
Posts: 1
Joined: Sat Nov 12, 2005 9:39 pm
Location: Paris - France

Post by gandalf_blanc »

NightLinks wrote: I installed this mod but I get this error:

Parse error: parse error, unexpected $ in /home/nychatn/public_html/viewtopic.php on line 1347

the problem with this is that in viewtopic.php there's not 1347 line. :(


I had the same problem, and I didnt find solution.

Thanks

THE_HUNTER
Registered User
Posts: 2
Joined: Sun Nov 13, 2005 3:23 pm

Post by THE_HUNTER »

This MOD generated a certain problem with the MOD "Rate Topics"


The MOD "Rate Topics" only asks for to add this stretch:
ratings_view_topic();


In the line 1510 no viewtopic.php

Here:
include($phpbb_root_path . 'quick_reply.'.$phpEx);
ratings_view_topic();

$template->pparse('body');

if(isset($HTTP_GET_VARS['printertopic']))
{
$gen_simple_header = 1;
}


include($phpbb_root_path . 'includes/page_tail.'.$phpEx);


?>



I always used the MOD "Rate Topics"... He happens, that this stretch of the "Rate Topics" makes to generate this error when printing.
Fatal error: Call to undefined function ratings_view_topic() in e:\server - web\www\experiencefailed666\viewtopic.php on line 1510



Help-me please?

THE_HUNTER
Registered User
Posts: 2
Joined: Sun Nov 13, 2005 3:23 pm

Post by THE_HUNTER »

*cri cri*

fishfreek
Registered User
Posts: 695
Joined: Tue May 14, 2002 3:05 pm
Location: Virginia
Contact:

Post by fishfreek »

I installed this mod on a testing site where I have a few mods that I think may be in conflict with the default install instructions. What I have done is tripple checked the install instructions with the code and everything is exactly how the mod says as far as adding and modifying the code. When I click the printer icon I get a new window thats just blank. If I look at the HTML for that new window its basicly blank aswell only showing

Code: Select all

<html><body></body></html>
Mods that I have installed that I belive are breaking this is

-mod_rewrite - I know it affects viewtopic url's
-simple subforums - there is some modifications to the jumpbox code and a array added just before. This print topic mod has you replacing the entire code just prior to the jump box and the jump box itself so I dont know if its not working with the extra subforum information in the jumpbox.

This is what the mod wants for Load templates

Code: Select all

//
// Load templates
//
if(isset($HTTP_GET_VARS['printertopic']))
{
	$template->set_filenames(array(
		'body' => 'printertopic_body.tpl')
	);
} else
{
	$template->set_filenames(array(
		'body' => 'viewtopic_body.tpl')
	);
}
make_jumpbox('viewforum.'.$phpEx, $forum_id);
This is what I have

Code: Select all

//
// Load templates
//
if(isset($HTTP_GET_VARS['printertopic']))
{
	$template->set_filenames(array(
		'body' => 'printertopic_body.tpl')
	);
} else
{
	$template->set_filenames(array(
		'body' => 'viewtopic_body.tpl')
	);
}
// Begin Simple Subforums MOD
$all_forums = array();
make_jumpbox('viewforum.'.$phpEx, $forum_id, $all_forums);
You can see it broken here: http://testing.aquariumadvice.com/ftopic65127.php
Have you joined the PetAdvice Network?

Are you in or around the Shenandoah Valley area? If so ask me how to join our local Shenandoah Valley aquarium group.

fishfreek
Registered User
Posts: 695
Joined: Tue May 14, 2002 3:05 pm
Location: Virginia
Contact:

Post by fishfreek »

In looking back thru some pages I found some info that I tried but still blank pages when viewing the print version of a topic. This is what I did.

I saw an issue someone had with the mod rewrite code in page tail so I added

Code: Select all

if(!isset($HTTP_GET_VARS['printertopic']))
{
echo replace_mod_rewrite($contents);
}
And given the questions with the subforums code and the load templates area I took

Code: Select all

//
// Load templates
//
if(isset($HTTP_GET_VARS['printertopic']))
{
   $template->set_filenames(array(
      'body' => 'printertopic_body.tpl')
   );
} else
{
   $template->set_filenames(array(
      'body' => 'viewtopic_body.tpl')
   );
}
// Begin Simple Subforums MOD
$all_forums = array();
make_jumpbox('viewforum.'.$phpEx, $forum_id, $all_forums);
and made it

Code: Select all

//
// Load templates
//
if(isset($HTTP_GET_VARS['printertopic']))
{
	$template->set_filenames(array(
		'body' => 'printertopic_body.tpl')
	);
} else
{
	$template->set_filenames(array(
		'body' => 'viewtopic_body.tpl')
	);
}

if(!isset($HTTP_GET_VARS['printertopic']))
{
// Begin Simple Subforums MOD
$all_forums = array();
}

if(isset($HTTP_GET_VARS['printertopic']))
{
make_jumpbox('viewforum.'.$phpEx, $forum_id);
}
else
{
make_jumpbox('viewforum.'.$phpEx, $forum_id, $all_forums);
}
Where the logic was if the vairable printertopic was set it should call the code how the mod wants it called but if the variable printertopic is not set than it calls the code how the subforums mod wants.

Anyone else overcom this blank page issue? I know the template files are uploaded to the /templates/fisubice folder and I know they are complete as the file sizes match.
Have you joined the PetAdvice Network?

Are you in or around the Shenandoah Valley area? If so ask me how to join our local Shenandoah Valley aquarium group.

alehawk
Registered User
Posts: 33
Joined: Sun Nov 13, 2005 12:54 am

Post by alehawk »

blank screen to me also, it doesnt work.

fishfreek
Registered User
Posts: 695
Joined: Tue May 14, 2002 3:05 pm
Location: Virginia
Contact:

Post by fishfreek »

I have given up on a reasponse. Its been over 30 days and nothing. IMO this mod has been abandoned.
Have you joined the PetAdvice Network?

Are you in or around the Shenandoah Valley area? If so ask me how to join our local Shenandoah Valley aquarium group.

User avatar
stevemagruder
Registered User
Posts: 210
Joined: Wed Jul 02, 2003 2:05 pm
Location: Louisville, KY
Contact:

Post by stevemagruder »

Works perfectly for me under v2.0.19. I'm not sure what all the fuss is about.
Steve Magruder - WebCommons :: Media
Administrator for the Louisville History & Issues discussion board

fishfreek
Registered User
Posts: 695
Joined: Tue May 14, 2002 3:05 pm
Location: Virginia
Contact:

Post by fishfreek »

While it might work on a board thats been upgraded to 2.0.19 it will not work on a 2.0.19 virgan install. I have tried it several times and same thing happens. A blank page occurs when I hit the print icon.
Have you joined the PetAdvice Network?

Are you in or around the Shenandoah Valley area? If so ask me how to join our local Shenandoah Valley aquarium group.

User avatar
stevemagruder
Registered User
Posts: 210
Joined: Wed Jul 02, 2003 2:05 pm
Location: Louisville, KY
Contact:

Post by stevemagruder »

fishfreek wrote: While it might work on a board thats been upgraded to 2.0.19 it will not work on a 2.0.19 virgan install. I have tried it several times and same thing happens. A blank page occurs when I hit the print icon.


I did a file compare between the viewtopic.php in 2.0.19 and the one I have, and there appears to be only one area (the code for "Load templates") where a code merge would have been somewhat difficult.

Compare the following to your own code and see if you have it coded correctly.

Code: Select all

//
// Load templates
//
// BEGIN printer-friendly topic view option MOD
// $template->set_filenames(array(
// 	'body' => 'viewtopic_body.tpl')
// );
// make_jumpbox('viewforum.'.$phpEx, $forum_id);

//
// Output page header
//
// $page_title = $lang['View_topic'] .' - ' . $topic_title;
// include($phpbb_root_path . 'includes/page_header.'.$phpEx);

if(isset($HTTP_GET_VARS['printertopic']))
{
	$template->set_filenames(array(
		'body' => 'printertopic_body.tpl')
	);
} else
{
	$template->set_filenames(array(
		'body' => 'viewtopic_body.tpl')
	);
}

make_jumpbox('viewforum.'.$phpEx, $forum_id);

//
// Output page header
//
$page_title = $lang['View_topic'] .' - ' . $topic_title;

if(isset($HTTP_GET_VARS['printertopic']))
{
	include($phpbb_root_path . 'includes/page_header_printer.'.$phpEx);
} else
{
	include($phpbb_root_path . 'includes/page_header.'.$phpEx);
}
// END printer-friendly topic view option MOD
Hope that helps.
Steve Magruder - WebCommons :: Media
Administrator for the Louisville History & Issues discussion board

alehawk
Registered User
Posts: 33
Joined: Sun Nov 13, 2005 12:54 am

Post by alehawk »

maybe the problem is when you got subforums mod installed. I got them and I cant get the printable version work.

wmtoo
Registered User
Posts: 237
Joined: Wed Jan 28, 2004 3:21 am
Name: Josi
Contact:

Most recent version?

Post by wmtoo »

With 27-ish pages of topic on this mod - I'm not sure, but is v1.0.8 the most recent for the printer_friendly mod?

It tells me to modify some lines in viewtopic.php that do not appear to exist anymore, so I'm wondering if there might be a newer version and I'm just missing where it went to.

UPDATE: I see - it was because I had done modifications and those lines had been changed... I compared to the most recent viewtopic.php file and saw what was changed and was able to then add the printer_friendly mod successfully.

valik_90
Registered User
Posts: 128
Joined: Wed Jan 11, 2006 12:37 pm
Location: Republic of Moldova, Chisinau
Contact:

Demo

Post by valik_90 »

Demo is not working! Can you give anothre one?

Post Reply

Return to “[2.0.x] MOD Database Cleanup”