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

Search found 29 matches
Smarty Forum Index
Author Message
  Topic: Correct setting of languages with Smarty
fornve

Replies: 3
Views: 3545

PostForum: General   Posted: Fri Mar 11, 2011 2:51 pm   Subject: Correct setting of languages with Smarty
Hi topliset,

It is good solution which I used successfully as well. Recently I have developed something different such translation blocks.

In smarty template it looks like:

{t}String to trans ...
  Topic: Błąd: Unable to write to $compile_dir
fornve

Replies: 1
Views: 8946

PostForum: Language: Polish   Posted: Fri Oct 22, 2010 12:15 pm   Subject: Błąd: Unable to write to $compile_dir
Faktycznie dziwne.

Sprawdz moze czy /var/www/html/ jest dostepny dla httpd, czy httpd moze 'read & execute' (z natury tego katalogu powinno byc ok).

Najwyzej zmien $compile_dir na '/tmp'

...
  Topic: Wyswietlanie wynikow z warunkiem
fornve

Replies: 1
Views: 8114

PostForum: Language: Polish   Posted: Sat Sep 04, 2010 11:20 pm   Subject: Wyswietlanie wynikow z warunkiem
Zakladajac ze mamy objekty w tablicy ( mysqli_fetch_object ) i porownujemy ceny

{foreach from=$data item=row loop=data_loop}
{if !$smarty.foreach.data_loop.first && $row- ...
  Topic: Edytowanie jednej wartości w innym pliku
fornve

Replies: 1
Views: 7714

PostForum: Language: Polish   Posted: Sat Sep 04, 2010 11:14 pm   Subject: Edytowanie jednej wartości w innym pliku
Na to pytanie chyba nie bedzie odpowiedzi, chyba ze 'Co ma piernik do wiatraka'.

Przykro mi ale nie bardzo wiadomo o co chodzi.
  Topic: Problem z array i obiektem.
fornve

Replies: 1
Views: 9102

PostForum: Language: Polish   Posted: Sat Sep 04, 2010 11:11 pm   Subject: Problem z array i obiektem.
Heja!

Try


{assign var=tableElement value=$Tablica.$ObiektDOM}
{if $tableElement->getAttribute('admin') == true}
cosik
{/if}


Niestety smarty (w ...
  Topic: Pliki z językami
fornve

Replies: 1
Views: 8466

PostForum: Language: Polish   Posted: Wed Mar 03, 2010 12:15 pm   Subject: Pliki z językami
Odpowiedzialem Wink
  Topic: [HELP]Including language files
fornve

Replies: 2
Views: 13094

PostForum: Tips and Tricks   Posted: Wed Mar 03, 2010 12:14 pm   Subject: [HELP]Including language files
You can do this simpler.

In controller:


include(ROOT_PATH .'Languages/'. $language .'/main.php');
$smarty->assign( 'language', $language ); // $language taken somehow fro ...
  Topic: problem nowicjusz
fornve

Replies: 1
Views: 8031

PostForum: Language: Polish   Posted: Fri Jan 08, 2010 12:36 am   Subject: problem nowicjusz
<?php

$smarty->assign("autor", "Marcin Razynski");


?>

Zapomniales $

Uprzedzajac kolejny blad, czy $smarty jest zadeklarowane wczesniej?


Pozdrawi ...
  Topic: Alternating Row Colors
fornve

Replies: 8
Views: 50332

PostForum: Tips and Tricks   Posted: Wed Aug 19, 2009 8:43 pm   Subject: Alternating Row Colors
see {if $smarty.foreach.transaction_loop.index%2} class="odd"{/if} in code below

and don't forget to set name=transaction_loop in foreach statement

<table class="datatable&qu ...
  Topic: One copy of Smarty for all websites in the server
fornve

Replies: 9
Views: 17455

PostForum: Tips and Tricks   Posted: Sat Jul 04, 2009 7:49 am   Subject: One copy of Smarty for all websites in the server
1. Download and unpack smarty.

2. sudo mkdir /usr/share/php/smarty

3. sudo mv {unpacked_smarty}/libs/* /usr/share/php/smarty

4. Add /usr/share/php/smarty to php.ini include_path

5. Restart ...
  Topic: Another ecommerce with smarty
fornve

Replies: 3
Views: 14468

PostForum: Showcase   Posted: Fri Jul 03, 2009 10:55 pm   Subject: Another ecommerce with smarty
Sources: http://github.com/fornve/Sum-e.com-shop/tree/master
Demo: http://shop.sunforum.co.uk
Homepage: http://sum-e.com <- uses smarty as well Wink

I love smarty!
  Topic: podstawy
fornve

Replies: 1
Views: 6972

PostForum: Language: Polish   Posted: Tue May 26, 2009 11:20 am   Subject: podstawy
'parse' i 'text' nie sa wbudowane w smarty. Poszukaj klasy XTemplate w Twoim kodzie, te metody powinny sie tam znajdowac.
  Topic: Dostanie si&#281; pod wskazany indeks tablicy :-)
fornve

Replies: 1
Views: 6038

PostForum: Language: Polish   Posted: Fri May 15, 2009 4:06 pm   Subject: Dostanie si&#281; pod wskazany indeks tablicy :-)
Powinno to dzialac
{$Array.Foo->get()}

lub sprobuj:


{assign var=object value=$Array.Foo}
{$object->get()}
  Topic: Smarty , Zmienna $file
fornve

Replies: 1
Views: 8810

PostForum: Language: Polish   Posted: Thu Apr 09, 2009 9:21 am   Subject: Smarty , Zmienna $file
a co sie pokazuje gdy na poczatku index.php dasz:

var_dump( $show );

woogole skad bierzesz te zmienna?

a moze

var_dump( $_GET[ 'show' ] );

Pozdrawiam
  Topic: Metoda zwracajaca obiekt
fornve

Replies: 2
Views: 7668

PostForum: Language: Polish   Posted: Tue Mar 10, 2009 8:34 am   Subject: Metoda zwracajaca obiekt

{assign var=category value=$Article->ShowCategory()}
{$category->ShowName()}
 
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