Topic description mod and meta

Discussions about the phpBB2 Forum. How to get the best from this powerful script.

Moderator: Moderators

Postby cheapez » Thu May 17, 2007 1:40 pm

Umm, All I want is to hide some links from bots, but don't want to uses the robots.txt
"Cloaking", Yes I know that too. I thinks I should forget about it.

Thanks alot dcz, You replied my post fast :p, that why I picked your forum to requests my needed.

Also I installed the "Topic description" mod bellow:
http://www.phpbbhacks.com/viewhack.php?id=5474

I want to add the description contents into the <meta description of your "advanced meta tag". Is that possible? That is my biggest concern, I did spend at least 2 hours on it but without have it works.

Thanks again.
cheapez
 
Posts: 15
Joined: Thu May 17, 2007 12:09 am

Advertisement

Postby cheapez » Thu May 17, 2007 1:42 pm

SEO is really important, I need to work on that more and more.
cheapez
 
Posts: 15
Joined: Thu May 17, 2007 12:09 am

Postby dcz » Thu May 17, 2007 2:12 pm

It's doable, but you'll have to alter the query grabbing the topic_descrition, since it's using the post table to do so in the regular mod.

In viewtopic.php, you can look for :

Code: Select all
$order_sql = (!$post_id) ? '' : "GROUP BY p.post_id, t.topic_id, t.topic_title, t.topic_status, t.topic_replies, t.topic_time, t.topic_type, t.topic_vote, t.topic_last_post_id,


In line after add :
Code: Select all
t.topic_description,

Find :
Code: Select all
sql = "SELECT t.topic_id, t.topic_title, t.topic_status, t.topic_replies, t.topic_time, t.topic_type, t.topic_vote, t.topic_last_post_id,

In line after add :
Code: Select all
t.topic_description,


Then find :

Code: Select all
$phpbb_seo->seo_meta['meta_desc'] = $phpbb_seo->meta_filter_txt($board_config['sitename'] . " : $page_title");


That's what will be used to build up the topic description.

You can change it to :

Code: Select all
$phpbb_seo->seo_meta['meta_desc'] = $phpbb_seo->meta_filter_txt($forum_topic_data['topic_description'] . " : $page_title");


For example.
The meta keyword, since it's using the meta desc to build the keywords as well would then reuse the keywords in the topic desc as well.

In all case, the most used keywords in what is sent to $phpbb_seo->make_keywords() will be listed first, and they are limited to 15 by default.

++
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 cheapez » Thu May 17, 2007 5:39 pm

I see nothings changes in the "META DESCRIPTION"

Can you make it something likes $title_page

and just add it where you want
for exam:
<meta name="description content="$topic_description"
that would be so much easier :P
cheapez
 
Posts: 15
Joined: Thu May 17, 2007 12:09 am

Postby dcz » Fri May 18, 2007 7:43 am

Well, it's almost as simple as you wish.

All you need to do to add meta is to add :

Code: Select all
// www.phpBB-SEO.com SEO TOOLKIT BEGIN - META
$phpbb_seo->seo_meta['meta_desc'] = $phpbb_seo->meta_filter_txt(" here goes the description text, will be filtered, no html and php tags, no multiple spaces");
$phpbb_seo->seo_meta['keywords'] = $phpbb_seo->make_keywords("keyword list, only the first 15 most used and greater than 3 letter will be used");
// www.phpBB-SEO.com SEO TOOLKIT END - META


Before :

Code: Select all
include($phpbb_root_path . 'includes/page_header.'.$phpEx);


It's just that this way, you do not risk to break you layout if you send a variable with html tags in the meta description, and you only output the most interesting keywords as well.

++
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


Return to phpBB2 Forum

 


  • Related topics
    Replies
    Views
    Last post

Who is online

Users browsing this forum: No registered users and 43 guests