| |
| |
|
|
|
|
| |
|
| |
|
| :: |
| Author |
Message |
sypher
Joined: 23 Jul 2007 Posts: 12
|
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

Joined: 28 Apr 2006 Posts: 14403
|
|
| Back to top |
|
 |
sypher
Joined: 23 Jul 2007 Posts: 12
|
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

Joined: 28 Apr 2006 Posts: 14403
|
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  |
_________________ 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 |
|
 |
|
| Navigation |
Similar Topics |
|
|
|
|
|
|
|
| |
|
|
|
|
| |
|
|
|
|
| |