mod_rewrite on download mod

Discussions and support about the different URL Rewriting techniques for phpBB2.

Moderator: Moderators


mod_rewrite on download mod

Postby mgl » Sun Apr 06, 2008 5:32 pm

Do you have a mod for mod_rewrite on download mod?


cheers
mgl
 
Posts: 23
Joined: Sun Sep 30, 2007 2:18 pm

Advertisement

Postby dcz » Wed Apr 16, 2008 11:39 am

We should have had one long ago, but, never found time to release it.

If you are willing to code and put together a patch, I could provide with the code already written, and by the way, used here : http://downloads.phpbb-seo.com/

++
Useful links :
SEO Forum || SEO Directory || SEO phpBB || Search
____________________

Liens Utiles :
Forum référencement || Annuaire référencement || Référencement phpBB || Recherche
dcz
Admin
Admin
 
Posts: 19930
Joined: Fri Apr 28, 2006 9:03 pm

Postby mgl » Wed Apr 16, 2008 10:03 pm

Sure. If I code it for me, then I don't have any problem sharing it
mgl
 
Posts: 23
Joined: Sun Sep 30, 2007 2:18 pm

Postby dcz » Thu Apr 17, 2008 8:19 am

The end of phpBB2 was officially announced yesterday, this confirm that we should not work to hard on phpBB2 anymore.

So here are some DL links, these are snapshots of the last working copy, they should work with phpBB2 + phpBB2 SEO mod rewrite and the corresponding zero dupe :
http://www.phpbb-seo.com/downloads/phpB ... _int03.zip
http://www.phpbb-seo.com/downloads/Ultr ... 0INT02.zip

The ultra advanced version will simulate a folder structure, like on phpBB SEO.

Install may contain some typos, to be tested before using online, if you clean up the install, write a nice release thread and validate the mod, we can release the mod with you as co-author.

Until then, the code is provided as is, and will not be supported.

++
Useful links :
SEO Forum || SEO Directory || SEO phpBB || Search
____________________

Liens Utiles :
Forum référencement || Annuaire référencement || Référencement phpBB || Recherche
dcz
Admin
Admin
 
Posts: 19930
Joined: Fri Apr 28, 2006 9:03 pm

phpBB SEO Ultra Advanced mod Rewrite

Postby Skillz » Thu Oct 16, 2008 4:36 am

Ok, I realize that PhpBB2 isn't supported anymore, but I really do not want to have to upgrade my forums to the new version. Not really satisfied with what the new version has to offer, so I'm going to stick with Phpbb2.

With that being said, I tried to install the SEO mod rewrite for the Download mod, but to my dismay I got some errors. This line here was not found in the phpbb_seo/phpbb_seo_class.php

Code: Select all
#
#-----[ FIND ]------------------------------------------
# I know this sucks ;-)

         return $this->url . $html_anchor;

#
#-----[ BEFORE, ADD ]------------------------------------------
#

         if ($this->dlmod) {
            $this->url =  ROOT_URL . ( (strpos($this->url, $this->dl_seo_static['dl_index']) !==FALSE) ? '' : PHPBB_SCRIPT ). $this->url;
         }


The closest part I could find to this is this bit of code here:

Code: Select all
   /**
   * Rewrite URLs.
   * Allow adding of many more cases than just the
   * regular phpBB URL rewritting without slowing up the process.
   */
   function url_rewrite($url, $non_html_amp = FALSE) {
      global $phpEx;
      $this->url = $this->url_in = $url;
      if ( strpos($this->url, ".$phpEx") === FALSE || defined('IN_ADMIN') || defined('IN_LOGIN') ) {
         return $url;
      }
      // Grabb params
      $this->url = str_replace('&', '&', $this->url);
      $parsed_url = @parse_url($this->url);
      parse_str($parsed_url['query'], $this->get_vars);
      $this->file = basename($parsed_url['path']);
      $this->path = trim(trim(dirname($parsed_url['path']), "."),  "/");
      $this->path = (!empty($this->path)) ? ( isset( $this->seo_path['PathToUrl'][$this->path . '/'] ) ? $this->seo_path['PathToUrl'][$this->path . '/'] : $this->path . '/' ) : '';
      $this->filename = trim(str_replace(".$phpEx", "", $this->file));
      if ( in_array($this->filename, $this->seo_stop_files) ) {
         return $url;
      }
      // Reset $url
      $this->url = $this->file;
      if ( @method_exists($this, $this->filename) ) {
         $this->{$this->filename}();
         // Assamble URL
         $this->url .= $this->query_string($this->get_vars);
         //$this->url = (!$non_html_amp) ? str_replace('&', '&', $this->url) : $this->url;
         return $this->path . $this->url . ((!empty($parsed_url['fragment'])) ? "#" . $parsed_url['fragment'] : '');
      } else {
         return $url;
      }
   }


I think it goes in there somewhere, but I am not sure where. Anyone willing to help me out?
Skillz
 
Posts: 14
Joined: Thu Oct 16, 2008 2:27 am

Postby dcz » Sat Oct 18, 2008 9:28 am

That would be before :
Code: Select all
         return $this->path . $this->url . ((!empty($parsed_url['fragment'])) ? "#" . $parsed_url['fragment'] : '');


But I still encourage you to consider converting to phpBB3, because phpBB2 does not officially support php5 and php4 is about to be discontinued so, time will surely come where you'll have to convert, and the later the harder.

That's how sad it is man, the end of phpBB2.
I don't agree though about phpBB3, phpBB3 is just wonderful IMHO.

++
Useful links :
SEO Forum || SEO Directory || SEO phpBB || Search
____________________

Liens Utiles :
Forum référencement || Annuaire référencement || Référencement phpBB || Recherche
dcz
Admin
Admin
 
Posts: 19930
Joined: Fri Apr 28, 2006 9:03 pm

Postby Skillz » Sat Oct 18, 2008 9:41 am

Thank you for the reply, I will have to apply these settings all over again and see what happens. I was just about to go get some sleep, so I can't do it now. Though I should have it done when I wake up or get home from work tomorrow.

Thanks again,
Skillz

PS
I know I will soon be forced to switch to Phpbb3. Though I think when that time finally comes, I will just go with different forum software. :(
Skillz
 
Posts: 14
Joined: Thu Oct 16, 2008 2:27 am

Postby dcz » Sat Oct 18, 2008 1:46 pm

Why that, phpBB3 is just great, have you seen our demo server with the SEO premod installed ?

++
Useful links :
SEO Forum || SEO Directory || SEO phpBB || Search
____________________

Liens Utiles :
Forum référencement || Annuaire référencement || Référencement phpBB || Recherche
dcz
Admin
Admin
 
Posts: 19930
Joined: Fri Apr 28, 2006 9:03 pm

Postby Skillz » Tue Oct 21, 2008 1:42 am

This is the error I am getting:

Code: Select all
The requested URL /ROOT_URLdownloads/monster-hunt-files-3/ was not found on this server.

Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the reque


Not sure where I went wrong. :? :?
Skillz
 
Posts: 14
Joined: Thu Oct 16, 2008 2:27 am

Postby dcz » Sun Oct 26, 2008 10:47 am

Looks like ROOT_URL is not defined, sorry about this, the mod never was fully finished even though the code is used on phpBB SEO.

So, in common.php, add :
Code: Select all
define('ROOT_URL', $phpbb_seo->seo_path['root_url']);

before :
Code: Select all
?>


Should do it ;)

++
Useful links :
SEO Forum || SEO Directory || SEO phpBB || Search
____________________

Liens Utiles :
Forum référencement || Annuaire référencement || Référencement phpBB || Recherche
dcz
Admin
Admin
 
Posts: 19930
Joined: Fri Apr 28, 2006 9:03 pm

Postby Skillz » Sun Oct 26, 2008 6:45 pm

Ok got that part fixed, now I am getting this

Code: Select all
Fatal error: Call to undefined method phpbb_seo::seo_req_uri() in /home/planetmo/public_html/downloads.php on line 259


Also when I go to the downloads categories page, there is no formatting. When I say formatting, I mean no colors, images or anything of that nature displayed. It just shows all the text.
Skillz
 
Posts: 14
Joined: Thu Oct 16, 2008 2:27 am

Postby dcz » Sun Nov 02, 2008 10:45 am

The error just comes from the fact this install includes the zero duplicate steps together with the mod rewrite, so you need to install the zero duplicate mod too, which by the way is a good thing to do for the forum as well.

Then remember that this code was really released as is, it's almost functional and should wok with few corrections, but it's better if you know a bit of code to use it.
Consider the install as beta even though the mod can work very well (we are using it here), but the install file never really was finished for public release, it's just that we are not willing to spend too much time on phpBB2 any more.

++
Useful links :
SEO Forum || SEO Directory || SEO phpBB || Search
____________________

Liens Utiles :
Forum référencement || Annuaire référencement || Référencement phpBB || Recherche
dcz
Admin
Admin
 
Posts: 19930
Joined: Fri Apr 28, 2006 9:03 pm

Postby Skillz » Sun Nov 02, 2008 7:24 pm

I am trying to give Phpbb3 a chance. Though I can not seem to find the SEO URls for the phpbb3 download mod version.
Skillz
 
Posts: 14
Joined: Thu Oct 16, 2008 2:27 am

Postby dcz » Mon Nov 03, 2008 1:28 pm

Not yet, but we're working on it to convert phpBB SEO, and we will this time release the mod ;)

Since it will be zero duped, you can safely start using it now, it will only be better once we'll have released the SEO URL mod for it ;)

++
Useful links :
SEO Forum || SEO Directory || SEO phpBB || Search
____________________

Liens Utiles :
Forum référencement || Annuaire référencement || Référencement phpBB || Recherche
dcz
Admin
Admin
 
Posts: 19930
Joined: Fri Apr 28, 2006 9:03 pm

Postby Skillz » Mon Nov 03, 2008 9:04 pm

So far Phpbb3 isn't THAT bad. 8)

Much better than the beta I tried a couple years ago.
Skillz
 
Posts: 14
Joined: Thu Oct 16, 2008 2:27 am

Next

Return to phpBB2 mod Rewrite

 


  • Related topics
    Replies
    Views
    Last post

Who is online

Users browsing this forum: No registered users and 3 guests


 
cron