WebmasterSite.net: PHP scripts to enable your creativity
WSN Links PHP Directory Software
PHP Scripts Webmaster Links Support Forums

Register | Forgot Password

Description problems

Version: 4.1.0. rc2
Example URL: http://www.thefishingscene.co.uk
printPrint


Description problems
babrees
Expert
Avatar

Usergroup: Customer
Joined: Aug 19, 2005
Location: England
Total Topics: 312
Total Posts: 1032
Posted 09/13/07 - 01:26 AM:
quote post
#1
I have two identical sites that I am trying out and perfecting the latest 4.1 version.

http://www.thefishingscene.co.uk and http://www.thebirdscene.co.uk

When adding a link of the type article with just, say, 1 or 2 lines in the description everything is fine and looks great. However, add, say, a reasonable paragraph in the description and it goes bonkers <G> debug is attached. Delete the description and errors disappear but the added field for catphotoattach then shows an empty image.

This only appears to happen when the type is article, so I guess I have done something wrong but blowed if I can see what!

I also attach my linkbits for article type and displaylinks.tpl

This problem is seen on http://thefishingscene.co.uk/index.php?action=displaycat&catid=2


Attached Files:
displaylinks.tpl
(8 KB, 15 downloads)
linkbitarticle.tpl
(3 KB, 16 downloads)
article-debug.txt
(16 KB, 13 downloads)
Paul
Administrator
Avatar

Usergroup: Administrator
Joined: Dec 21, 2001
Location: Northern California
Total Topics: 57
Total Posts: 6312
Posted 09/13/07 - 01:49 AM:
quote post
#2
You need to use the BOOL} template variables appendage for conditionals if you want to test whether something has a value or not. When you use the regular variable, conditionals will die on complex multi-line values.

BOOL} was added sometime around 4.0.30 and has a brief description here: "Sometimes (when you're writing a template conditional) instead of wanting the value of a field you just want to determine whether the field has anything in it or not. To do this you add BOOL to the end of your regular template variable. If you want to check the link field fieldname, for example, use {LINKFIELDNAMEBOOL}."

I'm editing another mention into the conditionals article.

Edited by Paul on 09/13/07 - 01:56 AM

"Do things you love doing, because then it ain't work. Don't do something you don't really enjoy, because you're never going to work hard enough at it." - Bob Young, founder of Red Hat
babrees
Expert
Avatar

Usergroup: Customer
Joined: Aug 19, 2005
Location: England
Total Topics: 312
Total Posts: 1032
Posted 09/13/07 - 03:55 AM:
quote post
#3
Thanks Paul.

I originally had bool for the description field and took it off thinking that it might be wrong to have it there! I have put it back and (touch wood <G>) so far it looks ok.

You state in the manual bool is needed "sometimes". How do we know just when to use it and when not to?

I see that you have also added a "currency" which is great!


Paul
Administrator
Avatar

Usergroup: Administrator
Joined: Dec 21, 2001
Location: Northern California
Total Topics: 57
Total Posts: 6312
Posted 09/13/07 - 08:26 PM:
quote post
#4
Anytime you're doing a conditional testing for a true/false.

"Do things you love doing, because then it ain't work. Don't do something you don't really enjoy, because you're never going to work hard enough at it." - Bob Young, founder of Red Hat
babrees
Expert
Avatar

Usergroup: Customer
Joined: Aug 19, 2005
Location: England
Total Topics: 312
Total Posts: 1032
Posted 09/13/07 - 09:09 PM:
quote post
#5
Paul wrote:
Anytime you're doing a conditional testing for a true/false.



so, basically, every IF statement?
Paul
Administrator
Avatar

Usergroup: Administrator
Joined: Dec 21, 2001
Location: Northern California
Total Topics: 57
Total Posts: 6312
Posted 09/13/07 - 11:20 PM:
quote post
#6
Well, if you want to do an <IF {LINKDESCRIPTION} contains special trigger phrase>show something</IF> then you have to use {LINKDESCRIPTION}, {LINKDESCRIPTIONBOOL} won't help you.

"Do things you love doing, because then it ain't work. Don't do something you don't really enjoy, because you're never going to work hard enough at it." - Bob Young, founder of Red Hat
Search thread for
Download thread as


You don't have permission to post.

Please login or register.

   
 
© 2008 Paul Knierim. All rights reserved.