##############################################################
## MOD Title: Advanced Link Exchange Mod
## MOD Author: George Belton < george@georgebelton.com >
## MOD Description: Adds a banner link exchange page to your phpBB2 that allows others
##                  to submit thier own sites, with all aspects editied/controled from the ACP.
## MOD Version: 2.0.6
##
## Installation Level: easy
## Installation Time: 5-10 Minutes
## Files To Edit: includes/page_header.php
##		          includes/constants.php
##                templates/subSilver/overall_header.tpl
## Included Files: links.php
##                 link_submission.php
##                 admin/admin_link_exchange.php
##                 language/lang_english/lang_link_exchange.php
##                 language/lang_english/email/lang_link_submission.tpl
##     		       templates/subSilver/link_exchange.tpl
##     		       templates/subSilver/link_exchange_out.tpl
##     		       templates/subSilver/link_exchange_submission.tpl
##     		       templates/subSilver/admin/link_exchange_edit_body.tpl
##     		       templates/subSilver/admin/link_exchange_list_body.tpl
##		           link_exchange_db_install.php
##		           link_exchange_db_uninstall.php
## 
## Most code for admin_link_exchange.php borrowed from admin_banner.php in the Complete Banner 
## Hack by Niels < ncr@db9.dk > (Niels Chr. Rd) http://mods.db9.dk
##############################################################
##
## MOD History 
##   7/22/04 - v 2.0.1 Initial Release
##   7/24/04 - v 2.0.2 Fixed error with alt text in link_exchange.tpl
##           - v 2.0.2 Fixed error when submitting a blank comment or site description
##   9/14/04 - v 2.0.3 Added missing .css information
##                     Fixed code to generate link id to prevent duplicates
##   8/03/05 - v 2.0.4 Added outgoing link counts
##   8/27/05 - v 2.0.5 Added support for flash banners
##   9/24/05 - v 2.0.6 Fixed code preventing first link exchange from being created
##           - v 2.0.6 Fixed templates to display mouse over description for links
##           - v 2.0.6 Added click out counts to ACP pages
##
## Before Adding This MOD To Your Forum, You Should Back Up All Files Related To This MOD
##############################################################

#
#-----[ OPEN ]------------------------------------------
#
includes/page_header.php

#
#-----[ FIND ]------------------------------------------
#
//
// Parse and show the overall header.
//

#
#-----[ BEFORE, ADD  ]------------------------------------------
#
// Link Exchange mod
include($phpbb_root_path . 'language/lang_' . $board_config['default_lang'] . '/lang_link_exchange.' . $phpEx);

#
#-----[ FIND ]------------------------------------------
#
        'L_FAQ' => $lang['FAQ'],

#
#-----[ AFTER, ADD  ]------------------------------------------
#
        // Link Exchange mod
        'L_LINK_EXCHANGE' => $lang['Link_exchange'],
#
#-----[ FIND ]------------------------------------------
#
        'U_FAQ' => append_sid('faq.'.$phpEx),
        
#
#-----[ AFTER, ADD  ]------------------------------------------
#
        // Link Exchange mod
        'U_LINK_EXCHANGE' => append_sid('links.'.$phpEx),

		
#
#-----[ OPEN ]------------------------------------------
#
includes/constants.php

#
#-----[ FIND ]------------------------------------------
#

?>

#
#-----[ BEFORE, ADD  ]------------------------------------------
#
// Link Exchange mod
define('LINK_EXCHANGE_TABLE', $table_prefix.'linkexchange');
define('LINK_EXCHANGE_CONFIG_TABLE', $table_prefix.'linkexchange_config');


#
#-----[ OPEN ]------------------------------------------
#
templates/subSilver/overall_header.tpl

#
#-----[ FIND ]------------------------------------------
#
&nbsp;<a href="{U_FAQ}" class="mainmenu"><img src="templates/subSilver/images/icon_mini_faq.gif" width="12" height="13" border="0" alt="{L_FAQ}" hspace="3" />{L_FAQ}</a>

#
#-----[ BEFORE, ADD  ]------------------------------------------
#
&nbsp;<a href="{U_LINK_EXCHANGE}" class="mainmenu"><img src="templates/subSilver/images/icon_mini_groups.gif" width="12" height="13" border="0" alt="{L_LINK_EXCHANGE}" hspace="3" />{L_LINK_EXCHANGE}</a>&nbsp;


#
#-----[ OPEN ]------------------------------------------
#
templates/subSilver/subSilver.css

#
#-----[ FIND ]------------------------------------------
#

/* General text */

#
#-----[ Before Add ]------------------------------------------
#

/* Link Exchange text */

.pp,.genlarge { color : #000000; text-decoration: none; }
a.pp,a.genlarge { color: #006699; text-decoration: none; }
a.pp:visited,a.genlarge:visited { color: #006699; text-decoration: none; }
a.pp:hover,a.genlarge:hover { color: #DD6900; text-decoration: none; }

#
#-----[ COPY ]-------------------------------------------------------
# Copy the following file and folder to root folder on your host
#
# copy  root/links.php                                     		-> links.php
# copy  root/link_submission.php                                     	-> link_submission.php
# copy  root/admin/admin_link_exchange.php            			-> admin/admin_link_exchange.php
# copy  root/language/lang_english/lang_link_exchange.php               -> language/lang_english/lang_link_exchange.php
# copy  root/language/lang_english/email/link_exchange_submission.tpl   -> language/lang_english/email/link_exchange_submission.tpl
# copy  root/templates/subSilver/link_exchange.tpl    			-> templates/subSilver/link_exchange.tpl
# copy  root/templates/subSilver/link_exchange_out.tpl    		-> templates/subSilver/link_exchange_out.tpl
# copy  root/templates/subSilver/link_exchange_submission.tpl    	-> templates/subSilver/link_exchange_submission.tpl
# copy  root/templates/subSilver/admin/link_exchange_edit_body.tpl    	-> templates/subSilver/admin/link_exchange_edit_body.tpl
# copy  root/templates/subSilver/admin/link_exchange_list_body.tpl    	-> templates/subSilver/admin/link_exchange_list_body.tpl
#
#-----[ SQL ]--------------------------------------------------------
#
# Upload link_exchange_db_install.php to your phpBB root directory then 
# run link_exchange_db_install.php by typing on the browser. After that, 
# delete the file immediately.
#
# You can run link_exchange_db_uninstall.php to remove the db entries if you
# ever decide not to use this mod
#
# Remember to delete link_exchange_db_install.php and link_exchange_db_uninstall.php 
# when you are done with them.
#
#####################################################################
######################################################################
#-----[ SAVE/CLOSE/UPLOAD ALL FILES ]------------------------------------------