|
Geek Article and Review System GARS is the mega popular system for turning forums into articles, tutorials, or even reviews. |
Advertisement | |
Learn how to remove ads |
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
[Custom Field] How to hide when blank?
Hi!
I have added a custom filed [text] and show that on postbit! But my problem is hide and show that! Its field is not required. so it maybe left blank "NULL". How can I use something like <if> tag that couse when this field is blank not show and when it Inputed by thred starter show? thanks |
#2
|
||||
|
||||
Do you mean something like this:
<if condition="$post['gars5']">my value is $post[gars5]</if> |
#3
|
|||
|
|||
Yes!
It will show "my value is $post[gars5]" If its field is not blank? |
#4
|
||||
|
||||
Yup
|
#5
|
|||
|
|||
Good but a problem!
I added a text field and using that for a url. now when I use this code: Code:
<a href="$thread[gars7]"><img border="0" src="$stylevar[imgdir_misc]/sub.png"><br>Download $post[title]</a> But if i use this code in gars_threadbit it worked correctly! whats the problem u think? thanks a lot |
#6
|
|||
|
|||
I think I have to use "$post" in post related templates and "$thread" in thread related templates!
But not working anymore. I think some days ago I used this but now I cant! And what is different with "$post[gars5]" and "$post['gars5']" ! what do ' around the gars5 ? |
#7
|
||||
|
||||
In the threadbit templates, you need to use $thread[gars5] and in the postbit templates, use $post[gars5]
You only use $post['gars5'] (with the apostraphes) if it is in a conditional statement like <if condition="$post['gars5']"><strong>$post[gars5]</if> HTHs |
#8
|
|||
|
|||
Quote:
thanks Last edited by Asasi; 09-28-2006 at 10:16 AM.. |
#9
|
|||
|
|||
I did this but not working.
see! I have field no=7 ... I wnat to add a text like "aaa" that linked to no.7 custom field. and this is in postbit I have to edit "gars_pb" template and put this: Code:
<a href="$post[gars7]">aaa</a> |
#10
|
||||
|
||||
Does it appear in the custom fields module correctly?
|
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Custom field layout help | croft | Geek Article and Review System | 7 | 09-22-2007 06:05 AM |
Adsense in Custom Field? | soultrader | Geek Article and Review System | 1 | 10-10-2006 03:10 PM |
Custom Field Problem | soultrader | Geek Article and Review System | 2 | 10-03-2006 10:09 PM |
Custom Field problem | spadez | Geek Article and Review System | 1 | 09-24-2006 09:36 AM |
Custom field or custom module? | Richy | Geek Article and Review System | 6 | 06-07-2006 08:15 PM |