This forum is locked
to the creation of new threads
. If you wish to post a code snippet, first read the guidelines below before finally private messaging a moderator with your thread.
Writing a code snippet should be fairly self explanatory.
First, check if a code snippet that does what your does already exists. If it does, check to see if it's done in a similiar way. If it does, provide the name of the thread to include your code snippet. If not, a descriptive name for your snippet's new thread.
Code snippets should be suitable for use in production level code. The snippet will be reviewed by the board.
The title of your thread should be clear and descriptive.
When posting your snippet, if it's not extremely obvious you should give a very clear description of what your snippet does and any limitations/requirements to run it (e.g. requires PHP5). You should also include examples on its usage.
Code snippets do not need to be lengthy, complex excerpts of source code. If you have some useful code which is only a few lines long you should still offer it.
Do's and Don'ts...
- Do not send links to external content without posting the source code here.
- Do not send snippets that are not free to use (i.e. not licensed under the GPL, LGPL or another free software license).
- Do not send code which only works in your own application or will not be useful to other developers.
- Do include examples of how to use your snippet.
- Do state the license of your snippet where appropriate.