Custom Gzip Level

Tips and help with HTML, CSS, JavaScript, and site development.
Post Reply
User avatar
ccb056
Site Administrator
Posts: 981
Joined: January 14th, 2004, 11:36 pm
Location: Texas
Contact:

Custom Gzip Level

Post by ccb056 »

I'm having trouble locating a certain mod. This mod would allow you to configure the gzip level (1 to 9) of your phpbb forum in the admin control panel. Could anyone point me in the right direction for this?

Thanks
User avatar
ccb056
Site Administrator
Posts: 981
Joined: January 14th, 2004, 11:36 pm
Location: Texas
Contact:

Post by ccb056 »

found it just now:

Code: Select all

################################################################# 
## MOD Title: Gzip Level
## MOD Author: WyriHaximus <[email protected]> Cees-Jan Kiewiet http://www.wyrihaximus.net/
## MOD Description: This MOD allows you to set the GZip compression level
## in your admin panel.
## MOD Version: 1.0.1
##
## Installation Level: Easy
## Installation Time: 2 Minutes
## Files To Edit: 4
## 		includes/page_tail.php
## 		admin/admin_board.php
## 		language/lang_english/lang_admin.php
## 		templates/subSilver/admin/board_config_body.tpl
## Included Files: 1
##		db_update.php
################################################################# 
## For Security Purposes, Please Check: http://www.phpbb.com/mods/ or 
## http://mods.wyrihaximus.net/ for the latest version of this MOD.
## Downloading this MOD from other sites could cause malicious code
## to enter into your phpBB Forum. As such, phpBB will not offer support
## for MOD'S not offerd in our MOD-Database, located at: http://www.phpbb.com/mods/
################################################################# 
## MOD History:
##
## 2003-08-03 - Version 1.0.1
##	- db_update.php created
## 2003-06-02 - Version 1.0.0
##	- Initial Release
################################################################# 

#
#-----[ RUN SQL ]---------------------------------------------
# (replace phpbb_config with you phpbb config table name) you can use db_update.php instead of doign the sql query your self
INSERT INTO `phpbb_config` ( `config_name` , `config_value` ) 
VALUES (
'gzip_level', '9'
);

#
#-----[ OPEN ]---------------------------------------------
#
includes/page_tail.php
#
#-----[ FIND ]---------------------------------------------
#
	$gzip_contents = gzcompress($gzip_contents, 9);
#
#-----[ REPLACE WITH ]---------------------------------------------
#
	$gzip_contents = gzcompress($gzip_contents, $board_config['gzip_level']);
#
#-----[ OPEN ]---------------------------------------------
#
admin/admin_board.php
#
#-----[ FIND ]---------------------------------------------
#
	"L_ENABLE_GZIP" => $lang['Enable_gzip'],
#
#-----[ AFTER, ADD ]---------------------------------------------
#
	"L_GZIP_LEVEL" => $lang['Gzip_level'],
#
#-----[ FIND ]---------------------------------------------
#
	"GZIP_YES" => $gzip_yes,
	"GZIP_NO" => $gzip_no,
#
#-----[ AFTER, ADD ]---------------------------------------------
#
	"GZIP_LEVEL_" . $new['gzip_level'] . "_SELECTED" => "selected",
#
#-----[ OPEN ]---------------------------------------------
#
language/lang_english/lang_admin.php
#
#-----[ FIND ]---------------------------------------------
#
$lang['Enable_gzip'] = 'Enable GZip Compression';
#
#-----[ AFTER, ADD ]---------------------------------------------
#
$lang['Gzip_level'] = 'Set GZip Compression Level';
#
#-----[ OPEN ]---------------------------------------------
#
templates/subSilver/admin/board_config_body.tpl
#
#-----[ FIND ]---------------------------------------------
#
	<tr>
		<td class="row1">{L_ENABLE_GZIP}</td>
		<td class="row2"><input type="radio" name="gzip_compress" value="1" {GZIP_YES} /> {L_YES}  <input type="radio" name="gzip_compress" value="0" {GZIP_NO} /> {L_NO}</td>
	</tr>
#
#-----[ AFTER, ADD ]---------------------------------------------
#
	<tr>
		<td class="row1">{L_GZIP_LEVEL}</td>
		<td class="row2">
			<select name="gzip_level">
  				<option {GZIP_LEVEL_1_SELECTED} value="1">1</option>
  				<option {GZIP_LEVEL_2_SELECTED} value="2">2</option>
  				<option {GZIP_LEVEL_3_SELECTED} value="3">3</option>
  				<option {GZIP_LEVEL_4_SELECTED} value="4">4</option>
  				<option {GZIP_LEVEL_5_SELECTED} value="5">5</option>
  				<option {GZIP_LEVEL_6_SELECTED} value="6">6</option>
	  			<option {GZIP_LEVEL_7_SELECTED} value="7">7</option>
  				<option {GZIP_LEVEL_8_SELECTED} value="8">8</option>
	  			<option {GZIP_LEVEL_9_SELECTED} value="9">9</option>
			</select>
		</td>
	</tr>
#
#-----[ SAVE/CLOSE ALL FILES ]------------------------------------------ 
#
# EoM
Tebow2000
Registered User
Posts: 1099
Joined: January 19th, 2004, 7:56 am
Location: New Orleans, Louisiana
Contact:

Post by Tebow2000 »

looks like you dont have to reformat now :)
Redcode Hosting redcodehosting.com | Unix Shared Hosting | sales[aT]redcodehosting[dOt]com
Post Reply