Smarty Forum Index Smarty
The discussions here are for Smarty, a template engine for the PHP programming language.

Use graphs with smarty codes

 
Post new topic   Reply to topic    Smarty Forum Index -> Help Wanted (commercial)
View previous topic :: View next topic  
Author Message
Dominick
Smarty n00b


Joined: 27 Jun 2009
Posts: 3

PostPosted: Sat Jun 27, 2009 1:37 pm    Post subject: Use graphs with smarty codes Reply with quote

Hi,

I want to use flot with smarty commands.

I want to use this graph script called flot

I already have kinda a graph, but its more a table. but this is the code:
<p>These are your listings stats for this month.</p>
<table width="100%" border="0" cellspacing="3" cellpadding="3">
{foreach from=$my_stats item="entry"}
<tr>
<td width="0%" class="{cycle values="row1,row2" advance=false name=class}" nowrap="nowrap">{$entry.date}</td>
<td width="100%" class="{cycle values="row1,row2" advance=false name=class}" nowrap="nowrap"><img src="modules/listingstats/images/{cycle values="blue,green,orange,red" name=color advance=false}-left.gif" width="3" height="10"><img src="modules/listingstats/images/{cycle values="blue,green,orange,red" name=color advance=false}.gif" width="{$entry.percentage}%" height="10"><img src="modules/listingstats/images/{cycle values="blue,green,orange,red" name=color advance=true}-right.gif" width="3" height="10"></td>
<td width="0%" class="{cycle values="row1,row2" advance=true name=class}" nowrap="nowrap">{$entry.total}</td>
</tr>
{/foreach}
</table>


Please quote me!
This post is urgent (within a month)

Dominick
Back to top
View user's profile Send private message
elpmis
Smarty Elite


Joined: 07 Jun 2007
Posts: 321

PostPosted: Mon Jun 29, 2009 10:38 am    Post subject: Re: Use graphs with smarty codes Reply with quote

Dominick wrote:

I want to use this graph script called flot


Do you mean this one?

http://code.google.com/p/flot/

And whats your question/problem?
Back to top
View user's profile Send private message
Dominick
Smarty n00b


Joined: 27 Jun 2009
Posts: 3

PostPosted: Mon Jun 29, 2009 12:04 pm    Post subject: Reply with quote

Hi,

well, i have data (date, and the number of visits)
And i want to show this data in a graph (so visitors will see a nice graph with the amount of visitors).

And because i dont have the knowledge to do this, i am looking for someone who can do this for money.
Back to top
View user's profile Send private message
elpmis
Smarty Elite


Joined: 07 Jun 2007
Posts: 321

PostPosted: Wed Jul 01, 2009 6:32 pm    Post subject: Re: Use graphs with smarty codes Reply with quote

Normally the loop should work with

Code:
{foreach from=$my_stats item=entry}


(without "..")
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Smarty Forum Index -> Help Wanted (commercial) All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group
Protected by Anti-Spam ACP