Home News Contact Us Forum About Us Demos Products F.A.Q.
Shopping Cart
You currently have 0 items in your cart.


Recent Events
  • 18/11/2017 Black Friday is coming

    Don't wait BLACK FRIDAY, use FRIDAY17 coupon code to get 35% discount for all our extensions right now.

  • 05/09/2017 BIG Autumn SALE

    Use AUTUMN17 coupon code to buy our WordPress or Joomla! extensions with 25% discount. Hurry up! The offer is valid till 11 September.


2Checkout.com, Inc. is an authorized retailer of goods and services provided by ARI Soft. 2CheckOut




Follow us on twitter



Welcome, Guest
Please Login or Register.    Lost Password?

Using variable in CSVTable tag
(1 viewing) (1) Guest
Go to bottomPage: 12
TOPIC: Using variable in CSVTable tag
*
#44587
Using variable in CSVTable tag 4 Years, 2 Months ago Karma: 0
Hi,

I need to do something pretty simple, I'm outputting tables with rows as dates, and I need to have the offset use a variable that is calculated as the week number (of the year)... so the table returns the first row as the current calendar week.

I'm not particularly savvy with PHP, so anything I've tried hasn't seemed to work.

How would I do this?
The administrator has disabled public write access.
 
#44588
Re: Using variable in CSVTable tag 4 Years, 2 Months ago Karma: 0
Just to clarify... the tables are already in date order, I just need to pass the variable to tell it to put the offset at what the week-finding-function returns.
The administrator has disabled public write access.
 
#44595
Re: Using variable in CSVTable tag 4 Years, 2 Months ago Karma: 670
Hello,

Do you want to extract week number from date and show it instead of date?

Regards,
ARI Soft
The administrator has disabled public write access.
 
#44597
Re:Using variable in CSVTable tag 4 Years, 2 Months ago Karma: 0
Nope, I just need to be able to pass the variable through the 'offset' tag, then display the table starting at the row corresponding to that current week number

I was going to set it using something like:

$weekNumber = date("W");
Last Edit: 2013/09/23 00:09 By openstretchbus.
The administrator has disabled public write access.
 
#44599
Re:Using variable in CSVTable tag 4 Years, 2 Months ago Karma: 670
"Offset" accepts a number and it is used to retrieve records starting from entered number. It is not possible to filter it is by week number.

Regards,
ARI Soft
The administrator has disabled public write access.
 
#44624
Re:Using variable in CSVTable tag 4 Years, 2 Months ago Karma: 0
I'm not attempting to do so.

What I need is simply is some way to pass a number (as a variable) to the 'offset' tag.

For example:

I have tables that have rows in date order. I need to have the site figure out the week number of the year, then pass that to the ARI data table so it skips the requisite numbers of rows to the current location that represents the current week.

I don't need to filter at all. I just need to somehow take a function, calculate the week number, then pass that number into the offset="$variable" position.

That is possible, isn't it?
The administrator has disabled public write access.
 
Go to topPage: 12