| |
| |
|
|
|
|
| |
|
| |
|
| :: |
| Author |
Message |
Beagleman
Joined: 02 Apr 2008 Posts: 5
|
Posted: 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.
| 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.
Some profile URL in the portal are well modified with the nickname but most of them aren't. I can't find out why.
So what I have to do to inject the nickname in all profile URL?
Thank you!  |
|
|
| Back to top |
|
 |
|
 |
SeO Administrateur - Site Admin

Joined: 15 Mar 2006 Posts: 3137
|
Posted: Tue Apr 08, 2008 9:11 am Post subject: Re: Inject nickname in profile URL in addons like portals |
|
|
Great job
Maybe you should release some patch for the community
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() :
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.
 |
_________________
|
|
| Back to top |
|
 |
|
| Navigation |
Similar Topics |
|
|
|
|
|
|
|
| |
|
|
|
|
| |
|
|
|
|
| |