| :: |
| Author |
Message |
BFTUK
Joined: 05 Dec 2006 Posts: 15
|
Posted: Thu Dec 07, 2006 11:17 am Post subject: Latest and most popular posts mod..... |
|
|
I've installed the advanced SEO mod-rewrite on my development forum and it works well but it does'nt re-write the urls for the latest and most popular topic mod i have installed.
Has someone already created a fix for this?
www.ctabuk.theinplace.co.uk/BB/
Thanks
PS. Yet to finish the site, when i do your link will be added to the footer.... |
|
|
| Back to top |
|
 |
|
 |
dcz Administrateur - Site Admin

Joined: 28 Apr 2006 Posts: 13354
|
|
| Back to top |
|
 |
BFTUK
Joined: 05 Dec 2006 Posts: 15
|
Posted: Thu Dec 07, 2006 1:45 pm Post subject: Re: Latest and most popular posts mod..... |
|
|
Thanks for the welcome.
I can't find the thread on phpbb.com, the search function never seems to work well.....
This is a link to the mod at phpbbhacks.com
http://www.phpbbhacks.com/download/1238
Is this any good? |
|
|
| Back to top |
|
 |
dcz Administrateur - Site Admin

Joined: 28 Apr 2006 Posts: 13354
|
Posted: Thu Dec 07, 2006 3:04 pm Post subject: Re: Latest and most popular posts mod..... |
|
|
The problem with this mod is that it's not passing the topic titles through the phpBB censoring.
It's not often required to censor part of a title, I mean, I do edit topic title I find too bad.
And the zero dupe is allowing us to edit topic titles even with the advanced mod rewrite, so it's not a very big issue.
It depends on will the SQL queries needed to build the censored word array be worth it on phpBB index, already a demanding page.
Anyway, here is the light tweak, tell me if you'd prefer to see the topic titles censored as well and I'll tell you how.
phpBB SEO Advanced mod rewrite patch for the Top topic on index mod :
Open :
Find :
| Code: | $recent_topic_title = $recent_row[$i]['topic_title'];
$popular_topic_title = $popular_row[$i]['topic_title'];
$viewed_topic_title = $viewed_row[$i]['topic_title']; |
After add :
| Code: | // www.phpBB-SEO.com SEO TOOLKIT BEGIN
$recent_topic_title_url = format_url($recent_row[$i]['topic_title']) . '-vt' . $recent_row[$i]['topic_id'] . '.html';
$popular_topic_title_url = format_url($popular_row[$i]['topic_title']) . '-vt' . $popular_row[$i]['topic_id'] . '.html';
$viewed_topic_title_url = format_url($viewed_row[$i]['topic_title']) . '-vt' . $viewed_row[$i]['topic_id'] . '.html';
// www.phpBB-SEO.com SEO TOOLKIT END |
Find :
| Code: | $recent_post = '<a href="viewtopic.php?' . POST_TOPIC_URL . '=' . $recent_row[$i]['topic_id'] . '" title="' . $recent_row[$i]['topic_title'] . '">' . $recent_topic_title . '</a>';
$popular_post = '<a href="viewtopic.php?' . POST_TOPIC_URL . '=' . $popular_row[$i]['topic_id'] . '" title="' . $popular_row[$i]['topic_title'] . '">' . $popular_topic_title . '</a>';
$popular_total_replies = $popular_row[$i]['topic_replies'];
$viewed_post = '<a href="viewtopic.php?' . POST_TOPIC_URL . '=' . $viewed_row[$i]['topic_id'] . '" title="' . $viewed_row[$i]['topic_title'] . '">' . $viewed_topic_title . '</a>'; |
Replace with :
| Code: | // www.phpBB-SEO.com SEO TOOLKIT BEGIN
$recent_post = '<a href="' . $recent_topic_title_url . '" title="' . $recent_row[$i]['topic_title'] . '">' . $recent_topic_title . '</a>';
$popular_post = '<a href="' . $popular_topic_title_url . '" title="' . $popular_row[$i]['topic_title'] . '">' . $popular_topic_title . '</a>';
$popular_total_replies = $popular_row[$i]['topic_replies'];
$viewed_post = '<a href="' . $viewed_topic_title_url . '" title="' . $viewed_row[$i]['topic_title'] . '">' . $viewed_topic_title . '</a>';
// www.phpBB-SEO.com SEO TOOLKIT END |
And it should be ok.
++ |
_________________ 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 |
|
 |
BFTUK
Joined: 05 Dec 2006 Posts: 15
|
Posted: Sat Dec 09, 2006 2:23 pm Post subject: Re: Latest and most popular posts mod..... |
|
|
Works perfectly.
Many thanks  |
|
|
| Back to top |
|
 |
dcz Administrateur - Site Admin

Joined: 28 Apr 2006 Posts: 13354
|
|
| Back to top |
|
 |
Ľubor PR0

Joined: 13 Feb 2007 Posts: 52 Location: Slovakia,Bratislava
|
Posted: Sun Feb 25, 2007 4:45 pm Post subject: Re: Latest and most popular posts mod..... |
|
|
| Quote: | | Fatal error: Call to undefined function: format_url() in /data/web/pc-war.sk/web/index.php on line 405 |
 |
|
|
| Back to top |
|
 |
dcz Administrateur - Site Admin

Joined: 28 Apr 2006 Posts: 13354
|
Posted: Mon Feb 26, 2007 3:52 pm Post subject: Re: Latest and most popular posts mod..... |
|
|
With the advanced phpBB SEO mod rewrite, I'd do :
Open :
Find :
| Code: | $recent_topic_title = $recent_row[$i]['topic_title'];
$popular_topic_title = $popular_row[$i]['topic_title'];
$viewed_topic_title = $viewed_row[$i]['topic_title']; |
After add :
| Code: | // www.phpBB-SEO.com SEO TOOLKIT BEGIN
if ( !isset($phpbb_seo->seo_url['topic'][$recent_row[$i]['topic_id']]) ) {
$phpbb_seo->seo_url['topic'][$recent_row[$i]['topic_id']] = $phpbb_seo->format_url($recent_topic_title);
}
if ( !isset($phpbb_seo->seo_url['topic'][$popular_row[$i]['topic_id']]) ) {
$phpbb_seo->seo_url['topic'][$popular_row[$i]['topic_id']] = $phpbb_seo->format_url($popular_topic_title);
}
if ( !isset($phpbb_seo->seo_url['topic'][$viewed_row[$i]['topic_id']]) ) {
$phpbb_seo->seo_url['topic'][$viewed_row[$i]['topic_id']] = $phpbb_seo->format_url($viewed_topic_title);
}
// www.phpBB-SEO.com SEO TOOLKIT END |
Find :
| Code: | $recent_post = '<a href="viewtopic.php?' . POST_TOPIC_URL . '=' . $recent_row[$i]['topic_id'] . '" title="' . $recent_row[$i]['topic_title'] . '">' . $recent_topic_title . '</a>';
$popular_post = '<a href="viewtopic.php?' . POST_TOPIC_URL . '=' . $popular_row[$i]['topic_id'] . '" title="' . $popular_row[$i]['topic_title'] . '">' . $popular_topic_title . '</a>';
$popular_total_replies = $popular_row[$i]['topic_replies'];
$viewed_post = '<a href="viewtopic.php?' . POST_TOPIC_URL . '=' . $viewed_row[$i]['topic_id'] . '" title="' . $viewed_row[$i]['topic_title'] . '">' . $viewed_topic_title . '</a>'; |
Replace with :
| Code: | // www.phpBB-SEO.com SEO TOOLKIT BEGIN
$recent_post = '<a href="' . append_sid("viewtopic.$phpEx?" . POST_TOPIC_URL . '=' . $recent_row[$i]['topic_id']) . '" title="' . $recent_row[$i]['topic_title'] . '">' . $recent_topic_title . '</a>';
$popular_post = '<a href="' . append_sid("viewtopic.$phpEx?" . POST_TOPIC_URL . '=' . $popular_row[$i]['topic_id']) . '" title="' . $popular_row[$i]['topic_title'] . '">' . $popular_topic_title . '</a>';
$popular_total_replies = $popular_row[$i]['topic_replies'];
$viewed_post = '<a href="' . append_sid("viewtopic.$phpEx?" . POST_TOPIC_URL . '=' . $viewed_row[$i]['topic_id']) . '" title="' . $viewed_row[$i]['topic_title'] . '">' . $viewed_topic_title . '</a>';
// www.phpBB-SEO.com SEO TOOLKIT BEGIN |
This mod needs as well to use the phpBB censoring for topic titles, even though it's not very likely to be useful, to fully comply with phpBB.
Tell me if you need it
++ |
_________________ 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
Last edited by dcz on Sat Mar 10, 2007 12:27 pm; edited 2 times in total |
|
| Back to top |
|
 |
lionheart
Joined: 08 Mar 2007 Posts: 15
|
Posted: Fri Mar 09, 2007 12:11 am Post subject: Re: Latest and most popular posts mod..... |
|
|
hi, i'm having trouble making this mod work (The last Five and the Five popular (answers/views) on index.php - Mod Version: 1.1.0) with the rewrite mod (phpBB SEO Advanced mod Rewrite MOD Version:0.2.0) ...
the rewrite mod works prerfectly, then i install the last five mod as per instructions, but the url are not seo.
if i use the first fix from dcz in this post, i get this error:
Fatal error: Call to undefined function: format_url() in /home/adv/public_html/index.php on line 413
if i use the second fix, i get this error:
Parse error: syntax error, unexpected ')' in /home/adv/public_html/index.php on line 440
if i remove the")" from the lines, i get no error anymore from the index.php but the urls are not correct: http://www.mysite.com/.%20append_sid(viewtopic.php?t=26
must be an easy fix....
thank you for your help! |
|
|
| Back to top |
|
 |
dcz Administrateur - Site Admin

Joined: 28 Apr 2006 Posts: 13354
|
|
| Back to top |
|
 |
lionheart
Joined: 08 Mar 2007 Posts: 15
|
Posted: Fri Mar 09, 2007 3:07 pm Post subject: Re: Latest and most popular posts mod..... |
|
|
thank you for your reply!
but the problem remains, if i install the second fix i get this error:
Parse error: syntax error, unexpected ')' in /home/adv/public_html/index.php on line 440
thank you for your help! |
|
|
| Back to top |
|
 |
dcz Administrateur - Site Admin

Joined: 28 Apr 2006 Posts: 13354
|
Posted: Fri Mar 09, 2007 3:43 pm Post subject: Re: Latest and most popular posts mod..... |
|
|
Oh sorry, I missed this, and actually, there is a typo, the second replace should be :
| Code: |
// www.phpBB-SEO.com SEO TOOLKIT BEGIN
$recent_post = '<a href="' . append_sid("viewtopic.$phpEx?" . POST_TOPIC_URL . '=' . $recent_row[$i]['topic_id']) . '" title="' . $recent_row[$i]['topic_title'] . '">' . $recent_topic_title . '</a>';
$popular_post = '<a href="' . append_sid("viewtopic.$phpEx?" . POST_TOPIC_URL . '=' . $popular_row[$i]['topic_id']) . '" title="' . $popular_row[$i]['topic_title'] . '">' . $popular_topic_title . '</a>';
$popular_total_replies = $popular_row[$i]['topic_replies'];
$viewed_post = '<a href="' . append_sid("viewtopic.$phpEx?" . POST_TOPIC_URL . '=' . $viewed_row[$i]['topic_id']) . '" title="' . $viewed_row[$i]['topic_title'] . '">' . $viewed_topic_title . '</a>';
// www.phpBB-SEO.com SEO TOOLKIT BEGIN |
Post edited
++ |
_________________ 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
Last edited by dcz on Sat Mar 10, 2007 12:26 pm; edited 1 time in total |
|
| Back to top |
|
 |
lionheart
Joined: 08 Mar 2007 Posts: 15
|
Posted: Fri Mar 09, 2007 8:20 pm Post subject: Re: Latest and most popular posts mod..... |
|
|
thank you very much for your help!
but now this is the error i get:
Parse error: syntax error, unexpected '"' in /home/adv/public_html/index.php on line 441
regards |
|
|
| Back to top |
|
 |
lionheart
Joined: 08 Mar 2007 Posts: 15
|
Posted: Fri Mar 09, 2007 8:26 pm Post subject: Re: Latest and most popular posts mod..... |
|
|
ok, i figured it out
$popular_post = '<a href="' . append_sid("viewtopic.$phpEx?" . POST_TOPIC_URL . '=' . $popular_row[$i]['topic_id']) . '" title="' . $popular_row[$i]['topic_title'] . '">' . $popular_topic_title . '</a>';
the bracket was missing
it's all working now, thank you very much for your help! |
|
|
| Back to top |
|
 |
dcz Administrateur - Site Admin

Joined: 28 Apr 2006 Posts: 13354
|
|
| Back to top |
|
 |
|
|