General Community > WebsiteBaker Website Showcase

A site I've recently baked

(1/4) > >>

FreshWebDesign:
I love website baker. The simplicity is something thats unreal compared to other cms's.

Anyways heres my second site, http://www.westernlakedistrict.com

all the menu's are controlled in the admin, 3 in total. I used the news stippet addon, the ajax gallery and mass mail, I also created a little addon for mass mail to allow users to signup to the newsletter without being a member, youll see what i mean on the main page you can put your email in to sign up.

Give me your thaughts, if anybodies interested in the template just let me know and i would be willing to release it.

pcwacht:
Looks good to me

Nicely done

John

frankyboy:
great page. the lake district is one of may favourite places! i would like to have a look at your massmail-addon, thought about that for a long time; sounds like a very usefull improvement!

FreshWebDesign:
Create a form on your site for somebody to enter there email address like this but change the url


<form method="post" name="form1" action="http://www.yoursite.com/index.php?page_id=24">
<input type="text" name="mail_to" value=""> 
<input type="hidden" name="group_id" value="1">
<input type="submit" value="Go">
<input type="hidden" name="MM_insert" value="form1">
</form>

Create a new page in wb that is hidden and remember the page id from the top, put this page id
number where 24 is in the form above where it says page_id=

then in the page add this code

---------------------------------------------------------------------
<?php
# FileName="Connection_php_mysq l.htm"
# Type="MYSQL"
# HTTP="true"
$hostname_site = "databasehostname";
$database_site = "database name";
$username_site = "database username";
$password_site = "databasepassword";
$site = mysql_pconnect($hostname_site, $username_site, $password_site) or trigger_error(mysql_error(),E_USER_ERROR);

function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "")
{
  $theValue = (!get_magic_quotes_gp c()) ? addslashes($theValue) : $theValue;

  switch ($theType) {
    case "text":
      $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
      break;   
    case "long":
    case "int":
      $theValue = ($theValue != "") ? intval($theValue) : "NULL";
      break;
    case "double":
      $theValue = ($theValue != "") ? "'" . doubleval($theValue) . "'" : "NULL";
      break;
    case "date":
      $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
      break;
    case "defined":
      $theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue;
      break;
  }
  return $theValue;
}

$editFormAction = $_SERVER['PHP_SELF'];
if (isset($_SERVER['QUERY_STRING'])) {
  $editFormAction .= "?" . htmlentities($_SERVER['QUERY_STRING']);
}

if ((isset($_POST["MM_insert"])) && ($_POST["MM_insert"] == "form1")) {
  $insertSQL = sprintf("INSERT INTO testwbmod_massmail_ addresses (group_id, mail_to) VALUES (%s, %s)",
                       GetSQLValueString($_POST['group_id'], "int"),
                       GetSQLValueString($_POST['mail_to'], "text"));

  mysql_select_db($database_site, $site);
  $Result1 = mysql_query($insertSQL, $site) or die(mysql_error());
  echo "<center>THANK YOU <br>Thanks for subscribing to our newsletter and any time you can unsubscribe by clicking a link in your newsletter</center>";
}
?>
-------------------------------------------------------------------------------------------

The code above was created in dreamweaver, I made it completely independent to wb, i didnt really want
to fiddle with core files because i was in a real hurry to get the site done.

If you want to rewrite it to coincide with wb, feel free

the form simply adds an email address to the database table that mass mail uses, it's only
simple, but is limited, however it does just what i wanted.

seagull:
Nice site and a straight template!

I am sure interested in this template.

Jan

Navigation

[0] Message Index

[#] Next page

Go to full version