× Here you can get community support related to Tag Meta.

Custom tags for Joomla! 1.5

  • adnank
  • Topic Author
  • Offline
  • New Member
  • New Member
More
10 years 3 months ago #2001 by adnank
Custom tags for Joomla! 1.5 was created by adnank
Hello, I have client who have Joomla 1.5 site and wants some custom meta and since I used Tag Meta for available tags (very good extension btw :), I figured it would be easiest to fork Tag Meta for him and add new fields. I added column to database (for example, name: googlebot - varchar(255)), and where was entry for description in code, I duplicated it, just putting "googlebot" instead of "description". Everything works in administration, there is new field "googlbot", data can be saved, etc, but it does not generate new meta tag on frontend.




I added after line 140 in plugins/system/tagmeta.php
if ( !empty($items[0]->googlebot) ) { $document->setMetaData('googlebot',str_replace('"', '"', $items[0]->googlebot)); }

Any pointer to the right direction would be really appreciated :)
Attachments:

Please Log in or Create an account to join the conversation.

More
10 years 3 months ago #2003 by admin
Replied by admin on topic Custom tags for Joomla! 1.5
Hi,
it should work, if not maybe there's a problem with $items[0]->googlebot. Check your new table structure (post here if you can).

I suggest to add another line to support macros:
line 136:
      $items[0]->keywords = preg_replace($patterns, $replacements, $items[0]->keywords);
      $items[0]->googlebot = preg_replace($patterns, $replacements, $items[0]->googlebot);
line 142:
      if ( !empty($items[0]->keywords) ) { $document->setMetaData('keywords', str_replace('"', '"', $items[0]->keywords)); }
      if ( !empty($items[0]->googlebot) ) { $document->setMetaData('googlebot', str_replace('"', '"', $items[0]->googlebot)); }

Kind regards,
Luigi
The following user(s) said Thank You: adnank

Please Log in or Create an account to join the conversation.

  • adnank
  • Topic Author
  • Offline
  • New Member
  • New Member
More
10 years 3 months ago - 10 years 3 months ago #2016 by adnank
Replied by adnank on topic Custom tags for Joomla! 1.5
Hi Luigi,
I just added those two lines you suggested to support macro and voila - it started working :) It seems everything else was correct. Thank you ;)
Last edit: 10 years 3 months ago by adnank.

Please Log in or Create an account to join the conversation.

More
10 years 3 months ago #2019 by admin
Replied by admin on topic Custom tags for Joomla! 1.5
U're welcome. :)

Please Log in or Create an account to join the conversation.

Time to create page: 0.139 seconds