Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

Coding Forum


You are currently viewing our Coding Forum as a guest. Please register to participate.
Login



Reply
smarty help please have a look
Old 01-24-2007, 02:50 PM smarty help please have a look
Average Talker

Posts: 25
Name: Nicolas
Trades: 0
Hi, can anyone help me with this?
I have a directory and i would like the submit page payment to be yearly
subscription via paypal instead of a one time payment.
you can see a submit page here: http://www.nemdex.net/submit.php
So basically, i want that when someone choose sponsored listing, that
they get the paypal URL I place in the code. In the below code i want
if featured will redict to the paypal URL I specify.
something like that:
{if $price.featured}
<tr><td><input type="radio" name="LINK_TYPE" value="featured"{if $LINK_TYPE eq 'featured'}
checked="true"{/if} />{l}Featured links{/l}</td><td>${the-paypal-URL-i-want-here,-the
paypal-URL-i-put-here-and-that-they-will-see-if-they-choose -sponsored-listing.com}</td></tr>
{/if}
I placed the code below:

{if $price.featured}
<tr><td><input type="radio" name="LINK_TYPE" value="featured"{if $LINK_TYPE eq 'featured'} checked="true"{/if} />{l}Featured links{/l}</td><td>${$price.featured}</td></tr>
{/if}
{if $price.normal gt 0}
<tr><td><input type="radio" name="LINK_TYPE" value="normal"{if $LINK_TYPE eq 'normal'} checked="true"{/if} />{l}Regular links{/l}</td><td>${$price.normal}</td></tr>
{elseif $price.normal eq 0}
<tr><td><input type="radio" name="LINK_TYPE" value="normal"{if $LINK_TYPE eq 'normal'} checked="true"{/if} />{l}Regular links{/l}</td><td>{l}free{/l}</td></tr>
{/if}
{if $price.reciprocal gt 0}
<tr><td><input type="radio" name="LINK_TYPE" value="reciprocal"{if $LINK_TYPE eq 'reciprocal'} checked="true"{/if} />{l}Regular links with reciprocal{/l}</td><td>${$price.reciprocal}</td></tr>
{elseif $price.reciprocal eq 0}
<tr><td><input type="radio" name="LINK_TYPE" value="reciprocal"{if $LINK_TYPE eq 'reciprocal'} checked="true"{/if} />{l}Regular links with reciprocal{/l}</td><td>{l}free{/l}</td></tr>
{/if}
{if isset($price.free)}
<tr><td><input type="radio" name="LINK_TYPE" value="free"{if $LINK_TYPE eq 'free'} checked="true"{/if} />{l}Links with nofollow attribute{/l}</td><td>free</td></tr>
{/if}
</table>
</div>
{validate form="submit_link" id="v_LINK_TYPE" message=$smarty.capture.field_link_type}
</td></tr>
{/if}

Can anyone give me the right code tweak to have them go to the URL I specify? Your help is greatly apreciated.
Thanks.
balthasar is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 01-24-2007, 03:42 PM Re: smarty help please have a look
tripy's Avatar
Do not try this at home!

Posts: 3,621
Name: Thierry
Location: I'm the uber Spaminator !
Trades: 0
well, could be that you do
Code:
${the-paypal-URL-i-want-here,-the
paypal-URL-i-put-here-and-that-they-will-see-if-they-choose -sponsored-listing.com}
rather than
Code:
{$the-paypal-URL-i-want-here,-the
paypal-URL-i-put-here-and-that-they-will-see-if-they-choose -sponsored-listing.com}
__________________
Only a biker knows why a dog sticks his head out the window.
tripy is offline
Reply With Quote
View Public Profile Visit tripy's homepage!
 
Old 01-24-2007, 04:19 PM Re: smarty help please have a look
Average Talker

Posts: 25
Name: Nicolas
Trades: 0
No, it doesn't work that way:

Fatal error: Smarty error: [in submit.tpl line 46]: syntax error: unrecognized tag: $http://linking-service.com (Smarty_Compiler.class.php, line 439) in /home/linkings/public_html/nemdex/libs/smarty/Smarty.class.php on line 1095

Ijust put the URL in the code to show that i want to be able to specify the url i want when they choose a sponsored listing option or another but it's not at all the way to do it.

The right code to have this working is not on this page...
__________________
>>>
Please login or register to view this content. Registration is FREE
:)
Please login or register to view this content. Registration is FREE
:)
Please login or register to view this content. Registration is FREE
<<<
balthasar is offline
Reply With Quote
View Public Profile
 
Old 01-24-2007, 08:32 PM Re: smarty help please have a look
tripy's Avatar
Do not try this at home!

Posts: 3,621
Name: Thierry
Location: I'm the uber Spaminator !
Trades: 0
Does this url happens to have javascript ?

If so, and you have a javascript function in it (with the "{" and "}" characters) ? Then you need to escape them from the templating engine.

Code:
<a href="javascript:try();">this is a link</a>
<script type="text/javascript">
function try()
{literal}{{/literal}
  alert('done');
{literal}}{/literal}

</script>
__________________
Only a biker knows why a dog sticks his head out the window.
tripy is offline
Reply With Quote
View Public Profile Visit tripy's homepage!
 
Old 01-25-2007, 02:21 AM Re: smarty help please have a look
smarty's Avatar
Ultra Talker

Posts: 413
Name: Vinod Rawat
Location: india
Trades: 1
create a new html form and submit
and submit paypal values to paypal.com by submitting through button
OR
place the paypal code directly there



vinod


--edit--
my id is smarty
i thought you were asking me Lol
__________________

Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE

Last edited by smarty; 01-25-2007 at 02:24 AM..
smarty is offline
Reply With Quote
View Public Profile Visit smarty's homepage!
 
Reply     « Reply to smarty help please have a look
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 1.31454 seconds with 12 queries