1
bjuti
Classifieds + meta description
  • 2010/1/15 12:54

  • bjuti

  • Just can't stay away

  • Posts: 871

  • Since: 2009/1/7 2


It's very hard to index in Google page without meta description. The problem is that Classifieds uses meta description that is default in XOOPS for every page. This is wrong, so here is a little hack for it.


Step 1:
Open modules/classifieds/index.php in editor

Step 2: Add meta description for categories
Find:
$xoopsTpl->assign('cat_desc',$cat_desc);


and under
$xoopsTpl->assign('xoops_pagetitle',$title);


add this code
// meta description tags for categories
$cat_desc_clean strip_tags($cat_desc''); 
$xoTheme->addMeta('meta''description'"$title ".substr($cat_desc_clean,0,150));


Step 3: Add meta description for every ad
search for this (it's around line 700)
$xoopsTpl->assign('desctext'$desctext);


and under
$xoopsTpl->assign('xoops_pagetitle',"$title $ctitle - $type");


add this code
// meta description tags for ads
$desctextclean strip_tags($desctext''); 
$xoTheme->addMeta('meta''description'"$title $ctitle $type $price $typeprice".substr($desctextclean,0,120));


It works for me :)

Thanks Ghia for help in this topic.


Also check out Classifieds + Fancybox.

Tell me how does this meta description hack works on full working website, coz I've test it localhost, but you have nothing to lose - any specific meta description is better than none :)

AFAIK the meta description should be about 150 characters, so you can change it in ".substr($desctextclean,0,120)" cause first we add in description title and price and then description. Also i think that this should remove html tags from description [in case of using html editor for description].

Bye

P.S. This hack maybe need some polish, so if anyone have better idea, feel free to post it here :)

2
Peekay
Re: Classifieds + meta description
  • 2010/1/15 14:17

  • Peekay

  • XOOPS is my life!

  • Posts: 2335

  • Since: 2004/11/20


Quote:
It works for me :)

Yes. Works for me too. Nice work

3
vikrant
Re: Classifieds + meta description
  • 2010/1/28 15:00

  • vikrant

  • Just popping in

  • Posts: 97

  • Since: 2004/11/9


Hi all,
Its working...
One more question, is it possible to add Meta kewords from "category" "Description" as what we are adding now is Description of the advertisements...
Also can anyone hack the module such that the emails can be send without login or registration as this is a feature everyone is looking for with this module.
Cheers.....

4
bjuti
Re: Classifieds + meta description
  • 2010/1/28 15:29

  • bjuti

  • Just can't stay away

  • Posts: 871

  • Since: 2009/1/7 2


I gave up on meta keywords coz they arel irelevant for SEO. On the other way, the relevant keywords are on your website: how often do you have specific words on your page.

5
vikrant
Re: Classifieds + meta description
  • 2010/1/31 16:56

  • vikrant

  • Just popping in

  • Posts: 97

  • Since: 2004/11/9


Hi,
I have 111 Categories and over 400 classified ads on display.
This is making me difficult to keep all the key words in the ads.
If the description in categories are included in the classifieds it might sort some of the problems.
Hope you have come solution for this.
Regards
Vikrant

6
bjuti
Re: Classifieds + meta description
  • 2010/1/31 17:59

  • bjuti

  • Just can't stay away

  • Posts: 871

  • Since: 2009/1/7 2


What problems?

7
vikrant
Re: Classifieds + meta description
  • 2010/2/1 4:03

  • vikrant

  • Just popping in

  • Posts: 97

  • Since: 2004/11/9


If possible i want to add the Keywords of the category also instead of the Site keywords.
As these can be more specific and accurate.
Any help you can provide...
Regards
Vikrant

8
bjuti
Re: Classifieds + meta description
  • 2010/2/1 9:39

  • bjuti

  • Just can't stay away

  • Posts: 871

  • Since: 2009/1/7 2


You mean meta keywords?

I didn't bother with meta keywords since they are not relevant for SEO and Google.

9
vikrant
Re: Classifieds + meta description
  • 2010/2/6 16:31

  • vikrant

  • Just popping in

  • Posts: 97

  • Since: 2004/11/9


I think Meta Keywords and Meta Description should match for the page to get a proper ranking.
is it possible by some way to have these in the individual listings....
What i think is that we can use the Category Description as Keywords and Description in addition to the listing Description and title....
Is it possible to do this...
Regards
Vikrant

10
bjuti
Re: Classifieds + meta description
  • 2010/2/6 20:59

  • bjuti

  • Just can't stay away

  • Posts: 871

  • Since: 2009/1/7 2



Login

Who's Online

366 user(s) are online (271 user(s) are browsing Support Forums)


Members: 0


Guests: 366


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Nov 30
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits