From c4fa286ddf482d38a80e423f3e4311e5710c7e71 Mon Sep 17 00:00:00 2001 From: Cameron Date: Wed, 6 Mar 2013 14:54:21 -0800 Subject: [PATCH] Contact page shortcode enhancements --- contact.php | 2 +- .../shortcodes/batch/contact_shortcodes.php | 17 +++++++++++++---- 2 files changed, 14 insertions(+), 5 deletions(-) diff --git a/contact.php b/contact.php index 6d9e6a8d5..0d3e2cc2e 100644 --- a/contact.php +++ b/contact.php @@ -62,7 +62,7 @@ if(isset($_POST['send-contactus'])) } // Check subject line. - if(strlen(trim($_POST['subject'])) < 2) + if(varset($_POST['subject']) && strlen(trim($_POST['subject'])) < 2) { $error .= LANCONTACT_13."\\n"; } diff --git a/e107_core/shortcodes/batch/contact_shortcodes.php b/e107_core/shortcodes/batch/contact_shortcodes.php index 06b6ff3dd..54da51c26 100644 --- a/e107_core/shortcodes/batch/contact_shortcodes.php +++ b/e107_core/shortcodes/batch/contact_shortcodes.php @@ -90,7 +90,7 @@ class contact_shortcodes extends e_shortcode function sc_contact_name($parm='') { - return ""; + return ""; } @@ -98,20 +98,29 @@ class contact_shortcodes extends e_shortcode function sc_contact_email($parm='') { - return ""; + return ""; } function sc_contact_subject($parm='') { - return ""; + return ""; } function sc_contact_body($parm='') { - return ""; + parse_str($parm, $parm); + $rows = vartrue($parm['rows'],10); + $cols = vartrue($parm['cols'],70); + + if($cols > 60) + { + $size = 'input-xxlarge'; + } + + return ""; }