1
brutalicuss
Meta tag module "XBS MetaTags" or similar

Hi there,

Is there a some kind seo module for custom meta keywords and description like "XBS MetaTags" to create custom metas for the pages. This "XBS MetaTags" is nice but not working with xoops 2.5. The general system "Meta Tags and Footer" creates all data dubbing and the big boss :) is frowning about my pages

10x

2
brutalicuss
Re: Meta tag module "XBS MetaTags" or similar

Hi guys,

I found some solution to create custom meta keys & desc for most pages

Im not programmer, just testing (be careful with yours)

Put in your .php page this code:

$keyword_tags = 'word, word, word...' ;
$xoTheme->addMeta('meta', 'keywords', $keyword_tags);
$description = 'description....' ;
$xoTheme->addMeta('meta', 'description', $description);

This works in most cases. It may require to find the suitable place in your .php file, but anyway - it works :)
You dont need to change or delete your existing meta in general xoops system "Meta Tags and Footer" menu, the code will replace original meta data only if exist. Тhе rest pages, without this code, will working with original meta key & desc.

This is a part of solution with meta data in xoops pages. I hope one day some good guy to create nice seo module, we need of such :)

3
irmtfan
Re: Meta tag module "XBS MetaTags" or similar
  • 2013/5/7 11:24

  • irmtfan

  • Module Developer

  • Posts: 3419

  • Since: 2003/12/7


1- It is not good way.
Quote:

Put in your .php page this code:

Im afraid this is a hard-code and fix meta addition to all pages because nearly all xoops modules have dynamic pages with query strings like modules/MODULE/page.php?item_id=xxx
So your meta addition will fix the meta for all page.php pages.

2- most proper and good xoops content modules like news, publisher create special metas (keywords and description) for each dynamic page. newbb will create too in viewtopic.php which you can see in this page.
So why you want to add this hard-coded meta?

Finally the last question is: in which module you face this problem? That module is a bad one.

4
nmshah
Re: Meta tag module "XBS MetaTags" or similar
  • 2013/5/7 15:00

  • nmshah

  • Just can't stay away

  • Posts: 556

  • Since: 2007/7/2 8


Y0u can also look for a module by Trabis "defacer", it has the ability to add meta tags to pages from other modules.

5
brutalicuss
Re: Meta tag module "XBS MetaTags" or similar

10x I will check this module "defacer"

I have no problem with "hard-coded" meta data. May be I put the code in right places (testing) and the meta keys and description appears correctly with no bugs or conflict with every single page where I putting the code. In example Im looking for lines like: CreateMetaDatas, $xoopsTpl->assign... , template->get_keyword_array..., and set the code under them with no conflict or errors.

These modules you say has perfect meta data but only when we have single "news" or other event. For general files like index.php or others like search, vote, category and etc there is no custom meta keywords and description and the system gets meta from "Meta Tags and Footer" menu.
Other, I had problems particularly with module "weblinks". There are important page witch must be with custom meta, like index, viewcat, viewfeed, viewmark, catlist, ratelink and others, and specially singlelink.
Also files in news - index, topicdirectory.. in catads, in tags and others.

6
brutalicuss
Re: Meta tag module "XBS MetaTags" or similar

Guys, I found final decision for both directory modules - weblinks and mylinks

The big boss still thinks that the pages (singlelink - for both modules) are doubling. I think its normal, because every single link have same meta description, with custom tag or empty tag - they are always same.

I took meta code from catads, testing and sets for both singlelink.php and viewcat.php. Its working perfect now :)

For module weblinks
In the file singlelink.php set
$keyword_tags 'bla, blaa, blaaa' ;  
        
$desctextclean strip_tags($annonce['description']);
        
$xoTheme->addMeta('meta''description'substr($title_s0140));
        for ( 
$i=0$i$max $i++ ) {
        
$keyword_tags .= $mots_tags[$i].", " ;
        }
        
$xoTheme->addMeta('meta''keywords'$keyword_tags);

Must be just under this line:
$xoopsTpl->assign('keywords'$keywords_urlencoded);


Now meta description will be the same like link title, in any case we havent meta desc doubling any more. Keyword tags we know are not important yet...set as you wish.
In the file viewcat.php set
$keyword_tags 'bla, blaa, blaaa' ;         
        
$desctextclean strip_tags($annonce['description']);
        
$xoTheme->addMeta('meta''description'substr($category['title_s'] , 0140));
        for ( 
$i=0$i$max $i++ ) {
        
$keyword_tags .= $mots_tags[$i].", " ;
        }
        
$xoTheme->addMeta('meta''keywords'$keyword_tags);

just under this line:
$keywords_urlencoded =  $weblinks_template->get_keywords_urlencode();

Now the category title will be meta description too

For module mylinks
In the file singlelink.php set:
$keyword_tags 'bla, blaa, blaaa' ;  
        
$desctextclean strip_tags($annonce['description']);
        
$xoTheme->addMeta('meta''description'substr($description0140));
        for ( 
$i=0$i$max $i++ ) {
        
$keyword_tags .= $mots_tags[$i].", " ;
        }
        
$xoTheme->addMeta('meta''keywords'$keyword_tags);

just under:
$xoopsTpl->assign('mylinksjumpbox'$catjumpbox);

Now the meta description will be our first 140 characters from link description - no doubling meta desc anymore :)
In the file viewcat.php set:
$keyword_tags 'bla, blaa, blaaa' ;  
        
$desctextclean strip_tags($annonce['description']);
        
$xoTheme->addMeta('meta''description'substr($itemPath0140));
        for ( 
$i=0$i$max $i++ ) {
        
$keyword_tags .= $mots_tags[$i]."" ;
        }
        
$xoTheme->addMeta('meta''keywords'$keyword_tags);

just under:
$xoopsTpl->assign('mylinksthemeoption'$mylinkstheme_select);

Now we have category title as meta description too


That all, for me working perfect, there are no doubling links anymore. But be careful with yours

7
Mamba
Re: Meta tag module "XBS MetaTags" or similar
  • 2013/7/10 10:41

  • Mamba

  • Moderator

  • Posts: 11409

  • Since: 2004/4/23


Thanks for sharing the solution!

It's always nice to have the follow-up on a question or problem, so others can learn from it!
Support XOOPS => DONATE
Use 2.5.11 | Docs | Modules | Bugs

Login

Who's Online

213 user(s) are online (81 user(s) are browsing Support Forums)


Members: 0


Guests: 213


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