Webmastersite.net
Register Log In

Meta-description

Comments on Meta-description

scriptwiki
Member

Usergroup: Customer
Joined: Aug 04, 2005

Total Topics: 11
Total Comments: 47
Posted Jun 07, 2006 - 8:13 PM:

Is there a way to get the meta-description of each link details page to be the description of the link minus all the html markup?
Paul
developer

Usergroup: Administrator
Joined: Dec 20, 2001
Location: Diamond Springs, California

Total Topics: 61
Total Comments: 7868
Paul
Posted Jun 09, 2006 - 5:26 PM:

Possibly with a conditional <IF {TID} contains detail> and stripping the HTML using <?php echo strip_tags("{LINKDESCRIPTION}"); ?>

Depends on whether link template vars work in the wrapper there, I don't know.
scriptwiki
Member

Usergroup: Customer
Joined: Aug 04, 2005

Total Topics: 11
Total Comments: 47
Posted Jun 11, 2006 - 10:56 AM:

That works if I change "details>" to "detailcomments.tpl>" But what happens if the link description contains a double quote ". Won't that screw up the PHP? Is there a way to escape that?
Paul
developer

Usergroup: Administrator
Joined: Dec 20, 2001
Location: Diamond Springs, California

Total Topics: 61
Total Comments: 7868
Paul
Posted Jun 12, 2006 - 2:19 PM:

I believe it's encoded to use the HTML entity already, but if you've actually encountered the problem let me know.
scriptwiki
Member

Usergroup: Customer
Joined: Aug 04, 2005

Total Topics: 11
Total Comments: 47
Posted Jun 12, 2006 - 4:36 PM:

Yes, there is an error when there is a " in the listing. But if it does not have a " in it, it works just fine.

The code I have in the wrapper is
<IF {TID} contains main.tpl><meta name="description" content="Become part of the webmaster to webmaster marketplace. Buy and sell websites, domains, graphics, content, licenses, and more for free at Tidget.com."><OTHERWISE><IF {TID} contains detailcomments.tpl> <meta name="description" content="<?php echo strip_tags("{LINKDESCRIPTION[150]}"); ?>"><OTHERWISE>{MAINMETA} {CATHEADERINFO}</IF></IF>

EDIT: You won't see any problems on tidget now because I change ("{LINKDESCRIPTION[150]}") to ("{LINKDESCRIPTION[1]}") but I still would like a description that is more than 1 character long smiling face
Paul
developer

Usergroup: Administrator
Joined: Dec 20, 2001
Location: Diamond Springs, California

Total Topics: 61
Total Comments: 7868
Paul
Posted Jun 15, 2006 - 8:15 AM:

I don't see any way to type PHP in a template that doesn't quote with either ' or ", so I guess the html stripping would have to be added as a PHP feature instead of a template customization.
Search thread for
Download thread as
  • 0/5
  • 1
  • 2
  • 3
  • 4
  • 5



This thread is closed, so you cannot post a reply.