phpBB SEO
Boards
Directory  
SEO  
Downloads
  phpBB SEO : Search Engine Optimization, Directory, Forums  
Index
Forums
Annuaire
Référencement
Télécharger
 
  Search Rechercher
    Register
Username :  Password :  Log me on automatically each visit  
S'enregistrer  
 
   
phpBB SEO advanced (phpBB2) - error with $phpbb_root_path

 
Post new topic   Reply to topic    phpBB SEO » SEO Forum  » phpBB mod Rewrite
::  
Author Message
pozmu



Joined: 06 Nov 2007
Posts: 2

phpBB SEO advanced (phpBB2) - error with $phpbb_root_pathPosted: Tue Nov 06, 2007 8:01 pm    Post subject: phpBB SEO advanced (phpBB2) - error with $phpbb_root_path

Hi

I found that if $phpbb_root_path = "../../../" phpBB SEO will modify it to the form of "../" which is wrong. My temporary solution is to change it to "./../../.././" which will work, because phpBB SEO wil modify it to "../../../" which is what we want. With phpBB2 without phpBB SEO the first form of path will work correctly.

Example - temp.php:
Code:
<?php
$phpbb_root_path = '../../../';

//
// prevent hacking attempts - phpBB needs this line to work
//

define ('IN_PHPBB', true);

//
// lets make a little check if your root_path is correct ;-)
//

if (!file_exists($phpbb_root_path . 'extension.inc'))
{
   die ('<tt><b>phpBB Fetch All:</b>
      $phpbb_root_path is wrong and does not point to your forum.</tt>');
}

//
// now we include (integrate) some files which we need
//

//
// this is a phpBB file
//

include_once ($phpbb_root_path . 'extension.inc');

//
// again a phpBB file
//

include_once ($phpbb_root_path . 'common.' . $phpEx);

//
// phpBB file, too
//

include_once ($phpbb_root_path . 'includes/bbcode.' . $phpEx);

$userdata = session_pagestart($user_ip, PAGE_INDEX);
init_userprefs($userdata);
$seo_topic_name = "Test topic";
$news[$i]['topic_id'] = 8;
   if ( !isset($phpbb_seo->seo_url['topic'][$news[$i]['topic_id']]) ) {
      $phpbb_seo->seo_url['topic'][$news[$i]['topic_id']] = $phpbb_seo->format_url($seo_topic_name);
   }
   
   echo append_sid($phpbb_root_path . 'viewtopic.php?t=' . $news[$i]['topic_id']);


?>



Output:
Code:
../test-topic-t8.html




[ Topic moved to the correct forum. - Peter ]
Back to top
dcz
Administrateur - Site Admin
Administrateur - Site Admin


Joined: 28 Apr 2006
Posts: 13354

phpBB SEO advanced (phpBB2) - error with $phpbb_root_pathPosted: Thu Nov 08, 2007 4:40 pm    Post subject: Re: phpBB SEO advanced (phpBB2) - error with $phpbb_root_path

That's indeed a problem dealing with the way I first tried to deal with $phpbb_root_path being sent to append_sid().

This does not occur with the phpBB3 version.

As a quick fix you could use :

Code:
$phpbb_seo->seo_path['phpbb_url'] . append_sid('viewtopic.php?t=' . $news[$i]['topic_id'])


instead of :

Code:
append_sid($phpbb_root_path . 'viewtopic.php?t=' . $news[$i]['topic_id'])


until we back-port some of the phpBB3 versions improvements on the phpBB2 mod rewrite.

++

_________________
Useful links :
SEO Forum || SEO Directory || SEO phpBB || SEO phpBB3 || Search
____________________

Liens Utiles :
Forum référencement || Annuaire référencement || Référencement phpBB || Référencement phpBB3 || Recherche
Back to top
Visit poster's website
sai



Joined: 06 Jun 2008
Posts: 1

phpBB SEO advanced (phpBB2) - error with $phpbb_root_pathPosted: Fri Jun 06, 2008 9:14 pm    Post subject: Re: phpBB SEO advanced (phpBB2) - error with $phpbb_root_path

Hi,

[EDIT]

For now I've resorted to an alternative script called phpBB Latest Topic Displayer. Incase anyone has the same problem as me.

[/EDIT]

Has anyone been able to get the PHPBB Fetch All / FetchAll mod to work with PHPBB v2 SEO mod?

I downloaded SEO Mod and installed today. I used this version:
http://www.hm2k.com/projects/phpbb-seo-easymod

I tried all the suggestions in this thread and scoured the net for other suggestions but can't find anything that works. I always just get the error:

Quote:
phpBB Fetch All: $phpbb_root_path is wrong and does not point to your forum.


Thanks for any help.
Back to top
dcz
Administrateur - Site Admin
Administrateur - Site Admin


Joined: 28 Apr 2006
Posts: 13354

phpBB SEO advanced (phpBB2) - error with $phpbb_root_pathPosted: Mon Jun 09, 2008 9:03 am    Post subject: Re: phpBB SEO advanced (phpBB2) - error with $phpbb_root_path

sai wrote:

Quote:
phpBB Fetch All: $phpbb_root_path is wrong and does not point to your forum.




It may have been the case actually, in phpBB Fetch All script, you need to configure the relative path from the script to the forum dir, by default it's "./", but you need to change it in case you phpBB Fetch All script is not in the same dir Wink

_________________
Useful links :
SEO Forum || SEO Directory || SEO phpBB || SEO phpBB3 || Search
____________________

Liens Utiles :
Forum référencement || Annuaire référencement || Référencement phpBB || Référencement phpBB3 || Recherche
Back to top
Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    phpBB SEO » SEO Forum  » phpBB mod Rewrite
Page 1 of 1

Navigation Similar Topics

Jump to: