Jump to content

anttila

Members
  • Posts

    31
  • Joined

  • Last visited

Everything posted by anttila

  1. The real question is, why you want to do this with module? Creating a simple contact form is easy. <?php$action=$_REQUEST['action']; if ($action=="") /* display the contact form */ { ?> <form action="" method="POST" enctype="multipart/form-data"> <input type="hidden" name="action" value="submit"> Your name:<br> <input name="name" type="text" value="" size="30"/><br> Your email:<br> <input name="email" type="text" value="" size="30"/><br> Your message:<br> <textarea name="message" rows="7" cols="30"></textarea><br> <input type="submit" value="Send email"/> </form> <?php } else /* send the submitted data */ { $name=$_REQUEST['name']; $email=$_REQUEST['email']; $message=$_REQUEST['message']; if (($name=="")||($email=="")||($message=="")) { echo "All fields are required, please fill <a href=\"\">the form</a> again."; } else{ $from="From: $name<$email>\r\nReturn-path: $email"; $subject="Message sent using your contact form"; mail("info@tewdin.com", $subject, $message, $from); echo "Email sent!"; } } ?>
  2. I think mobile content should load fast and every useless piece should be disabled if possible. But I don't really understand why we can't just do everything AMP style and forget the old ways? Browsers can support it and if I don't have any elements which are banned, then why should I do normal page? I want always optimise my content and websites, but I don't really like double content or double work. I can confirm that LostKobrakai's way to do this seems to be best practise but I think fixing only the elements that needs to be fixed is a better way than put everything to AMP or normal. At least for me because I have a lot of templates and code. I just do my first AMP version. This is not nice for me because I always put YouTube video to top of the page (embed video - title - info - body), because that is very important for me. So now it must be the last.
  3. First, I want to thank everyone who has been developing this great CMS. I really love it and I can do so much more and even learn more about coding. Now I try to create something new and very important for me, but I have a small problem with it. I am trying to make a website where users only see their own stuff or blank / redirect if not logged in. The problem is that I want to use the same template for all users, so I can't put a certain page as parent for selectable pages because the parent should always be /clients/username/categories/ (different path for every user). Input field type is Select or PageAutocomplete. User can create new categories through it. I would also like to know if there is a way to prevent users to see only what they have under their own /clients/username without making new templates for all users. I only show what I want them to see through templates but if they know the admin url then they would see all the pages and they would have access to edit all the pages which are created with certain content type. They need only access to create new content under their own "main page". This user page is created when a new user is registered and linked with field (content of the field is user id). Select is very important because every category gives special view for user. user1 -- Project 1 ---- Year -------- Things that user creates from Page 1. -- Categories ---- Things I want to use as Select List for new pages -- Project 2
×
×
  • Create New...