Code Snippets Info

Small, short code snippets that other people may find useful. Do you have a good regex that you would like to share? Share it! Even better, the code can be commented on, and improved.

Moderator: General Moderators

Post Reply

Good idea?

Yes
71
97%
No
2
3%
 
Total votes: 73

jason
Site Admin
Posts: 1767
Joined: Thu Apr 18, 2002 3:14 pm
Location: Montreal, CA
Contact:

Code Snippets Info

Post by jason »

Basically, I think this forum is pretty self explanatory. Its for quick and simple snippets that people can copy and paste. Not really for complete classes or function libraries. http://www.phpclasses.org and http://www.evilwalrus.com are better suited for that.

This forum is also NOT for getting help with code. This is for completed and workable snippets of code often used.

The primary reason for adding was for something where I could store often used regular expressions, SQL databases, etc. Even better, other people can easily search through the forums for these code snippets, and also improve on them, and post a reply. So I think it will be useful.

On a side note: Do you guys think I am really pushing phpBB to be useful for more than just your average forum posts? Tutorials section, now a code snippet section? But considering that a forum is essentially (at the core) a "post and reply" setup, most anything can be use for it.
User avatar
twigletmac
Her Royal Site Adminness
Posts: 5371
Joined: Tue Apr 23, 2002 2:21 am
Location: Essex, UK

Post by twigletmac »

This is cool. All too often good code snippets are quickly lost in the PHP - Normal Forum.

Mac
jason
Site Admin
Posts: 1767
Joined: Thu Apr 18, 2002 3:14 pm
Location: Montreal, CA
Contact:

Post by jason »

Hehe, yeah, like I said, the reason I did this was mostly because I got tired of looking for good regular expressions. I can right my own...but still. I mean, just think about something like the postal costs regex. What better way to get a list of postal code regex's then to post yours, and then ask the rest of the world to do it as well.

Phone numbers would be good to have, too.
feha
Forum Newbie
Posts: 5
Joined: Tue Oct 19, 2004 7:11 am
Location: Sweden

Great

Post by feha »

I just deveoped CodeLibrary module for our CMS Enterprise

http://www.vision.to/new_cms/CodeLib_MOD/index.php

Lot's of features ...
regards
http://www.vision.to
User avatar
phpScott
DevNet Resident
Posts: 1206
Joined: Wed Oct 09, 2002 6:51 pm
Location: Keele, U.K.

Post by phpScott »

I think it would be a good idea. I have just started my own little repository of code snippets, usually regex's because I can't stand to write my own.

I also think that many of the additions to the site since I joined have been quite helpful, if a little underused, ie tutorials.

now if there was only a way to kind of group things together fer easy reference.
User avatar
dude81
Forum Regular
Posts: 509
Joined: Mon Aug 29, 2005 6:26 am
Location: Pearls City

Re: Code Snippets Info

Post by dude81 »

You mods are awesome.. making this forum great place for PHP developers
Post Reply