Welcome To Snipplr


Everyone's Recent Snippets



1 ... 121 122 123 124 125 ... 554
Share current page on Facebook wall or Twitter
1 778 posted 13 years ago by pratheep
Usage: <?php>post_excerpt; if($textin == ""){ $textin = $post->post_content; } echo TruncateText($textin, 150); ?>
0 650 posted 13 years ago by tcelestino
I made this because org.apache.commons.lang.StringUtils does not have this method. I used this because i was dealing with a legacy db where all fields were char. trailing spaces were a pita.
0 726 posted 13 years ago by m3rol666
I used this because I had a legacy db table that all fields are char. the right spaces were a pita. The rightTrim function can be viewed in my profile
0 741 posted 13 years ago by m3rol666
Initializing a popup
1 717 posted 13 years ago by cpres
Namespaces for enable browsers redering stuff for facebook's fbml, Google+1 and WAI-ARIA attributes in XHTML served as application/xml+html.
0 1020 posted 13 years ago by leobetosouza
Comes in handy for php magic functions such as __get and __set. This behaviour is fixed in php 5.3. Returns true also for private and protected properties using a reflectionclass
0 925 posted 13 years ago by Roen
Get posts from a Custom Post Type
0 1804 posted 13 years ago by i-am-andy
Useful snippet for getting a specific number of posts from a specific category, useful for news listing in sidebar
0 700 posted 13 years ago by i-am-andy
declare all custom fields first
0 626 posted 13 years ago by mesh606
0 709 posted 13 years ago by m1b
By omitting [end] it will remove all to the end. Set an [end] with a negative value to count back from the end of the elements. fadeOut is unnecessary.
0 852 posted 13 years ago by lewiswalsh
0 822 posted 13 years ago by rprol
Thanks to followgram.me you can read a public feed with your photos. Use this code to retrieve your Instagr.am photos and use them on your web.
0 1202 posted 13 years ago by ginoplusio
Questa piccola funzione riceve come argomento uno unix timestamp e ritorna una stringa contenente la "descrizione verbosa" della differenza di tempo. Ad esempio, usando il timestamp relativo a 5 minuti e mezzo fa, ritornerà la stringa "5 minuti e 30...
0 660 posted 13 years ago by claudiowebdesign
Check if user has intruded a real email address. Return true (real email) or false (fake email). Arguments: Element from a form. From book Dom Scripting by Jeremy Keith
0 1139 posted 13 years ago by alberomo
Arguments: Element from a form. Take that element and checks if is filled. If not, returns false. If is filled, returns true. From book Dom Scripting by Jeremy Keith
0 1122 posted 13 years ago by alberomo
I create this recursive function to remove and null all children inside a display object container.
0 1096 posted 13 years ago by radykal
A JS function that put the focus in the form field associated to a label element whenever is clicked. The for atributte of the label element must match the id attribute of the associated form field. It takes no arguments. From book Dom Scripting by...
0 673 posted 13 years ago by alberomo
Useful when using user-submitted URLs
0 682 posted 13 years ago by Entherman
An additional method for the jQuery validation plugin to validate a german date (dd.mm.YYYY) based on DateITA method.
0 1233 posted 13 years ago by tuuul
I was working on a site that pulled in and republished a bunch of RSS feeds. Some contained duff images such as blank gifs that I needed to block so I wrote this function to compare the url of an image against a blacklist
0 863 posted 13 years ago by paulo72
Add this code to the controller Set controller as the delegate of the all the UITextField s in the UIView
1 1426 posted 13 years ago by yasirmturk
JS Function that style sibling elements of a given tag. Arguments: tag of the element We want siblings to style and name of the class we want to add. It needs the class to be styled (using CSS). It uses getNextElement function and addClass functions....
0 485 posted 13 years ago by alberomo
A JS function that makes bold the text of table rows ("tr" elements) when you "mouseover" them. It takes no arguments. From book Dom Scripting by Jeremy Keith.
0 461 posted 13 years ago by alberomo
1 ... 121 122 123 124 125 ... 554