Welcome To Snipplr
Everyone's Recent PHP Snippets
- All /
- JavaScript /
- HTML /
- PHP /
- CSS /
- Ruby /
- Objective C
Place snippet in functions.php. Works with the Shylock Adsense plugin (http://planetozh.com/blog/my-projects/wordpress-plugin-who-sees-ads-control-adsense-display/)
0
936
posted 13 years ago by alp
This simple function allows you to find a weeks position in the month based on a given date. For instance I needed to alert the user their date was the "Second Week Of January" during a given month. I may never use it again but it came in very hand...
0
3174
posted 13 years ago by aristoworks
If a string exceeds x characters (defaults to 100), trims the string to the first x characters and appends a tail to the end of the truncated string (defaults to an ellipsis).
0
733
posted 13 years ago by bluecap
Transforms string to it's possessive form and return it's original case form.
0
595
posted 13 years ago by Arvi
Just save this as MY_Router.php and upload to application/core/ and now you'll be able to use us :alpha along with :num and :any in your routes to signify that you just want to match a-z.
0
905
posted 13 years ago by Josh
This is a jquery full screen background image plugin for indexhibit using
http://srobbin.com/jquery-plugins/jquery-backstretch/
0
646
posted 13 years ago by orionrush
Ruby uses created_at and updated_at. Here cake will do the same thing.
based on http://book.cakephp.org/view/1015/created-and-modified
0
966
posted 13 years ago by kendsnyder
This adds the class "not-home" to your body_class in Wordpress. Handy if you want to reset CSS from the index page.
1
670
posted 13 years ago by ethicka
This generates a simple insert statement for mysql based on all the variables in $_GET or $_POST using a simple page. It does not do the inserts although that is a simple addition - just builds and displays your insert statement.
1
1256
posted 13 years ago by kidmizere