Welcome To Snipplr


Everyone's Recent Snippets Tagged c



1 ... 234 235 236 237 238 ... 554
Combines .ics files from OS X Server iCal Server into a single merged ics which can then be subscribed to. I set this up specifically so I could display ical server calendars inside of Zap Calendar on a joomla site. This script could be called from...
0 924 posted 14 years ago by uptimejeff
Slide / scroll to the top of the page.
1 994 posted 14 years ago by BFTrick
I set up an $isHome boolean variable at the beginning of a template's index.php file so I can easily test the condition throughout the file. To me, the semantic variable name makes the logic more readable.
0 828 posted 14 years ago by beneberle
**Important: this snipplet has moved to Github.** - [Programmatically log out the user in Drupal](https://gist.github.com/1973079)
0 949 posted 14 years ago by wildpeaks
Im pretty new to oop php i have tried to create a php search function but im sure this needs alot of improvement. So add on :D
0 773 posted 14 years ago by JonnySnip3r
You may want to create navigation where the children are displayed only when the parent page is the current page. Place the code in your functions.php file
0 820 posted 14 years ago by awesomewordpressthemes
Centralizar menu sem usar width
0 1152 posted 14 years ago by shadow_d2
Just include **global $user;** and **$user->uid != 1** into the function
0 1065 posted 14 years ago by resting
0 945 posted 14 years ago by studioevoque
I should've wrote this function a LONGGG time ago. foreach($myArray, function($k, $v){ console.log($k + " :: " + $v); });
3 1135 posted 14 years ago by mattkenefick
How to enable Custom Navigation Menus in WordPress 3.0 Like the custom background, header image, and post thumbnails, the custom navigation menus also needs to be enabled through your theme’s functions.php file.
0 1020 posted 14 years ago by johnnyrokkit
Method for setting maximum on JQuery tools rangeinput slider. Add this method to RangeInput $.extend with the other get/set methods.
1 870 posted 14 years ago by dmertl
0 1196 posted 14 years ago by insanedreamer
0 671 posted 14 years ago by JohnnyGamba
Function (algorithm) that returns all prime numbers up to n.
0 724 posted 14 years ago by Doctor_Who
This code was re-purposed from Pamela Fox's MapIconMaker v1.1 to work with Google Maps API v3.
1 1100 posted 14 years ago by sandrews_06
<a href="http://nettuts.s3.amazonaws.com/837_shadow/shadow/index.html">View a demo</a>
17 6192 posted 14 years ago by Nettuts
The total number of search results can be added in a hook_preprocess_search_results() function from the following variable:
0 1050 posted 14 years ago by jonathanpglick
When injecting via jQuery HTML content which contains script tags referencing external scripts, which are then referenced via scripting elsewhere in the injected HTML, some browsers (Chrome) will not wait for the external scripts to load causing the...
2 1419 posted 14 years ago by harikaram
This will find the first image in post and return it as a thumbnail if it exists
0 1342 posted 14 years ago by howardpanton
Simple function to store an array in a cookie. Uses JSON. To pull data out of cookie use 'json_decode()'. It can then be looped etc.
1 1622 posted 14 years ago by liamchapman
This strips out any html tags (like paragraph tags) from the excerpt in WordPress.
0 892 posted 14 years ago by nonsalant
0 962 posted 14 years ago by G470
This jQuery code should make all external links from the #content div open in a new window.
1 1015 posted 14 years ago by nonsalant
put this code above the loop
0 691 posted 14 years ago by Token
1 ... 234 235 236 237 238 ... 554