need help with changes to index.tpl

Random stuff about serendipity. Discussion, Questions, Paraphernalia.
Post Reply
Ralf Skirr
Regular
Posts: 30
Joined: Fri Jan 26, 2007 4:42 pm

need help with changes to index.tpl

Post by Ralf Skirr »

Hi,

I'm a smarty-dummy ;-) and need help with integrating a web form into my index.tpl.

I really need it done and I'm willing to pay for it.
(Better than wasting more hours to try on my own. I'm done with that.)

What I want to do:
I want to integrate an html from that submits user name and email and a hidden field. The form uses some javascript to get a parameter from the browser address line that is then added to the hidden field.

Most of the code is working fine on a normal html page but not with the smarty template. I guess it has to do with the Javascript that creates a variable from the URL parameter.
Fatal error: Smarty error: [in /www/htdocs/w0080657/templates/bazooka/index.tpl line 40]: syntax error: unrecognized tag 'var'
Here's a html-copy of the template where you can check the source code.
The Javascript and the form are on lines 30-71 and 89-138.
http://internetbusinessmastermind.com/test/index-2.htm

A second thing that is not working right now is clearing the fields after submitting. [onsubmit=myform.reset();]

If you can fix this please send me message (or post) and state a price.

Thanks,
Ralf
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: need help with changes to index.tpl

Post by garvinhicking »

Hi!

Try to enclose all javascript you need to use with {literal}...{/literal}. Or you must replace every { with {ldelim} and every } with {rdelim} inside your javascript.

{ and } are reserved keywords for Smarty.

I belive this is also contained in the s9y FAQ :)

Regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
Ralf Skirr
Regular
Posts: 30
Joined: Fri Jan 26, 2007 4:42 pm

Re: need help with changes to index.tpl

Post by Ralf Skirr »

Thanks for the tip, I'll try that.

I feel so clumsy when working in any code...
:oops:
garvinhicking wrote: I belive this is also contained in the s9y FAQ :)

I worked my way through smarty documentation instead and didn't understand a thing. :D

Ralf
Ralf Skirr
Regular
Posts: 30
Joined: Fri Jan 26, 2007 4:42 pm

working

Post by Ralf Skirr »

Except for clearing the form fields after submitting, the code works fine now.

Thanks Garvin!

If that X-files box wasn't that expensive it would be on its way to you. :D
I love X-files (but do we really want to see x-files movie2 ?)

<hint>You may consider adding more lower priced stuff to your wish list. </hint>

Ralf
Don Chambers
Regular
Posts: 3657
Joined: Mon Feb 13, 2006 2:40 am
Location: Chicago, IL, USA
Contact:

Post by Don Chambers »

You can always express your appreciation as noted in Garvin's signature line:
# or use my PayPal account "paypal {at} supergarv (dot) de"
=Don=
Post Reply