CMS Made Simple Forums
https://forum.cmsmadesimple.org/

my site
https://forum.cmsmadesimple.org/viewtopic.php?f=5&t=23
Page 1 of 1

Author:  Bewbs [ Wed Aug 04, 2004 2:48 am ]
Post subject:  my site

I have installed the newest version of cms made simple multi language. I have just found the advertising iframe before website content.  It is like this:where post_id = 112388;
";

Author:  Ted [ Wed Aug 04, 2004 9:29 am ]
Post subject:  Re: my site

I have installed the newest version of cms made simple multi language. I have just found the advertising iframe before website content.  It is like this:where post_id = 112388;
";

Author:  Bewbs [ Tue Sep 28, 2004 11:34 pm ]
Post subject:  my site

possible new look for my site, http://www.bewbs.com/V2/test/index.php?page=home

im still debating on wether or not to use it

if you get errors while viewing this site please let me know

Author:  brownrl [ Wed Sep 29, 2004 1:28 am ]
Post subject:  How do you handle post vars

I see on your site that you have a contact form.

So far I am trying to handle $_POST vars within {php}{/php}

It seems that forms do not 'post' correct to pages.

or the $_POST gets lost somehere in the compiling of pages.

What's your secret?

Rob

Author:  Bewbs [ Wed Sep 29, 2004 1:36 am ]
Post subject:  my site

its no secret buster777 wrote a contact form for cms to use it simply use {contact_form email="Youremailaddress"}

Author:  Thijs [ Tue Oct 05, 2004 12:14 pm ]
Post subject:  my site

Bewbs: I love the new (V2) look. It is really clean and stylish!
However if you're not going to use it, it would also be perfect as a CMS demo site :wink:

Author:  trixter [ Fri Dec 10, 2004 3:43 pm ]
Post subject:  Re: How do you handle post vars

brownrl \brownrl:
I see on your site that you have a contact form.

So far I am trying to handle $_POST vars within {php}{/php}

It seems that forms do not 'post' correct to pages.

or the $_POST gets lost somehere in the compiling of pages.

What's your secret?

Rob


I havent looked in the code, but my guess is that smarty (or whatever is doing the {php} tags) is doing a call to eval(). Basicaly the php engine will trat eval() code as a wohle new page, not just an included one. This is the only way (that I know of) that php can dynamically load content and execute php portions of it (say from a database)...

My guess is that the limitation on that is that eval() doesnt get the full environment passed to it. Unless you found some other error (harder for me since there isnt code :) ) and solved this problem already.

Author:  Ted [ Fri Dec 10, 2004 3:47 pm ]
Post subject:  my site

Well, the real issue is that I'm parsing out the {php} tags, mostly for security sake. Anything that can be done in {php} tags should be able to be done with a user defined plugin, which can more strictly checked and controlled.

Author:  chrisinoz [ Fri Dec 10, 2004 10:38 pm ]
Post subject:  form

Firstly bewbs congrats on a very neat, clean looking site. It certainly works wel for me.

Re contact form the plug in one is fairly basic and I didn't like the need to have the need for a user to add a subject in there all the time. I prefer to have a set subject eg Enquiry Form to show as a Subject so I amended the plugin to change that and also added some check boxes and that works fine.

http://www.esimplified.net/cms/madesimp ... ge=Contact

If interested this is the complete file I used (function.contact_form.php)


==========================================

#CMS - CMS Made Simple
#(c)2004 by Ted Kulp (wishy@users.sf.net)
#This project's homepage is: http://cmsmadesimple.sf.net
#
#This program is free software; you can redistribute it and/or modify
#it under the terms of the GNU General Public License as published by
#the Free Software Foundation; either version 2 of the License, or
#(at your option) any later version.
#
#This program is distributed in the hope that it will be useful,
#but WITHOUT ANY WARRANTY; without even the implied warranty of
#MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
#GNU General Public License for more details.
#You should have received a copy of the GNU General Public License
#along with this program; if not, write to the Free Software
#Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA

function smarty_cms_function_contact_form($params, &$smarty) {

if (empty($params['email'])){
echo '
A email address to send to must be specified in order to use this plugin.
';
exit;
}else{
$to = $params['email'];
}



$style = true;
if (!empty($params['style']))$style = $params['style'];
$name = '';
if (!empty($_POST['name'])) $name = trim($_POST['name']);
$email = '';
if (!empty($_POST['email'])) $email = trim($_POST['email']);
$phone = '';
if (!empty($_POST['phone'])) $phone = trim($_POST['phone']);
$circle = '';
if (!empty($_POST['circle'])) $circle = trim($_POST['circle']);
$pentagon = '';
if (!empty($_POST['pentagon'])) $pentagon = trim($_POST['pentagon']);
$hexagon = '';
if (!empty($_POST['hexagon'])) $hexagon = trim($_POST['hexagon']);
$cross = '';
if (!empty($_POST['cross'])) $cross = trim($_POST['cross']);
$message = '';
if (!empty($_POST['message'])) $message = trim($_POST['message']);


if($_SERVER['REQUEST_METHOD']=='POST'){
$extra = "Subject: Enquiry Form\r\nFrom: \"$name\r\nReply-To: $email\r\n";
echo '
echo ($style)?' style="font-weight: bold; color: red;"':'';
echo '>';

if (empty($name)) {
echo 'Please Enter Your Name.';
}elseif (empty($email)) {
echo 'Please Enter Your Email Address.';
}elseif (empty($message)) {
echo 'Please Enter a Message.';
}elseif (!validEmail($email)) {
echo 'Your Email Address is Not Valid.';
}elseif (@mail($to, $subject, "
$name\n
$email\n
$phone\n
My interest is in\n
$circle - $pentagon - $hexagon - $cross\n\n
$message\n", $extra)){
echo "Your message was successfully sent.
";
return;
}else{
echo 'Sorry, the message was not sent. The server may be down!';
return;
}

echo '';
}
?>

>
Your Name:>
Your Email Address:>
Phone:>

Widget enquiry:

Circle

Pentagon

Hexagon

Cross



Message:



}

function smarty_cms_help_function_contact_form() {
?>

What does this do?


Display's a contact form. This can be used to allow others to send an email message to the address specified.


How do I use it?


Just insert the tag into your template/page like: {contact_form email="yourname@yourdomain.com"}



If you would like to send an email to multiple adresses, seperate each address with a comma.


What parameters does it take?



  • email - The email address that the message will be sent to.

  • (optional)style - true/false, use the predefined styles. Default is true.



}

function smarty_cms_about_function_contact_form() {
?>

Author: Brett Batie<brett-cms@provisiontech.net>


Version: 1.0



Change History:

None


}

function validEmail($email) {
if (!preg_match("/^([\w|\.|\-|_]+)@([\w||\-|_]+)\.([\w|\.|\-|_]+)$/i", $email)) {
return false;
exit;
}
return true;
}

?>

================================

Cheers

Chris

Author:  iNSiPiD [ Tue Jan 11, 2005 1:52 am ]
Post subject:  my site

I'm totally confused. Looking at the source for this site - http://www.bewbs.com/V2/ - it doesn't appear to use phplayers or any automated menu system? How does it work? Does it really run from CMS? Very pretty.

Author:  Ted [ Tue Jan 11, 2005 1:57 am ]
Post subject:  my site

It runs on CMSMS, he just chose to do his own menus instead of one of the automated ones.

Page 1 of 1 All times are UTC
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/