Welcome To Snipplr


Everyone's Recent Snippets



1 ... 383 384 385 386 387 ... 553
Easy check (: **UPD** You can just use [version_compare()](http://ca.php.net/manual/en/function.version-compare.php) function.
1 1695 posted 16 years ago by kirik
For use in conjunction with the get_work function in the theme functions template, functions.php.
0 1467 posted 16 years ago by tylersticka
For use in the theme functions template, functions.php.
0 1451 posted 16 years ago by tylersticka
For use within The Loop, in your portfolio item page template.
0 1592 posted 16 years ago by tylersticka
This is the Aidan Lister PHP countdown, translated for use in Norway. No more 133 days untill christmas, but insted 3 months and 3 weeks.
0 1843 posted 16 years ago by stavelin
This is just a simple function to get the variable without having to worry if its POST or GET, and even allows for a default value to be passed in case the variable was not found.
0 1589 posted 16 years ago by mondomondomxcom
0 1465 posted 16 years ago by antpaw
My Kohana HTML Helper
1 1552 posted 16 years ago by antpaw
Compile, put exe in cgi-bin folder, and post form data to it.
0 1572 posted 16 years ago by Zufolek
It's not 100% accurate, but works fine for people under 1.480.
2 2372 posted 16 years ago by nkm
Using the kohana framework for XSS protection
0 1741 posted 16 years ago by iloveitaly
Found at the source link - stealing and indexing :)
2 1693 posted 16 years ago by cyberhobo
sendmail needs to be working and configured properly uses popen and fputs
0 2508 posted 16 years ago by acosonic
e.g. <pre><code> $ twlogmerge.py twitter-log-user-dir read file: twitter-log-user-dir/page001.xml get status: id: 123456789 append status: accum.:1234 ... append status: accum.:3456 write file: twitter-log-user-dir-marged-20090828-130146.xml...
0 1632 posted 16 years ago by mustam
This is xslt file for twitter-logged xml file. * cf. [Backup my twitter-log](http://snipplr.com/view/18925/backup-my-twitterlog/) * cf. [Merge twitter-logged files into one xml-file](http://snipplr.com/view/18928/merge-twitterlogged-files...
0 3990 posted 16 years ago by mustam
e.g. <pre> $ twlog.py user twitter account name: user Now logging start, take several times. r u OK? [y/N]: y DEBUG: make dir: twitter-log-user DEBUG: get log: page=1 DEBUG: new tweet: 21, accum. tweet: 21 DEBUG: remain hits: 149 DEBUG: writ...
1 1448 posted 16 years ago by mustam
0 1988 posted 16 years ago by okidoka
Page_ClientValidate is a global function. When called this will return true/false if the validator group provided is valid or not.
0 1732 posted 16 years ago by jink
This is a quick & dirty helper for pumping out those annoying little link sharing URLS. I've kept it simple, so all it does is return a URL formatted for a particular service. To use it, just pass a string of the service name to the helper followe...
1 1731 posted 16 years ago by brettbergeron
Dumps whole query so developer can see where is error. However it's potential security issue, exposing SQL commands to attacker. (Recommended to use only during development, replace message code with some custom error text)
0 2091 posted 16 years ago by acosonic
Usage: //any element window.onload = function(){ focusFirstInput(); } or // form elements under 'content-body' window.onload = function(){ focusFirstInput('content-body'); }
0 1734 posted 16 years ago by neoprolog
Usually use in a template with `in_category()`, like `if ( in_category( 3 ) || in_subcategory( 3 ) ) { ...`. Tested in WP 2.8.4.
1 1868 posted 16 years ago by cyberhobo
0 1417 posted 16 years ago by iTony
The code below will loop through the properties in an object and alert a string. myObject is in JSON notation. The "for ( x in y)" construct does not work if the Prototype.js library is included on the page
0 3479 posted 16 years ago by elugardo
1 ... 383 384 385 386 387 ... 553