How can I @import the contact page
The contact page is special in two ways.
- You need to make sure the page has a 'php' extension.
- You need to insert special 'code' into it to get it to work correctly
In order for it to import properly you need to set up session variables. This is accomplished by opening the page inspector of the page that holds the @import, and adding a 'prefix' that sets up the session.
The tricky thing is the command is different for versions prior to 4.2.2 and version 4.2.2 and beyond
For versions prior to 4.2.2 you put the following
<?php session_start(); ?>
For versions after 4.2.2 you put the following
<?php
//start session
session_start();
//set a key, checked in mailer, prevents against
//spammers trying to hijack the mailer.
$security_token = $_SESSION['security_token'] = uniqid(rand());
if(!isset($_SESSION['formMessage'])) $_SESSION['formMessage'] =
'Fill in the form below to send me an email.';
if(!isset($_SESSION['formFooter'])) $_SESSION['formFooter'] = '';
if(!isset($_SESSION['form'])) $_SESSION['form'] = array();
function check($field, $type = "", $value = "") {
$string = "";
if(isset($_SESSION['form'][$field])) {
switch($type) {
case "checkbox":
$string = 'checked="checked"';
break;
case "radio":
if($_SESSION['form'][$field] == $value)
$string = 'checked="checked"';
break;
case "select":
if($_SESSION['form'][$field] == $value)
$string = 'selected="selected"';
break;
default:
$string = unescape_string($_SESSION['form'][$field]);
}
}
return $string;
}
function unescape_string($string) {
return stripslashes(@ html_entity_decode($string, ENT_QUOTES));
}
?>-
Admin
-
RapidBlog
-
FaqMaker
-
Lockdown
-
Sitemap
- What does "Don't allow publish if page defaults are still present"?
- Google says my sitemap appears to be HTML and it's not a supported format.
- Sitemap keeps putting the footer even though I turned it off
- Can I use multiple RapidWeaver files to make a single site and still get my sitemap.xml correct?
- Sitemap keeps a sitemap in the footer even though I turned it off!
- View all (1 more)
-
Pluskit
- Pluskit Examples
- How do I import pages into each other
- There are so many choices for lightbox in pluskit? Which lightbox effect should I use?
- No Really -- I need a step-by-step for importing pictures into blocks and using the lightbox feature?
- How do I change the fonts & colors of the caption in a lightbox?
- View all (13 more)
-
Notablemeals