contact form

hello again :)

is there somewhere that will show me exactly how to add the contact form to ZenPhoto?
I read the user guide but it must assume you already know how to call a php page. I don't and its annoying me now :)

Thanks in advance folks.

ps ZP is in my root webfolder.

Comments

  • fretzl Administrator, Developer

    It depends on what you want.

    • Place a link to the theme's contact page (contact.php)
      (contact.php itself contains a call to the printContactForm() function. See next possibility)
      <?php printCustomPageURL(gettext('Contact us'), 'contact', '', ''); ?>
      Example: /themes/basic/inc-footer.php
      Documentation: https://docs.zenphoto.org/1.5.3/function-printCustomPageURL.html

    • Print a contact form (almost) anywhere you like.
      <?php printContactForm(); ?>
      Example: /themes/basic/contact.php
      Documentation: https://docs.zenphoto.org/1.5.3/function-printContactForm.html

    • Use a macro to place a contact form in zenpage pages and zenpage news-articles. (requires the zenpage plugin to be enabled)
      Type [CONTACTFORM] in the content field.

  • robb1e Member

    Thanks, I'll try that.

  • fretzl Administrator, Developer

    Note that those are 3 different possibilities.

  • robb1e Member

    ok, so i still cant get the form to work. clearly i cant be understanding this.
    I can get a text link on my page saying 'Contact Me' but when clicked I get 'Error Loading Page.
    I'm using the ZPmobile theme and i'm inserting the php code into the index.php of that theme.
    Using your first suggestion, I change it from
    <?php printCustomPageURL(gettext('Contact Me'), 'contact', '', ''); ?>
    to
    <?php printCustomPageURL(gettext('Contact Me'), '/zp-core/zp-extensions/contact_form.php', '', ''); ?>

    What do i need to change?

    thanks in advance :)

  • robb1e Member

    Sorry, again i've found the pages link at top (never used to be there and i just noticed it now after enabling the zenpage plugin)
    i then used the last suggestion and it is appearing now.
    Unfortunately this does not yet mean i am finished needing help :P i'll get back to you.

    thanks for all your help so far mate

  • acrylian Administrator, Developer
    edited July 2019

    Using your first suggestion, I change it from
    <?php printCustomPageURL(gettext('Contact Me'), 'contact', '', ''); ?>
    to
    <?php printCustomPageURL(gettext('Contact Me'), '/zp-core/zp- extensions/contact_form.php', '', ''); ?>

    The first was correct. But the theme has to have a custom page named contact.php to have this working. zpMobile does not and you didn't mention the theme you are using. They are not all the same.

    I recommend to read the theming tutorial for the basics if you are planning to do more customizations. Especially you should modify a copy of the theme and not the original.

Sign In or Register to comment.