mirror of
https://github.com/e107inc/e107.git
synced 2025-08-05 06:07:32 +02:00
Simple 'Contact Us' menu item. Needs security image and other options added. Ajax posting?
This commit is contained in:
40
e107_plugins/contact/contact_menu.php
Normal file
40
e107_plugins/contact/contact_menu.php
Normal file
@@ -0,0 +1,40 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
if (!defined('e107_INIT')) { exit; }
|
||||||
|
|
||||||
|
$head = '<form id="contact-menu" action="'.e_BASE.'contact.php" method="post" >';
|
||||||
|
|
||||||
|
|
||||||
|
//XXX Template must conform to Bootstrap specs: http://twitter.github.com/bootstrap/base-css.html#forms
|
||||||
|
//TODO Security Image.
|
||||||
|
|
||||||
|
$template = '
|
||||||
|
<div>
|
||||||
|
<div class="control-group">
|
||||||
|
<label >Name</label>
|
||||||
|
{CONTACT_NAME}
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="control-group">
|
||||||
|
<label class="control-label" for="contactEmail">Email</label>
|
||||||
|
{CONTACT_EMAIL}
|
||||||
|
</div>
|
||||||
|
<div class="control-group">
|
||||||
|
<label>Comments</label>
|
||||||
|
{CONTACT_BODY=rows=5&cols=50}
|
||||||
|
</div>
|
||||||
|
{CONTACT_SUBMIT_BUTTON}
|
||||||
|
</div>
|
||||||
|
';
|
||||||
|
|
||||||
|
$foot = '</form>';
|
||||||
|
|
||||||
|
|
||||||
|
$contact_shortcodes = e107::getScBatch('contact');
|
||||||
|
$text = $tp->parseTemplate($head. $template . $foot, true, $contact_shortcodes);
|
||||||
|
|
||||||
|
|
||||||
|
$ns->tablerender("Contact Us", $text, 'contact-menu');
|
||||||
|
|
||||||
|
|
||||||
|
?>
|
4
e107_plugins/contact/plugin.xml
Normal file
4
e107_plugins/contact/plugin.xml
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<e107Plugin name="Contact" version="1.0" date="2012-12-01" compatibility="2.0" installRequired="false" >
|
||||||
|
<category>menu</category>
|
||||||
|
</e107Plugin>
|
Reference in New Issue
Block a user