How do I use phpbb seo mod to get the url for a post?

phpBB SEO Premod for phpBB3 support forum.
This premodded version of phpBB3 includes the three different type of URL rewriting for phpBB3 by phpBB SEO. It comes with several other Search Engine Optimization mods installed.

Moderator: Moderators

How do I use phpbb seo mod to get the url for a post?

Postby humble » Sat May 03, 2008 10:01 pm

Hi

I have created rss for my forum, but it generated url is post url not the SEO url (eg., /viewtopic?t=xxx instead of /post-title.html. Is there any method available in phpbb seo where I can pass the title and get the url?

Thanks
humble
 
Posts: 5
Joined: Sun Mar 23, 2008 5:43 am

Advertisement

Postby dcz » Tue May 06, 2008 1:18 pm

Yes, but it depends on your script.

Is it a mod ?
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: 21238
Joined: Fri Apr 28, 2006 9:03 pm

Postby humble » Tue May 06, 2008 1:25 pm

yes, it was posted in phpbb forum and I did few changes, but this one (generating seo link) I couldn't find it in your code. I think it would be like a method which get post details and return the seo url, Am i right?

TIA
humble
 
Posts: 5
Joined: Sun Mar 23, 2008 5:43 am

Postby dcz » Tue May 06, 2008 1:41 pm

Well yes, the general principle is to grab titles as well as other info such as topic type (if global announcement) before the link is built with append_sid() and the phpbb_seo classe does the rest.
Example in viewtopic.php :

Code: Select all
$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


After forum and topic titles are known, all consecutive calls to append_sid() will successfully rewrite the urls ;)

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

Postby humble » Tue May 06, 2008 1:47 pm

Thanks for the prompt response. But I am afraid the RSS mod doesn't use append_url. Would appreciate if I can get a method if I pass the topic/title data and get the seo url. Sorry, I am not that good in php
humble
 
Posts: 5
Joined: Sun Mar 23, 2008 5:43 am

Postby SeO » Tue May 06, 2008 1:50 pm

Problem is, it's a lot easier to pass though the append_sid function to take all the settings into accounts (like virtual folder and so on) easily.

If your scrip is sharing phpBB's sessions and code it's easy, if not, it's more work, maybe you want to want until we release GYM 2.0 ;)

++
SeO
Admin
Admin
 
Posts: 6333
Joined: Wed Mar 15, 2006 9:41 pm

Postby humble » Tue May 06, 2008 1:57 pm

ok, I will give it a try, Thanks. I will wait for GYM.. :-)
humble
 
Posts: 5
Joined: Sun Mar 23, 2008 5:43 am


Return to phpBB SEO Premod

 


  • Related topics
    Replies
    Views
    Last post

Who is online

Users browsing this forum: Google [Bot] and 14 guests