Welcome To Snipplr
Everyone's Recent Snippets
- All /
- JavaScript /
- HTML /
- PHP /
- CSS /
- Ruby /
- Objective C
function that creates a template tag that can be used to insert excerpts with different lengths. Also controls characters that come after excerpt
0
748
posted 12 years ago by verticalgrain
UPDATE: might be easier or faster to use this now (also courtesy Pippin): http://pippinsplugins.com/get-all-attached-media/
**courtesy Pippin Williamson (http://pippinsplugins.com/image-gallery-short-code-using-post-attachments/)
use shortcode...
1
964
posted 12 years ago by adambundy
It's very useful if you build a FLV player for example, and want to convert the time into minutes:seconds (example: 6:13)
//apply it to your project like this (and don't forget to import the class):
time.text = TimeUtil.getTimecode(timeValue);
0
1003
posted 12 years ago by vamapaull
An example showing how to solve the memory leak problem in constructor
0
684
posted 12 years ago by huanglx
Issues a check to see if the "www" is included, if not, forces "www" to be appended to the URL in question.
1
790
posted 12 years ago by thewickedchemist
This code demonstrates how to concatenate list of strings using lambda expression without need to use a loop.
1
757
posted 12 years ago by Neven
Save this as plugin.nextlink.php to your ndxz-studio/site/plugin folder. Call the Plugin where you need it: <plug:nextlink />
Original by "gd" http://www.indexhibit.org/forum/thread/7879/
0
689
posted 12 years ago by G470
A clean and simple jQuery function for creating a tabbed element. This one allows multiple tabbed elements on 1 page (which has been the downfall of so many others)
1
825
posted 12 years ago by digitalclubb
This function will detect the orientation (portrait/landscape) of an iOS device and set the body class to either portrait or landscape, as well as providing a global variable for use elsewhere in your JS.
If you require multiple classes on your bo...
3
1063
posted 12 years ago by iridium
Fast and easy way to find a keyword inside of files located inside of a directory tree. (eg: looking for a function foo, inside of your applications directory.) This command will display a list of files which contain function foo.
0
992
posted 12 years ago by luizlopes
simple as3 class that help you to avoid repeat add MouseEvent each time
0
1018
posted 12 years ago by mgraph
Simple mix of basic CSS, HTML, and jQuery to detect IE and display a message to the user encouraging them to update.
0
915
posted 12 years ago by thewickedchemist
dynamically selects a value in a select according to what's already in the DB
0
673
posted 12 years ago by dato
Replace the normal <image...> XML with the following code (be sure to adjust the width and height accordingly):
0
1932
posted 12 years ago by wnasich
Use PHP to get JSON
1) set the PHP to the URL of the JSON
2) echo a variable with the loaded data
3) use a request via jQuery to get the variable from PHP
0
952
posted 12 years ago by inreflection7
Return string representing current date in ISO 8601 format, e.g. "2011-12-12T20:50:22+0100".
java.util.Calendar and java.text.SimpleDateFormat have to be imported first.
NOTICE: Use this instead: http://snipplr.com/view/62060/clojure-iso-8601-curre...
0
1838
posted 12 years ago by ef
This snippet describes how to fill select html element with Text, Value pairs
where 'Text' is displayed to the user and 'Value' is actual value to be processed.
0
800
posted 12 years ago by Neven
<p>Little snippet, which helps to use custom colored selections.
All you need is to setup the right style and use this snippet!</p>
0
680
posted 12 years ago by schmizpeter
A simple PHP function for fetching tweets. Just provide your Twitter screen name and how many tweets you want and that is it. The function returns a simplified result set because you rarely need all the stuff that the Twitter API throws your way. If...
1
980
posted 12 years ago by Sverri
Adding custom fields to the quick edit panel in Wordpress is easy using built-in hooks. However, the hook to add fields seems to be called multiple times, adding duplicate fields to the quick edit panel. Adding this code to the top of the function be...
0
824
posted 12 years ago by briteweb