Welcome To Snipplr
Everyone's Recent Snippets
- All /
- JavaScript /
- HTML /
- PHP /
- CSS /
- Ruby /
- Objective C
Programsko rješenje za zadatak 3 iz kolegija Strukture podataka.
0
808
posted 13 years ago by kkovacic
Fight the "flash" effect at animation start in webkit browsers
0
916
posted 13 years ago by inpixelitrust
When adding a meta box to a 'page' in Wordpress (as opposed to a post, or custom post type), you might want to disable the default editor. Use this snippet in your theme's functions.php file to disable the editor for a specific page template.
3
1574
posted 13 years ago by f6design
Set up a basic template:
<html>
<head>
<title>[[++site_name]] - [[*pagetitle]]</title>
<base>
<meta>​
</head>
<body>
[[*content]]
</body>
</html>
Content:
<div>
<h4>The ACME web site is currently under development</h4>
<p>Please...
0
730
posted 13 years ago by hotdiggity
Here is a nice function you can use to implement a custom background for your UINavigation Bars
Simply make two images in photoshop:
32 x 32
44 x 44
and name them whatever you want.
put them in your iPhone project by dragging and dro...
1
1213
posted 13 years ago by codeRefiner
This is an example of omitting the width and height attributes from a thumbnail img tag in Wordpress. Useful if you are working on a responsive design. Use inside The Loop.
0
884
posted 13 years ago by f6design
Use WP_Query to query a custom taxonomy, using the tax_query parameter.
1
962
posted 13 years ago by f6design
In Wordpress if you are using a custom taxonomy you can get its details (id, slug, etc) using this snippet.
0
981
posted 13 years ago by f6design
Add this snippet to your Wordpress theme's functions.php file to reject any image uploads that are below the specified dimensions.
2
1150
posted 13 years ago by f6design
Basically, a simple way to use a templating system in
CodeIgniter. In your data array, add a view as the value for content. Pass that to the view, then print the $content variable in the view.
0
825
posted 13 years ago by nielsenrc
Here is a breakdown of creating a custom initializer and or general rules of init
0
1048
posted 13 years ago by codeRefiner
Here is a simple function that will return the path to the documents directory so you can store data in it later
1
1415
posted 13 years ago by codeRefiner
In this tutorial, we will see how to add custom fields to magento customer address.
0
801
posted 13 years ago by etechblog
**Usage**
> newuser.bash [username]
**What it does**
- Generates a random password with `makepasswd`
- Encrypts it with `mkpasswd` for use with useradd
- Adds the user
- Adds a MySQL Database for user
- Adds a MySQL User for user
-...
1
1200
posted 13 years ago by jiewmeng
This snippet adds support for post thumbnails (a.k.a. 'featured images') to a Wordpress theme. It also adds an additional image size for image thumbnails, hard cropped. This second step is optional.
Add this snippet to your WP theme's functions.ph...
1
1036
posted 13 years ago by f6design
Add the following to your Wordpress theme's functions.php file. The jQuery paths/URLs might need to be changed to suite your circumstances.
0
1436
posted 13 years ago by f6design
Simplify the Wordpress admin area for clients by hiding menu items. Add this snippet to your Wordpress theme's functions.php file.
0
1089
posted 13 years ago by f6design
If you are creating a custom post type in Wordpress, and turn off the 'editor' capability, then TinyMCE is not loaded. This means any WYSIWYG meta box textareas will fail. Add this snippet to your theme's functions.php file to load the required TinyM...
0
920
posted 13 years ago by f6design
Add this to your Wordpress theme's functions.php file. It allows you to move the 'featured image' upload/select box from the admin sidebar to another position on the page, to give it more prominence.
0
1064
posted 13 years ago by f6design