The Code Collective Snippet Count :: 445
- Register Now and start storing your code snippets here, for free - for real.
- Click on the gold heading bars below to open the window containing the snippet links.
- Submit your snippets to the collective.
All the snippets on this site should be considered Experimental and treated as such. Browsers and software are updated constantly so some snippets may not work as advertised, especially old ones.
Store your code here!Keeping your code in the collective makes finding it easier down the road. Search for code, sort by author, sort by category or just browse around using tags. The database is backed up daily and weekly so your code is safe here.
Javascript56
- Add and remove elements
- AJAX Refreshing DIV
- Ajax Request
- Auto back to top link
- Back btn for iframe
- Body Class JS
- Clear Form Field
- Collapse and Expand
- Control Iframe style
- Copy Div content to Clipboard
- Copy to Clipboard Button
- Cross browser javascript events
- Current page nav highlight
- Detect IE
- Detect Keystrokes
- Detect mouse coordinates
- Detect mouse out of browser
- Document Onload
- Dynamic Div
- Dynamic form input field value
- Easy Form Validation
- Enlarge image rollover
- External Interface
- Fader for elements
- Find and Replace
- Fix ie loading on submit bug
- Font replacement bugfix
- For each loop
- Get browser window size
- Google Maps template
- Hide by Classname
- Hide elements by url
- If class exists styling
- Image Gallery with Thumbs
- Javascript Get Values
- Javascript print_r
- Jquery UI Calendar with From and To
- Js Cookie
- Link MouseOver sound
- Object prototype example
- Objects for function arguments
- print_r for javascript
- Really Delete
- Redirect Ipad/Iphone
- Refresh parent of an iframe
- Remember scroll position
- Replace BC Globals
- Replace character onBlur
- Scroll page
- Scroll to bottom
- Select all in textarea
- Select dropdown value
- Set attribute functions
- Superfish Padding
- Swf Object dynamic resize
- Y scroll positon
- Add Javascript Snippet
PHP93
- Abbreviate State Switch
- Abstract Factory Pattern
- Add zero to rounded number
- Age from birthday
- Allow Extensions
- Alpha or Numeric
- Array of select options
- Auto Br Tag
- Autoload Classes
- AutoPlay swf only on first visit
- Body Class
- Browser Detection
- Build query issue
- Calendar Class
- Change url to html link
- Composite Pattern
- Convert Array to Object
- Convert Datetime to Unix Time Stamp
- Convert IP to IP Number
- Create file with php
- Current URL
- Customer Object
- Database Constants
- daysBetweenDates
- Decorator Pattern
- Divide a string
- Dynamic Variables
- Extract Query String from Form Submitted URL
- Extract subdomain from url
- Factory Pattern
- File exists for webdav
- File Exists function
- Find and Replace
- Function Arguments
- Get File Extension
- Get file name with php
- Get Interceptor
- Get methods of a class
- Get query string
- Get subversion files and folders
- Getting Relative Dates
- GF tab index fix
- Hex Shifta
- HypAjaxObject
- Id3v2 get mp3 data
- Image resize class
- Included file URL
- Ipad/Iphone Redirect
- Keyword Density
- List directories
- List directory contents
- Local error reporting
- Mailer Script
- Matt’s time snippet
- Month name to number
- Multiple file upload example
- Parse Hyperlink
- Pass array to Javascript
- PHP Basename
- PHP redirect using query string
- Polyton Design Pattern
- Poor mans trust seal starter
- Prevent form submit on refresh
- Prototype Pattern
- Query String Variables
- Quick Cookie
- Quick Login
- Random Hex Color
- Random hex css color
- Regular Expression HTML Removal
- Replcace Double Quotes
- repost all $_POST variables
- Reverse Geocode from Full Address
- Roman Conversion
- Self comment template
- Server Superglobal
- Shorten string characters
- Shorten string words
- simple profilecrib connect api WORKING
- simple profilecrib connect with php
- Split Camel Case
- SQL Query
- Strategy Pattern
- Temp Directory
- Temp Zip for Download
- The Date
- Timed Redirect
- Uppercase Characters
- url shortener function
- Verify hex color string
- YouTube delete video
- YouTube show user videos
- Zip Directory Recursively
- Add PHP Snippet
Wordpress183
- Access stdClass Object
- Add item to nav menu
- Add meta box to page or post
- Add post term
- Admin Bar Controller
- Admin bar on bottom
- Ajax Comments
- Alphabetize your posts
- Apply Shortcode to String
- Apply template to all child pages
- Archive page switch
- Assign post numbers
- Attach files
- Attatch Images
- Author Display Name
- Category and Post ID worksheet
- Category Exists
- Category ID and Name List
- Change meta on all posts
- Check for active plugin
- Check parent ID
- Child theme option constants
- Clean up tags
- Clean up WordPress Dashboard
- Clear field – Gravity Forms
- Comment List Columns
- Comment Meta Box
- Count children of a custom post
- Count posts in a category
- Count posts in taxonomy
- Create category term
- Create page with php
- Current Category Id Function
- Current page template
- Custom Field Array
- Custom field filter
- Custom field to taxonomy
- Custom post icon
- Custom Post Types on “Right Now” Dashboard Widget
- Default meta – Custom field
- Delete Post Link
- Detach post attachment
- Dev site orange background
- Disable WP 3.1 admin bar
- Display child thumbnails
- Display current category name
- Display custom field on page
- Display search result count
- Display tag name
- Dropdown Menu
- Dynamic body class
- Dynamic class name
- Dynamic heading for archive page
- Dynamic text with shortcode
- Easy options table class
- Easy plugin options
- Edit Post Link
- Enclosure custom field
- Enqueue Javascript
- Enqueue js conditional
- Enqueue scripts and styles
- Enqueue Style
- Enqueue Thickbox
- Excerpt Read More Link
- Exclude category from search
- Exclude cats from the_category()
- Exclude pages filter
- Execute shortcode in custom field
- Explode comma separated list
- File Exists Function
- Fix for wordpress upgrade error
- Function argument arrays
- Function as Shortcode
- Get all post meta
- Get current admin color scheme
- Get current category ID
- Get custom field data
- Get database name-password
- Get Gravatar
- Get next available post id
- Get Page ID
- Get tag name
- Get the content
- Get User Roles In WordPress
- Grandparent
- Gravity External Form
- Gravity Forms code
- Gravity Forms file upload query
- Gravity forms javascript
- Gravity Forms outside of wordpress
- Gravity Forms taxonomy fix
- Gravity forms upload path
- Hide Private Posts
- Highlight for Page Links To
- Html Email Filter
- In class actions
- Insert Tweetmeme into theme
- Is Admin Conditional
- Limit post number of words
- List Taxonomies
- Load Plugin First
- Load WordPress externally
- Log in programmatically
- Login form for frontend
- Login link and expanding form
- Login logout link
- Logout Redirect
- Manage options for editor
- Manual Media Library Access
- Menu Activation
- More default avatars
- More Mime’s
- MU default theme
- Multisite main blog url
- Nav menu fallback
- No auto link in comment
- Oembed wmode
- Options table for DB
- Options updated message
- Page and category dropdowns
- Page has parent
- Pagination Query
- Parent Body Class
- Parent Cat ID for single.php
- Per template page title
- Plugin Constants
- Plugin directory url
- Populate dynamically hook
- Post Columns
- Post count in a category
- Post Thumbnails
- Published post count
- Query by term and custom field
- Query for custom post taxonomy
- Query Posts Worksheet
- Quick add page style
- Quick Custom Field
- Re-order My Sites
- Recent posts with date
- Redirect multiple pages-htaccess
- Refine search by category
- Register admin stylesheet
- Register custom taxonomy
- Register Sidebar
- Remove and install dashboard widgets
- Role Worksheet
- Search Box – with clear
- Self submitting comment template
- Set featured image
- Shortcode
- Add Wordpress Snippet
Click for IntroductionOpen ~ Close
Open and close the snippet windows by clicking on the heading bar. When open, simply hover over snippet names to view a brief description or click to view the source code.
Notes:
1) The displayed number is the total snippets in that category.
2) The link in the heading opens the list view for that category.
3) Code can be submitted anonymously but to display an author for code you must register.
Actionscript30
- As2 Countdown Timer
- Auto Play Swf
- Autoload Class Class
- Banned swear words
- Buffer Mp3 sound
- Crossdomain XML
- Custom Event Class
- Custom Page Template
- Detect Carriage Returns
- Dynamic associative array key
- Easy Sound Player
- Excerpt Length
- FlashVars
- For Each Loop
- Get an object’s class name
- Get domain name
- Google click tag
- Hyperlink Regex
- Loop through flashVars
- Move Native Window
- Navigate to URL
- Remove spaces
- Save plugin options multisite 3.1
- Stage Mouse Over/Out
- Stage Scale
- Style Combo Box
- Style Text Input Field
- Swf Resize
- Url request – Hyperlink
- Utf characters in text fields
- Add Actionscript Snippet
Buddypress29
- Activity Default to My Friends
- Add tab to activity page
- BP admin bar login redirect
- BP fix for WP 3.1
- BP global worksheet
- Buddypress Age
- Buddypress member id
- Buddypress profile field
- Buddypress signup form hook
- Change member tabs
- Comet Chat Friend of All
- Conditional Reference
- Favorite link for individual posts
- Function Reference
- Header image size
- Hide Ajax chat link
- htaccess spam kill
- Intercept Ajax Query
- Is user online
- Logout Redirect
- Omega get profile data
- Omega is friend
- Profile field data
- Retrieve Mini Avatar
- Signup Redirect
- Style admin bar dropdown
- User blogs
- Username
- Welcome User Msg in Admin Nav Bar
- Add Buddypress Snippet
CSS28
- Attribute Selectors
- Box Shadow
- Buddypress ajax chat client css
- Center element vertically
- Center floated list
- Centered Div
- Containers for textarea with resize
- Dead Center Div
- Disjointed Rollover Text
- Div sizing around a float
- Firefox specific css rule
- Google Translate width fix
- Link click effect for links
- No Focus Outlines
- No more smiley face
- Pre Wrap
- Pseudo Class Selectors
- Remove dotted outline on links
- Rollover Image
- Rounded corner fix
- Rounded Corners
- Shadow effect
- Sidebar category highlighting
- Simple Sprite
- Super Simple Form Formatting
- Table row hover
- Webkit specific rules
- WP 3.0 robot notice highlight
- Add CSS Snippet
HTML13
Code Search
Searches include code snippets and descriptions. Refine using the dropdown. Search for code by function name. Ex: the_excerpt or str_replace. Results ordered by number of individual word matches.
Collective Tags
Tags
arrays
category
classes
comments
CSS
custom fields
database
date
design patterns
effects
files
fixes
forms
functions
google
gravity forms
hooks
id
login
meta
mysql
navigation
oop
page
plugins
post
posts
query
redirect
regex
rollover
search
shortcode
sidebar
sql
strings
tags
taxonomy
template
time
tricks
user
widgets
worksheet
wpmu
