You are not logged in.
Version 0.3 download link / homepage
aks_var operate with Txp variables and Custom Fields.
Last edited by makss (2012-02-14 06:57:25)
aks_cron : Cron inside Textpattern | aks_article : extended article_custom tag
aks_cache : cache for TxP | aks_meta | aks_header : Compress your pages on the fly
Offline
aks_var v 0.2 released
<txp:aks_var value="<txp:title />" /> or <txp:aks_var><txp:title /></txp:aks_var>Last edited by makss (2009-04-20 20:55:46)
aks_cron : Cron inside Textpattern | aks_article : extended article_custom tag
aks_cache : cache for TxP | aks_meta | aks_header : Compress your pages on the fly
Offline
Looks like a helpful plug in, but Im not sure how to use it?
I have tried a few examples. the thing I am trying to do is add ALL custom field values together.
So, I have a custom field labled ‘Area’ and in this box the user enters the area of land that has been covered. (eg 1 = 1 acre)
What I want to do is add all the ‘Area’ custom fields together so as you image it outputs the total area!?
I’m not sure how to do this – I assume that is what this plug in can do?
Thanks
Oli
Offline
I’m getting an error and the result is not getting calculated… Any Ideas? r3105
Here’s my call
<txp:aks_evar customfield="price" substr="1" calc="*12" />
And here’s the errors
Parse error: syntax error, unexpected T_LNUMBER, expecting T_VARIABLE or '$' in /users/home/mrdale/domains/tld.com/web/public/textpattern/lib/txplib_misc.php(573) : eval()'d code(35) : eval()'d code on line 1
Offline
mrdale, thanks for report. Please upgrade plugin.
aks_var Version 0.2.1
Last edited by makss (2009-04-25 15:45:33)
aks_cron : Cron inside Textpattern | aks_article : extended article_custom tag
aks_cache : cache for TxP | aks_meta | aks_header : Compress your pages on the fly
Offline
oliverker wrote:
I have tried a few examples. the thing I am trying to do is add ALL custom field values together.
So, I have a custom field labled ‘Area’ and in this box the user enters the area of land that has been covered. (eg 1 = 1 acre)
What I want to do is add all the ‘Area’ custom fields together so as you image it outputs the total area!?
I’m not sure how to do this – I assume that is what this plug in can do?
I did not understand the question. My English is poor. :(
Do you have a lot of custom fields in a single article, and you want to display in total?
e.g. field1+field2+field3+…
aks_cron : Cron inside Textpattern | aks_article : extended article_custom tag
aks_cache : cache for TxP | aks_meta | aks_header : Compress your pages on the fly
Offline
almost, i want to a sum
article1 field1+article2 field1+article3 field1 …
= total
makss wrote:
Do you have a lot of custom fields in a single article, and you want to display in total?
e.g. field1+field2+field3+…
Offline
oliverker, please upgrade plugin.
aks_var Version 0.2.2
.
oliverker wrote:
almost, i want to a sum
article1 field1+article2 field1+article3 field1 … = total
1. Create new form t1:
<txp:if_custom_field name="field1"> <txp:aks_var name="total" calc="+<txp:aks_evar customfield='field1' />" /> </txp:if_custom_field>
2. Place this code to article:
<txp:aks_var name="total" value="0" /> - init total value <txp:article_custom form="t1" section="area" /> <txp:aks_evar name="total" /> - display value
Do you have a lot of custom fields in a single article, and you want to display in total?
e.g. field1+field2+field3+…
Calculate field1+field2 in one article:
==<txp:aks_evar calc="+0"><txp:aks_evar customfield="field1" />+<txp:aks_evar customfield="field2" /></txp:aks_evar>==
Last edited by makss (2009-04-27 07:31:07)
aks_cron : Cron inside Textpattern | aks_article : extended article_custom tag
aks_cache : cache for TxP | aks_meta | aks_header : Compress your pages on the fly
Offline