##############################################################
## MOD Title: Remove Navigation Links
## MOD Author: drathbun < N/A > (Dave Rathbun) http://phpBBDoctor.com
## MOD Description: This simple MOD removes the navigation links from your board which can result in a lower server load from your board
## MOD Version: 1.0.1
##
##
## Installation Level: Easy
## Installation Time: ~ 5 Minutes
## Files To Edit: (6) common.php
## viewforum.php
## viewtopic.php
## includes/functions.php
## includes/page_header.php
## templates/subSilver/overall_header.tpl
## Included Files: None
## License: http://opensource.org/licenses/gpl-license.php GNU General Public License v2
##############################################################
## For security purposes, please check: http://www.phpbb.com/mods/
## for the latest version of this MOD. Although MODs are checked
## before being allowed in the MODs Database there is no guarantee
## that there are no security problems within the MOD. No support
## will be given for MODs not found within the MODs Database which
## can be found at http://www.phpbb.com/mods/
##############################################################
## Author Notes:
## I experienced an extreme server load because of one of my phpBB2 boards. After a
## substantial investigation I believe that the reason was the navigation links
## that are built by phpBB2 and displayed in the header. I have removed all of this
## code from my boards and my server issues appear to have been resolved. My apache
## load is about 25% of what I was used to seeing.
##
## I am presenting these instructions in MOD format in case anyone else wants to
## make the same changes. As they say, YMMV (your mileage may vary).
##
## More details in the following blog post:
##
## http://phpbbdoctor.com/blog/2008/03/24/running-a-phpbb2-board-get-rid-of-this-code-and-do-it-now/
##
## Please install and test only ONE new MOD at a time. That may seem like common
## sense, but you would be amazed at how often this is not done. :-)
##
## Install Time Estimate
## The MOD install time is assumed to be for a manual install and is based on the
## number of files to edit. If you use an automatic installer the time estimate
## is essentially meaningless. We do not test with EasyMOD but our MODs should
## work based on our usage of the proper template. Note that EasyMOD seems to
## have issues with certain SQL structures that work fine in MySQL directly.
##
## FIND Line Number Hints
## Some of the FIND operations may have line numbers associated with the
## operation. These line numbers are derived from a set of baseline phpBB code
## and are generally approximations only. Use them as a guideline if you find
## more than one line in a similar location. Note that as you add new lines to
## the file as you are editing that the line numbers for the remaining portion
## of that file are nearly always going to be wrong. We do not guarantee that
## there will be line numbers on each FIND.
##
## Some actions have additional comments. Please review them as they are
## intended to help you understand the exact steps required to complete that
## specific action.
##
## This MOD has 43 install instructions.
## This MOD is in FINAL status as of version 1.0.1.
##############################################################
## MOD History:
##
## 2008-03-21 - Version 1.0.1
## Fixed two data entry errors and one logic error in the installation instructions
##
## 2008-02-23 - Version 1.0.0
## Initial Release
##
## History prior to 1.0.0 not shown for Released MODs
##############################################################
## Before Adding This MOD To Your Forum, You Should Back Up All Files Related To This MOD
##############################################################
#
#-----[ OPEN ]-------------------------------------
#
common.php
#
#-----[ FIND ]-------------------------------------
# On or about line 173; find text might not be a complete line
#
$nav_links = array();
#
#-----[ REPLACE WITH ]-------------------------------------
# Special Instructions: Replace this line with a space, or do
# this instead: //$nav_links = array();
#
#
#-----[ OPEN ]-------------------------------------
#
viewforum.php
#
#-----[ FIND ]-------------------------------------
# On or about line 381; find text might not be a complete line
#
$nav_links['up']
#
#-----[ BEFORE, ADD ]-------------------------------------
#
/* Removed block of code
#
#-----[ FIND ]-------------------------------------
# On or about line 384; find text might not be a complete line
#
);
#
#-----[ AFTER, ADD ]-------------------------------------
#
*/
#
#-----[ OPEN ]-------------------------------------
#
viewtopic.php
#
#-----[ FIND ]-------------------------------------
# On or about line 516; find text might not be a complete line
#
$nav_links['prev']
#
#-----[ BEFORE, ADD ]-------------------------------------
#
/* Remove block of code
#
#-----[ FIND ]-------------------------------------
# On or about line 526 to 527; find text might not be a complete line
#
'title' => $forum_name
);
#
#-----[ AFTER, ADD ]-------------------------------------
#
*/
#
#-----[ OPEN ]-------------------------------------
#
includes/functions.php
#
#-----[ FIND ]-------------------------------------
# On or about line 203; find text might not be a complete line
#
global $template, $userdata,
#
#-----[ IN-LINE FIND ]-------------------------------------
#
, $nav_links
#
#-----[ IN-LINE REPLACE WITH ]-------------------------------------
# Special Instructions: Replace with a space (meaning remove
# the prior find target)
#
#
#-----[ FIND ]-------------------------------------
# On or about line 260; find text might not be a complete line
#
$nav_links['chapter forum']
#
#-----[ BEFORE, ADD ]-------------------------------------
#
/* Removed block of code
#
#-----[ FIND ]-------------------------------------
# On or about line 262 to 263; find text might not be a complete line
#
'title' => $forum_rows[$j]['forum_name']
);
#
#-----[ AFTER, ADD ]-------------------------------------
#
*/
#
#-----[ FIND ]-------------------------------------
# On or about line 313; find text might not be a complete line
#
global $nav_links;
#
#-----[ REPLACE WITH ]-------------------------------------
# Special Instructions: Replace with a space, or do this
# instead // global $nav_links;
#
#
#-----[ FIND ]-------------------------------------
# On or about line 421; find text might not be a complete line
#
$nav_links['top']
#
#-----[ BEFORE, ADD ]-------------------------------------
#
/* Removed block of code
#
#-----[ FIND ]-------------------------------------
# On or about line 435 to 436; find text might not be a complete line
#
'title' => $lang['Memberlist']
);
#
#-----[ AFTER, ADD ]-------------------------------------
#
*/
#
#-----[ FIND ]-------------------------------------
# On or about line 714; find text might not be a complete line
#
global $db, $template, $board_config,
#
#-----[ IN-LINE FIND ]-------------------------------------
#
$nav_links,
#
#-----[ IN-LINE REPLACE WITH ]-------------------------------------
# Special Instructions: Replace the find target with a space
# (remove the code)
#
#
#-----[ OPEN ]-------------------------------------
#
includes/page_header.php
#
#-----[ FIND ]-------------------------------------
# On or about line 316; find text might not be a complete line
#
if (!isset($nav_links))
#
#-----[ BEFORE, ADD ]-------------------------------------
#
/* Remove block of code
#
#-----[ FIND ]-------------------------------------
# On or about line 334 to 337; find text might not be a complete line
#
$nav_links_html .= sprintf($nav_link_proto, $nav_item, $nested_array['url'], $nested_array['title']);
}
}
}
#
#-----[ AFTER, ADD ]-------------------------------------
#
*/
#
#-----[ FIND ]-------------------------------------
# On or about line 442; find text might not be a complete line
#
$theme['span_class3'],
#
#-----[ IN-LINE FIND ]-------------------------------------
#
,
#
#-----[ IN-LINE REPLACE WITH ]-------------------------------------
# Special Instructions: Remove the comma by deleting it or
# replacing it with a space
#
#
#-----[ FIND ]-------------------------------------
# On or about line 444; find text might not be a complete line
#
'NAV_LINKS' => $nav_links_html)
#
#-----[ REPLACE WITH ]-------------------------------------
#
)
#
#-----[ OPEN ]-------------------------------------
#
templates/subSilver/overall_header.tpl
#
#-----[ FIND ]-------------------------------------
# On or about line 7; find text might not be a complete line
#
{NAV_LINKS}
#
#-----[ REPLACE WITH ]-------------------------------------
# Special Instructions: Replace with a space, or remove this
# line of code altogether
#
#
#-----[ SAVE/CLOSE ALL FILES ]------------------------------------------
#
# EoM
|