Welcome To Snipplr


Everyone's Recent PHP Snippets Tagged c



1 ... 115 116 117 118 119 ... 147
This code replaces a normal category template. It sorts all posts by their category/subcategory instead of bunching them all together and ordering them by date. A bit complicated to explain in a box this size... Check the link for a run through!
1 2342 posted 17 years ago by rocktronica
If you leave out the "paged" parameter, the same results are queried and shown on each pagination. Of course, you'll want to change the "3" to whichever category you'll want to exclude.
3 2297 posted 17 years ago by rocktronica
I was asked to add Recaptcha' to an already existing form. I didn't want to interfere with the code so I decided to search for some sort of AJAX solution. Here's my implementation of DarkSideOfTheCarton.com. This form needs to have a form with <fo...
1 3046 posted 17 years ago by chrisaiv
like array_key_exists but accepts an array of key values to check
0 1384 posted 17 years ago by iloveitaly
this function processes a URL that 'should' be a full url (i.e. http://something.com/dfsdfs/) and makes sure it contains http:// for easy inclusion as a link into a href attribute
0 1568 posted 17 years ago by iloveitaly
2 2462 posted 17 years ago by iloveitaly
2 2332 posted 17 years ago by iloveitaly
/libraries/joomla/html/html/behavior.php ~line 108
0 1526 posted 17 years ago by nico65
[Google's "AJAX Libraries API"](http://code.google.com/apis/ajaxlibs/) is great and all, but can slow things down if you're doing a lot of refreshing/cache clearing while debugging. Here's a neat trick: stuff something like this in the `<head>` of yo...
1 2358 posted 17 years ago by jdbartlett
1 2229 posted 17 years ago by gfazioli
More of a setQueryString
0 1689 posted 17 years ago by iloveitaly
0 1542 posted 17 years ago by sinecera
When you have a URL like this http://mysite/newsletters/index/2007 The find('first') method adds the 2007 value as ID parameter WTF!?
0 1613 posted 17 years ago by sveggiani
0 1473 posted 17 years ago by sinecera
0 1586 posted 17 years ago by sinecera
To arrange multiple dynamic sidebars in wordpress, add the following code snippet into functions.php. The sidebar should then appear in the dropdown menu in wordpress under the widgets section. Next, go into your sidebar.php file & edit the dynamic s...
2 1793 posted 17 years ago by kstetson
Self-updating copyright
1 1738 posted 17 years ago by fabi
2 2057 posted 17 years ago by randyjhunt
Use this function to print out all the rows in a table. Specify columns to show using the columnstring parameter: tablulardata(tablename, columnstring); ie: tabluardata("users","username=Username|fname=First Name|lname=Last Name");
1 1937 posted 17 years ago by kilrizzy
Use this function to pull all columns from a single database field. getrowdata(tablename,rowid,prefix); You would call this function like: getrowdata("users",$_SESSION['user'],"user_"); The prefix is the prefix you want for the array names,...
1 2153 posted 17 years ago by kilrizzy
This code within your CakePHP Controller to include a Model.
0 1715 posted 17 years ago by jdbartlett
what was taking an embarrassingly long time in Spry took 2 lines in PHP
0 1953 posted 17 years ago by rwczippy
Enable the use of Custom Fields in Wordpress. This is the code to put into the markup. Related plugin: get-custom-field-values
0 2038 posted 17 years ago by taqin
1 ... 115 116 117 118 119 ... 147