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?
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
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.
0/5
1
2
3
4
5
This thread is closed, so you cannot post a reply.
Comments on Meta-description
Member
Usergroup: Customer
Joined: Aug 04, 2005
Total Topics: 11
Total Comments: 47
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?
developer
Usergroup: Administrator
Joined: Dec 20, 2001
Location: Diamond Springs, California
Total Topics: 61
Total Comments: 7868
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.
Member
Usergroup: Customer
Joined: Aug 04, 2005
Total Topics: 11
Total Comments: 47
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?
developer
Usergroup: Administrator
Joined: Dec 20, 2001
Location: Diamond Springs, California
Total Topics: 61
Total Comments: 7868
I believe it's encoded to use the HTML entity already, but if you've actually encountered the problem let me know.
Member
Usergroup: Customer
Joined: Aug 04, 2005
Total Topics: 11
Total Comments: 47
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
developer
Usergroup: Administrator
Joined: Dec 20, 2001
Location: Diamond Springs, California
Total Topics: 61
Total Comments: 7868
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.