| :: |
| Author |
Message |
PDD_20
Joined: 23 May 2008 Posts: 35 Location: Spain
|
Posted: Mon Sep 01, 2008 11:07 am Post subject: URL SEO in mod similar topic |
|
|
Hi, I have this code but I dont get URL SEO, I dont know :S
| Code: | $sql= 'SELECT f.forum_id, f.forum_name, t.topic_id, t.topic_title, u.user_id, u.username, u.user_colour
FROM ' . TOPICS_TABLE . ' t, ' . USERS_TABLE . ' u, ' . FORUMS_TABLE . " f
WHERE MATCH (t.topic_title) AGAINST ('" . $db->sql_escape($topic_data['topic_title']) . "' IN BOOLEAN MODE)
AND f.forum_id = t.forum_id
AND u.user_id = t.topic_poster
AND t.topic_id <> " . (int) $topic_data['topic_id'] . '
GROUP BY t.topic_id';
if ($result = $db->sql_query_limit($sql, 5))
{
while($similar = $db->sql_fetchrow($result))
{
if ($auth->acl_get('f_list', $similar['forum_id']))
{
$similar_forum_url = append_sid('viewforum.php?f='.$similar['forum_id']);
$similar_topic_url = append_sid('viewtopic.php?f='.$similar['forum_id'].'&t='.$similar['topic_id']);
$similar_user = '<a style="color: #' .$similar['user_colour']. ';" href="' .append_sid('memberlist.php?mode=viewprofile&u='.$similar['user_id']). '">' .$similar['username']. '</a>';
$template->assign_block_vars('similar', array(
'TOPIC_TITLE' => $similar['topic_title'],
'U_TOPIC' => $similar_topic_url,
'USER' => $similar_user,
'U_FORUM' => $similar_forum_url,
'FORUM' => $similar['forum_name'])
);
}
}
} |
Can you help me?
Thanks!!! |
|
|
| Back to top |
|
 |
|
 |
dcz Administrateur - Site Admin

Joined: 28 Apr 2006 Posts: 15133
|
Posted: Sat Sep 06, 2008 8:13 am Post subject: Re: URL SEO in mod similar topic |
|
|
Try adding :
after (in the same line) :
and then :
| Code: | // www.phpBB-SEO.com SEO TOOLKIT BEGIN
if ( empty($phpbb_seo->seo_url['topic'][$similar['topic_id']]) ) {
if ($similar['topic_type'] == POST_GLOBAL) {
$phpbb_seo->seo_opt['topic_type'][$similar['topic_id']] = POST_GLOBAL;
}
$phpbb_seo->seo_url['topic'][$similar['topic_id']] = $phpbb_seo->format_url($similar['topic_title']);
}
if ( empty($phpbb_seo->seo_url['forum'][$similar['forum_id']]) ) {
$phpbb_seo->seo_url['forum'][$similar['forum_id']] = $phpbb_seo->set_url($similar['forum_name'], $similar['forum_id'], $phpbb_seo->seo_static['forum']);
}
// www.phpBB-SEO.com SEO TOOLKIT END |
after :
| Code: | while($similar = $db->sql_fetchrow($result))
{
if ($auth->acl_get('f_list', $similar['forum_id']))
{ |
 |
_________________ 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 Sep 06, 2008 1:59 pm; edited 1 time in total |
|
| Back to top |
|
 |
PDD_20
Joined: 23 May 2008 Posts: 35 Location: Spain
|
Posted: Sat Sep 06, 2008 10:29 am Post subject: Re: URL SEO in mod similar topic |
|
|
Sorry but It show non URL SEO :S
Thanks |
|
|
| Back to top |
|
 |
dcz Administrateur - Site Admin

Joined: 28 Apr 2006 Posts: 15133
|
|
| Back to top |
|
 |
PDD_20
Joined: 23 May 2008 Posts: 35 Location: Spain
|
Posted: Sat Sep 06, 2008 2:08 pm Post subject: Re: URL SEO in mod similar topic |
|
|
Yes, now It is correct!!!!!!! Thanksssssssss!!!!!!!!!!!
You are the best xD
Bye and thanks |
|
|
| Back to top |
|
 |
Professional PR2


Joined: 07 Apr 2008 Posts: 249 Location: 1/2 of the World
|
|
| Back to top |
|
 |
PDD_20
Joined: 23 May 2008 Posts: 35 Location: Spain
|
|
| Back to top |
|
 |
Professional PR2


Joined: 07 Apr 2008 Posts: 249 Location: 1/2 of the World
|
Posted: Tue Oct 21, 2008 4:59 pm Post subject: Re: URL SEO in mod similar topic |
|
|
tnx i'll try it
but i use sub silver3 style
this cod is for prosilver style:
Open: styles/prosilver/template/viewtopic_body.html
find:
| Code: | | <!-- INCLUDE jumpbox.html --> |
Add before
| Code: | <div class="forumbg" style="width: 800px; margin:0 auto">
<span class="corners-top"><span></span></span>
<div style="color: #FFFFFF; height: 20px;"><b>{L_SIMILAR_TOPICS}</b></div>
<table border="0" class="bg1">
<!-- BEGIN similar -->
<tr>
<td width="400"><a class="topictitle" href="{similar.U_TOPIC}">{similar.TOPIC_TITLE}</a></td>
<td width="300"><a class="topictitle" href="{similar.U_FORUM}">{similar.FORUM}</a></td>
<td width="100">{similar.USER}</td>
</tr>
<!-- END similar -->
</table>
<span class="corners-bottom"><span></span></span>
</div> |
can anyone help me to do this for sub silver2 style?
and another question plz answe admins,does this mod will effect at indexing? |
_________________ انجمن تخصصی موبایل برای ایرانیان
http://www.mobile4persian.com
برنامه موبایل - بازی موبایل - تم موبایل - اخبار موبایل - ترفند موبایل - s60 -s60 3rd- s80-s90-java-pocket pc-palm-ppc-UIQ3-UIQ |
|
| Back to top |
|
 |
globetrotting
Joined: 14 Apr 2008 Posts: 17
|
|
| Back to top |
|
 |
Professional PR2


Joined: 07 Apr 2008 Posts: 249 Location: 1/2 of the World
|
|
| Back to top |
|
 |
dcz Administrateur - Site Admin

Joined: 28 Apr 2006 Posts: 15133
|
|
| Back to top |
|
 |
Professional PR2


Joined: 07 Apr 2008 Posts: 249 Location: 1/2 of the World
|
|
| Back to top |
|
 |
|
|