Page 1 of 1

{literal} functionality and ASP scripting

Posted: Fri Sep 15, 2006 8:29 pm
by jmcgin51
OK - I'll preface this post by stating that I don't know if what I want to do is legit, I was half-expecting it not to work when I tried it, and I'm open to other suggestions for accomplishing my goal.  With that said, here's the deal:

I have an existing site written in ASP.  I'm in the process of converting this site to CMSMS, and it's going great for the most part.  90% of the pages are static, and I've just used the *.ASP extension to be consistent with the dynamic pages.

On one existing page, I have a form that sends data to an ASP script.  The script searches a database for the string submitted by the form, and writes information about that string if it is found in the database.  We'll pretend that it's a simple contact database, so if I submit "smith" in the form, the ASP page looks for "smith" in the db, and if it finds it, prints smith's full name, address and phone number.

I want to use this script in my CMSMS site, ideally without alteration.  Here's where the going got rough.

I thought "hey, I'll just wrap my existing ASP script in {literal} tags, throw it into the {content} section of my page, point the form action to the new CMSMS alias (form action="http://mysite.com/cmsms/index.php?page=script"), and maybe it will be that easy."  As some of you have no doubt already realized, it's not that easy.

2 questions:

1. When I wrapped my script in {literal} tags, I thought that that would preserve my existing code as-is, and force Smarty/CMSMS to interpret the script as originally written.  I see now that I was wrong, but CMSMS did something I don't understand.  When I saved the page after pasting my script, it converted my "" characters to "".  Why?  Why can't it leave them alone as I wrote them?  Is there a way to make it leave them alone?

2. Is there a way to incorporate ASP scripting into a CMSMS page?  Without recoding it in PHP, of which I know almost nothing?

Thanks so much,
Torn

Re: {literal} functionality and ASP scripting

Posted: Fri Sep 15, 2006 9:08 pm
by tsw
I really dont think its possible.

If the script is a simple "search a db for this data" it would be very easy to create user defined tag for it.

or you could create asp page that only has that form and prints the results and use {embed} in your cmsms install..

hope this helps

Re: {literal} functionality and ASP scripting

Posted: Sat Sep 16, 2006 2:37 am
by jmcgin51
ahhhhh, I think {embed} might work...  hadn't thought of this; I'll give it a try - thanks!

Still don't understand why CMSMS turns my <% into <!--, though...