| |
|
| :: |
| Author |
Message |
diabolic.bg

Joined: 04 Feb 2008 Posts: 47 Location: Bulgaria
|
Posted: Thu Feb 14, 2008 6:20 pm Post subject: Problem with GYM Sitemaps.xml |
|
|
Hi!
In my board I have installed some your mods:
- dynamic_meta_tagsV0-2-0
- Optimal_titlesV_1.0.0
- Simple-Show-BotV0-0-2
All are great mods and works very good. I tested simple_mod_rewriteV0-2-4 but with it I have a problems. I already write in another topic.
Now in my board working able2know mod_rewrite. Maybe it is important to say. His .htaccess is in phpbb/ dir.
Yesterday I installed GYM Sitemaps \with GYM_Sitemap_xml_pluginV0-2-0 and GYM_Sitemap_txt_pluginV0-2-0\ - all the files are in phpbb/ dir.
Where I must place xs_gym_xml.cfg and xs_gym_txt.cfg?
but again have a problem:
all my maps \sitemap, rss and urllist\ works as .php but don't works as .xml - I get Error 404.
I read many topics here but don't find out right answer.
My phpbb_seo_class.php is
| Code: |
<?php
/**
*
* @package phpBB SEO
* @version $Id: phpbb_seo_class.php,v 1.0 2006/12/09 13:48:48 dcz Exp $
* @copyright (c) 2006 dcz - www.phpbb-seo.com
* @license http://www.opensource.org/licenses/rpl.php RPL Public License
*
*/
/**
* phpBB_SEO Class
* www.phpBB-SEO.com
* @package Advanced phpBB SEO mod Rewrite
*/
class phpbb_seo {
/**
* constuctor
*/
function phpbb_seo() {
global $phpEx;
// URL Settings
$this->seo_url = array( 'cat' => 'cat',
'forum' => 'forum-',
'topic' => 'about',
'user' => 'member'
);
$this->seo_delim = array('cat' => '-vc',
'forum' => '-vf',
'topic' => '-vt',
'user' => '-u'
);
$this->seo_ext = array('cat' => '.html',
'forum' => '.html',
'topic' => '.html',
'user' => '.html'
);
$this->seo_static = array('cat' => 'cat',
'forum' => 'forum-',
'topic' => 'about',
'post' => 'post',
'user' => 'member',
'start' => '-',
'gz_ext' => '.gz',
'index' => ''
);
$this->modrtype = -1;
return;
// --> Meta tags
$this->seo_meta_tags();
return;
}
// -- > Meta tags
var $seo_meta = array();
/**
* Returns meta tag code
*/
function build_meta($page_title = '') {
$meta_desc = ( $this->seo_meta['meta_desc'] != '' ) ? $this->seo_meta['meta_desc'] : $this->seo_meta['meta_desc_def'];
$keywords = ( $this->seo_meta['keywords'] != '' ) ? $this->seo_meta['keywords'] : $this->seo_meta['meta_keywords_def'];
$title = ( $this->seo_meta['meta_title'] != '' ) ? $this->seo_meta['meta_title'] : $page_title;
return sprintf( $this->seo_meta['meta_tpl'], $title, $this->seo_meta['meta_lang'], $meta_desc, $keywords, $this->seo_meta['meta_cat'], $this->seo_meta['meta_robots'] );
}
/**
* Returns a word list separated by comas
* You might want tu use mb_strlen() instead of strlen()
* if you are using UTF-8 : mb_strlen($word, 'UTF-8')
* you can as well change the minimum word size here : if ( strlen($word) >= 3 ) {
* Possible Options :
* - $limit = 0 means no limit.
* By default, ' . and , are deleted.
*/
function make_keywords($text, $limit = 35) {
$keywords = '';
$num = 0;
$text = preg_replace(array("`[[:punct:]]+`", "`[\s]+`"), array(" ", " "), strip_tags($text) );
$text = explode(" ", $text);
// We take the most used words first
$text = array_count_values($text);
foreach ($text as $word => $count) {
if ( strlen($word) >= 3 ) {
$keywords .= ($keywords == '') ? $word : ',' . $word;
$num++;
if ( $limit > 0 && $num >= $limit ) {
break;
}
}
}
return $keywords;
}
/**
* Filter php/html tags and white spaces and returns htmlspecialchared string
*/
function meta_filter_txt($text) {
return htmlspecialchars(preg_replace("`[\s]+`", " ", strip_tags($text) ) );
}
/**
* Initialize meta tags
* @access private
*/
function seo_meta_tags() {
global $board_config;
$this->seo_meta = array('meta_tpl' => '<meta name="title" content="%s" />' . "\n" . '<meta name="description" lang="%s" content="%s" />' . "\n" . '<meta name="keywords" content="%s" />' . "\n" . '<meta name="category" content="%s" />' . "\n" . '<meta name="robots" content="%s" />'. "\n",
'meta_title' => '',
'meta_desc' => '',
'meta_keywords' => '',
// Here you can hard code a static default title, description and keywords
// As is, the mod will return information based on the phpbb config
'meta_title_def' => $this->meta_filter_txt($board_config['sitename']),
'meta_desc_def' => $this->meta_filter_txt($board_config['site_desc']),
'meta_keywords_def' => $this->make_keywords($board_config['site_desc']),
'meta_lang' => 'bg',
'meta_cat' => 'general',
'meta_robots' => 'index, follow',
'meta_gened' => FALSE
);
return;
}
// --> Gen stats
/**
* Returns microtime
* Borrowed from php.net
*/
function microtime_float() {
return array_sum(explode(' ', microtime()));
}
// --> URL rewriting functions <--
/**
* Prepare Titles for URL injection
* Replace by the function you'd prefer for different URL injection standards
*/
function format_url( $url, $type = 'topic' ) {
//Short url
$url = preg_replace("(\[.*\])U","",$url);
$find = array('"','&','<','>','\r\n','\n',);
$url = str_replace ($find, '-', $url);
$url = str_replace ('Я', 'ss', $url);
$url = str_replace (array('ц','Ц'), 'oe', $url);
$url = str_replace (array('д','Д'), 'ae', $url);
$url = str_replace (array('ь','Ь'), 'ue', $url);
$find = "АБВГЕабвгеТУФХШтуфхшИЙКЛийклЗзМНОПмнопЩЪЫщъыяСс";
$replace = "aaaaaaaaaaooooooooooeeeeeeeecciiiiiiiiuuuuuuynn";
$url = strtr($url,$find,$replace);
$url = preg_replace("`[^a-zA-Z0-9]`", "-", $url);
$url = preg_replace("`[-]+`", "-", $url);
$url = trim($url, '-');
$url = ( $url == "" ) ? $type : strtolower($url);
return $url;
}
}
?> |
My .htaccess is in root dir:
| Code: |
# You could need to un-comment the following line
# Options +FollowSymlinks
RewriteEngine On
RewriteBase /
#########################################################
# GYM SITEMAPS AND RSS REWRITE RULES #
#########################################################
# AUTHOR : dcz http://www.phpbb-seo.com/
# STARTED : 2006/02/22
########################
# RSS main
RewriteRule ^phpbb2/rss-?(l|s)?-?(m)?\.(xml(\.gz)?)$ /phpbb2/rss.php?$1&$2 [L]
# RSS forums
RewriteRule ^phpbb2/forums-rss-?(l|s)?-?(m)?\.(xml(\.gz)?)$ /phpbb2/rss.php?forum&c&$1&$2 [L]
# RSS all
RewriteRule ^phpbb2/([a-zA-Z0-9_-]+)-rss([0-9]*)-?(l|s)?-?(m)?\.(xml(\.gz)?)$ /phpbb2/rss.php?$1=$2&$3&$4 [L]
# RSS forum topics
RewriteRule ^phpbb2/.+-rf([0-9]+)-?(l|s)?-?(m)?\.(xml(\.gz)?)$ /phpbb2/rss.php?forum=$1&$2&$3 [L]
# SitemapIndex
RewriteRule ^phpbb2/sitemaps\.(xml(\.gz)?)$ /phpbb2/sitemap.php [L]
# Sitemap modules
RewriteRule ^phpbb2/([a-zA-Z0-9_-]+)-sitemap\.(xml(\.gz)?)$ /phpbb2/sitemap.php?$1 [L]
# Forum Sitemaps
RewriteRule ^phpbb2/.+-gf([0-9]+)\.(xml(\.gz)?)$ /phpbb2/sitemap.php?forum=$1 [L]
# Yahoo! urllist.txt
RewriteRule ^phpbb2/urllist\.(txt(\.gz)?)$ /phpbb2/urllist.php [L]
#########################################################
# END GYM SITEMAPS AND RSS REWRITE RULES #
#########################################################
# SITEMAP SITE TXT
RewriteRule ^phpbb2/([a-zA-Z0-9_-]+)-gx\.(xml(\.gz)?)$ /phpbb2/sitemap.php?xml=$1 [L]
# SITEMAP SITE TXT
RewriteRule ^phpbb2/([a-zA-Z0-9_-]+)-gt\.(xml(\.gz)?)$ /phpbb2/sitemap.php?txt=$1 [L] |
Also I correct my ggs_functions as says dcz here.
This is my sitemap_index.php.
I think my problem is in .htaccess file but I don't understand it.
Help me please! |
|
|
| Back to top |
|
 |
|
 |
SeO Administrateur - Site Admin

Joined: 15 Mar 2006 Posts: 3089
|
Posted: Fri Feb 15, 2008 3:17 pm Post subject: Re: Problem with GYM Sitemaps.xml |
|
|
Erf, again, the problem comes form the meta tag mod. The phpBB2 version is not really standalone. Problem is, GYM sitemaps uses a light version of the phpbb_seo class in order to handle url rewriting, this way, the mod is able to detect if the phpBB SEO mods are used and if so, use the full phpbb_seo class already started.
With the standalone install of the meta tag mod, you already started a phpbb_seo class, but, without enough method in it to allow gym sitemaps to fully work, since it will not load its light (but with enough to rewrite) phpbb_seo class.
So I'm afraid you are in the worst case, usually thing are made a lot more easier. And that's why the phpBB3 meta tag mod is fully standalone.
You have several solutions to get around all this, converting to phpBB3 is to take into consideration since it would as well solve all your seo mods issues and you'd as well would for sure only need one massive redirection.
Other solution would be to start using one of our mod rewrite instead of the able2know mod, you can even (and fairly easily) keep the same urls as before for the most (since the phpBB SEO mod do not output any pagination duplicate, and able2know does, there will be some duplicate reduction).
You only need to additonally install the zero duplicate to deal with the pagination duplicate generated by the able2know mod and keep some of its rewriterules in your new .htaccess (in case you decide for this, you can ask for help).
You could as well decide to go for mixed or advanced phpBB2 mod rewrites, but this would mean some massive redirecting which in itself is not a problem, but, if you as well plan to go for phpBB3 within the next 6-12 month, then, it would be better to save a massive redirect and directly go for phpBB3.
You could as well alter the meta tag mod to make it work fully outside the phpbb_seo class, you'd only have to rename every "phpbb_seo" you find in the mod (phpbb_seo.php standalone version file included) with let's say meta_tag and you'd be good to go without any more change (worth a local test though to make sure you did not missed any occurrences). |
_________________
|
|
| Back to top |
|
 |
diabolic.bg

Joined: 04 Feb 2008 Posts: 47 Location: Bulgaria
|
Posted: Fri Feb 15, 2008 3:53 pm Post subject: Re: Problem with GYM Sitemaps.xml |
|
|
I have installed able2know mod because nobody don't give me answer here, but if I have a solution, I will uninstall it. I don't like mixing. My charset is win-1251 and I choose Simple rewrite mod. If is possible I can install Mixed mod rewrite with some help of course. I don't understand .htaccess commands.
I dont have intention to go for phpBB3 - i have many installed mod and many design changes, I like my board and my users too and we don't want to change it.
I will wait for your help and will do all necessary.  |
|
|
| Back to top |
|
 |
SeO Administrateur - Site Admin

Joined: 15 Mar 2006 Posts: 3089
|
Posted: Fri Feb 15, 2008 4:37 pm Post subject: Re: Problem with GYM Sitemaps.xml |
|
|
| diabolic.bg wrote: | | I have installed able2know mod because nobody don't give me answer here, |
No answer is pretty far from truth.
Something I did not noticed at first is that you added the phpbb_seo.php (the complete one, from the mod rewrite) code in the one you already had, the standalone meta tag version.
http://www.phpbb-seo.com/boards/simple-mod-rewrite/discussions-vt2094.html#14419
| dcz wrote: | Your .htaccess should work in the htdocs/ dir.
About the meta tag, you need to do as if you installed the meta tag mod not in standalone mode, this only means that you need to take the original phpbb_seo_class.php file and add the code changes for this file from the meta tag mod, and you'll be done
++ |
That really is it, you need to take the original phpbb_seo.php file from the mod rewrite package and then, apply the code changes for the meta tag mod you'll find in the meta tag mod install file, not the standalone ones of course.
Declaring two time the same class was most likely the reason for the blank page, you should have seen it in your php error logs.
Now, making up your mind fast is a good option, you do not want SE to start indexing able2know urls if you are about to install one of our mods, it's actually better to keep the original urls until you make it (because it's of course doable) if you decide so, since the zero duplicate (you'd need to install it as well) will properly redirect them without any additional set up.
It's bad luck since you would not have had any trouble if you had first installed our mod rewrite, the meta tag mod can be tricky and was in your case. |
_________________
|
|
| Back to top |
|
 |
diabolic.bg

Joined: 04 Feb 2008 Posts: 47 Location: Bulgaria
|
Posted: Fri Feb 15, 2008 4:49 pm Post subject: Re: Problem with GYM Sitemaps.xml |
|
|
| SeO wrote: |
Now, making up your mind fast is a good option, you do not want SE to start indexing able2know urls if you are about to install one of our mods, it's actually better to keep the original urls until you make it (because it's of course doable) if you decide so, since the zero duplicate (you'd need to install it as well) will properly redirect them without any additional set up.
It's bad luck since you would not have had any trouble if you had first installed our mod rewrite, the meta tag mod can be tricky and was in your case. |
Well I will uninstall able2know mod rigth now but who rewrite mod you will reccommend me? |
Last edited by diabolic.bg on Fri Feb 15, 2008 5:03 pm; edited 2 times in total |
|
| Back to top |
|
 |
SeO Administrateur - Site Admin

Joined: 15 Mar 2006 Posts: 3089
|
Posted: Fri Feb 15, 2008 4:59 pm Post subject: Re: Problem with GYM Sitemaps.xml |
|
|
Well, it's something to think about, there are three mod rewrite because there is no final answer about the best url rewriting standard, it really is up to both the topic covered in your forum and the effort you'll be ready to put into moderation.
This thread can give you more clues on how to choose : http://www.phpbb-seo.com/boards/phpbb-seo-toolkit/phpbb-seo-mod-rewrites-vt66.html
What is for sure is that you should not do things to fast when it comes to SEO, it's no big deal if you even take a month to test the various solution and / or to understand more things about them, but it can be quite bad SEOwise if you let's say install the simple mod, then, the advanced couple week after, and couple month after go for the mixed one because you find out your topic title are very bad.
Take your time, and before you go online, perform local test as you did, and you'll see it's pretty simple in the end, it's just that SEO is more than just installing a mod, many things do matter.
If you need more help about mod rewrite, maybe it is time to use another forum. |
_________________
|
|
| Back to top |
|
 |
diabolic.bg

Joined: 04 Feb 2008 Posts: 47 Location: Bulgaria
|
Posted: Fri Feb 15, 2008 5:07 pm Post subject: Re: Problem with GYM Sitemaps.xml |
|
|
| SeO wrote: | Well, it's something to think about, there are three mod rewrite because there is no final answer about the best url rewriting standard, it really is up to both the topic covered in your forum and the effort you'll be ready to put into moderation.
This thread can give you more clues on how to choose : http://www.phpbb-seo.com/boards/phpbb-seo-toolkit/phpbb-seo-mod-rewrites-vt66.html
What is for sure is that you should not do things to fast when it comes to SEO, it's no big deal if you even take a month to test the various solution and / or to understand more things about them, but it can be quite bad SEOwise if you let's say install the simple mod, then, the advanced couple week after, and couple month after go for the mixed one because you find out your topic title are very bad.
Take your time, and before you go online, perform local test as you did, and you'll see it's pretty simple in the end, it's just that SEO is more than just installing a mod, many things do matter.
If you need more help about mod rewrite, maybe it is time to use another forum. |
Hey, it is GREAT!!! As I remove able2know mod and my sitemaps.xml now is working! Yaho-o-o-o!
Thank you so much!!!
This is my indexsitemaps.
Now I will submit my maps to Google and will read all for rewrite mods. And will think of course. Now I have a hope!
And will write for mod rewrite in respective topic.
Thanks again! |
|
|
| Back to top |
|
 |
diabolic.bg

Joined: 04 Feb 2008 Posts: 47 Location: Bulgaria
|
Posted: Thu Feb 21, 2008 6:53 pm Post subject: Re: Problem with GYM Sitemaps.xml |
|
|
Hi!
I have a question about rss.xml. Why my rss.xml don't remember my site's name?
I write it more then 10 times... And now in the source code I see <title></title>. Site description is stored. |
|
|
| Back to top |
|
 |
SeO Administrateur - Site Admin

Joined: 15 Mar 2006 Posts: 3089
|
Posted: Thu Feb 21, 2008 9:54 pm Post subject: Re: Problem with GYM Sitemaps.xml |
|
|
Er, this could be a bug with the installer. Make sure that you have the rss_sitename and rss_site_desc field in the phpbb_ggs_config table.
If not, add them (pretty easy with phpMyadmin) and you'll be good to go. |
_________________
|
|
| Back to top |
|
 |
diabolic.bg

Joined: 04 Feb 2008 Posts: 47 Location: Bulgaria
|
Posted: Fri Feb 22, 2008 7:31 am Post subject: Re: Problem with GYM Sitemaps.xml |
|
|
| SeO wrote: | Er, this could be a bug with the installer. Make sure that you have the rss_sitename and rss_site_desc field in the phpbb_ggs_config table.
If not, add them (pretty easy with phpMyadmin) and you'll be good to go. |
No, I don't have a rss_sitename. I have added it. Thanks for your help!
EDIT
OMG! What's now wrong? If I click on Source link somewhere in my rss.xml, I get error like this:
| Quote: | Warning: file_get_contents(http://www.phpbb-seo.com/yahoo.php?appid=dimov.ivaylo&url=http://wasteland-bg.com/phpbb2/forum-rss2-l.xml) [function.file-get-contents]: failed to open stream: HTTP request failed! HTTP/1.1 404 Not Found in C:\xAmp\xampp\htdocs\phpbb2\mx_ggsitemaps\includes\ggs_functions.php on line 632
Warning: Cannot modify header information - headers already sent by (output started at C:\xAmp\xampp\htdocs\phpbb2\mx_ggsitemaps\includes\ggs_functions.php:632) in C:\xAmp\xampp\htdocs\phpbb2\mx_ggsitemaps\includes\ggs_functions.php on line 1237
Warning: Cannot modify header information - headers already sent by (output started at C:\xAmp\xampp\htdocs\phpbb2\mx_ggsitemaps\includes\ggs_functions.php:632) in C:\xAmp\xampp\htdocs\phpbb2\mx_ggsitemaps\includes\ggs_functions.php on line 1241
Warning: Cannot modify header information - headers already sent by (output started at C:\xAmp\xampp\htdocs\phpbb2\mx_ggsitemaps\includes\ggs_functions.php:632) in C:\xAmp\xampp\htdocs\phpbb2\mx_ggsitemaps\includes\ggs_functions.php on line 1242
500 Internal Server Error :
Íàòúêíàõòå ñå íà Ãðåøêà! Ìîëÿ óâåäîìåòå àäìèíèñòðàòîðèòå!
The request to Yahoo notify failed with both curl and file_get_contents method.
Please check your allow_url_fopen status in your php.ini file. |
Before this error don't appears. Here is my rss.xml.
In my php.ini file the string is:
| Quote: | ; Whether to allow the treatment of URLs (like http:// or ftp://) as files.
allow_url_fopen = On |
EDIT2
If Yahoo! Notifications are turned OFF, I don't have error. Yesterday evening I turn it ON.
Another problem: If I examine another rss map (for example forum-rss41.xml) and click on title (Wasteland's tales RPG - форумно РПГ на Бункера - RSS Feed) the link is not work - Error 404.  |
|
|
| Back to top |
|
 |
dcz Administrateur - Site Admin

Joined: 28 Apr 2006 Posts: 13354
|
|
| Back to top |
|
 |
diabolic.bg

Joined: 04 Feb 2008 Posts: 47 Location: Bulgaria
|
Posted: Mon Feb 25, 2008 2:38 pm Post subject: Re: Problem with GYM Sitemaps.xml |
|
|
| dcz wrote: | Looks like everything is working great now.
Yahoo notification is bugged in this version, it's not very useful anyway.
++ |
Thanks! I already registered my feed in Yahoo and don't need from a notification. What do you think about the problem with title links? |
|
|
| Back to top |
|
 |
dcz Administrateur - Site Admin

Joined: 28 Apr 2006 Posts: 13354
|
|
| Back to top |
|
 |
diabolic.bg

Joined: 04 Feb 2008 Posts: 47 Location: Bulgaria
|
Posted: Mon Feb 25, 2008 6:14 pm Post subject: Re: Problem with GYM Sitemaps.xml |
|
|
Maybe I give you a bad explanation. For example forum-rss2 - see screenshot. This link \and all as him\ give me error 404.
Source code:
| Code: | <rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/">
<channel>
<title>РАДИОАКТИВНА КЛЮКАРНИЦА - VAULT TEC RSS НОВИНИ</title>
<link>http://wasteland-bg.com/phpbb2/forum2</link>
<description> |
The link code isn't correct. Where is my problem? |
|
|
| Back to top |
|
 |
dcz Administrateur - Site Admin

Joined: 28 Apr 2006 Posts: 13354
|
|
| Back to top |
|
 |
|
|
| Navigation |
Similar Topics |
|
|
|
|
|
|
|