Rewrite of phpBB3 Gallery index.php

phpBB3 SEO Advanced mod Rewrite support forum.
This mods performs URL rewriting for phpBB, injecting forums and topic titles in their URLs.

Moderator: Moderators

Postby GoBieN » Tue Apr 29, 2008 8:48 pm

Just installed phpBB Gallery 0.3.1 on phpBB 3.0.1 SEO PREMOD and i followed my directions, and it's working. So still ok for newest versions.

Just know, that i had to adjust the gallery install script to get it to work. Because the script asumes that the module ID's are the same for everyone. And with the SEO premod, the module ID's of like UCP_MAIN and ACP_CAT_DOT_MODS are different. I adjuested the script you can find my script here: http://www.flying-bits.org/viewtopic.ph ... 1515#p1515
GoBieN
PR1
PR1
 
Posts: 124
Joined: Mon Mar 10, 2008 7:12 pm
Location: Belgium

Advertisement

Postby dcz » Tue May 06, 2008 10:26 am

Looks like you fixed the gallery installer. It should not assume that id's are the same for all IMHO.

The gallery mods is now really looking great, I shall work on urls one of this days ;)
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: 21407
Joined: Fri Apr 28, 2006 9:03 pm

Postby Stitch » Sun May 25, 2008 9:06 am

Salut,

Je viens de faire les modifs pour adapter phpbb gallery 0.3.1 avec les dernier seo mais je me retrouve avec cette erreur dans le header

Code: Select all
[phpBB Debug] PHP Notice: in file /gallery/gallery.php on line 92: Division by zero
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 3598: Cannot modify header information - headers already sent by (output started at /includes/functions.php:2991)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 3600: Cannot modify header information - headers already sent by (output started at /includes/functions.php:2991)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 3601: Cannot modify header information - headers already sent by (output started at /includes/functions.php:2991)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 3602: Cannot modify header information - headers already sent by (output started at /includes/functions.php:2991)


Autre probleme, je n'ai pas pu faire la modif dans "phpbb_seo_class.php"

GoBieN wrote:in php_seo_class.php
FIND:

Code: Select all
if ( !$user->data['is_registered'] ) {
            if ( $this->seo_opt['rem_sid'] ) {
               unset($this->get_vars['sid']);
            }
            if ( $this->seo_opt['rem_hilit'] ) {
               unset($this->get_vars['hilit']);
            }
      }

REPLACE WITH:

Code: Select all
if (!defined('IN_GALLERY')){
         if ( !$user->data['is_registered'] ) {
            if ( $this->seo_opt['rem_sid'] ) {
               unset($this->get_vars['sid']);
            }
            if ( $this->seo_opt['rem_hilit'] ) {
               unset($this->get_vars['hilit']);
            }
         }
      }

Stitch
 
Posts: 27
Joined: Wed May 23, 2007 4:20 pm

Postby SeO » Sun May 25, 2008 1:22 pm

You do not seem to use the proper version of the gallery mod, try the one from http://www.flying-bits.org
SeO
Admin
Admin
 
Posts: 6334
Joined: Wed Mar 15, 2006 9:41 pm

Postby Stitch » Sun May 25, 2008 2:16 pm

Ok c'est bon sa fonction merci beaucoup
Stitch
 
Posts: 27
Joined: Wed May 23, 2007 4:20 pm

Fix in phpbb_seo_class.php for phpbb gallery 0.3.1

Postby danlanger » Tue Jul 22, 2008 12:18 am

Open: phpbb_seo/phpbb_seo_class.php

Find:
Code: Select all
if ( !$this->seo_opt['url_rewrite'] || strpos($this->path, 'adm/') !== false || defined('ADMIN_START') ) {
         return ($this->seo_cache[$url] = $url);
      }


After add:
Code: Select all
if ( !$this->seo_opt['url_rewrite'] || strpos($this->path, 'gallery/') !== false) {
         return ($this->seo_cache[$url] = $url);
      }


This seems to be a very easy way to fix the problem.

Best regards
Dan
danlanger
 
Posts: 1
Joined: Tue Jul 22, 2008 12:13 am

Postby dcz » Tue Jul 22, 2008 9:22 am

Yes, it's working as well.

You could just replace :

Code: Select all
if ( !$this->seo_opt['url_rewrite'] || strpos($this->path, 'adm/') !== false || defined('ADMIN_START') ) {
         return ($this->seo_cache[$url] = $url);
      }


with :

Code: Select all
if ( !$this->seo_opt['url_rewrite'] || strpos($this->path, 'adm/') !== false || defined('ADMIN_START') || strpos($this->path, 'gallery/') !== false) {
         return ($this->seo_cache[$url] = $url);
      }


to even go a bit faster ;)
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: 21407
Joined: Fri Apr 28, 2006 9:03 pm

Postby GoBieN » Tue Jul 22, 2008 4:41 pm

dcz wrote:Yes, it's working as well.

You could just replace :

Code: Select all
if ( !$this->seo_opt['url_rewrite'] || strpos($this->path, 'adm/') !== false || defined('ADMIN_START') ) {
         return ($this->seo_cache[$url] = $url);
      }


with :

Code: Select all
if ( !$this->seo_opt['url_rewrite'] || strpos($this->path, 'adm/') !== false || defined('ADMIN_START') || strpos($this->path, 'gallery/') !== false) {
         return ($this->seo_cache[$url] = $url);
      }


to even go a bit faster ;)


This code make a lot more sense then mine, and makes some of the edits i described not needed. To be more specific, this replaces the IN-GALLERY edits right ? (need affirmation on this)
GoBieN
PR1
PR1
 
Posts: 124
Joined: Mon Mar 10, 2008 7:12 pm
Location: Belgium

Postby dcz » Tue Jul 22, 2008 5:10 pm

Actually I think that you only need this.

By the way I'm almost done with a rewriting patch for this mod, I'm sure you'll appreciate 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: 21407
Joined: Fri Apr 28, 2006 9:03 pm

Postby GoBieN » Tue Jul 22, 2008 5:27 pm

dcz wrote:Actually I think that you only need this.

By the way I'm almost done with a rewriting patch for this mod, I'm sure you'll appreciate it ;)

++

I'm glad to here that. Will try it out as soon as it's out ;)
GoBieN
PR1
PR1
 
Posts: 124
Joined: Mon Mar 10, 2008 7:12 pm
Location: Belgium

Postby Silverado05 » Mon Sep 08, 2008 8:27 am

Did anyone come to a solid solution for this? I am using the same Gallery and I can not link to the Gallery from the link on the index page. It just refreshes the page because it is getting pointed to the index in the root instead of the index in the gallery dir.

-Thanks
Silverado05
PR0
PR0
 
Posts: 51
Joined: Sat Jul 01, 2006 8:38 pm
Location: Texas

Postby GoBieN » Tue Sep 09, 2008 11:27 am

Silverado05 wrote:Did anyone come to a solid solution for this? I am using the same Gallery and I can not link to the Gallery from the link on the index page. It just refreshes the page because it is getting pointed to the index in the root instead of the index in the gallery dir.

-Thanks


This seems to be the easiest fix:
Open: phpbb_seo/phpbb_seo_class.php
FIND
Code: Select all
if ( !$this->seo_opt['url_rewrite'] || strpos($this->path, 'adm/') !== false || defined('ADMIN_START') ) {
         return ($this->seo_cache[$url] = $url);
      }


REPLACE with :

Code: Select all
if ( !$this->seo_opt['url_rewrite'] || strpos($this->path, 'adm/') !== false || defined('ADMIN_START') || strpos($this->path, 'gallery/') !== false) {
         return ($this->seo_cache[$url] = $url);
      }



This instruction tell the SEO mod to leave all URL's that point to anything in the folder gallery alone. So it should work. Test it out ! I haven't tested this, because i used my instructions from the 1st page of this topic.

Basicly my solution was to rename the gallery file (index.php) to gallery.php and then i went trough all the code and changed the gallery/index.php to gallery/gallery.php. But someone said i should not use gallery.php because it's already used for the avatar gallery. So use gallery_index.php or something.

Ofcourse the album is not SEO friendly but it's working 100%
Dcz is working on a SEO friendly patch for the gallery.
GoBieN
PR1
PR1
 
Posts: 124
Joined: Mon Mar 10, 2008 7:12 pm
Location: Belgium

Postby tbxn » Fri Oct 03, 2008 6:57 pm

Hey dcz, has any progress been made on this patch?
tbxn
 
Posts: 11
Joined: Sun Aug 03, 2008 1:38 pm

Postby dcz » Sat Oct 04, 2008 3:12 pm

Actually quite a lot, but the solution implies to update the phpbb_seo class, making it path aware for files with the same name.

So what should occur is the patch to be released when we update the phpbb_seo class ;)

++
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: 21407
Joined: Fri Apr 28, 2006 9:03 pm

Postby tbxn » Sat Oct 04, 2008 4:14 pm

Great, that sounds like a much needed update. Hopefully that update can also address some of the viewonline issues as well. Thanks for all your hard work. I'm looking forward to this update.
tbxn
 
Posts: 11
Joined: Sun Aug 03, 2008 1:38 pm

PreviousNext

Return to Advanced SEO URL

 


  • Related topics
    Replies
    Views
    Last post

Who is online

Users browsing this forum: No registered users and 4 guests