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  
 
   
Topic notification double url problem

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



Joined: 26 Oct 2006
Posts: 6

Topic notification double url problemPosted: Thu Oct 26, 2006 12:59 pm    Post subject: Topic notification double url problem

Hi I am testing your advanced and middel version url rewrite for phpbb and is good, but I see that both have problem.

If a member asks to be notified of a post *watch topic* then the url sent by phpbb is

viewtopic.php?p=12#12

and not the rewrite

This is problem and could lead to double content

Thank you for time and responses
Back to top
dcz
Administrateur - Site Admin
Administrateur - Site Admin


Joined: 28 Apr 2006
Posts: 14403

Topic notification double url problemPosted: Thu Oct 26, 2006 2:31 pm    Post subject: Re: Topic notification double url problem

And welcome Very Happy

Actually, if you have installed the robots.txt as suggested, this won't be the case, but this is only for before the public release of the zero dupe Wink

Anyway, this particular feature could be added in the next update, as a cosmetic one since it's not really a SEO threat.

++

_________________
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
mreider
phpBB SEO Team
phpBB SEO Team


Joined: 07 May 2006
Posts: 219

Topic notification double url problemPosted: Sun Nov 05, 2006 5:11 pm    Post subject: Re: Topic notification double url problem

Is it a relatively simple thing to do, to get it to show the proper URL?
Back to top
dcz
Administrateur - Site Admin
Administrateur - Site Admin


Joined: 28 Apr 2006
Posts: 14403

Topic notification double url problemPosted: Mon Nov 06, 2006 10:50 am    Post subject: Re: Topic notification double url problem

All right, this is rather simple, here it goes :

Open :

Code:
includes/functions_post.php


Find :

Code:
               $topic_title = (count($orig_word)) ? preg_replace($orig_word, $replacement_word, unprepare_message($topic_title)) : unprepare_message($topic_title);


After add :

Code:
               // www.phpBB-SEO.com SEO TOOLKIT BEGIN
               $topic_title = (count($orig_word)) ? preg_replace($orig_word, $replacement_word, unprepare_message($topic_title)) : unprepare_message($topic_title);
               $paginated = $board_config['posts_per_page'];
               $pages = ceil($post_data['topic_replies'] / $paginated);
               $topic_url = $server_protocol . $server_name . $server_port . ( (trim($board_config['script_path'], "/") != '/') ? trim($board_config['script_path'], "/") : '' ) . '/' . format_url($topic_title)  . '-vt' . $topic_id .( ($pages > 1) ? '-' . $paginated * ($pages -1)  : '') . '.html' . '#' . $post_id;
               // www.phpBB-SEO.com SEO TOOLKIT END


Find :

Code:
                     'U_TOPIC' => $server_protocol . $server_name . $server_port . $script_name . '?' . POST_POST_URL . "=$post_id#$post_id",

Replace with :

Code:
                     // www.phpBB-SEO.com SEO TOOLKIT BEGIN
                     //'U_TOPIC' => $server_protocol . $server_name . $server_port . $script_name . '?' . POST_POST_URL . "=$post_id#$post_id",
                     'U_TOPIC' => $topic_url,
                     // www.phpBB-SEO.com SEO TOOLKIT END




Open :

Code:
posting.php


Find :

Code:
$sql = "SELECT f.*, t.topic_status, t.topic_title, t.topic_type
         FROM " . FORUMS_TABLE . " f, " . TOPICS_TABLE . " t
         WHERE t.topic_id = $topic_id
         AND f.forum_id = t.forum_id";


Replace with :
Code:
      // www.phpBB-SEO.com SEO TOOLKIT BEGIN
      $sql = "SELECT f.*, t.topic_status, t.topic_title, t.topic_replies, t.topic_type 
         FROM " . FORUMS_TABLE . " f, " . TOPICS_TABLE . " t
         WHERE t.topic_id = $topic_id
         AND f.forum_id = t.forum_id";
      // www.phpBB-SEO.com SEO TOOLKIT END


Find :

Code:
      $select_sql = (!$submit) ? ', t.topic_title, p.enable_bbcode, p.enable_html, p.enable_smilies, p.enable_sig, p.post_username, pt.post_subject, pt.post_text, pt.bbcode_uid, u.username, u.user_id, u.user_sig, u.user_sig_bbcode_uid' : '';


Replace With :
Code:
      // www.phpBB-SEO.com SEO TOOLKIT BEGIN
      $select_sql = (!$submit) ? ', t.topic_title, t.topic_replies, p.enable_bbcode, p.enable_html, p.enable_smilies, p.enable_sig, p.post_username, pt.post_subject, pt.post_text, pt.bbcode_uid, u.username, u.user_id, u.user_sig, u.user_sig_bbcode_uid' : '';
      // www.phpBB-SEO.com SEO TOOLKIT END


Find :

Code:
if ( $result = $db->sql_query($sql) )
{
   $post_info = $db->sql_fetchrow($result);
   $db->sql_freeresult($result);


After add :
Code:
      // www.phpBB-SEO.com SEO TOOLKIT BEGIN
   $post_data['topic_replies'] = $post_info['topic_replies'];
      // www.phpBB-SEO.com SEO TOOLKIT END


Note that these code changes are meant for the phpBB SEO advanced mod rewrite.

If you want to do this for the mixed or the simple one, you'll need to replace :

Code:
format_url($topic_title)  . '-vt'


With :

Code:
'topic'


In the suggested code changes.

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


Last edited by dcz on Sat Dec 16, 2006 1:02 am; edited 4 times in total
Back to top
Visit poster's website
dcz
Administrateur - Site Admin
Administrateur - Site Admin


Joined: 28 Apr 2006
Posts: 14403

Topic notification double url problemPosted: Mon Nov 06, 2006 9:11 pm    Post subject: Re: Topic notification double url problem

Small mystake, forgot the topic_id on its way, so it's fixed now Very Happy

Code:
               $topic_url = $server_protocol . $server_name . $server_port . ( (trim($board_config['script_path'], "/") != '/') ? trim($board_config['script_path'], "/") : '' ) . '/' . format_url($topic_title)  . '-vt' . $topic_id .( ($pages > 1) ? '-' . $paginated * ($pages -1)  : '') . '.html' . '#' . $post_id;

_________________
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
mreider
phpBB SEO Team
phpBB SEO Team


Joined: 07 May 2006
Posts: 219

Topic notification double url problemPosted: Tue Nov 07, 2006 12:28 am    Post subject: Re: Topic notification double url problem

One thing I noticed in your code:

WHen you put the find:
Code:
$sql = "SELECT f.*, t.topic_status, t.topic_title, t.topic_type


in posting.php it should be:

find:
Code:
$sql = "SELECT f.*, t.topic_status, t.topic_title, t.topic_type
         FROM " . FORUMS_TABLE . " f, " . TOPICS_TABLE . " t
         WHERE t.topic_id = $topic_id
         AND f.forum_id = t.forum_id";


Otherwise you leave those extra sql querues and get an error in posting.php Smile Seems to be working otherwise!
Back to top
dcz
Administrateur - Site Admin
Administrateur - Site Admin


Joined: 28 Apr 2006
Posts: 14403

Topic notification double url problemPosted: Tue Nov 07, 2006 1:08 am    Post subject: Re: Topic notification double url problem

You're right, I am so stubborn some times Laughing

_________________
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
mikey67



Joined: 26 Oct 2006
Posts: 6

Topic notification double url problemPosted: Tue Nov 14, 2006 3:07 am    Post subject: Re: Topic notification double url problem

thanks works
Back to top
mikey672



Joined: 15 Dec 2006
Posts: 24

Topic notification double url problemPosted: Fri Dec 15, 2006 11:41 pm    Post subject: Re: Topic notification double url problem

i think this is what is causing my posting problem.
i can not edit or delete posts

it says


There is no such post. Please return and try again.


this is last thing done and all was working i am sure before
Back to top
dcz
Administrateur - Site Admin
Administrateur - Site Admin


Joined: 28 Apr 2006
Posts: 14403

Topic notification double url problemPosted: Fri Dec 15, 2006 11:49 pm    Post subject: Re: Topic notification double url problem

Yes, it's beta and there is still a small pagination bug, but it only concerns the links sent by the notification under some circumstances, you can still browse the topic and go to the last post.

++

_________________
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
mikey672



Joined: 15 Dec 2006
Posts: 24

Topic notification double url problemPosted: Sat Dec 16, 2006 12:03 am    Post subject: Re: Topic notification double url problem

dcz no this is worse

i can not now edit or delete any posts
Back to top
mikey672



Joined: 15 Dec 2006
Posts: 24

Topic notification double url problemPosted: Sat Dec 16, 2006 1:00 am    Post subject: Re: Topic notification double url problem

dcz i think problem is here

you say find

$select_sql = (!$submit) ? ', t.topic_title, t.topic_url, p.enable_bbcode, p.enable_html, p.enable_smilies, p.enable_sig, p.post_username, pt.post_subject, pt.post_text, pt.bbcode_uid, u.username, u.user_id, u.user_sig, u.user_sig_bbcode_uid' : '';

this is not the phpbb standard it is

$select_sql = (!$submit) ? ', t.topic_title, p.enable_bbcode, p.enable_html, p.enable_smilies, p.enable_sig, p.post_username, pt.post_subject, pt.post_text, pt.bbcode_uid, u.username, u.user_id, u.user_sig, u.user_sig_bbcode_uid' : '';


do i need this t.topi_url ??? it seems to work without it
Back to top
dcz
Administrateur - Site Admin
Administrateur - Site Admin


Joined: 28 Apr 2006
Posts: 14403

Topic notification double url problemPosted: Sat Dec 16, 2006 1:02 am    Post subject: Re: Topic notification double url problem

You're right my fault.

Post edited.

++

_________________
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
mikey672



Joined: 15 Dec 2006
Posts: 24

Topic notification double url problemPosted: Sat Dec 16, 2006 1:08 am    Post subject: Re: Topic notification double url problem

good i will do testing now and report status
Back to top
lavinya
PR1
PR1


Joined: 24 Jul 2006
Posts: 159
Location: Turkey

Topic notification double url problemPosted: Sat Feb 10, 2007 3:59 pm    Post subject: Re: Topic notification double url problem

phpBB SEO Advanced mod Rewrite 0.2.2
phpBB SEO Zero duplicate - phpBB SEO Advanced mod Rewrite version 0.2.2
compatible?

and above which code add?
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: