[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
severnet
Registered User
Posts: 14
Joined: Mon Jul 10, 2006 10:36 pm
Location: Saint-Petersburg, Russia
Contact:

Post by severnet » Mon Aug 28, 2006 1:17 pm

1. What is the SE Friendly Board mod? Can you link me to this mod?

http://www.phpbbguru.net/community/download.php?id=129
2. Post your complete page_tail.php code and page_header.php code.

http://slil.ru/23064959

moodgard
Registered User
Posts: 316
Joined: Sun Feb 08, 2004 8:05 pm

Post by moodgard » Mon Aug 28, 2006 5:57 pm

Open page_header_printer.php

Code: Select all

FIND:

$template->set_filenames(array(
	'header' => 'printer_header.tpl')
);


AFTER, ADD:

Code: Select all

// [begin] SE Friendly Board mod
function replace_mod_rewrite($s)
{
	$url_in = array(
		// Don't want 2 pages with simular content 		
		"'(?<!/)viewforum.php\?f=([0-9]+)&topicdays=([0-9]+)&start=0'",
		// Basic forum pagination link
		"'(?<!/)viewforum.php\?f=([0-9]+)&topicdays=([0-9]+)&start=([0-9]+)'",
		// Basic forum link
		"'(?<!/)viewforum.php\?f=([0-9]+)'",

		// Don't want 2 pages with simular content
		"'(?<!/)viewtopic.php\?t=([0-9]+)&postdays=([0-9]+)&postorder=([a-zA-Z]+)&start=0'",
		// Basic topic pagination link
		"'(?<!/)viewtopic.php\?t=([0-9]+)&postdays=([0-9]+)&postorder=([a-zA-Z]+)&start=([0-9]+)'",
		// 2 pages again
		"'(?<!/)viewtopic.php\?t=([0-9]+)&start=0&postdays=([0-9]+)&postorder=([a-zA-Z]+)&highlight=([a-zA-Z0-9%+]*)'",
		// Topic link at the top of the page
		"'(?<!/)viewtopic.php\?t=([0-9]+)&start=([0-9]+)&postdays=([0-9]+)&postorder=([a-zA-Z]+)&highlight=([a-zA-Z0-9%+]*)'",
		// 2 pages again
		"'(?<!/)viewtopic.php\?t=([0-9]+)&start=0'",
		// Topic pagination at forum view
		"'(?<!/)viewtopic.php\?t=([0-9]+)&start=([0-9]+)'",
		// Topic links from search
		"'(?<!/)viewtopic.php\?t=([0-9]+)&highlight=([a-zA-Z0-9%+]*)'",
		// Basic topic link
		"'(?<!/)viewtopic.php\?t=([0-9]+)'",

		// Basic post link
		"'(?<!/)viewtopic.php\?p=([0-9]+)'"
	);

	$url_out = array(
		'forum$1.html',
		'forum$1-$3.html',
		'forum$1.html',
		'topic$1.html',
		'topic$1-$4.html',
		'topic$1.html',
		'topic$1-$2.html',
		'topic$1.html',
		'topic$1-$2.html',
		'topic$1.html',
		'topic$1.html',
		'post$1.html'
	);

	$s = preg_replace($url_in, $url_out, $s);

	// Processing invalid links
	$s = str_replace('.html&', '.html?', $s);
	$s = str_replace('.html&', '.html?', $s);

	return $s;
}
Save & Close files and check it out.

User avatar
severnet
Registered User
Posts: 14
Joined: Mon Jul 10, 2006 10:36 pm
Location: Saint-Petersburg, Russia
Contact:

Post by severnet » Mon Aug 28, 2006 6:19 pm


moodgard
Registered User
Posts: 316
Joined: Sun Feb 08, 2004 8:05 pm

Post by moodgard » Mon Aug 28, 2006 6:57 pm

This is what I see - an error message:

http://s110.photobucket.com/albums/n94/ ... h=imgAnch1


Did you say it works if you set GZip off?

User avatar
severnet
Registered User
Posts: 14
Joined: Mon Jul 10, 2006 10:36 pm
Location: Saint-Petersburg, Russia
Contact:

Post by severnet » Mon Aug 28, 2006 7:03 pm

moodgard, look it once again (now with your fix). :wink:
Did you say it works if you set GZip off?

Yep. :(

User avatar
igorw
Former Team Member
Posts: 8024
Joined: Fri Dec 16, 2005 12:23 pm
Location: {postrow.POSTER_FROM}
Name: Igor Wiedler

Post by igorw » Mon Aug 28, 2006 7:18 pm

"replace_mod_rewrite()", this looks like some URL manipulation MOD :)
Igor Wiedler | area51 | GitHub | trashbin | Formerly known as evil less than three

User avatar
severnet
Registered User
Posts: 14
Joined: Mon Jul 10, 2006 10:36 pm
Location: Saint-Petersburg, Russia
Contact:

Post by severnet » Mon Aug 28, 2006 7:30 pm

eviL<3 wrote: "replace_mod_rewrite()", this looks like some URL manipulation MOD :)

http://freestudents.ru/forum/forum1.html (for guests) = http://freestudents.ru/forum/viewforum.php?f=1 (for users)

moodgard
Registered User
Posts: 316
Joined: Sun Feb 08, 2004 8:05 pm

Post by moodgard » Tue Aug 29, 2006 12:05 am

severnet wrote: moodgard, look it once again (now with your fix). :wink:


Looks good to me:

http://s110.photobucket.com/albums/n94/ ... h=imgAnch2

http://s110.photobucket.com/albums/n94/ ... h=imgAnch1

There's a Divide by Zero on bottom of the page, you can eliminate that by changing this code in page_tail.php ; honestly there's too much going on with your mods!

Code: Select all

FIND: 
    $gzip_stats = round( strlen($compress) / strlen($uncompress) * 100);

Code: Select all

REPLACE WITH:

   if (strlen($uncompress) == 0){
      $gzip_stats=0;
     }
   else {
    $gzip_stats = round( strlen($compress) / strlen($uncompress) * 100);
    }

artiprinted
Registered User
Posts: 52
Joined: Wed Aug 09, 2006 1:11 pm

Not compatible with Quick Reply

Post by artiprinted » Wed Aug 30, 2006 4:37 pm

When you click the printer button you get,
Template->loadfile(): No file specified for handle qrbody

User avatar
severnet
Registered User
Posts: 14
Joined: Mon Jul 10, 2006 10:36 pm
Location: Saint-Petersburg, Russia
Contact:

Post by severnet » Fri Sep 01, 2006 11:41 pm

Template->loadfile(): No file specified for handle qrbody

What will you recommend me? :?:

Officeforum
Registered User
Posts: 6
Joined: Fri Jul 28, 2006 5:39 pm

Post by Officeforum » Tue Sep 05, 2006 12:20 am

Hi all, :lol:

Is there anybody arround running CH 2.1.6 Hierarchy mod by phirtiik with the easyprintmod installed?

I tried to alter the code to get it up but I'm getting no where. It would be great if it has allready been done by a more knowledgable person.

Thanks. :wink:

Officeforum
Registered User
Posts: 6
Joined: Fri Jul 28, 2006 5:39 pm

Post by Officeforum » Thu Sep 07, 2006 7:32 pm

Hi Guys, :D

Could that be that there is nobody using this mod in combination with CH 2.1.6 by phirtiik? :wink:

User avatar
severnet
Registered User
Posts: 14
Joined: Mon Jul 10, 2006 10:36 pm
Location: Saint-Petersburg, Russia
Contact:

Post by severnet » Sat Sep 16, 2006 6:37 pm

Warning: Cannot modify header information - headers already sent by (output started at /home/www/freestudents/htdocs/forum/includes/page_tail.php:145) in /home/www/freestudents/htdocs/forum/includes/page_tail.php on line 182

Warning: Cannot modify header information - headers already sent by (output started at /home/www/freestudents/htdocs/forum/includes/page_tail.php:145) in /home/www/freestudents/htdocs/forum/includes/page_tail.php on line 182

Warning: Division by zero in /home/www/freestudents/htdocs/forum/includes/page_tail.php on line 197

saaiberke
Registered User
Posts: 1126
Joined: Wed Jul 20, 2005 8:13 am
Location: Gent/Belgium
Contact:

Post by saaiberke » Tue Oct 17, 2006 5:14 pm

Great mod! I installed it a few weeks ago. My users are very happy with it, they are even so happy they ask me the same for the private messages. Is there any way to have a print button in their private message section?

Grtz,

Nic

kdtcat
Registered User
Posts: 8
Joined: Tue Nov 22, 2005 1:32 pm
Location: Wiesbaden, Germany

Post by kdtcat » Wed Oct 18, 2006 11:25 am

Hi folks,

is there an easy hack to restrict print function for logged in Users only?

Klaus
have a nice day

Post Reply

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

Who is online

Users browsing this forum: No registered users and 6 guests