O mica problema la GYM Sitemaps & RSS

Discuţii legate de instalarea şi funcţionarea unor MODificări vechi sau noi ale forumului phpBB 3.0.x.
Reguli forum
Aveti o problema si vreti sa primiti ajutor? Click aici ! Nu uitati si de regulamentul forumului !
ciupylan
Nou venit
Mesaje: 9
Membru din: 07-Oct-2009, 17:36:00
Versiune: 3.0.5
Ext: Da
Server: Windows
Nivel phpBB: Puţin experimentat

Re: O mica problema la GYM Sitemaps & RSS

Mesaj de ciupylan »

DIY instructions

These are manual instructions that cannot be performed automatically. You should follow these instructions carefully.

Cod: Selectaţi tot

To update from all 2.0.x (phpBB3) versions you will have to upload all files in the root/ directory of the archive to your phpBB/ ftp directory, after you will have taken care manually of the eventual code change you would have implemented in the template files (directory phpBB/styles/, .html, .js and .xsl) added by the module.
Once done, just lunch the update script (example.com/phpBB/gym_sitemaps/gym_install.php).
Your settings will be kept during the update process.

Updating from the previous version, you will need to implement the changes listed in contrib/2.0.RC5_2.0.0_GYM_Update.txt, as well displayed by the updater, to update the phpBB files modified by this module.

If you previously where using the phpBB2 version, you will be able to provide the new rewritten urls to subscriber of the old feeds. 
To do so, you will need to activate the "Handle GYM 1x rewritten URL" option in the RSS feeds main configuration, under the URL Rewriting tab.
You will as well need to add these rewriterule :

#####################################################
# Redirect GYM 1.x RSS Feeds
# Mais feeds
RewriteRule ^rss-?(l|s)?-?(m)?.(xml(.gz)?)$ /gymrss.php?$1&$2&gym1x=1 [L,NC]
# Redirect GYM 1.x RSS all
RewriteRule ^([a-z0-9_-]+)-rss([0-9]*)-?(l|s)?-?(m)?.(xml(.gz)?)$ /gymrss.php?$1=$2&$3&$4&gym1x=1 [L,NC]
# Redirect GYM 1.x RSS forum topics
RewriteRule ^([a-z0-9_-]+)-rf([0-9]+)-?(l|s)?-?(m)?.(xml(.gz)?)$ /gymrss.php?forum=$2&$3&$4&gym1x=1&gymtitle=$1 [L,NC]
# END Redirect GYM 1.x RSS Feeds
#####################################################

before : 

# Google SitemapIndex

in your .htaccess (once the regular rewriterules are implemented) with the proper path and slash settings.

____________________
NOTE : translations/
____________________

French Install and lang files are in the /translations folder of this release.

In case you need it, here are the code changes for the FR language pack : 

In language/fr/common.php

FIND

?>

BEFORE, ADD

// www.phpBB-SEO.com SEO TOOLKIT BEGIN -> GYM Sitemaps
$lang = array_merge($lang, array(
	'GYM_LINKS' => 'Liens',
	'GYM_LINK' => 'Lien',
	'GYM_RSS_SLIDE_START' => 'Lancer',
	'GYM_RSS_SLIDE_STOP' => 'Stopper',
	'GYM_RSS_SOURCE' => 'Source',
));
// www.phpBB-SEO.com SEO TOOLKIT END -> GYM Sitemaps

________________________________________
>>>>   INSTALLATION INSTRUCTIONS   <<<<<
________________________________________

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 sitemapindex.

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 Search Engines. 
To do this, you only need to open sitemap.php, 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.
Then you would need to go ACP and update the "Google Sitemaps URL" parameter, in the Google sitemaps main panel, to match your domain's root location instead of the phpBB url : http://www.example.com/ instead of http://www.example.com/phpbb/
Links to the forum will of course stay valid.
You can do the same with gymrss.php if you wish.

_____________
Please note :
_____________

If you run phpBB in a sub directory (example.com/phpbb/) and installed the sitemap (and / or gymrss.php) file at the root level (example.com/sitemap.php) following the instructions above, you will need to change paths in the sitemap (and / or gymrss.php) rewriterules accordingly.
And if your phpBB's .htaccess was in the phpBB/ directory, to move them to the domain's root .htaccess.


===> To Install, just follow these five easy steps <===

	1) Upload root/*.* to *.* (EG upload all files from root/ to your phpBB directory.

	2) CHMOD  gym_sitemaps/cache/ to 0777

	3) Connect yourself as admin and go to "http://www.yourdomain.com/phpbb_folder/gym_sitemaps/gym_install.php" to install

	4) Apply the code change bellow and upload the modified files 
	or just use the premodified file, in case you are running a vanilla phpBB3.0.3, to be found in contrib/phpbb3.0.3_files/

	5) Refresh your theme's cache as well as phpBB's cache (ACP => STYLE, Themes and Templates => Refresh).

!!!!! The SQL involved in the install script where tested for all mysql versions, but unfortunately not with the other possible DBAL (oracle, sqlite, postgresql etc ...), chances are great that it will work though !!!!!

GYM sitemaps & RSS should work with all DBAL supported by phpBB.

======> The only url to submit for all your sitemaps is "http://www.yourdomain.com/phpbb/sitemap.php" 
======> or "http://www.yourdomain.com/phpbb/sitemapindex.xml" with URL rewriting. 
======> You should make sure that the url is valid before you submit, just load the url in your browser to see the mod in action.


To uninstall :

	1) Connect yourself as admin and go to "http://www.yourdomain.com/phpbb_folder/gym_sitemaps/gym_install.php" to un-install

	2) remove all files and code changes added


________________
NOTE : .htaccess
________________

If the phpBB SEO mod rewrites are installed, the .htaccess generator will automatically generate the required rewriterules for GYM sitemaps & RSS. Just generate a new .htaccess once you have installed the module and implement it.

Manual install, in your phpBB's .htaccess add : 

#####################################################
# GYM Sitemaps & RSS
# Global channels
RewriteRule ^rss(/(news)+)?(/(digest)+)?(/(short|long)+)?/?$ /gymrss.php?channels&$2&$4&$6 [QSA,L,NC]
# HTML Global news & map
RewriteRule ^(news|maps)/?(page([0-9]+).html)?$ /map.php?$1&start=$3 [QSA,L,NC]
# END GYM Sitemaps & RSS
#####################################################

After (in there with the phpBB SEO mod rewrite, if not, just add at the end of the .htaccess) :

# HERE IS A GOOD PLACE TO ADD OTHER PHPBB RELATED REWRITERULES


And then add at the end of it :

#####################################################
# GYM Sitemaps & RSS
# MTML Module additional modes
RewriteRule ^(news|maps)/([a-z0-9_-]+)(/([a-z0-9_-]+))?/?(page([0-9]+).html)?$ /map.php?$2=$4&$1&start=$6 [QSA,L,NC]
# Main feeds & channels
RewriteRule ^rss(/(news)+)?(/(digest)+)?(/(short|long)+)?(/([a-z0-9_-]+))?/([a-z0-9_]+).xml(.gz)?$ /gymrss.php?$9=$8&$2&$4&$6&gzip=$10 [QSA,L,NC]
# Module feeds
RewriteRule ^[a-z0-9_-]*-[a-z]+([0-9]+)(/(news)+)?(/(digest)+)?(/(short|long)+)?/([a-z0-9_]+).xml(.gz)?$ /gymrss.php?$8=$1&$3&$5&$7&gzip=$9 [QSA,L,NC]
# Module feeds without ids
RewriteRule ^([a-z0-9_-]+)(/(news)+)?(/(digest)+)?(/(short|long)+)?/([a-z0-9_]+).xml(.gz)?$ /gymrss.php?nametoid=$1&$3&$5&$7&modulename=$8&gzip=$9 [QSA,L,NC]
# Google SitemapIndex
RewriteRule ^sitemapindex.xml(.gz)?$ /sitemap.php?gzip=$1 [QSA,L,NC]
# Module cat sitemaps
RewriteRule ^[a-z0-9_-]+-([a-z]+)([0-9]+).xml(.gz)?$ /sitemap.php?module_sep=$1&module_sub=$2&gzip=$3 [QSA,L,NC]
# Module sitemaps
RewriteRule ^([a-z0-9_]+)-([a-z0-9_-]+).xml(.gz)?$ /sitemap.php?$1=$2&gzip=$3 [QSA,L,NC]
# END GYM Sitemaps & RSS
#####################################################


With the proper path and slashes settings.
For example you could need to use something like :

# Module sitemaps
RewriteRule ^phpbb/([a-z0-9_]+)-([a-z0-9_-]+).xml(.gz)?$ phpbb/sitemap.php?$1=$2&gzip=$3 [QSA,L,NC]

instead of :

# Module sitemaps
RewriteRule ^([a-z0-9_]+)-([a-z0-9_-]+).xml(.gz)?$ /sitemap.php?$1=$2&gzip=$3 [QSA,L,NC]

and so on for all the rewriterules.

_____________________
NOTE : RSS 2.0 Parser
_____________________

GYM Sitemaps & RSS comes with a simple yet efficient RSS 2.0 parser.
It will cache the processed feed for a configured period of time (1 hour by default).
It's very handy to display url rewriting links anywhere in phpBB without more efforts than if un-rewritten.
You can easily display list of links or posts on any page within phpBB.

To display a RSS 2.0 feed's content, just add :

// GYM Sitemaps & RSS agregator
if (!empty($config['gym_installed'])) {
	if (!function_exists('display_feed')) {
		require_once($phpbb_root_path . 'gym_sitemaps/includes/gym_common.' . $phpEx);
	}
	$params = array(
		// Full URL to the RSS feed
		'url' => 'http://www.example.com/feed_url',
		// true | false - Scroll the link list or not ? 
		// Default is false
		'slide' => true,
		// Speed of scroller higher number = slower scroller
		// Default is 30
		'speed' => 30,
		// How long should we cache the result in seconds
		// Default is 3600 (1 hour)
		'ttl' => 3600,
		// number of item to parse
		// Default is 5
		'limit' => 5,
		// true | false - Display the items description if available as well ? 
		// Turning this on will change the link list layout
		// Default is false
		'desc' => false,
		// true | false - Allow html in the descriptions ?
		// Default is false
		'html' => true,
		// true | false - if html is off, you can additionnaly strip all html tags
		// Default is true
		'striptags' => true,
	);
	/**
	 * display_feed($params, $tpl_prefix = '')
	 * $params : array of params or string feed URL for defaults
	 * tpl_prefix is for using different link blocks on one page
	 * Use display_feed('http://www.example.com/feed_url') to use default settings.
	 * */
	display_feed($params, '');
}
// GYM Sitemaps & RSS agregator

before page_header() is called in any phpBB script.

Then you'll just have to add :

<!-- INCLUDE gym_sitemaps/gym_link_body.html -->

in the template corresponding to the phpBB script, just put it where you want the output to display in the page.

Only the url parameter is mandatory, others should be set only to use different values than defaults.
The order of the parameters is not important.

See this feature in action : 
	http://demo.phpbb-seo.net/demo/rss-links.php
	http://demo.phpbb-seo.net/demo/rss-messages.php

____________________
NOTE : URL rewriting
____________________
The HTML module will so far only rewrite URL to the forum if one of the phpBB SEO mod rewrite is installed.
Închis

Înapoi la “3.0.x Suport pentru MODificări”

Cine este conectat

Utilizatori ce ce navighează pe acest forum: Niciun utilizator înregistrat și 6 vizitatori