Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

 
Reply to this topicStart new topic
> [JavaScript][XML][PHP]Problem z wyświetlaniem animacji używając Smarty
Maker5
post 21.12.2012, 06:38:51
Post #1





Grupa: Zarejestrowani
Postów: 139
Pomógł: 0
Dołączył: 2.04.2008

Ostrzeżenie: (0%)
-----


Witam
mój problem jest następujący. Na naszej stronie chciałem wrzucić animację cu3er, popularny slider obrazków.
Na stronie używamy silnika SMARTY i w nim pojawia się problem przy próbie odtworzenia animacji.

www.gokbabimost.pl (teraz usunąłem poniższe dwa warunki które tworzą problem)

Oto kod animacji
Kod
<script type="text/javascript">
        var flashvars = {};
        flashvars.xml = "Scripts/config_cu3er.xml";
        flashvars.font = "font.swf";
        var attributes = {};
        attributes.wmode = "transparent";
        attributes.id = "slider";
        swfobject.embedSWF("misc/cu3er.swf", "cu3er-container", "585", "356", "9", "misc/expressInstall.swf", flashvars, attributes);
</script>


a oto błąd który się pojawia

Fatal error: Smarty error: [in default_public/cu3er.php line 10]: syntax error: unrecognized tag: (Smarty_Compiler.class.php, line 446) in /home/srw_gokbabimost/gokbabimost.pl/lib/Smarty/Smarty.class.php on line 1092

jeśli usunę te dwa znaczniki

Kod
        var flashvars = {};
        var attributes = {};


to błędu nie ma ale wtedy nie działa animacja sad.gif a znów z tymi warunkami powyżej jest błąd jakby silnik SMARTY nie rozpoznawał takich warunków ?

oto część kodu SMARTY gdzie ma wpisane różne warunki, może tu jakoś trzeba byłoby dopisać te dwa co ?
Smarty_Compiler.class.php

Kod
class Smarty_Compiler extends Smarty {

    // internal vars
    /**#@+
     * @access private
     */
    var $_folded_blocks         =   array();    // keeps folded template blocks
    var $_current_file          =   null;       // the current template being compiled
    var $_current_line_no       =   1;          // line number for error messages
    var $_capture_stack         =   array();    // keeps track of nested capture buffers
    var $_plugin_info           =   array();    // keeps track of plugins to load
    var $_init_smarty_vars      =   false;
    var $_permitted_tokens      =   array('true','false','yes','no','on','off','null');
    var $_db_qstr_regexp        =   null;        // regexps are setup in the constructor
    var $_si_qstr_regexp        =   null;
    var $_qstr_regexp           =   null;
    var $_func_regexp           =   null;
    var $_reg_obj_regexp        =   null;
    var $_var_bracket_regexp    =   null;
    var $_num_const_regexp      =   null;
    var $_dvar_guts_regexp      =   null;
    var $_dvar_regexp           =   null;
    var $_cvar_regexp           =   null;
    var $_svar_regexp           =   null;
    var $_avar_regexp           =   null;
    var $_mod_regexp            =   null;
    var $_var_regexp            =   null;
    var $_parenth_param_regexp  =   null;
    var $_func_call_regexp      =   null;
    var $_obj_ext_regexp        =   null;
    var $_obj_start_regexp      =   null;
    var $_obj_params_regexp     =   null;
    var $_obj_call_regexp       =   null;
    var $_cacheable_state       =   0;
    var $_cache_attrs_count     =   0;
    var $_nocache_count         =   0;
    var $_cache_serial          =   null;
    var $_cache_include         =   null;

    var $_strip_depth           =   0;
    var $_additional_newline    =   "\n";

    /**#@-*/
    /**
     * The class constructor.
     */
    function Smarty_Compiler()
    {

proszę o pomoc
Go to the top of the page
+Quote Post
viking
post 21.12.2012, 07:30:07
Post #2





Grupa: Zarejestrowani
Postów: 6 377
Pomógł: 1116
Dołączył: 30.08.2006

Ostrzeżenie: (0%)
-----


Dawno nie korzystałem ze smarty ale jedno co się od razu rzuca w oczy to właśnie te klamry które są w nim wykorzystywane ze znaczeniem specjalnym.
http://www.smarty.net/docs/en/language.escaping.tpl


--------------------
Go to the top of the page
+Quote Post
Maker5
post 21.12.2012, 10:21:37
Post #3





Grupa: Zarejestrowani
Postów: 139
Pomógł: 0
Dołączył: 2.04.2008

Ostrzeżenie: (0%)
-----


Cytat(viking @ 21.12.2012, 07:30:07 ) *
Dawno nie korzystałem ze smarty ale jedno co się od razu rzuca w oczy to właśnie te klamry które są w nim wykorzystywane ze znaczeniem specjalnym.
http://www.smarty.net/docs/en/language.escaping.tpl


możesz rozwinąć swoją myśl tak abym rozwiązał ten problem ?
Go to the top of the page
+Quote Post
viking
post 22.12.2012, 07:09:41
Post #4





Grupa: Zarejestrowani
Postów: 6 377
Pomógł: 1116
Dołączył: 30.08.2006

Ostrzeżenie: (0%)
-----


Ale którą część? Masz dokładnie opisane w dokumentacji co zrobić, jak i ewentualnie jak alternatywnie zmienić zachowanie. Co jest niezrozumiałe?


--------------------
Go to the top of the page
+Quote Post
d3ut3r
post 22.12.2012, 10:09:58
Post #5





Grupa: Zarejestrowani
Postów: 709
Pomógł: 176
Dołączył: 24.10.2010

Ostrzeżenie: (0%)
-----


http://www.smarty.net/docs/en/language.function.literal.tpl

Nie zauważyłem, że odpowiedź już padła smile.gif w każdym razie {literal} rozwiąże problem

Ten post edytował d3ut3r 22.12.2012, 10:10:44


--------------------
http://d3ut3r.wordpress.com/ | mysql_* jest przestarzałe UŻYWAJ PDO!
Go to the top of the page
+Quote Post
Maker5
post 22.12.2012, 10:12:54
Post #6





Grupa: Zarejestrowani
Postów: 139
Pomógł: 0
Dołączył: 2.04.2008

Ostrzeżenie: (0%)
-----


Cytat(d3ut3r @ 22.12.2012, 10:09:58 ) *
http://www.smarty.net/docs/en/language.function.literal.tpl

Nie zauważyłem, że odpowiedź już padła smile.gif w każdym razie {literal} rozwiąże problem


a mógłbym prosić o przykład w tym konkretnym przypadku ?
nie jestem mega znawcą tego tematu dlatego proszę o wytłumaczenie jak przedszkolakowi sad.gif
Go to the top of the page
+Quote Post
d3ut3r
post 22.12.2012, 10:59:42
Post #7





Grupa: Zarejestrowani
Postów: 709
Pomógł: 176
Dołączył: 24.10.2010

Ostrzeżenie: (0%)
-----


[JAVASCRIPT] pobierz, plaintext
  1. <script type="text/javascript">
  2. {literal}
  3. var flashvars = {};
  4. flashvars.xml = "Scripts/config_cu3er.xml";
  5. flashvars.font = "font.swf";
  6. var attributes = {};
  7. attributes.wmode = "transparent";
  8. attributes.id = "slider";
  9. swfobject.embedSWF("misc/cu3er.swf", "cu3er-container", "585", "356", "9", "misc/expressInstall.swf", flashvars, attributes);
  10. {/literal}
  11. </script>
[JAVASCRIPT] pobierz, plaintext


--------------------
http://d3ut3r.wordpress.com/ | mysql_* jest przestarzałe UŻYWAJ PDO!
Go to the top of the page
+Quote Post
Maker5
post 22.12.2012, 21:19:36
Post #8





Grupa: Zarejestrowani
Postów: 139
Pomógł: 0
Dołączył: 2.04.2008

Ostrzeżenie: (0%)
-----


Cytat(d3ut3r @ 22.12.2012, 10:59:42 ) *
[JAVASCRIPT] pobierz, plaintext
  1. <script type="text/javascript">
  2. {literal}
  3. var flashvars = {};
  4. flashvars.xml = "Scripts/config_cu3er.xml";
  5. flashvars.font = "font.swf";
  6. var attributes = {};
  7. attributes.wmode = "transparent";
  8. attributes.id = "slider";
  9. swfobject.embedSWF("misc/cu3er.swf", "cu3er-container", "585", "356", "9", "misc/expressInstall.swf", flashvars, attributes);
  10. {/literal}
  11. </script>
[JAVASCRIPT] pobierz, plaintext


niestety nie działa. nie ma już na szczęscie błędu ale nie pokazuje animacji sad.gif
Go to the top of the page
+Quote Post

Reply to this topicStart new topic
1 Użytkowników czyta ten temat (1 Gości i 0 Anonimowych użytkowników)
0 Zarejestrowanych:

 



RSS Wersja Lo-Fi Aktualny czas: 12.06.2025 - 12:32