From c94b1867a3a3a045746866d66f1d315cd67a54bb Mon Sep 17 00:00:00 2001 From: Cameron Date: Mon, 15 Feb 2021 10:58:49 -0800 Subject: [PATCH] Issue #4372 - Enhancement: Contact page info. Requires database update. --- contact.php | 554 +++++++++--------- e107_admin/prefs.php | 91 ++- .../shortcodes/batch/contact_shortcodes.php | 65 ++ e107_core/templates/contact_template.php | 31 +- e107_core/xml/default_install.xml | 2 + e107_languages/English/admin/lan_prefs.php | 6 +- e107_web/css/e107.css | 1 + 7 files changed, 450 insertions(+), 300 deletions(-) diff --git a/contact.php b/contact.php index 66a2ef3a8..88ca897fb 100644 --- a/contact.php +++ b/contact.php @@ -10,288 +10,296 @@ * */ -require_once("class2.php"); -//define('e_HANDLER', "e107_handlers/"); -// security image may be disabled by removing the appropriate shortcodes from the template. -$active = varset($pref['contact_visibility'], e_UC_PUBLIC); -$contactInfo = trim(SITECONTACTINFO); +require_once(__DIR__."/class2.php"); -if(!check_class($active) && empty($contactInfo)) + +class contact_front { - e107::getRedirect()->go(e_HTTP."index.php"); + function __construct() + { + $this->init(); + + } + + function init() + { + $active = varset($pref['contact_visibility'], e_UC_PUBLIC); + $contactInfo = trim(SITECONTACTINFO); + + if(!check_class($active) && empty($contactInfo) && empty($pref['contact_info'])) + { + e107::redirect(); + } + + + $sec_img = e107::getSecureImg(); + $tp = e107::getParser(); + $ns = e107::getRender(); + $pref = e107::getPref(); + + $CONTACT_FORM = $GLOBALS['CONTACT_FORM']; + + if (empty($CONTACT_FORM)) + { + /* if (file_exists(THEME."contact_template.php")) + { + require_once(THEME."contact_template.php"); + } + else*/ + { + $CONTACT_FORM = e107::getCoreTemplate('contact','form'); // require_once(e_THEME."templates/contact_template.php"); + } + } + + if(isset($_POST['send-contactus'])) + { + $error = ""; + $ignore = false; + + + // Contact Form Filter ----- + + $contact_filter = e107::pref('core','contact_filter',''); + + if(!empty($contact_filter)) + { + $tmp = explode("\n", $contact_filter); + + if(!empty($tmp)) + { + foreach($tmp as $filterItem) + { + if(strpos($_POST['body'], $filterItem)!==false) + { + $ignore = true; + break; + } + + } + } + } + + // --------- + + $sender_name = $tp->toEmail($_POST['author_name'], true,'RAWTEXT'); + $sender = check_email($_POST['email_send']); + $subject = $tp->toEmail($_POST['subject'], true,'RAWTEXT'); + $body = nl2br($tp->toEmail($_POST['body'], true,'RAWTEXT')); + + $email_copy = !empty($_POST['email_copy']) ? 1 : 0; + + // Check Image-Code + if (isset($_POST['rand_num']) && !$sec_img->verify_code($_POST['rand_num'], $_POST['code_verify'])) + { + $error .= LANCONTACT_15."\\n"; + } + + // Check message body. + if(strlen(trim($body)) < 15) + { + $error .= LANCONTACT_12."\\n"; + } + + // Check subject line. + if(isset($_POST['subject']) && strlen(trim($subject)) < 2) + { + $error .= LANCONTACT_13."\\n"; + } + + if(!strpos(trim($sender),"@")) + { + $error .= LANCONTACT_11."\\n"; + } + + + + // Check email address on remote server (if enabled). XXX Problematic! + /* + if ($pref['signup_remote_emailcheck'] && $error == '') + { + require_once(e_HANDLER."mail_validation_class.php"); + list($adminuser,$adminhost) = explode('@', SITEADMINEMAIL, 2); + $validator = new email_validation_class; + $validator->localuser= $adminuser; + $validator->localhost= $adminhost; + $validator->timeout=3; + // $validator->debug=1; + // $validator->html_debug=1; + if($validator->ValidateEmailBox($sender) != 1) + { + $error .= LANCONTACT_11."\\n"; + } + + } + */ + + // No errors - so proceed to email the admin and the user (if selected). + if($ignore === true) + { + $ns->tablerender('', "
".LANCONTACT_09."
"); // ignore and leave them none the wiser. + e107::getDebug()->log("Contact form post ignored"); + require_once(FOOTERF); + exit; + } + elseif(empty($error)) + { + $body .= "

+ + + "; + + if (USER) + { + $body .= ""; + } + + if(empty($_POST['contact_person']) && !empty($pref['sitecontacts'])) // only 1 person, so contact_person not posted. + { + if($pref['sitecontacts'] == e_UC_MAINADMIN) + { + $query = "user_perms = '0' OR user_perms = '0.' "; + } + elseif($pref['sitecontacts'] == e_UC_ADMIN) + { + $query = "user_admin = 1 "; + } + else + { + $query = "FIND_IN_SET(".$pref['sitecontacts'].",user_class) "; + } + } + else + { + $query = "user_id = ".intval($_POST['contact_person']); + } + + if($sql->gen("SELECT user_name,user_email FROM `#user` WHERE ".$query." LIMIT 1")) + { + $row = $sql->fetch(); + $send_to = $row['user_email']; + $send_to_name = $row['user_name']; + } + else + { + $send_to = SITEADMINEMAIL; + $send_to_name = ADMIN; + } + + + // ---------------------- + + $CONTACT_EMAIL = e107::getCoreTemplate('contact','email'); + + unset($_POST['contact_person'], $_POST['author_name'], $_POST['email_send'] , $_POST['subject'], $_POST['body'], $_POST['rand_num'], $_POST['code_verify'], $_POST['send-contactus']); + + if(!empty($_POST)) // support for custom fields in contact template. + { + foreach($_POST as $k=>$v) + { + $body .= ""; + } + } + + $body .= "
IP:".e107::getIPHandler()->getIP(TRUE)."
User:#".USERID." ".USERNAME."
".$k.":".$tp->toEmail($v, true,'RAWTEXT')."
"; + + if(!empty($CONTACT_EMAIL['subject'])) + { + $vars = array('CONTACT_SUBJECT'=>$subject,'CONTACT_PERSON'=>$send_to_name); + + if(!empty($_POST)) // support for custom fields in contact template. + { + foreach($_POST as $k=>$v) + { + $scKey = strtoupper($k); + $vars[$scKey] =$tp->toEmail($v, true,'RAWTEXT'); + } + } + + $subject = $tp->simpleParse($CONTACT_EMAIL['subject'],$vars); + } + + // ----------------------- + + // Send as default sender to avoid spam issues. Use 'replyto' instead. + $eml = array( + 'subject' => $subject, + 'sender_name' => $sender_name, + 'body' => $body, + 'replyto' => $sender, + 'replytonames' => $sender_name, + 'template' => 'default' + ); + + + + $message = e107::getEmail()->sendEmail($send_to, $send_to_name, $eml, false) ? LANCONTACT_09 : LANCONTACT_10; + + // $message = (sendemail($send_to,"[".SITENAME."] ".$subject, $body,$send_to_name,$sender,$sender_name)) ? LANCONTACT_09 : LANCONTACT_10; + + if(isset($pref['contact_emailcopy']) && $pref['contact_emailcopy'] && $email_copy == 1) + { + require_once(e_HANDLER."mail.php"); + sendemail($sender,"[".SITENAME."] ".$subject, $body,ADMIN,$sender,$sender_name); + } + + + $ns->tablerender('', "
".$message."
"); + require_once(FOOTERF); + exit; + } + else + { + message_handler("P_ALERT", $error); + } + + } + + if(deftrue('SITECONTACTINFO') || !empty($pref['contact_info'])) + { + if(!isset($CONTACT_INFO)) + { + $CONTACT_INFO = e107::getCoreTemplate('contact','info'); + } + + $contact_shortcodes = e107::getScBatch('contact'); + $contact_shortcodes->wrapper('contact/info'); + $text = $tp->parseTemplate($CONTACT_INFO, true, $contact_shortcodes); + $ns->tablerender(LANCONTACT_01, $text,"contact-info"); + } + + + if(check_class($active) && isset($pref['sitecontacts']) && $pref['sitecontacts'] != e_UC_NOBODY) + { + + // Wrapper support + $contact_shortcodes->wrapper('contact/form'); + + $text = $tp->parseTemplate($CONTACT_FORM, true, $contact_shortcodes); + + if(trim($text) != "") + { + $ns->tablerender(LANCONTACT_02, $text, "contact-form"); + } + } + elseif($active == e_UC_MEMBER && ($pref['sitecontacts'] != e_UC_NOBODY)) + { + $srch = array("[","]"); + $repl = array("",""); + $message = LANCONTACT_16; // "You must be [registered] and signed-in to use this form."; + + $ns->tablerender(LANCONTACT_02, "
".str_replace($srch, $repl, $message)."
", "contact"); + } + } } -require_once(e_HANDLER."secure_img_handler.php"); -$sec_img = new secure_image; e107::lan('core','contact'); -if(!defined('PAGE_NAME')) -{ - define('PAGE_NAME', LANCONTACT_00); // FIX ME -} +e107::title(LANCONTACT_00); e107::canonical('contact'); + require_once(HEADERF); -$tp = e107::getParser(); -$ns = e107::getRender(); - -if (!vartrue($CONTACT_FORM)) - { - if (file_exists(THEME."contact_template.php")) - { - require_once(THEME."contact_template.php"); - } - else - { - // Redirect Page if no contact-form or contact-info is available. - if(($pref['sitecontacts']== e_UC_NOBODY) && trim(SITECONTACTINFO) == "") - { - e107::getRedirect()->redirect(e_BASE."index.php"); - exit; - } - - $CONTACT_FORM = e107::getCoreTemplate('contact','form'); // require_once(e_THEME."templates/contact_template.php"); - } -} - -if(isset($_POST['send-contactus'])) -{ - $error = ""; - $ignore = false; - - - // Contact Form Filter ----- - - $contact_filter = e107::pref('core','contact_filter',''); - - if(!empty($contact_filter)) - { - $tmp = explode("\n", $contact_filter); - - if(!empty($tmp)) - { - foreach($tmp as $filterItem) - { - if(strpos($_POST['body'], $filterItem)!==false) - { - $ignore = true; - break; - } - - } - } - } - - // --------- - - $sender_name = $tp->toEmail($_POST['author_name'], true,'RAWTEXT'); - $sender = check_email($_POST['email_send']); - $subject = $tp->toEmail($_POST['subject'], true,'RAWTEXT'); - $body = nl2br($tp->toEmail($_POST['body'], true,'RAWTEXT')); - - $email_copy = !empty($_POST['email_copy']) ? 1 : 0; - -// Check Image-Code - if (isset($_POST['rand_num']) && !$sec_img->verify_code($_POST['rand_num'], $_POST['code_verify'])) - { - $error .= LANCONTACT_15."\\n"; - } - -// Check message body. - if(strlen(trim($body)) < 15) - { - $error .= LANCONTACT_12."\\n"; - } - -// Check subject line. - if(isset($_POST['subject']) && strlen(trim($subject)) < 2) - { - $error .= LANCONTACT_13."\\n"; - } - - if(!strpos(trim($sender),"@")) - { - $error .= LANCONTACT_11."\\n"; - } - - - -// Check email address on remote server (if enabled). XXX Problematic! - /* - if ($pref['signup_remote_emailcheck'] && $error == '') - { - require_once(e_HANDLER."mail_validation_class.php"); - list($adminuser,$adminhost) = explode('@', SITEADMINEMAIL, 2); - $validator = new email_validation_class; - $validator->localuser= $adminuser; - $validator->localhost= $adminhost; - $validator->timeout=3; - // $validator->debug=1; - // $validator->html_debug=1; - if($validator->ValidateEmailBox($sender) != 1) - { - $error .= LANCONTACT_11."\\n"; - } - - } - */ - - // No errors - so proceed to email the admin and the user (if selected). - if($ignore === true) - { - $ns->tablerender('', "
".LANCONTACT_09."
"); // ignore and leave them none the wiser. - e107::getDebug()->log("Contact form post ignored"); - require_once(FOOTERF); - exit; - } - elseif(empty($error)) - { - $body .= "

- - - "; - - if (USER) - { - $body .= ""; - } - - if(empty($_POST['contact_person']) && !empty($pref['sitecontacts'])) // only 1 person, so contact_person not posted. - { - if($pref['sitecontacts'] == e_UC_MAINADMIN) - { - $query = "user_perms = '0' OR user_perms = '0.' "; - } - elseif($pref['sitecontacts'] == e_UC_ADMIN) - { - $query = "user_admin = 1 "; - } - else - { - $query = "FIND_IN_SET(".$pref['sitecontacts'].",user_class) "; - } - } - else - { - $query = "user_id = ".intval($_POST['contact_person']); - } - - if($sql->gen("SELECT user_name,user_email FROM `#user` WHERE ".$query." LIMIT 1")) - { - $row = $sql->fetch(); - $send_to = $row['user_email']; - $send_to_name = $row['user_name']; - } - else - { - $send_to = SITEADMINEMAIL; - $send_to_name = ADMIN; - } - - - // ---------------------- - - $CONTACT_EMAIL = e107::getCoreTemplate('contact','email'); - - unset($_POST['contact_person'], $_POST['author_name'], $_POST['email_send'] , $_POST['subject'], $_POST['body'], $_POST['rand_num'], $_POST['code_verify'], $_POST['send-contactus']); - - if(!empty($_POST)) // support for custom fields in contact template. - { - foreach($_POST as $k=>$v) - { - $body .= ""; - } - } - - $body .= "
IP:".e107::getIPHandler()->getIP(TRUE)."
User:#".USERID." ".USERNAME."
".$k.":".$tp->toEmail($v, true,'RAWTEXT')."
"; - - if(!empty($CONTACT_EMAIL['subject'])) - { - $vars = array('CONTACT_SUBJECT'=>$subject,'CONTACT_PERSON'=>$send_to_name); - - if(!empty($_POST)) // support for custom fields in contact template. - { - foreach($_POST as $k=>$v) - { - $scKey = strtoupper($k); - $vars[$scKey] =$tp->toEmail($v, true,'RAWTEXT'); - } - } - - $subject = $tp->simpleParse($CONTACT_EMAIL['subject'],$vars); - } - - // ----------------------- - - // Send as default sender to avoid spam issues. Use 'replyto' instead. - $eml = array( - 'subject' => $subject, - 'sender_name' => $sender_name, - 'body' => $body, - 'replyto' => $sender, - 'replytonames' => $sender_name, - 'template' => 'default' - ); - - - - $message = e107::getEmail()->sendEmail($send_to, $send_to_name, $eml, false) ? LANCONTACT_09 : LANCONTACT_10; - - // $message = (sendemail($send_to,"[".SITENAME."] ".$subject, $body,$send_to_name,$sender,$sender_name)) ? LANCONTACT_09 : LANCONTACT_10; - - if(isset($pref['contact_emailcopy']) && $pref['contact_emailcopy'] && $email_copy == 1) - { - require_once(e_HANDLER."mail.php"); - sendemail($sender,"[".SITENAME."] ".$subject, $body,ADMIN,$sender,$sender_name); - } - - - $ns->tablerender('', "
".$message."
"); - require_once(FOOTERF); - exit; - } - else - { - message_handler("P_ALERT", $error); - } - -} - -if(SITECONTACTINFO) -{ - if(!isset($CONTACT_INFO)) - { - $CONTACT_INFO = e107::getCoreTemplate('contact','info'); - } - - $text = $tp->parseTemplate($CONTACT_INFO, true, vartrue($contact_shortcodes)); - $ns->tablerender(LANCONTACT_01, $text,"contact-info"); -} - - -if(check_class($active) && isset($pref['sitecontacts']) && $pref['sitecontacts'] != e_UC_NOBODY) -{ - $contact_shortcodes = e107::getScBatch('contact'); - // Wrapper support - $contact_shortcodes->wrapper('contact/form'); - - $text = $tp->parseTemplate($CONTACT_FORM, true, $contact_shortcodes); - - if(trim($text) != "") - { - $ns->tablerender(LANCONTACT_02, $text, "contact-form"); - } -} -elseif($active == e_UC_MEMBER && ($pref['sitecontacts'] != e_UC_NOBODY)) -{ - $srch = array("[","]"); - $repl = array("",""); - $message = LANCONTACT_16; // "You must be [registered] and signed-in to use this form."; - - $ns->tablerender(LANCONTACT_02, "
".str_replace($srch, $repl, $message)."
", "contact"); -} - - +new contact_front; require_once(FOOTERF); diff --git a/e107_admin/prefs.php b/e107_admin/prefs.php index af088b413..1a30656c4 100644 --- a/e107_admin/prefs.php +++ b/e107_admin/prefs.php @@ -38,9 +38,8 @@ e107::coreLan('mailout', true); require_once (e_ADMIN."auth.php"); $e_userclass = e107::getUserClass(); -require_once (e_HANDLER."user_extended_class.php"); require_once(e_HANDLER.'mailout_admin_class.php'); // Admin tasks handler -$ue = new e107_user_extended(); +$ue = e107::getUserExt(); $core_pref = e107::getConfig(); if(!$core_pref->get('timezone')) @@ -321,7 +320,7 @@ $text = "
- ".PRFLAN_1." +

".PRFLAN_53.SEP.PRFLAN_1."

@@ -423,7 +422,7 @@ $text .= " // Email and Contact Information -------------- $text .= "
- ".PRFLAN_13." +

".PRFLAN_53.SEP.PRFLAN_13."

@@ -492,8 +491,53 @@ $text .= "
- @@ -544,7 +588,7 @@ $text .= "
// GDPR Settings ----------------------------- $text .= "
- ".PRFLAN_277." +

".PRFLAN_53.SEP.PRFLAN_277."

".$frm->help(PRFLAN_163)." - ".$frm->textarea('sitecontactinfo', $pref['sitecontactinfo'], 6, 59, array('size'=>'xxlarge'))." + "; + + if(!empty($pref['sitecontactinfo'])) + { + $text .= $frm->textarea('sitecontactinfo', $pref['sitecontactinfo'], 6, 59, array('size'=>'xxlarge')); + } + else + { + $text .= " + + + + + "; + + $text .= " + + "; + + $text .= " + + "; + + $contactFields = [ + 'phone1' => ['label'=>'Phone', 'placeholder'=>'+1-555-555-5555'], + 'phone2' => ['label'=>'Phone', 'placeholder'=>'+1-444-444-4444'], + 'phone3' => ['label'=>'Phone', 'placeholder'=>'+1-333-333-3333'], + 'fax' => ['label'=>'Fax', 'placeholder'=>'+1-555-555-5555'], + 'email1' => ['label'=>LAN_EMAIL, 'placeholder'=>'info@mycompany.com'], + 'email2' => ['label'=>LAN_EMAIL, 'placeholder'=>'sales@mycompany.com'] + ]; + + foreach($contactFields as $type => $var) + { + $text .= " + + + "; + } + + + + $text .= "
Company".$frm->text('contact_info[company]', varset($pref['contact_info']['company']), 200, ['size'=>'block-level', 'placeholder'=>'My Company'])."
Address".$frm->textarea('contact_info[address]', varset($pref['contact_info']['address']), 2, 80, ['size'=>'block-level', 'placeholder'=>'123 address st. city, state, zip/postal, country'])."
".$var['label']."".$frm->text('contact_info['.$type.']', varset($pref['contact_info'][$type]), 200, ['size'=>'block-level', 'placeholder'=>varset($var['placeholder'])])."
"; + + } + + $text .= "
@@ -580,7 +624,7 @@ $text .= " $text .= "
- ".PRFLAN_13." +

".PRFLAN_53.SEP.PRFLAN_13."

@@ -630,7 +674,7 @@ $text .= " */ $text .= "
- ".PRFLAN_77." +

".PRFLAN_53.SEP.PRFLAN_77."

@@ -703,7 +747,7 @@ $date4 = $tp->toDate(time(),"input"); $text .= "
- ".PRFLAN_21." +

".PRFLAN_53.SEP.PRFLAN_21."

@@ -817,7 +861,7 @@ $elements = array(1=> PRFLAN_259, 2=> PRFLAN_260, 0=>LAN_DISABLED); $text .= "
- ".PRFLAN_28." +

".PRFLAN_53.SEP.PRFLAN_28."

@@ -962,7 +1006,7 @@ $prefOptionPassword = (isset($pref['signup_option_password'])) ? $pref['signup_o $text .= "
- ".PRFLAN_19." +

".PRFLAN_53.SEP.PRFLAN_19."

@@ -1166,7 +1210,7 @@ if ($savePrefs) $core_pref->setPref($pref)->save(false, true); $text .= "
- ".PRFLAN_101." +

".PRFLAN_53.SEP.PRFLAN_286."

@@ -1332,7 +1376,7 @@ $hasGD = extension_loaded("gd"); $text .= "
- ".PRFLAN_47." +

".PRFLAN_53.SEP.PRFLAN_47."

@@ -1575,7 +1619,7 @@ $text .= " $text .= "
- ".PRFLAN_87." +

".PRFLAN_53.SEP.PRFLAN_87."

@@ -1646,7 +1690,7 @@ $text .= "
- ".PRFLAN_209." +

".PRFLAN_209."

@@ -1679,7 +1723,7 @@ $text .= " $text .= "
- ".PRFLAN_238.""; +

".PRFLAN_53.SEP.PRFLAN_238."

"; $upload_max_filesize = ini_get('upload_max_filesize'); @@ -1764,7 +1808,8 @@ $text .= "
"; -$text .= "
"; +$text .= "
+

".PRFLAN_53.SEP.PRFLAN_257 . "

"; if(E107_DEBUG_LEVEL > 0) { @@ -1772,7 +1817,7 @@ if(E107_DEBUG_LEVEL > 0) // Javascript Control $text .= " - " . PRFLAN_242 . " +

".PRFLAN_242 . "

@@ -1972,7 +2017,7 @@ $text .= ""; $text .= "
- ".PRFLAN_149." +

".PRFLAN_53.SEP.PRFLAN_149."

@@ -2043,8 +2088,8 @@ $text .= " "; - -$ns->tablerender(PRFLAN_53, $mes->render().$text); +//PRFLAN_53 +$ns->tablerender(null, $mes->render().$text); require_once(e_ADMIN."footer.php"); @@ -2107,7 +2152,7 @@ function prefs_adminmenu() $var['core-prefs-admindisp']['text'] = PRFLAN_77; $var['core-prefs-admindisp']['image_src'] = 'fa-dashboard.glyph'; - $var['core-prefs-textpost']['text'] = PRFLAN_101; + $var['core-prefs-textpost']['text'] = PRFLAN_286; $var['core-prefs-textpost']['image_src'] = 'fa-filter.glyph'; $var['core-prefs-security']['text'] = PRFLAN_47; diff --git a/e107_core/shortcodes/batch/contact_shortcodes.php b/e107_core/shortcodes/batch/contact_shortcodes.php index 23095eafd..b62fda558 100644 --- a/e107_core/shortcodes/batch/contact_shortcodes.php +++ b/e107_core/shortcodes/batch/contact_shortcodes.php @@ -103,6 +103,71 @@ class contact_shortcodes extends e_shortcode return ""; } + function sc_contact_map($parm=null) + { + $pref = e107::getPref('contact_info'); + + if(empty($pref['address'])) + { + return null; + } + + $address = trim($pref['address']); + + $zoom = varset($parm['zoom'], 'street'); + + $zoomOpts = [ + 'street' => 17, + 'district' => 14, + 'city' => 12, + + ]; + + $zoom = (int) varset($zoomOpts[$zoom],$zoom); + +// &z='.$zoom.' + + return ''; + + } + + function sc_contact_info($parm=null) + { + $ipref = e107::getPref('contact_info'); + $type = varset($parm['type']); + + if(empty($type) || empty($ipref[$type])) + { + return null; + } + + $tp = e107::getParser(); + $ret = ''; + + switch($type) + { + case "company": + $ret = $tp->toHTML($ipref[$type], true, 'TITLE'); + break; + + case 'email1': + case 'email2': + case 'phone1': + case 'phone2': + case 'phone3': + case 'fax': + $ret = $tp->obfuscate($ipref[$type]); + break; + + default: + $ret = $tp->toHTML($ipref[$type], true, 'BODY'); + // code to be executed if n is different from all labels; + } + + return $ret; + } + + /* example {CONTACT_EMAIL} */ diff --git a/e107_core/templates/contact_template.php b/e107_core/templates/contact_template.php index b45de67b2..95d6d1934 100644 --- a/e107_core/templates/contact_template.php +++ b/e107_core/templates/contact_template.php @@ -12,11 +12,40 @@ if (!defined('e107_INIT')) { exit; } +$CONTACT_WRAPPER['info']['CONTACT_INFO'] = "
{---}
"; +$CONTACT_WRAPPER['info']['CONTACT_INFO: type=company'] = "

{---}

"; +$CONTACT_WRAPPER['info']['CONTACT_INFO: type=address'] = "
{GLYPH=fa-map-marker} {---}
"; +$CONTACT_WRAPPER['info']['CONTACT_INFO: type=email1'] = "
{GLYPH=fa-envelope} {---}
"; +$CONTACT_WRAPPER['info']['CONTACT_INFO: type=email2'] = "
{GLYPH=fa-envelope} {---}
"; +$CONTACT_WRAPPER['info']['CONTACT_INFO: type=phone1'] = "
{GLYPH=fas-phone-alt} {---}
"; +$CONTACT_WRAPPER['info']['CONTACT_INFO: type=phone2'] = "
{GLYPH=fas-phone-alt} {---}
"; +$CONTACT_WRAPPER['info']['CONTACT_INFO: type=phone3'] = "
{GLYPH=fas-phone-alt} {---}
"; +$CONTACT_WRAPPER['info']['CONTACT_INFO: type=fax'] = "
{GLYPH=fa-fax} {---}
"; $CONTACT_TEMPLATE['info'] = "
-
{SITECONTACTINFO}
+ + + {SITECONTACTINFO} + + {CONTACT_INFO: type=company} +
+
+ {CONTACT_INFO: type=address} +
+ {CONTACT_INFO: type=phone1} + {CONTACT_INFO: type=phone2} + {CONTACT_INFO: type=phone3} + {CONTACT_INFO: type=fax} +
+ {CONTACT_INFO: type=email1} + {CONTACT_INFO: type=email2} +
+
+ {CONTACT_MAP: zoom=city} +
+
"; diff --git a/e107_core/xml/default_install.xml b/e107_core/xml/default_install.xml index 3b92810de..5e365eb8e 100644 --- a/e107_core/xml/default_install.xml +++ b/e107_core/xml/default_install.xml @@ -33,6 +33,8 @@ 247desc0 + 00 diff --git a/e107_languages/English/admin/lan_prefs.php b/e107_languages/English/admin/lan_prefs.php index 56091a12e..514275630 100644 --- a/e107_languages/English/admin/lan_prefs.php +++ b/e107_languages/English/admin/lan_prefs.php @@ -61,7 +61,7 @@ define("PRFLAN_59", "ticking will restrict all areas apart from the front page a define("PRFLAN_60", "Use SSL only"); define("PRFLAN_61", "Redirect all traffic through SSL (https)"); define("PRFLAN_76", "Display CAPTCHA on signup page."); -define("PRFLAN_77", "Admin Display Options "); +define("PRFLAN_77", "Admin Display"); define("PRFLAN_78", "Leave blank to disable"); // define("PRFLAN_80", "Click here to view"); define("PRFLAN_81", "Display CAPTCHA on login page."); @@ -99,7 +99,7 @@ define("PRFLAN_95", "Display plugins info:"); define("PRFLAN_96", "Will display info on all admin pages for each plugin supporting this type of feature"); define("PRFLAN_97", "Unique 'Plugins info' menu:"); define("PRFLAN_98", "If disabled, each plugin will display its own info in an individual menu. If enabled all info will be displayed in one menu."); -define("PRFLAN_101", "Text Rendering"); +// define("PRFLAN_101", "Text Rendering"); define("PRFLAN_102", "Replace clickable URLs"); define("PRFLAN_103", "If ticked, and 'Make Clickable' (above) is also ticked, posted URLs or Email addresses are displayed as a hyperlink using text from the textboxes below. This keeps very long URLs/Emails from breaking layout."); define("PRFLAN_104", "URL replacement text"); @@ -307,4 +307,4 @@ define("PRFLAN_282", "Session Save Method"); define("PRFLAN_283", "Display navigation-bar labels"); define("PRFLAN_284", "Collapse navigation side-bar by default"); define("PRFLAN_285", "Display field help tips"); - +define("PRFLAN_286", "Content Filters"); diff --git a/e107_web/css/e107.css b/e107_web/css/e107.css index 2e4450b08..d19afdbd4 100644 --- a/e107_web/css/e107.css +++ b/e107_web/css/e107.css @@ -382,6 +382,7 @@ cursor: pointer; #uiAlert .alert { z-index:10000; box-shadow:1px 4px 5px rgba(0,0,0,0.4) } #uiAlert.notifications { top: 48%; left: 0; width: 100%; } +#contactInfo iframe.sc-contact-map { width:100%; min-height:195px } #login-template { max-width: 330px; margin-right: auto; margin-left: auto; }