So pulling that thru formail.php does work but you see all of the wrapper code as well. Is there a setting in formmail that might be useful? Or am I at a brick wall with no options except to frame the forms inside the cms?
Welcome to the Tectite Forums! You can download and get support for our free PHP FormMail (form processor) and other free software.
Lets hope this is possible. Here is the code.
Now what I am doing is wrapping icms around the multitest forms. So far I have not been able to get this working.Code:<?php // Author: Trabis // URL: http://www.xuups.com // E-Mail: lusopoemas@gmail.com include("../../mainfile.php"); include(XOOPS_ROOT_PATH."/header.php"); $meta_keywords = "gallery"; $meta_description = "gallery"; $pagetitle = "Gallery"; if(isset($xoTheme) && is_object($xoTheme)) { $xoTheme->addMeta( 'meta', 'keywords', $meta_keywords); $xoTheme->addMeta( 'meta', 'description', $meta_description); } else { // Compatibility for old Xoops versions $xoopsTpl->assign('xoops_meta_keywords', $meta_keywords); $xoopsTpl->assign('xoops_meta_description', $meta_description); } $xoopsTpl->assign('xoops_pagetitle', $pagetitle); //this will only work if your theme is using this smarty variables $xoopsTpl->assign( 'xoops_showlblock', 1); //set to 0 to hide left blocks $xoopsTpl->assign( 'xoops_showrblock', 1); //set to 0 to hide right blocks $xoopsTpl->assign( 'xoops_showcblock', 1); //set to 0 to hide center blocks ?> <?php include(XOOPS_ROOT_PATH."/footer.php"); ?>
I was wondering if any of you gurus know if this can be done.
Here is an example of step two in multi that has been wrapped.
Code:<?php if (file_exists("mainfile.php")) { include("mainfile.php"); } elseif(file_exists("../mainfile.php")) { include("../mainfile.php"); } else { include("../../mainfile.php"); } include(XOOPS_ROOT_PATH . "/header.php"); $xoopsTpl->assign('xoops_showrblock', 0); // 1 display right blocks $xoopsTpl->assign('xoops_showlblock', 0); // 1 display right blocks /////// echo "Your code"; <form name="MultiSample" method="post" action="formmail.php"> <input type="hidden" name="this_form" value="$this_form_url" /> <input type="hidden" name="next_form" value="multitest3.htm" /> <input type="hidden" name="bad_template" value="multierror.htm" /> <input type="hidden" name="bad_url" value="fmbadhandler.php" /> <table border="0"> <tr> <td><p>Meat</p></td> <td><p>$meat</p></td> </tr> <tr> <td><p>Dairy</p></td> <td><p>$dairy</p></td> </tr> <tr> <td><p> <select name="produce"> <option value="">Select</option> <option value="apples">Apples</option> <option value="bananas">Bananas</option> <option value="oranges">Oranges</option> </select> </p></td> </td> </tr> <tr> <td><input type="submit" name="multi_go_back" value="< Back" /></td> <td><input type="submit" name="submit" value="Next >" /></td> </tr> </table> </form> /////// include(XOOPS_ROOT_PATH . "/footer.php");
So pulling that thru formail.php does work but you see all of the wrapper code as well. Is there a setting in formmail that might be useful? Or am I at a brick wall with no options except to frame the forms inside the cms?
ok....
multipage forms r formmail templates except for the first page.
so, formmail opens the raw template, does stuff to it, then sends it to the browser.
this means that wot formmail reads must be normal HTML except for the tempalte stuff that formmail knows about
if u want to execute php, thats ok, it has to be done as formmail reads the template - the php runs on the server
in short, ur site is a dynamic site.
MULTIFORMDIR is for static pages
MULTIFORMURL is for dynamic pages
set MULTIFORMURL, and formmail will open ur template pages like a browser, so ur server will interpret them first
it should work fine - but ur CMS has to do sensible things too.
in short, the output has to be valid html (except for formmail's template stuff).
Crabtree that was just what I was looking for. Your post made perfect sense. You Rock!!!
I have read thru this doc and I understand what it does.
http://www.tectite.com/fmdoc/multiformurl.php
Getting it to work is another story!
I have two errors
and this long one that seems to say fopen is not working I think?The following error occurred in FormMail :
multi_form_failed
**********
Error=Failed to process multi-page form template "acura.htm"
I ran the testurlopen.php script from this website. It says PHP version is: 5.2.6The following error occurred in FormMail :
Failed to open template "/home/xxxxxxxx/public_html/modules/request/templates/acura.htm?USER_AGENT=Mozilla%2F5.0+%28Windows%3B+U%3B+Windows+NT+5.1%3B+en-US%3B+rv%3A1.9.0.4%29+Gecko%2F2008102920+Firefox%2F3.0.4&PHPSESSID=3f8334367be4db2601021bd76e3d33b4" : fopen(/home/xxxxxxxx/public_html/modules/request/templates/acura.htm?USER_AGENT=Mozilla%2F5.0+%28Windows%3B+U%3B+Windows+NT+5.1%3B+en-US%3B+rv%3A1.9.0.4%29+Gecko%2F2008102920+Firefox%2F3.0.4&amp;PHPSESSID=3f8334367be4db2601021bd76e3d33b4) [<a href='function.fopen'>function.fopen</a>]: failed to open stream: Operation not permitted
Safe mode is: Off (this is good!)
URL open succeeded!
Hum but I have this error above?
Never mind about the last post. That was a path error that I fixed.
Now I have this error (which is essentially the theme/design of my site)
This is the output that is left on the advance template after I run it through the browser. These are the smarty variables that get left over because formmail does not understand smarty. I am pretty sure this is the problem.Code:addMeta( 'meta', 'keywords', ); ->addMeta( 'meta', 'description', ); } else { // Compatibility for old Xoops versions ->assign('xoops_meta_keywords', ); ->assign('xoops_meta_description', ); } ->assign('xoops_pagetitle', ); //this will only work if your theme is using this smarty variables ->assign( 'xoops_showlblock', 1); //set to 0 to hide left blocks ->assign( 'xoops_showrblock', 1); //set to 0 to hide right blocks ->assign( 'xoops_showcblock', 1); //set to 0 to hide center blocks ?>
Does anyone know of a work around?
l
I just had an Idea! Could "Zend Decoder" work as a filter for my smarty?
How would this work?
Hum fishing on google again.
Php + Html To Smarty
smarty and php decode
Smarty goes one way with impress which out from the browser?
I wonder if you can tell smarty to go the other way as well.
import smarty
export smarty
Last edited by billy; 15-Dec-2008 at 04:52 AM. Reason: lil more info
i dont think youve set MULTIFORMURL correctly
it must be a URL not a directory
so, its value must start with "http://"
r u doing that?
Yep I fixed that error. You are correct crabtree!
I needed my complete url and that fixed those errors.
I will pm you a link to the new ones! These are smarty errors!
ImpressCms.org has a template engine called
http://www.smarty.net/
This is how the design/graphics/themes of the data driven site is displayed.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks