############################################################## ## MOD Title: Google Yahoo MSN Sitemaps and RSS (GYM) ## MOD Author: dcz http://www.phpbb-seo.com/ ## ## ## MOD Description: Modular solution for generating Google Yahoo & MSN sitemaps both for phpBB and mxBB PORTAL ( 2.7x and 2.8 supported ) ## This mod will create a Google SitemapIndex and auto generated Google Sitemaps for phpBB and mxBB ## It will as well create many different RSS 2.0 feeds and Yahoo urllist.txt. ## Uses a full support Gun-zip cache for all types of outputs ## and some XSL-Transform styling for Sitemaps and RSS feeds. ## ## ## MOD Version: 1.2.0RC4 ## ## Installation Level: (Easy) ## Installation Time: 2 Minutes ## Files To Edit: 1 in most cases ## language/lang_english/lang_admin.php ## Included Files: 13 ## sitemap.php, ## rss.php, ## urllist.php, ## templates/subSilver/admin/admin_mx_ggsitemap.tpl ## language/lang_english/lang_ggs_admin.php ## language/lang_english/lang_ggs_main.php ## admin/admin_mx_ggsitemap.php ## includes/ggs_functions.php ## includes/google_forum.php ## includes/rss_forum.php ## includes/yahoo_forum.php ## db_install.php ## db_uninstall.php ## ## 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 module is designed to allow many additional plug-ins. ## Check http://www.phpbb-seo.com/boards/ to get the list of available plug-ins ## For Google sitemaps and RSS feeds. Plug-ins are installed very easily, juste a file upload and voilą. ## ######################################################################################## ######## THE FRENCH INSTALL & LANG FILES ARE LOCATED IN THE translations/ FOLDER ####### ######################################################################################## ## ## More informations about this mod can be found on http://www.phpbb-seo.com/boards/gym-sitemaps/ ## ## New in - 1.2.0RC4 ## - UTF-8 conversion method is now selectable ## - mxBB 2.8 Compatible. ## New in - 1.2.0RC3 ## - RSS now able to display private forums. ## - 100% RSS 2.0 valid output. ## - Advanced UTF-8 conversion backported from phpBB3. ## - Enhanced the XSLt styling, no more JS to build User friendly links. ## - RSS XSLt styling can be forced for for FF2 and IE7. ## - Bbcode, active links, smilies can now be desactivated on RSS feeds. ## - Advanced BBcode filtering for rss feeds. ## - Added two summarize methods. ## New in - 1.2.0RC2 ## - Fixed censoring issue in GYM sitemaps. ## New in 1.2.0RC1 : ## - The module was rewritten from scratch and renamed. ## - Added cache for all type of outputs with full gun-zip support. ## - Added RSS 2.0 feeds. ## - Added yahoo! urllist.txt. ## - Added Zillions options in ACP. ## - Optimized the code. ## ## New in 1.0.1 : ## - Took the resubmit occasion to implement exclude lists ## - Added Category hierarchy 2.1.4e support (Premodded file). ## ## New in 1.0.0 : ## - Nothing, Intended to be sumited in the phpbb.com moddb ## ## New in 1.0.0RC2 : ## - Changed the Chapter name in ACP, for it to stand next to my ## other mx Sitemaps Module configuration ## ## New in 1.0.0RC1 : ## - Added some checks to make sure sitemaps are not empty ## ## New in 1.0.0B2 : ## - Advanced pagination settings for topics ## You can now choose how many page to list from the first ## and the last page of paginated topics. ## ##______________________________________________________________________________ ## ## This mod is really going to help a lot to be indexed in Google Yahoo and MSN. ## ## * It was first inspired by jhaskins's Google sitemap generator ## (< jhaskins AT streetrod3 DOT com > (Joe Haskins) http://www.streetrod3.com) ## but is doing a totally different thing now. ## ## * First, the code is meant to be as fast and light as possible while giving the appropriates infos. ## All listings can be cached, allowing for greater amount of links in listings. ## The cache fully support Gun-zip. If activated, the sitemaps will be cached compressed and sent as is ## upon demand. This mean that 50 ko can be enough to send 10 000 URL sitemaps. ## ## * All major queries are separated into several cycles, configurable in acp. ## Possibility to exclude forums from the listings, configurable in acp. ## Possibility to limit the number of url outputted, configurable in acp. ## Possibility to limit the messages selection by time when applicable, configurable in acp. ## All outputted links are sorted according to last activity, configurable in acp. ## Mod rewrite for sitemaps URLs, configurable in acp. (Require Apache with mod_rewrite module or IIS with isapi_rewrite) ## Mod rewrite for outputted links, 4 Kinds configurable, none, simple, mixed and advanced, configurable in ACP. ## The phpBB SEO mod Rewrite 0.2.x will be auto discovered. ## Various priority settings for phpbb, configurable in acp. ## ## * Possibility to output (and limit) paginated topics url, configurable in acp. ## Pagination will be limited like this : ## You can set up the upper and down limit for pagination in ACP for each typ of output, eg sitemaps, RSS feeds and urllist.php. ## ## "begin" "end" ## | | ## | Down Up | ## | | | | ## v v v v ## 1, 2, 3 ... 10, 11, 12 ## ## ## * Only public and valid content is listed. 100% Valid output. ## ## * Works both on mxBB PORTAL and phpBB with (almost as I now add a sinlge $lang key for the admin) no code changes. ## Auto detect whatever new sitemap module is added, making thus possible for unlimited new sitemaps. ## ## * Several mod Rewrite for SEO phpBB Supported, such as the abl2know, webmedic, and more ... ## The new URL rewriting method allow to fine tune the url standard used. ## The phpBB SEO mod Rewrite 0.2.x will be auto discovered ( http://www.phpbb-seo.com/boards/ ). ## ## ## Sitemaps Created : ## - One sitemapindex listing all sitemaps ## - One general forum sitemap, listing public forums url ## - One sitemap per public forum listing topics. ## When mxBB installed ## - Adds an entry in the sitemap index ## - Adds proper otpion for mxBB and for Kb to run with mx in acp (define mx kb page's ID) ## - One sitemap listing all public mx pages. ## RSS 2.0 Feeds Created : ## - One RSS feed listing all RSS feeds. ## - One general RSS forum feed, listing public forums url. ## - One RSS feed per public forum listing topics. ## - One general forum feed, listing public messages. ## - One General feed, listing all item eventually added by plug-ins. ## ## NOT tested with EasyMod, but should work :-) ############################################################## ## MOD History: ## ## 2007-04-15 - 1.2.0RC4 ## - UTF-8 conversion method is now selectable ## - mxBB 2.8 Compatible ## - Some SQL optimization ## - Better authorisation method ## - fixed urllist.php ## 2007-03-05 - 1.2.0RC3 ## - RSS now able to display private forums. ## - 100% RSS 2.0 valid output. ## - Advanced UTF-8 conversion backported from phpBB3. ## - Enhanced the XSLt styling, no more JS to User friendly links. ## - RSS XSLt styling can be forced for for FF2 and IE7. ## - Bbcode, active links, smilies can now be desactivated on RSS feeds. ## - Advanced BBcode filtering for rss feeds. ## - Added two summarize methods. ## 2006-01-27 - 1.2.0RC2 ## - Fixed censoring issue in GYM sitemaps. ## 2006-01-16 - 1.2.0RC1 ## - The module was rewritten from scratch and renamed. ## - Added cache for all type of outputs with full gun-zip support. ## - Added RSS 2.0 feeds. ## - Added yahoo! urllist.txt. ## - Added Zillions options in ACP. ## - Optimized the code. ## ## 2006-06-14 - 1.0.1 ## - Added exclusion settings based on forum ID (mxBB Pages IDs and KB's Categories IDs) ## - Changed the SQL Queries previously needing a SWITCH. ## - Added Category hierarchy 2.1.4e support (Premodded file). ## - Fixed paths to allow any mxBB installation type. ## - Added a check to find out if KB's mxBB Page Id was set. ## ## 2006-04-28 - 1.0.0 ## - Just a version update for moddb submission ## - Fixed Pagination Bug, went one page too far. ## ## 2006-04-26 - Second release candidate 1.0.0RC2 ## - Mostly intended to be more friendly with my other plans ## - Some code clean up, Acp side and paths mostly ## - Added common_GGsitemaps.php file in the release. ## ## ## 2006-02-28 - First release candidate 1.0.0RC1 ## - Added some checks to make sure sitemaps are not empty ## - Made the install phbbb.com compliant. ## - Minors bug fixes and code opt. ## - Added uninstall jhaskins's Google sitemap generator file. ## ## ## 2006-02-24 - Second beta Version 1.0.0B2 ## - Added advanced pagination control for topics ## - Better handeling of eventual sql errors ## - Install and uninstall script both for phpBB and mxBB PORTAL ## - Cosmetic in acp ## - Minors bug fixes and code opt. ## ## ## 2006-02-22 - First beta Version 1.0.0B1 ## ## ############################################################## ## Before Adding This MOD To Your Forum, You Should Back Up All Files Related To This MOD ############################################################## # #-----[ DIY INSTRUCTIONS ]------------------------------------------ # ______________________________ NOTE : VERSION UPDATE CHECKING ______________________________ if you are using XS mod ( http://www.phpbbstyles.com/viewtopic.php?t=356 ), by the way you should, Upload : contrib/xs_gym_sitemaps.cfg in your forum's admin/ folder, XS mod version checking will be extended to this mod. ____________________ NOTE : translations/ ____________________ French Install and lang files are to be find in the translations/ folder of this release. _____________________________ === > module Update <=== _____________________________ To update from all versions you will have to uninstall the module, by deleting all of its files, before you go for a new install. If you are upgrading from less than 1.2.0RC3, you'll have to update the module rewriterules as well, using the new ones. You will have to re-enter you settings in ACP. So far no KB (knowledge Base) plug-in is joined to this release, but this will be done when a stable KB is released. You'll need as well to re upload the contrib/xs_gym_sitemaps.cfg in phpBB/admin/ folder if your run XS mod. ____________________ NOTE : URL Rewriting ____________________ If you do not plan to use any URL rewriting for you forum and sitemaps, just ignore this part and look for INSTALLATION INSTRUCTIONS in this DIY INSTRUCTIONS. Here are the RewriteRules you should add in your root's .htaccess for the GYM Sitemaps and RSS URLs. According to the specific hoster you are using, you might have to get rid of the "/" at the beginning of the right part of each rewriterules eg : RewriteRule ^rss-?(l|s)?-?(m)?\.([xml|xml\.gz]+)$ rss.php?$1&$2 [L] Two different type of install : _______________________________ You can move sitemap.php, rss.php and urllist.php out of you phpBB (or mxBB) folder when installed in a sub-folder. To do this, you'd only need to open the file you want to move up, and look for : $phpbb_root_path = './'; and change it to : $phpbb_root_path = './phpbb/'; Obviously replacing phpbb/ with the real folder name where phpBB would be installed. With mxBB you'd search for : $mx_root_path = './'; instead. and replace it with : $mx_root_path = './portal/'; Obviously replacing portal/ with the real folder name where mxBB would be installed. WARNING : ______________________________________________________________________________________________________ The module is auto discovering the sitemap.php, rss.php and urllist.php location, under some circumstances, not often, it is possible that you'll need to manually set the path for it. In sitemap.php : $paths['sitemap_url'] should contain the full URL to sitemap.php's install folder (www.example.com/folder/ or www.example.com) $paths['sitemap_url'] = 'www.example.com/folder/'; Right before : if (defined('IN_PORTAL')) { You can hard code it if you experience problems with the auto discovery script. Same principle apply in rss.php, with $paths['rss_url'], and urllist.php with $paths['yahoo_url']. ______________________________________________________________________________________________________ Then, you would need to edit the Rewriterule paths accordingly, as each of the three files can be located in three different places. What matters in the Rewriterules is the path to the target file (rss.php, sitemap.php and urllist.php). In those files, what matter is the path to phpBB (or mxBB). ______ OPEN : ______ .htaccess _________________________________________________________ >>> YOUR GYM FILES ARE INSTALLED IN THE DOMAIN'S ROOT <<< _________________________________________________________ AFTER THE FORUM REWRITERULES ADD : __________________________________ ######################################################### # GYM SITEMAPS AND RSS REWRITE RULES # ######################################################### # AUTHOR : dcz http://www.phpbb-seo.com/ # STARTED : 2006/02/22 ######################## # RSS main RewriteRule ^rss-?(l|s)?-?(m)?\.(xml(\.gz)?)$ /rss.php?$1&$2 [L] # RSS forums RewriteRule ^forums-rss-?(l|s)?-?(m)?\.(xml(\.gz)?)$ /rss.php?forum&c&$1&$2 [L] # RSS all RewriteRule ^([a-zA-Z0-9_-]+)-rss([0-9]*)-?(l|s)?-?(m)?\.(xml(\.gz)?)$ /rss.php?$1=$2&$3&$4 [L] # RSS forum topics RewriteRule ^.+-rf([0-9]+)-?(l|s)?-?(m)?\.(xml(\.gz)?)$ /rss.php?forum=$1&$2&$3 [L] # SitemapIndex RewriteRule ^sitemaps\.(xml(\.gz)?)$ /sitemap.php [L] # Sitemap modules RewriteRule ^([a-zA-Z0-9_-]+)-sitemap\.(xml(\.gz)?)$ /sitemap.php?$1 [L] # Forum Sitemaps RewriteRule ^.+-gf([0-9]+)\.(xml(\.gz)?)$ /sitemap.php?forum=$1 [L] # Yahoo! urllist.txt RewriteRule ^urllist\.(txt(\.gz)?)$ /urllist.php [L] ######################################################### # END GYM SITEMAPS AND RSS REWRITE RULES # ######################################################### ________________________________________________ >>> YOUR GYM FILES ARE INSTALLED IN A FOLDER <<< ________________________________________________ AFTER THE FORUM REWRITERULES ADD : __________________________________ ######################################################### # GYM SITEMAPS AND RSS REWRITE RULES # ######################################################### # AUTHOR : dcz http://www.phpbb-seo.com/ # STARTED : 2006/02/22 ######################## # RSS main RewriteRule ^phpbb/rss-?(l|s)?-?(m)?\.(xml(\.gz)?)$ /phpbb/rss.php?$1&$2 [L] # RSS forums RewriteRule ^phpbb/forums-rss-?(l|s)?-?(m)?\.(xml(\.gz)?)$ /phpbb/rss.php?forum&c&$1&$2 [L] # RSS all RewriteRule ^phpbb/([a-zA-Z0-9_-]+)-rss([0-9]*)-?(l|s)?-?(m)?\.(xml(\.gz)?)$ /phpbb/rss.php?$1=$2&$3&$4 [L] # RSS forum topics RewriteRule ^phpbb/.+-rf([0-9]+)-?(l|s)?-?(m)?\.(xml(\.gz)?)$ /phpbb/rss.php?forum=$1&$2&$3 [L] # SitemapIndex RewriteRule ^phpbb/sitemaps\.(xml(\.gz)?)$ /phpbb/sitemap.php [L] # Sitemap modules RewriteRule ^phpbb/([a-zA-Z0-9_-]+)-sitemap\.(xml(\.gz)?)$ /phpbb/sitemap.php?$1 [L] # Forum Sitemaps RewriteRule ^phpbb/.+-gf([0-9]+)\.(xml(\.gz)?)$ /phpbb/sitemap.php?forum=$1 [L] # Yahoo! urllist.txt RewriteRule ^phpbb/urllist\.(txt(\.gz)?)$ /phpbb/urllist.php [L] ######################################################### # END GYM SITEMAPS AND RSS REWRITE RULES # ######################################################### ________________________________________ >>>> INSTALLATION INSTRUCTIONS <<<<< ________________________________________ __________________________________________________________ === > mxBB PORTAL install (phpBB user skip this part) <=== __________________________________________________________ Note : Files for the mxBB Portal install (taking care of phpBB listing as well) are located in the mxBB/ folder of this release. 1) If mxBB Portal is installed in a sub folder, you will need to replace : $mx_root_path = './'; with : $mx_root_path = './portal/'; Obviously replacing portal/ with the real folder name where mxBB would be installed. At the beginning of the sitemap.php, rss.php and urllist.php files. This is to allow the Google Sitemap module to list forums URLS as well. 2) Upload mxBB/mx_ggsitemaps/sitemap.php, mxBB/mx_ggsitemaps/rss.php and mxBB/mx_ggsitemaps/urllist.php to your server's root (e.g. www.example.com/sitemap.php) 3) Upload mxBB/mx_ggsitemaps/ggs_style/*.* where rss.php and sitemap.php are installed. 4) copy mxBB/mx_ggsitemaps/*.* to modules/mx_ggsitemaps/*.* 5) CHMOD modules/mx_ggsitemaps/gs_cache/ to 0777 6) Go to acp and install mx_ggsitemap module __________________________________________________ ===> phpBB install (mxBB user skip this part) <=== __________________________________________________ NOTE : phpBB Files are Located in the root/ Folder of the release. If phpbb is installed in a sub folder and you run other pages at the root level, You can take advantage of this system's modularity to include all of your site's sitemaps in this same index. You'll have to put the sitemap.php file at the domain's root level, since no link from above the sitemap files folder are taken into consideration by Google. To do this, you only need to open the file you want to move up, and look for : $phpbb_root_path = './'; and change it to : $phpbb_root_path = './phpbb/'; Obviously replacing phpbb/ with the real folder name where phpBB would be installed, in sitemap.php. You can do the same with rss.php and urllist.txt if you wish. Once you have uploaded all files in the proper folders : 1) Upload root/ggs_style/*.* where rss.php and sitemap.php are installed. 2) CHMOD mx_ggsitemaps/gs_cache/ to 0777 3) Upload contrib/db_install.php to db_install.php 4) Connect yourself as admin and go to http://www.yourdomain.com/phpbb_folder/db_install.php to install the sql part 5) delete db_install.php. If you install it with EasyMod, it will certainly have done this part already, computing the manual SQL bellow. To uninstall just upload : copy contrib/db_uninstall.php to db_uninstall.php and go to http://www.yourdomain.com/phpbb_folder/db_uninstall.php while logged admin # #-----[ COPY ]------------------------------------------ # Meaning copy root/*.* to *.* copy root/sitemap.php to sitemap.php copy root/rss.php to rss.php copy root/urllist.php to urllist.php copy root/language/lang_english/lang_ggs_admin.php to language/lang_english/lang_ggs_admin.php copy root/language/lang_french/lang_ggs_main.php to language/lang_english/lang_ggs_main.php copy root/admin/admin_mx_ggsitemap.php to admin/admin_mx_ggsitemap.php copy root/mx_ggsitemaps/includes/yahoo_forum.php to mx_ggsitemaps/includes/yahoo_forum.php copy root/mx_ggsitemaps/includes/rss_forum.php to mx_ggsitemaps/includes/rss_forum.php copy root/mx_ggsitemaps/includes/google_forum.php to mx_ggsitemaps/includes/google_forum.php copy root/mx_ggsitemaps/includes/ggs_functions.php to mx_ggsitemaps/includes/ggs_functions.php copy root/templates/subSilver/admin_mx_ggsitemap.tpl to templates/subSilver/admin/admin_mx_ggsitemap.tpl # #-----[ OPEN ]------------------------------------------ # You can skip this part if you don't care about translating the # mx Google Sitemaps ACP menu Title. Everything else will still be translated. language/lang_english/lang_admin.php # #-----[ FIND ]------------------------------------------ # ?> # #-----[ BEFORE, ADD ]------------------------------------------ # // BEGIN mx Google Sitemaps www.phpBB.SEO.com $lang['Google_SiteMaps'] = "GYM Sitemaps & RSS"; // END mx Google Sitemaps www.phpBB.SEO.com # #-----[ SAVE/CLOSE ALL FILES ]------------------------------------------ # # EoM