Profile
Achievement
FatFolderDesigner's Recent Snippets
- All /
It's a 3 part process, first is the PHP that you need to run, which includes the appropriate scripts and styles into the admin header, then you need an html button and input field to put the stored value in, then you need some jQuery to open the popu...
0
848
posted 12 years ago by FatFolderDesigner
These two snippets together, the first in the .htaccess file, and the second in your PHP create an elegantly simple solution to arbitrary URLs with php. For a breakdown and example check out the link.
Don't want to follow the link, how about the q...
0
942
posted 12 years ago by FatFolderDesigner
This javascript will create a complex google javascript map with multiple locations selected marked. The map will be centered in the middle and zoomed so that all point can be seen. It also stylizes the map making it mostly desaturated with bits of o...
0
1311
posted 12 years ago by FatFolderDesigner
This javascript will create a google map on the div with the ID "the_map" and centered on an address with a marker on it. In this example the address is for Jet City Improv. More information on setup and customization at the link.
0
1099
posted 12 years ago by FatFolderDesigner
Below are several different types of google static maps.
The first is a map with a single marker on the Space Needle.
The second is one with 3 marks, one on the Space Needle, one on the Seattle Science Center, and One on the EMP Museum.
The last...
0
994
posted 12 years ago by FatFolderDesigner
This needs to be run on an action, or at least I wanted able to get it to run outside of an action, I suggest template_redirect. More information at the link.
0
850
posted 12 years ago by FatFolderDesigner
Navigating the DOM in jQuery is incredibly simple and thats to phpQuery you can do the same in php. Below are some examples of how it's used, the key change bing that instead of $() you use pq(), and instead of a . you used ->. Theres alot more detai...
0
1024
posted 12 years ago by FatFolderDesigner
Usually when working with form you use a server to handle it, and if your doing it entirely in javascript no reload is required, but what if you wanted to take the information and use it in a javascript on another page, completely client side. I had...
0
1131
posted 12 years ago by FatFolderDesigner
There are 2 jQuery snippets, both replace broken images with one of your choosing, the difference is that one is "safe" and the other is "persistent". The safe one will quick working, so if your doing something that dynamically changed images on a pa...
3
1048
posted 12 years ago by FatFolderDesigner
Ever notice a weird CS3 animation flicker? Annoying right? Add these CSS3 classes to the objects being animated and it should go away (at least it has in my testing). More details at the link, questions can be postsed either here or there.
0
891
posted 12 years ago by FatFolderDesigner
I've previously posted this here: http://snipplr.com/view/59044/flexible-site-layout-with-resize-detection/
This new version is short and more efficient, plus it no longer shows 1 (harmless) error on launch. Works the same as last time, the sizabl...
2
939
posted 13 years ago by FatFolderDesigner
This bit of jquery will take whatever you give it in the selector (which should be a valid jquery selector of any kind) and add or remove additional classas as appropriate based on width.
The width and style names are all determined by the last i...
0
895
posted 13 years ago by FatFolderDesigner
With this file you can load stylesheets and minify the code while changing colors. The stylesheets are loaded using file_get_contents and you can attach them one after another if you have multiple sheets. The colors are replaces based on a variable t...
0
842
posted 13 years ago by FatFolderDesigner
Just a short little script that takes a mysql query and turns it into a csv file that downloads automatically. If your interested in the details you can hit up the link.
0
926
posted 13 years ago by FatFolderDesigner
Instead of requiring the loop.php file in your custom themes you can use there two functions, placed in your functions.php file to not only automatically include it, but make a dead simple to filter sections out on a page by page basis negating the n...
0
719
posted 13 years ago by FatFolderDesigner
This is just a simple explanation of how to use the HTML5 local storage in javascript. The link has a more thorough explanation and an example for those interested. The examples to save, retrive, and clear are marked below.
0
777
posted 13 years ago by FatFolderDesigner
The link has a full explanation with more detail about how this all works, as well as an example of it in action. This is just going to be the short-short version. If you have any questions check that out, if you still have questions then leave a com...
0
741
posted 13 years ago by FatFolderDesigner
This is a simple example of the google maps javascript API v3. If you want a map with a marker this is the minimum you need to do to get it done. Theres more talk about how it's all set up, and how to use the other static image map as well at the lin...
1
950
posted 13 years ago by FatFolderDesigner
The code is in three parts, a HTML layout (with some requirements I'll go over below), some CSS code (again, requirements below) and the actual jQuery code. I go over all the code in detail at the link, but I'll give a quick rundown od the jQuery as...
0
928
posted 13 years ago by FatFolderDesigner
Traditionally when you have lost lists of dat you want to alternate rows for usability. The first thing everybody makes to fix this is a simple if statement loop, but this adds a number of lines and is hardly a clean solution. Additionally it require...
0
835
posted 13 years ago by FatFolderDesigner
This one was not created by me, but I can't remember who originally created it. It does the same thing as the built in <code>:contains()</code> selector with one important difference, it's case insensitive. Since I usually type in all lower case (bad...
0
810
posted 13 years ago by FatFolderDesigner
The comments for this are broken down into 2 parts, first the script is talked about, then theres a little about the HTML code that the script relies on. You can find more information at the URL, as well as an example of it in action. You can leave c...
0
801
posted 13 years ago by FatFolderDesigner
After being tasked with creating inputs like those on the twitter homepage I came up with this inline label system that uses jquery to control the labels (in the vase of the example it fase and slides them).
The code is in three parts. First, the...
0
866
posted 13 years ago by FatFolderDesigner
A contract I work on uses tables to layout forms (kinda ghetto I know) and I wanted a text field with a button text to it that would work with their 100% width scheme. Normall it places to betton below the text input, but using this HTML and CSS it w...
0
883
posted 13 years ago by FatFolderDesigner
This function will insert items into an orders alphabetically (assuming it's already alphabetical). Initially design to make a smooth single page load/save feature that sotred everything in drop down lists, you guessed it, alphabetically. Can simply...
0
896
posted 13 years ago by FatFolderDesigner
A simple way to filter lists or tables that uses a new "Contains" (note capitalization) selector to clean up the code a bit. Three examples are below, first sorts through a list, second a table, third a tabe and it correctly the alternating row color...
0
966
posted 13 years ago by FatFolderDesigner
When running live filters on large, long scripts you can get old, stale results replacing your new, fresh ones. After all, a search for everything containing 'S" in a large database of city names can take a lot longer than "Seattle", so your script g...
2
1086
posted 13 years ago by FatFolderDesigner
Simple jQuery script to load additional content when you near the bottom of the page, same sorta thing Twitter does (although I originally programed it for a different use). Only thing of remark is the fact that it stores the current highest loaded v...
4
1360
posted 13 years ago by FatFolderDesigner
Uploading multiple files at once used to be strictly in the realm of flash or required javascript to crate multiple upload forms as needed. The first method has the problems with the general incompatibility of flash. The second, well, it's a very low...
0
1138
posted 13 years ago by FatFolderDesigner
This is a simple and effective way yo make sure people are actually filing out a form before submitting it. If you need to verify content it should be done server side (so that if you come across the odd person with javascript turned off it wont brea...
0
897
posted 13 years ago by FatFolderDesigner