Welcome To Snipplr


Everyone's Recent Snippets



1 ... 121 122 123 124 125 ... 554
Share current page on Facebook wall or Twitter
1 1019 posted 13 years ago by pratheep
Usage: <?php>post_excerpt; if($textin == ""){ $textin = $post->post_content; } echo TruncateText($textin, 150); ?>
0 855 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 955 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 916 posted 13 years ago by m3rol666
Initializing a popup
1 956 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 1262 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 1156 posted 13 years ago by Roen
Get posts from a Custom Post Type
0 2216 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 938 posted 13 years ago by i-am-andy
declare all custom fields first
0 837 posted 13 years ago by mesh606
0 960 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 1127 posted 13 years ago by lewiswalsh
0 1062 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 1474 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 882 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 1402 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 1378 posted 13 years ago by alberomo
I create this recursive function to remove and null all children inside a display object container.
0 1366 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 880 posted 13 years ago by alberomo
Useful when using user-submitted URLs
0 926 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 1490 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 1129 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 1742 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 652 posted 13 years ago by alberomo
1 ... 121 122 123 124 125 ... 554