#1 (permalink)  
Old 04-28-2008, 11:08 AM
Registered User
 
Join Date: Nov 2004
Posts: 49
azul is on a distinguished road
Question Call external script sending arguments

Hi All,

About the Smarty templates;
It's possible to call an external php script from a template and pass some arguments?

For example.. I need to call from detail_link.html the following:

<%include file="script.php?url=$url"%>

but this does not work.. Can you help me on how to do this?

Thank you for your time on this
Reply With Quote
  #2 (permalink)  
Old 04-28-2008, 12:21 PM
Bruceper's Avatar
Nicecoder Team
 
Join Date: Jun 2002
Location: Winnipeg Canada
Posts: 4,008
Bruceper is on a distinguished road
Default

To call PHP from smarty use <%php> and <%/php>
Reply With Quote
  #3 (permalink)  
Old 04-28-2008, 01:00 PM
Registered User
 
Join Date: Nov 2004
Posts: 49
azul is on a distinguished road
Default

Hi Bruce

Ok, but you kown if it's possible to pass parameters to this php script?

Thanks!
Reply With Quote
  #4 (permalink)  
Old 04-28-2008, 02:10 PM
Bruceper's Avatar
Nicecoder Team
 
Join Date: Jun 2002
Location: Winnipeg Canada
Posts: 4,008
Bruceper is on a distinguished road
Default

It should be, but I don't really know what you want to do. Note that I'm not a programmer, but I can hack up code. Give me an idea of what you're trying to do and perhaps I can tell you if it's possible.
Reply With Quote
  #5 (permalink)  
Old 04-28-2008, 04:35 PM
Registered User
 
Join Date: Nov 2004
Posts: 49
azul is on a distinguished road
Default

I am trying to call a script like this:

Code:
Content visible to License Owner only.
.. but does not work.. If I remove ?url=$siteurl the script runs, but I need to pass the variable..

You know other way to pass the variable value?

Thanks
Reply With Quote
  #6 (permalink)  
Old 04-28-2008, 05:03 PM
Bruceper's Avatar
Nicecoder Team
 
Join Date: Jun 2002
Location: Winnipeg Canada
Posts: 4,008
Bruceper is on a distinguished road
Default

$siteurl isn't a valid variable. Itwould be $site_url
Reply With Quote
  #7 (permalink)  
Old 04-28-2008, 06:17 PM
Registered User
 
Join Date: Nov 2004
Posts: 49
azul is on a distinguished road
Default

Bruce, no mater what variable I enter as a parameter, It does not pass to script.php ..

I have been looking at the smarty webpage, but I could not find a way to pass variables with include
Reply With Quote
  #8 (permalink)  
Old 04-28-2008, 10:02 PM
Bruceper's Avatar
Nicecoder Team
 
Join Date: Jun 2002
Location: Winnipeg Canada
Posts: 4,008
Bruceper is on a distinguished road
Default

The smarty FAQ answers your question (I think)

http://smarty.incutio.com/?page=Smar...AskedQuestions
Reply With Quote
Reply

Thread Tools
Display Modes

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 On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Script Dragon - Script Mod Directory mpdaddy Sites in Action 1 03-06-2008 11:56 PM
redirecting external links vittle v5.x 3 11-03-2005 04:59 AM
3.2E - new links on external page ? Frank71 v5.x 2 11-30-2004 11:27 AM
Not Sending E-mail craven v5.x 9 09-25-2003 06:14 AM
External rating for admin links ? Frank71 v5.x 2 10-14-2002 03:39 AM

HACKER SAFE certified sites prevent over 99.9% of hacker crime.

All times are GMT -5. The time now is 02:40 PM.


Powered by vBulletin®
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO
SSL Certificate