Create your own snippets and share...

User 2000538 Photo


Registered User
1,392 posts

Dave Thompson wrote:
Why is there a cat drumming it's claws on the table?


Because the cat is impatient and wants everything yesterday :D

Where is that SCC Pro?
I know you believe you understand what you think I said...but I am not sure you realize that what you heard is not exactly what I meant.


User 117361 Photo


Ambassador
6,076 posts

Only discovered this now. Just say I am a late starter, but here is one of my most used snippets... I call it my blahblah and it is just a bunch of Lorem ipsum text to fill out my pages until I have something better to add.
Attachments:
User 117361 Photo


Ambassador
6,076 posts

Here are a couple more I use pretty often too:

brace brackets for when I am doing css code as I have an Italian keyboard and can never find the brackets when I need them

external css file link (file name needs changing of course)

a comment which I insert into my html pages code head to show that all editing has been carried out with CoffeeCup HTML Editor even when I am using templates, cms skins etc which are not originally by CC. I still always use the Editor for tweaking, skinning and so on. Unfortunately sometimes in cms this gets removed but by no choice of my own as the cms application on the server strips out what it doesn't want!

Attachments:
User 133269 Photo


Registered User
2,900 posts

Here - make your own snippet (or perhaps some nice forum member will turn it in to one for me and post it back...

Php Very Basic Contact Form
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Untitled</title>
</head>
<body>
<?php
// basic php contact form by Fe Pixie
// note - this is a very basic form with no error checking - use at your own risk
// check with your web host that php mail is enabled on your server
// save this page as contactform.php - or any .php page but change the form action="" to match
// --------------------------------------------------------------------------
if (isset($_POST['submit'])) { // check for submit button
// fetch the form data
$firstname = $_POST['firstname'];
$lastnamename = $_POST['lastnamename'];
$emailaddress = $_POST['emailaddress'];
$message = $_POST['message'];
// add some more stuff for the email
$myemail = "me@mywebsite.co.nz"; // ------------- set to your email address
$subject = "Contact Form Email";
// stick together the info from the form to put in the body of the email
$theMessage = "A message has been sent from \n\n";
$theMessage .= "$firstname $lastnamename\n";
$theMessage .= "Email: $emailaddress\n\n";
$theMessage .= "Message:\n $message\n\n";
$theMessage .= "Love from your website\n";
// send the mail
mail("$myemail", "$subject", "$theMessage", "From:$emailaddress");
// print a thank you message
echo "<br /><h1>Thank you $firstname - your mail has been sent.</h1>"; // print a message

} else { // else if the form is not submitted yet - print out the form in normal html
?>
<form action="contactform.php" method="post">
First Name: <input type="text" name="firstname" /><br />
Last Name: <input type="text" name="lastnamename" /><br />
Email Address: <input type="text" name="emailaddress" /><br />
<textarea rows="4" cols="30" name="message"></textarea><br />
<input type="submit" name="submit" />
</form>
<?php
} // end no submit yet
?>
</body>
</html>
Have fun
~ Fe Pixie ~
User 1948478 Photo


Senior Advisor
1,850 posts

not sure this will work, but I tried...! :)
Attachments:
User 133269 Photo


Registered User
2,900 posts

thanks per :)
Have fun
~ Fe Pixie ~
User 1948478 Photo


Senior Advisor
1,850 posts

You're most welcome fe!

Unfortunately I'm fresh out of votes though... (only one each, right Jo Ann??)
User 38401 Photo


Senior Advisor
10,951 posts

Yep 1 per account, but you're more than welcome to change your vote, just revote again and tell us which vote to remove :)
User 92156 Photo


Registered User
272 posts

Can't attach my snippets, when I try I get this message in a big pink box:

Sorry, we couldn't add your post for the following reasons:
* Your attachment must be one of: .TXT, .SNP, .ZIP, .GIF, .JPG, or .PNG format.

The files were *.snp (lowercase extension) files produced by CC Editor so I don't know what's happening.



User 38401 Photo


Senior Advisor
10,951 posts

hmm dunno Zipper, go ahead and put them in code forum that works fine too people can just create their own snippets with it then :)

Have something to add? We’d love to hear it!
You must have an account to participate. Please Sign In Here, then join the conversation.