Smarty Forum Index Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon.

Search found 16 matches
Smarty Forum Index
Author Message
  Topic: News system and Smarty
arac-softec

Replies: 0
Views: 3347

PostForum: General   Posted: Wed Oct 01, 2008 8:54 am   Subject: News system and Smarty
I want to [url=http://winged.info/project/news]integrate a news system i have in my old site, with the new site i'm creating with smarty.

Is by any chance a plugin already created to accomplish the ...
  Topic: Concacenate two variables in template
arac-softec

Replies: 8
Views: 12803

PostForum: General   Posted: Wed Oct 01, 2008 8:48 am   Subject: Concacenate two variables in template
There's an overlib smarty plugin out there that might help you with your popups.

Thank's, i'll give it a try, despite the overlib site is down, i have an old overlib.js file, and i'll try it...

...
  Topic: Concacenate two variables in template
arac-softec

Replies: 8
Views: 12803

PostForum: General   Posted: Tue Sep 30, 2008 2:30 pm   Subject: Concacenate two variables in template
http://www.php.net/file_exists

Hummm, i don't want to mess with PHP at the template level, not yet...

Anyway, i've managed to work arround with this solution:
{assign var=img_url value=&qu ...
  Topic: Count queries used
arac-softec

Replies: 2
Views: 4462

PostForum: General   Posted: Tue Sep 30, 2008 2:23 pm   Subject: Count queries used
MAny thanks for the help...

Yes, i would like to count loop interactions, indeed...
And also the number of rows returned......

Maybe with a little example:

SQL / ARRAY 1:
Row 1
Row 2
...
  Topic: Concacenate two variables in template
arac-softec

Replies: 8
Views: 12803

PostForum: General   Posted: Tue Sep 30, 2008 1:06 pm   Subject: Concacenate two variables in template
First of all, I'd recommend you favor {foreach} over {section} Smile

You can {assign} your Image path to a temporary variable:
{assign var=img_src value="$imgpath`$imagesarray[n].i ...
  Topic: SQL template output issue
arac-softec

Replies: 2
Views: 4488

PostForum: General   Posted: Tue Sep 30, 2008 11:25 am   Subject: SQL template output issue
You could create a little more complicated Array in your PHP script and use two nested {foreach} loops to display the data.

Maybe kind of nested arrays???
Like this:

SQL OUTPUT:
Série 1 - ...
  Topic: SQL template output issue
arac-softec

Replies: 2
Views: 4488

PostForum: General   Posted: Mon Sep 29, 2008 5:14 pm   Subject: SQL template output issue
I've got a SQL (or smarty array) in wich the rows are like this:
Série 1 - Peça 1
Série 1 - Peça 2
Série 1 - Peça 3
Série 2 - Peça 10
Série 2 - Peça 11

I want to output the SQL/array in the te ...
  Topic: Concacenate two variables in template
arac-softec

Replies: 8
Views: 12803

PostForum: General   Posted: Mon Sep 29, 2008 4:43 pm   Subject: Concacenate two variables in template
Something like this?
{foreach from=$imagesarray item=image}
<img src="{$imgpath}{$image.image_name}">
{/foreach}

Well, not quite, just b ...
  Topic: Concacenate two variables in template
arac-softec

Replies: 8
Views: 12803

PostForum: General   Posted: Mon Sep 29, 2008 11:41 am   Subject: Concacenate two variables in template
Is there any way i can join two variables in an HTML Tag in a template, inside a loop???

Something like:
<img src="{$imgpath}{$imagesarray[n].image_name}" ...
  Topic: Count queries used
arac-softec

Replies: 2
Views: 4462

PostForum: General   Posted: Mon Sep 29, 2008 11:32 am   Subject: Count queries used
I would like to put a counter of the number of queries runned in the template (ie, loops runned)

Is there any smarty variable that holds this value???
Or there's any way i can do it from the templ ...
  Topic: Smarty & MySQL problem....
arac-softec

Replies: 1
Views: 3772

PostForum: General   Posted: Fri Sep 26, 2008 11:34 am   Subject: Smarty & MySQL problem....
I've tryed to use this tip (Fatal error: Call to undefined method Smarty::assign_md_array() in ........\index.php on line 80

The code i'm using is this one, on index.php:
...
require_once('in ...
  Topic: Creating themes inside smarty
arac-softec

Replies: 5
Views: 6756

PostForum: General   Posted: Fri Sep 26, 2008 11:17 am   Subject: Creating themes inside smarty
Hummmm, and if i have two users acessing the site at the same time, with diferente themes, they will clobber each other....

Simultaneous use doesn't matter, what matters is they share the same comp ...
  Topic: Creating themes inside smarty
arac-softec

Replies: 5
Views: 6756

PostForum: General   Posted: Wed Sep 24, 2008 4:20 pm   Subject: Creating themes inside smarty
Hummmm, and if i have two users acessing the site at the same time, with diferente themes, they will clobber each other....

Simultaneous use doesn't matter, what matters is they share the same comp ...
  Topic: Setting up MySQL recordset as array to be parsed by Smarty
arac-softec

Replies: 6
Views: 81182

PostForum: Tips and Tricks   Posted: Wed Sep 24, 2008 3:18 pm   Subject: Setting up MySQL recordset as array to be parsed by Smarty
Should you decide to implement Pagination, the way I have set it up in the first post will get you the total records that match the query as if the LIMIT clause wasn't there.

I assume your function ...
  Topic: Creating themes inside smarty
arac-softec

Replies: 5
Views: 6756

PostForum: General   Posted: Wed Sep 24, 2008 2:37 pm   Subject: Creating themes inside smarty
Well, currently i'm solving this like this:
index.php (site root)
...
$smarty->template_dir = 'smarty.tpl/inicial';
$smarty->config_dir = 'smarty.tpl/inicial/cfg';

$smarty->assign( ...
 
Page 1 of 2 Goto page 1, 2  Next
All times are GMT
Jump to:  


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