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  
 
   
MKPortal Rewriting custom portal modules help!

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



Joined: 23 Jul 2007
Posts: 12

MKPortal Rewriting custom portal modules help!Posted: Mon May 26, 2008 6:49 pm    Post subject: MKPortal Rewriting custom portal modules help!

Can i know how would you do to translate this url (a portal URL) to the SEO url ?

viewtopic.php?f={$post['forum_id']}&t={$post['topic_id']}&p={$pid}#p{$pid}

Its a php string as u can see, variables are
$post['forum_id']
$post['topic_id']
$pid (post id) taken before with a query on the database.

I cant really sort it out,looked a little bit on the code but the portal just gets data from the posts table so i dont know how to do the seo url there.

I will post example code from mkportal get_last_posts function.
http://pastebin.com/m4f9c9b3d
Thanks in advance
Back to top
dcz
Administrateur - Site Admin
Administrateur - Site Admin


Joined: 28 Apr 2006
Posts: 14403

MKPortal Rewriting custom portal modules help!Posted: Sat May 31, 2008 1:54 pm    Post subject: Re: MKPortal Rewriting custom portal modules help!

Problem here is that the module does not query for topic titles, only post ones, so it's not patchable without rewriting most of it.

It would no necessarily be complicated, but I do not have any mkportal install right now.

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



Joined: 23 Jul 2007
Posts: 12

MKPortal Rewriting custom portal modules help!Posted: Sat May 31, 2008 4:10 pm    Post subject: Re: MKPortal Rewriting custom portal modules help!

well, making a query is not a problem, just tell me what would you do if you had that data available; i'll try to sort out the rest.
Back to top
dcz
Administrateur - Site Admin
Administrateur - Site Admin


Joined: 28 Apr 2006
Posts: 14403

MKPortal Rewriting custom portal modules help!Posted: Mon Jun 02, 2008 9:36 am    Post subject: Re: MKPortal Rewriting custom portal modules help!

Basically, you just need to grab the title to inject before you build the link with append_sid, there is a complete example of this for the advanced mod rewrite in viewtopic.php :

Code:
$forum_id = (int) $topic_data['forum_id'];
$topic_id = (int) $topic_data['topic_id'];
// www.phpBB-SEO.com SEO TOOLKIT BEGIN
if ( empty($phpbb_seo->seo_url['topic'][$topic_id]) ) {
   if ($topic_data['topic_type'] == POST_GLOBAL) {
      $phpbb_seo->seo_opt['topic_type'][$topic_id] = POST_GLOBAL;
   }
   $phpbb_seo->seo_censored[$topic_id] = censor_text($topic_data['topic_title']);
   $phpbb_seo->seo_url['topic'][$topic_id] = $phpbb_seo->format_url($phpbb_seo->seo_censored[$topic_id]);
}
if ( empty($phpbb_seo->seo_url['forum'][$topic_data['forum_id']]) ) {
   $phpbb_seo->seo_url['forum'][$topic_data['forum_id']] = $phpbb_seo->set_url($topic_data['forum_name'],$topic_data['forum_id'], $phpbb_seo->seo_static['forum']);
}
// www.phpBB-SEO.com SEO TOOLKIT END


As soon as the data is available and before append_sid is used, titles are grabbed this way. With the mixed mod, you would not need to parse the topic title, only the forum one, to let the magic happen with all options available 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  » phpBB3 mod Rewrite
Page 1 of 1

Navigation Similar Topics

Jump to: