Below are snippets for ffxfiend.
11
You can use this function to dynamically generate html "width/height" for use with displaying a thumbnail image usingthe original image. This will help save in making dup images just for display as a thumbnail.
It takes two arguments, the path to where the image is stored and the desired width or height.
Please comment or improve this code
.
It takes two arguments, the path to where the image is stored and the desired width or height.
Please comment or improve this code
.
26
This is a simple function to generate a random ID of letters and numbers however long you want. All you do is pass it how many parts you want and then how many pieces(chars/numbers) per part you want.
I hope you enjoy
I hope you enjoy
10
Here is a pair of function to use in combination. The first one will change newlines into tags to store into a database. The second one does the reverse so you can edit the content of the database without having the tags show when you edit the content. If you can find improvements or have comments please let me know
-11
This is a faily simple function to validate a URL being passed into your scripts. It will allow for http, https, and ftp. The beginning www. of a URL is optional as well. It will also validate if you have an IP address in place of the domain name. I'm sure this can be improved upon as this is my first attempt at regular expressions but it has worked good for me so far. Please comment or improve if your able.
Thanks!
Thanks!









