smarty

Jquery add table row after the row which calling the jquery.

Hello! I've got a table. <table id="servers" ...> ... {section name=i loop=$ownsites} <tr id="site_id_{$ownsites[i].id}"> ... <td>{$ownsites[i].phone}</td> <td class="icon"><a id="{$ownsites[i].id}" onClick="return makedeleterow(this.getAttribute('id'));" ...></a></td> </tr> {/section} <tbody> </table> And this java script. <...

"Ghost" values in PHP/Smarty.

I've been working on a site for a while changing the layout and skin of a webshop checkout process. I've noticed that if you go all the way through the process until the last page, then click the link to go back to the view products page, the delivery method price displays underneath the navigation buttons, until you refresh and it goes ...

Smarty: including a template file from the same directory

I have a Smarty template located in a directory under templates_dir: templates/some/dir/template.tpl . In the same directory, I have a sub-template: templates/some/dir/_component.tpl . I can't include the sub-component using an unqualified include, since apparently it looks it up under the templates_dir: {include file='_component.tpl'}...

[Smarty] Looking for variables which aren't assigned.

What could happen if my template looks for variables which weren't assigned? For example: var id = '{$tpl_id}'; This snippet is from my javascript code. I outputted the value and it is simply empty. I know I could use isset(). But I couldn't find anything about how Smarty handles non-existing variables. So, what happens if a template...

Smarty/PHP loop not being passed to IE(Pc) or Chrome/FF(Mac)

Hi, I've been working on a site that has a lot of PHP/Smarty involved, I've been asked to re-skin a webstore checkout process, but during this we've discovered this issue. This particular quirk is one part of a tax calculation that doesn't get sent to the browser in IE for PC and Chrome/FF for the Mac. It's NOT in the output source in th...

Echo certain value from smarty array

Hi, So currently I have an array with smarty.. {foreach from=$_sequences key=k item=v} Name => {$v.menu} Type => {$v.type} Step => {$v.pri} Data =>{$v.data} {/foreach} which gives me: Name => Test Type => Audio Step => 1 Data => audio1 Name => Test2 Type => Audio Step => 2 D...

Using str_replace with smarty variable

Hello, Basically I just want to strip out a part of my smarty variable contents. {foreach from=$_sequences key=k item=v} {if $v.pri == $smarty.get.cf && $v.type == 'TTS'} {$v.data} {/if} {/foreach} {$v.data} will echo out 21,5555555555 I want it to only echo out 5555555555. I tried str_replace but couldn't get it working.. str_...

jQuery toggle show XHTML Smarty some clahes maybe? It doesn't show..

Hi, at this page new customer, there is some clash between the two scripts. I have been asked to make the content shown when clicking the "ny kunde" button. This script works fine now, thanks to Voyta. There is another script made by another person that finds Company CEO information and inputs the data into the fields. When I put th...

Integrating Smarty into Zend Framework 1.10

Hello, I searched through Google and there was little to no information about how to integrate Smarty 2.x into Zend Framework 1.10. Can anyone teach me how to do so? ...

smarty tags and css condition tags are the same,what is the solution?

hi i want to design a theme for postnuke cms. and want to use css condition in the template files. postnuke use smarty tag like <!--[if $n eq ''] -->....<!--[/if]--> so when i use <!--[if lt IE 7]>....<![endif]--> it gives some errors about tags. what can i do? ...

smarty assign to javascript external

hi folks, here in index.tpl here in javas.js var currentTS = "{literal}{$userid}{/literal}"; alert(currentTS); but there will be alert {literal}{$userid}{/literal} not the $userid. any idea? ...

php smarty is there a way to log who logs in to the site?

I guess if it is possible, that it will be some crazy convoluted way, but my client has asked me to try to create a log file of people who log in to the site. Is there a way to do this? I don't know php/smarty so well, I'm more of a layout person. Thanks. ...

php smarty not passing to browser unless logged in.

I'm not the best at understanding these things with php and smarty, but this is really annoying. On: http://www.euroworker.no/order, there is meant to be a display of the amount of tax included in the price like: Tax (25%): 772,- Totalt: 3861,- But unless the user has logged in or created a new account, the tax doesn't displa...

How do I know which include path will be used in PHP?

When I run phpinfo() and look by the Configuration category under PHP Core, I see a directive titled include_path, with a local value and a master value. In this case, my local value is set to .: ./include: ../include: /usr/share/php: /usr/share/php/smarty: /usr/share/pear and my master value is set to .: /usr/share/php: /usr/shar...

How to throw a server side error message in thickbox using php

Hi all, My prob in brief: I am validating a registration form with server side using php and its working fine. Now my prob is i need to show the error message using thickbox like popup. Is that possible. If yes please explain how? thanks in advance Code: <script type="text/javascript" src="thickbox/jquery-latest.js"></script> <sc...

{textarea} smarty php

Hi, further to a previous question, I have this code: <p class="required"> {err for="msg"} <!--{{label {t _inquiry_msg}:}}--> {textarea onblur="if(this.value=='') this.value='Skriv her';" onfocus="if(this.value=='Skriv her') this.value='';"} {/err} </p> And I want the output to be <textarea onblur="if(this.value=='')...

how to make smarty's display function return to a variable

In smarty is it possible or is there any kind of function to render a template and return the result? for example: $rendered_content = $smarty->render("content.html") ...

Accessing variable in Smarty Array

Hi, I'm trying to access a variable in a smarty array. The array is called product and contains loads of values. A print_r dump of the array is shown below Array ( [0] => Array ( [itemid] => 4 [productid] => 31 [productcode] => 1658303 [product] => ENERGIZER 628504 COMP RECH...

Templating Engine Pros and Cons with Zend Framework

I am getting familiar with Zend Framework (and MVC with PHP in general) for a personal project. I have previous experience with Smarty and have no major gripes with it, but I would like to use this project as a good in-depth learning exercise. Those of you familiar with different templating engines and ZF: Do you believe there are better...

An internal error occurred during runtime. Smarty

WARNING [2] include(somepath/templates_c/%%B0^B01^B019F522%%login.htm.php) [function.include]: failed to open stream: No such file or directory on Line No 1871 in somepath/Smarty.class.php Error!: An internal error occurred during runtime. Any body please tell me why this error is occuring.. ...