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 27 matches
Smarty Forum Index
Author Message
  Topic: Smarty: Time-Modifications
omexlu

Replies: 6
Views: 5878

PostForum: General   Posted: Sat May 05, 2018 1:32 pm   Subject: Smarty: Time-Modifications
Hi,

After some testings i think i have found a better way to do this with math function:
{math equation="a - (60 * b)" a=$getRow.date|strtotime b="10" assign=" ...
  Topic: Smarty: Time-Modifications
omexlu

Replies: 6
Views: 5878

PostForum: General   Posted: Sat May 05, 2018 9:25 am   Subject: Smarty: Time-Modifications
Hello,

Thanks for you reply.

$getRow.time CONTAINS ONLY a number = 11

Maybe somthing like that is possible?:
{"`$getRow.date` -`$getRow.time` minutes"|strtotime|date_format&# ...
  Topic: Smarty: Time-Modifications
omexlu

Replies: 6
Views: 5878

PostForum: General   Posted: Sat May 05, 2018 3:12 am   Subject: Smarty: Time-Modifications
Hello,

I have a variabel {$getRow.date} (comes from a foreach loop) who contains a mysql datestamp and a second variable {$getRow.time} who contrains a string (example: 11 [min.]).

How can i now ...
  Topic: is it possible to add time to a variable:
omexlu

Replies: 5
Views: 5769

PostForum: General   Posted: Wed Nov 29, 2017 1:07 pm   Subject: is it possible to add time to a variable:
Hi,

Okay thank you.

How can i use second parameter in template with the costumer modifier?:
$smarty->registerPlugin("modifier","demoTPL", "demo");

f ...
  Topic: is it possible to add time to a variable:
omexlu

Replies: 5
Views: 5769

PostForum: General   Posted: Sun Nov 26, 2017 4:30 pm   Subject: is it possible to add time to a variable:
Thanks for your reply.

Yes sure but it is not possible to do this in template?
  Topic: is it possible to add time to a variable:
omexlu

Replies: 5
Views: 5769

PostForum: General   Posted: Sun Nov 26, 2017 8:01 am   Subject: is it possible to add time to a variable:
Hello,

I have one question is it possible to add time to a variable:
{$lastSportEntry.date|"+1 hour"|date_format:"%H:%M:%S"}

This don't work, is this p ...
  Topic: Count passed days from date?
omexlu

Replies: 5
Views: 9441

PostForum: General   Posted: Mon May 22, 2017 3:14 am   Subject: Count passed days from date?
Very easy Smile

First:
// create modifer
$smarty->registerPlugin("modifier","date_timestamp", "print_current_date");

function print_current_date($stri ...
  Topic: Count passed days from date?
omexlu

Replies: 5
Views: 9441

PostForum: General   Posted: Sun May 21, 2017 7:12 pm   Subject: Count passed days from date?
Hi,

I am not really the php profi Smile

I don't know how to implement that if i have the foreach already in the tpl (date).

Maybe you can give more informations or maybe a functional example?
...
  Topic: Count passed days from date?
omexlu

Replies: 5
Views: 9441

PostForum: General   Posted: Sun May 21, 2017 6:47 am   Subject: Count passed days from date?
Hello,

I have the follwing in a foreach from mysql:
{foreach $rowsEntryLiquids as $rowEntryLiquids}
{$rowEntryLiquids.date|date_format:"%d / %m / %Y"}
{/f ...
  Topic: Problem with foreach
omexlu

Replies: 3
Views: 5780

PostForum: General   Posted: Tue Jan 24, 2017 12:11 pm   Subject: Problem with foreach
Hello,

Is it also possible to put a third query in the foreach?
If yes how?

$rows4 = array();
$result4 = mysql_query("SELECT * FROM stats_follow ORDER BY id DESC LIMIT 5&q ...
  Topic: Foreach in php und in tpl ausgeben
omexlu

Replies: 2
Views: 20709

PostForum: Language: German   Posted: Mon May 30, 2016 7:50 am   Subject: Foreach in php und in tpl ausgeben
Works thanks Smile
  Topic: Foreach in php und in tpl ausgeben
omexlu

Replies: 2
Views: 20709

PostForum: Language: German   Posted: Sun May 29, 2016 11:51 am   Subject: Foreach in php und in tpl ausgeben
Hallo,

Ich arbeite gerade an einer API die das Wetter ausliesst und diese wird normal so abgerufen (in php):
foreach($conditions_today as $cond) {

$echo $cond->getTime(' ...
  Topic: Random ausgabe im TPL
omexlu

Replies: 7
Views: 29907

PostForum: Language: German   Posted: Fri Apr 22, 2016 9:20 am   Subject: Random ausgabe im TPL
Hi,

Unfortantly your version dont work but i have found a way todo this:

{assign var='randomKey' value=1|rand:2}
{if $randomKey == "1"}
DOSOMETHING
{els ...
  Topic: Random ausgabe im TPL
omexlu

Replies: 7
Views: 29907

PostForum: Language: German   Posted: Thu Apr 21, 2016 7:36 pm   Subject: Random ausgabe im TPL
I dont have i testet now but if seems to be this after i looked the code i give it a try tomorror Smile

Thanks a lot.
  Topic: Random ausgabe im TPL
omexlu

Replies: 7
Views: 29907

PostForum: Language: German   Posted: Thu Apr 21, 2016 6:57 pm   Subject: Random ausgabe im TPL
What should be done inside the loop?

Hi,

I want to display two different foreach-loops who display different infos that comes from mySQL (differrent tables).

And now i want that it displayes ...
 
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