mx Sitemaps Auto link Add On for phpBB : "mod Rewrite Version"
This version of the Add On is ment to be used with phpBB.
The proper set up for mx Sitemaps with this Add On version is when Mod Rewrite are set to "YES".
You will need to properly set up the rewrite rules in your .htaccess in order to be able to use the outputed links.
This
Require Being hosted on an
Apache Server With
mod_Rewrite loaded.
Have a look in the mx Sitemap contrib/ folder for a sample .htacess file.
The links will be pointing to your Site Map file.
With this Add On, Sitemap's Url will be :
-http://www.example.com/phpBB/sitemaps.html => Site Map Index
-http://www.example.com/phpBB/forum-map.html => Forum Index Map
-http://www.example.com/phpBB/forum-mapxx.html => Forum xx Map
- Code: Select all
##############################################################
## MOD Title: mx Sitemaps Auto link Add on for phpBB Mod Rewrite Version
## MOD Author: dcz <n/a> http://www.phpbb-seo.com/
## MOD Description: This Add on mod creates Dynamic links to your mx_sitemaps Site Maps.
## MOD Version: 0.0.1
##
## Installation Level: Easy.
## Installation Time: 3 Minutes.
##
## Files To Edit: 2,
##
## Included Files: 0
##
## 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:
## This code change will output links to your Site Maps in your Forum's footer.
## It will output the link to the Site Maps as well as the link to the
## Forum Map.
## When browsing a specific forum, an extra link to the specific forum map
## Will be outputed as well.
##
## NOT tested with EasyMod, but should work :-)
##############################################################
## MOD History:
##
## 2006-04-21 - Version 0.0.1
## - This is the first version.
## Fully tested working, no known bugs so far.
##
##############################################################
## Before Adding This MOD To Your Forum, You Should Back Up All Files Related To This MOD
##############################################################
This one goes like this :For the php part, one file to edit.
- Code: Select all
#
#-----[ OPEN ]------------------------------------------
#
includes/page_tail.php
#
#-----[ FIND ]------------------------------------------
#
//
// Show the overall footer.
//
#
#-----[ BEFORE, ADD ]------------------------------------------
# Note : You can here change links titles also ;-)
# Make sure to change here "URL_TO_THE_FOLDER_WHERE_YOUR_SITEMAP_IS_INSTALLED" with the actual URL to the folder.
//Begin mx_Sitemaps Auto link Add On http://www.phpbb-seo.com/
$mx_forum_id =( isset($HTTP_GET_VARS[POST_FORUM_URL]) )? intval($HTTP_GET_VARS[POST_FORUM_URL]) : 0;
$root_url = 'http://URL_TO_THE_FOLDER_WHERE_YOUR_SITEMAP_IS_INSTALLED/';
if ( $mx_forum_id != 0 )
{
$mx_link_tmp = append_sid($root_url . 'forum-map' . $mx_forum_id . '.html');
$link_title = $forum_row['forum_name'].' - Map';
$mx_sitemap_link = '<a href="'.$mx_link_tmp.'" class="copyright" title="'.$link_title.'">'.$link_title.'</a>';
$mx_sitemap_link .= '<br /><a href="'.append_sid($root_url . 'forum-map.html').'" class="copyright" title="Forum Map">Forum Map</a>';
$mx_sitemap_link .= '<br /><a href="'.append_sid($root_url . 'sitemaps.html').'" class="copyright" title="'.$board_config['sitename'].' : Site Map">Site Map</a>';
}
else
{
$mx_sitemap_link = '<a href="'.append_sid($root_url . 'forum-map.html').'" class="copyright" title="Forum Map">Forum Map</a>';
$mx_sitemap_link .= '<br /><a href="'.append_sid($root_url . 'sitemaps.html').'" class="copyright" title="'.$board_config['sitename'].' : Site Map">Site Map</a>';
}
//End mx_Sitemaps Auto link Add On http://www.phpbb-seo.com/
#
#-----[ FIND ]------------------------------------------
#
$template->assign_vars(array(
#
#-----[ AFTER, ADD ]------------------------------------------
#
'U_SITEMAPS' => $mx_sitemap_link,
In this part you have to make sure to put the proper url to your sitemap's folder (the folder in which stands the sitemaps.php file).
And the Template part :
- Code: Select all
#
#-----[ OPEN ]------------------------------------------
#
templates/subSilver/overall_footer.tpl
#
#-----[ FIND ]------------------------------------------
#
</span></div>
#
#-----[ REPLACE WITH ]------------------------------------------
#
</span><br />{U_SITEMAPS}<br /></div>
#
#-----[ SAVE/CLOSE ALL FILES ]------------------------------------------
#
# EoM
Here too, you can change the links upon your needs. {U_SITEMAPS} Stands for the complete html link to the sitemap, you can use it where you want in the overall_footer.tpl.