Page 1 of 2 12 LastLast
Results 1 to 10 of 13

Thread: Echo multitest2.htm thru formmail.php so I can wrap my forms in a cms.

  1. #1
    Join Date
    Dec 2008
    Location
    Maryland
    Posts
    82

    Default Echo multitest2.htm thru formmail.php so I can wrap my forms in a cms.

    Lets hope this is possible. Here is the code.

    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");
    ?>
    Now what I am doing is wrapping icms around the multitest forms. So far I have not been able to get this working.

    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");

  2. #2
    Join Date
    Dec 2008
    Location
    Maryland
    Posts
    82

    Default Re: Echo multitest2.htm thru formmail.php so I can wrap my forms in a cms.

    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?

  3. #3
    Join Date
    Mar 2004
    Posts
    2,224

    Default Re: Echo multitest2.htm thru formmail.php so I can wrap my forms in a 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).

  4. #4
    Join Date
    Dec 2008
    Location
    Maryland
    Posts
    82

    Default Re: Echo multitest2.htm thru formmail.php so I can wrap my forms in a cms.

    Crabtree that was just what I was looking for. Your post made perfect sense. You Rock!!!

  5. #5
    Join Date
    Dec 2008
    Location
    Maryland
    Posts
    82

    Default Re: Echo multitest2.htm thru formmail.php so I can wrap my forms in a cms.

    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

    The following error occurred in FormMail :
    multi_form_failed
    **********
    Error=Failed to process multi-page form template "acura.htm"
    and this long one that seems to say fopen is not working I think?

    The 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&amp;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;amp;PHPSESSID=3f8334367be4db2601021bd76e3d33b4) [&lt;a href='function.fopen'&gt;function.fopen&lt;/a&gt;]: failed to open stream: Operation not permitted
    I ran the testurlopen.php script from this website. It says PHP version is: 5.2.6

    Safe mode is: Off (this is good!)

    URL open succeeded!

    Hum but I have this error above?

  6. #6
    Join Date
    Dec 2008
    Location
    Maryland
    Posts
    82

    Default Re: Echo multitest2.htm thru formmail.php so I can wrap my forms in a cms.

    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)

    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 ?>
    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.

    Does anyone know of a work around?

    l

  7. #7
    Join Date
    Dec 2008
    Location
    Maryland
    Posts
    82

    Default Re: Echo multitest2.htm thru formmail.php so I can wrap my forms in a cms.

    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 03:52 AM. Reason: lil more info

  8. #8
    Join Date
    Mar 2004
    Posts
    2,224

    Default Re: Echo multitest2.htm thru formmail.php so I can wrap my forms in a cms.

    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?

  9. #9
    Join Date
    Dec 2008
    Location
    Maryland
    Posts
    82

    Default Re: Echo multitest2.htm thru formmail.php so I can wrap my forms in a cms.

    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!

  10. #10
    Join Date
    Dec 2008
    Location
    Maryland
    Posts
    82

    Default Re: Echo multitest2.htm thru formmail.php so I can wrap my forms in a cms.

    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.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. formmail trouble html or php file not sure
    By putertfix in forum FormMail Subscription Support
    Replies: 5
    Last Post: 25-Oct-2004, 08:11 AM
  2. How to set up the formmail.php file?
    By treborito in forum FormMail Subscription Support
    Replies: 1
    Last Post: 19-Oct-2004, 06:29 PM
  3. Error Messsage for Formmail.php
    By dparker2 in forum FormMail Subscription Support
    Replies: 8
    Last Post: 01-Jun-2004, 07:09 AM
  4. GOOD_URL COMMAND IN FORMMAIL.PHP
    By Paul Ovens in forum FormMail Subscription Support
    Replies: 3
    Last Post: 19-Jan-2004, 04:29 AM
  5. formmail.php
    By paul in forum FormMail Subscription Support
    Replies: 8
    Last Post: 03-Jan-2004, 06:11 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •