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  
 
   
Inject nickname in profile URL in addons like portals

 
Post new topic   Reply to topic    phpBB SEO » SEO Forum  » phpBB3 mod Rewrite  » Advanced SEO URL
::  
Author Message
Beagleman



Joined: 02 Apr 2008
Posts: 5

Inject nickname in profile URL in addons like portalsPosted: Tue Apr 08, 2008 7:16 am    Post subject: Inject nickname in profile URL in addons like portals

I have a portal (board3).
I know how to inject the forum title and topic title in the forum URL and topic URL. Cool
Code:

// www.phpBB-SEO.com SEO TOOLKIT BEGIN
if ( empty($phpbb_seo->seo_url['topic'][$topic_id]) ) {
   $phpbb_seo->seo_censored[$topic_id] = censor_text($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'][$forum_id]) ) {
   $phpbb_seo->seo_url['forum'][$forum_id] = $phpbb_seo->set_url($forum_name,$topic_data['forum_id'], $phpbb_seo->seo_static['forum']);
}
// www.phpBB-SEO.com SEO TOOLKIT END



But I don't know how to inject the nickname in the profile URL. Embarassed

Some profile URL in the portal are well modified with the nickname but most of them aren't. I can't find out why. Rolling Eyes
So what I have to do to inject the nickname in all profile URL?

Thank you! Smile
Back to top
SeO
Administrateur - Site Admin
Administrateur - Site Admin


Joined: 15 Mar 2006
Posts: 3137

Inject nickname in profile URL in addons like portalsPosted: Tue Apr 08, 2008 9:11 am    Post subject: Re: Inject nickname in profile URL in addons like portals

Great job Very Happy

Maybe you should release some patch for the community Wink

For nicknames, it's pretty simpler actually.
All nicknames formatted using the get_username_string() functions properly (to be found in includes/functions_content.php) will have the proper rewriting directly.

If the url is build using another method, you need to grab the nickname the same way we need to for other title injected urls.

For nicknames, it is done using the phpbb_seo class set_user_url() method, like it is done in get_username_string() :
Code:
// www.phpBB-SEO.com SEO TOOLKIT BEGIN
$phpbb_seo->set_user_url( strip_tags($username), $user_id );
// www.phpBB-SEO.com SEO TOOLKIT END


Here strip_tag() is used because at this stage, some <i> </i> tags could have been added to the nicknames by phpBB3, it's not necessarily required when building the url "by hand", but it's a costless precaution.

Wink

_________________
Back to top
Display posts from previous:   
Post new topic   Reply to topic    phpBB SEO » SEO Forum  » phpBB3 mod Rewrite  » Advanced SEO URL
Page 1 of 1

Navigation Similar Topics

Jump to: