Templates are exactly the same for both sites. But on The Dog Scene it does not display correctly, repeating a bit of the information above the text. You have to scroll down to the end of the article to see it - it is the copyright details in a box. On The Dog Scene you get the wording "Web site>" in front of the author's name. On The Horse Scene it displays correctly!!!
What's the value for {LINKCOPYRIGHT} in an example where it doesn't work? I'm guessing it contains HTML. Conditionals open with <IF and close with the next >, so if you have an html tag like </a> that closes the conditional. I don't have a solution that at the moment other than using PHP
<?php if ("{LINKCOPYRIGHT}") { ?>{LINKCOPYRIGHT}<?php } ?>
Paul wrote: What's the value for {LINKCOPYRIGHT} in an example where it doesn't work? I'm guessing it contains HTML. Conditionals open with <IF and close with the next >, so if you have an html tag like </a> that closes the conditional. I don't have a solution that at the moment other than using PHP
<?php if ("{LINKCOPYRIGHT}") { ?>{LINKCOPYRIGHT}<?php } ?>
instead.
Thanks Paul but it didn't like that at all! I thought it was perhaps because it was within another conditional <IF {LINKTYPE} is article>, so I moved it outside that, but it still didn't work at all and I had to change it back. You know I am sure that it all worked ok when I first did it, back when wsn was v.3.#
Attached is my debug. The page took over 8 seconds to load - used to be a lot quicker :-(
(edit) OK, trying to think of ways around this I changed
The bulk of your processing time isn't query related, it appears to be a matter of having a large amount of HTML (40KB) to process. I see you have some javascript, you should really move that to the javascript header or other external javascript files so it doesn't get reloaded inside each page. The huge category selector may take the longest to parse though, I'd guess.
You also have a gazillion <!-- BEGIN REGULAR -->s in the result, not sure how you get that since my sites don't.
Also you've just got too high of a server load, over 5 at the moment, which makes every page longer. Is it possible for you to use guest caching?
Sorry - you guessed right - {LINKCOPYRIGHT} usually contains html of a url link. This also answers my problem in https://www.webmastersite.net/forums/threads/IF_co... as that IF condition also has a field with html of a url link.
Is there another way to include a live link in a text field?
You also have a gazillion &#60;!-- BEGIN REGULAR --&#62;s
The menu is basically a site map where I have a conditional to only show the top level cats. I guess it was still parsing every sub-cat though. I have now changed it and put them in plain html, although I liked it done automatically so when cats are added or changed I don't have to remember to change the wrapper.
I have also moved the javascript (silly me didn't think it would matter being in the header as it was only very small)
Doing just those two has now speeded the site up. Funny thing is it only slowed down after the latest couple of upgrades, prior to that it always loaded in about 3/4 seconds.
What is guest caching and how is it normally done?
PS I can now access your site ok! No idea what the problem was and I didn't do anything it just began working ok! I think I'm jinxed!
The field needs to be selected as one to parse WSN codes for at the bottom of Admin -> Settings -> General. If you have it selected and still don't know, click the "WSN Codes" link to the left of your post while you're typing it -- that shows a list of codes available.
I see, it's converted to HTML long before then. And the PHP doesn't work because the value has quotes in it, and so can't be quoted. The only way to handle it seems to be if I make it so there's a special BOOL} version of everything, so <IF {LINKCOPYRIGHTBOOL}> can be used. Applied that for 4.0.22.
Paul wrote: I see, it's converted to HTML long before then. And the PHP doesn't work because the value has quotes in it, and so can't be quoted. The only way to handle it seems to be if I make it so there's a special BOOL} version of everything, so <IF {LINKCOPYRIGHTBOOL}> can be used. Applied that for 4.0.22.
Thanks Paul, but unfortunately it doesn'g seem to be working and instead of the data of LINKCOPYRIGHT I get "Web Site>1" displayed.
Works perfectly for me. <IF {LINKDESCRIPTIONBOOL}>{LINKDESCRIPTION}</IF> shows when there's a description, regardless of how many wsn codes are in there.
Comments on don't know how to describe!
Expert
Usergroup: Customer
Joined: Aug 19, 2005
Location: England
Total Topics: 391
Total Comments: 1303
I have two sites - both run 4.0.21 and both use exactly the same templates, just that the dogscene does have a few more cat fields.
On the details page I have:
<IF {LINKTYPE} is article>
<div class="copyright">
<IF {LINKCOPYRIGHT}>{LINKCOPYRIGHT}<br />
<br /></IF>
{LINKTITLE} was published by <a href="{DIRURL}">{SITETITLE} </a> on {LINKDATE}. © All rights reserved. You may download and print this article for personal or non-profit use only. Please feel free to link to this article. Visit {SITETITLE} (<a href="{DIRURL}">{DIRURL}</a>) for more articles. </div>
</IF>
Templates are exactly the same for both sites. But on The Dog Scene it does not display correctly, repeating a bit of the information above the text. You have to scroll down to the end of the article to see it - it is the copyright details in a box. On The Dog Scene you get the wording "Web site>" in front of the author's name. On The Horse Scene it displays correctly!!!
Examples:
www.thehorsescene.co.uk/det...rse-for-your-child-81.html
www.thedogscene.co.uk/detai...nd-body-language-1271.html
Also, The Dog Scene is a LOT slower to load than the Horse Scene - taking up to 14 seconds, which is not acceptable.
developer
Usergroup: Administrator
Joined: Dec 20, 2001
Location: Diamond Springs, California
Total Topics: 61
Total Comments: 7868
What's the value for {LINKCOPYRIGHT} in an example where it doesn't work? I'm guessing it contains HTML. Conditionals open with <IF and close with the next >, so if you have an html tag like </a> that closes the conditional. I don't have a solution that at the moment other than using PHP instead.
Expert
Usergroup: Customer
Joined: Aug 19, 2005
Location: England
Total Topics: 391
Total Comments: 1303
What's the value for {LINKCOPYRIGHT} in an example where it doesn't work? I'm guessing it contains HTML. Conditionals open with <IF and close with the next >, so if you have an html tag like </a> that closes the conditional. I don't have a solution that at the moment other than using PHP
instead.
Thanks Paul but it didn't like that at all! I thought it was perhaps because it was within another conditional <IF {LINKTYPE} is article>, so I moved it outside that, but it still didn't work at all and I had to change it back. You know I am sure that it all worked ok when I first did it, back when wsn was v.3.#
Attached is my debug. The page took over 8 seconds to load - used to be a lot quicker :-(
(edit) OK, trying to think of ways around this I changed to
But that still doesn't work!!
Attached Files:
developer
Usergroup: Administrator
Joined: Dec 20, 2001
Location: Diamond Springs, California
Total Topics: 61
Total Comments: 7868
Please give the info I requested in post #2.
The bulk of your processing time isn't query related, it appears to be a matter of having a large amount of HTML (40KB) to process. I see you have some javascript, you should really move that to the javascript header or other external javascript files so it doesn't get reloaded inside each page. The huge category selector may take the longest to parse though, I'd guess.
You also have a gazillion <!-- BEGIN REGULAR -->s in the result, not sure how you get that since my sites don't.
Also you've just got too high of a server load, over 5 at the moment, which makes every page longer. Is it possible for you to use guest caching?
Expert
Usergroup: Customer
Joined: Aug 19, 2005
Location: England
Total Topics: 391
Total Comments: 1303
Thanks Paul
Sorry - you guessed right - {LINKCOPYRIGHT} usually contains html of a url link. This also answers my problem in https://www.webmastersite.net/forums/threads/IF_co... as that IF condition also has a field with html of a url link.
Is there another way to include a live link in a text field?
The menu is basically a site map where I have a conditional to only show the top level cats. I guess it was still parsing every sub-cat though. I have now changed it and put them in plain html, although I liked it done automatically so when cats are added or changed I don't have to remember to change the wrapper.
I have also moved the javascript (silly me didn't think it would matter being in the header as it was only very small)
Doing just those two has now speeded the site up. Funny thing is it only slowed down after the latest couple of upgrades, prior to that it always loaded in about 3/4 seconds.
What is guest caching and how is it normally done?
PS I can now access your site ok! No idea what the problem was and I didn't do anything it just began working ok! I think I'm jinxed!
developer
Usergroup: Administrator
Joined: Dec 20, 2001
Location: Diamond Springs, California
Total Topics: 61
Total Comments: 7868
It's straight HTML, not a WSN code? I always strongly advise against HTML.
The menu is basically a site map where I have a conditional to only show the top level cats.
You could just make a toplist of categories where parent=0 instead.
What is guest caching and how is it normally done?
Admin -> Settings -> General, near the top, click the help icon by it.
Expert
Usergroup: Customer
Joined: Aug 19, 2005
Location: England
Total Topics: 391
Total Comments: 1303
It's straight HTML, not a WSN code? I always strongly advise against HTML.
.
OK, please realise I'm a bit thick. I tried to do a url link using wsncodes but can't see how to do it.
If I want to display the words "web site" and have it as a link to http://www.thedogscene.co.uk please show me exactly how I do it.
what here?
developer
Usergroup: Administrator
Joined: Dec 20, 2001
Location: Diamond Springs, California
Total Topics: 61
Total Comments: 7868
The field needs to be selected as one to parse WSN codes for at the bottom of Admin -> Settings -> General. If you have it selected and still don't know, click the "WSN Codes" link to the left of your post while you're typing it -- that shows a list of codes available.
Expert
Usergroup: Customer
Joined: Aug 19, 2005
Location: England
Total Topics: 391
Total Comments: 1303
It was parsed for wsncodes, I was actually trying to ask how to put the param as I couldn't get it working - it is now.
But it STILL will not display correctly with an if condition.
www.thedogscene.co.uk/detai...nd-body-language-1271.html
Scroll down to view the first paragraph in the red box. It doesn't make any difference if I use wsn codes or html
developer
Usergroup: Administrator
Joined: Dec 20, 2001
Location: Diamond Springs, California
Total Topics: 61
Total Comments: 7868
I see, it's converted to HTML long before then. And the PHP doesn't work because the value has quotes in it, and so can't be quoted. The only way to handle it seems to be if I make it so there's a special BOOL} version of everything, so <IF {LINKCOPYRIGHTBOOL}> can be used. Applied that for 4.0.22.
Expert
Usergroup: Customer
Joined: Aug 19, 2005
Location: England
Total Topics: 391
Total Comments: 1303
I see, it's converted to HTML long before then. And the PHP doesn't work because the value has quotes in it, and so can't be quoted. The only way to handle it seems to be if I make it so there's a special BOOL} version of everything, so <IF {LINKCOPYRIGHTBOOL}> can be used. Applied that for 4.0.22.
Thanks Paul, but unfortunately it doesn'g seem to be working and instead of the data of LINKCOPYRIGHT I get "Web Site>1" displayed.
www.thedogscene.co.uk/detai...nd-body-language-1271.html
developer
Usergroup: Administrator
Joined: Dec 20, 2001
Location: Diamond Springs, California
Total Topics: 61
Total Comments: 7868
You're not using it, there are no instances of <IF {LINKCOPYRIGHTBOOL}> in a search of www.thedogscene.co.uk/templ...plates/default/details.tpl
Expert
Usergroup: Customer
Joined: Aug 19, 2005
Location: England
Total Topics: 391
Total Comments: 1303
You're not using it, there are no instances of <IF {LINKCOPYRIGHTBOOL}> in a search of www.thedogscene.co.uk/templ...plates/default/details.tpl
I had to remove it because otherwise the article would be in violation of the copyright, ie not displaying the author's link.
developer
Usergroup: Administrator
Joined: Dec 20, 2001
Location: Diamond Springs, California
Total Topics: 61
Total Comments: 7868
Works perfectly for me. <IF {LINKDESCRIPTIONBOOL}>{LINKDESCRIPTION}</IF> shows when there's a description, regardless of how many wsn codes are in there.
Expert
Usergroup: Customer
Joined: Aug 19, 2005
Location: England
Total Topics: 391
Total Comments: 1303
OK, I tried it again and this time it worked! I do get this sometimes, don't know if it is my server or what
Thanks Paul