Archive for category Code

jQuery: Check All of the Checkboxes

This will check all of the checkboxes inside of an element (div,span,table) with a class of outerClassName

$(".outerClassName :checkbox").attr('checked', true);

Tip: you must have the jQuery library referenced before using this line of code.

TikiWiki – Tracker Email Subject Improvement-Modification

tikiwiki

The template for the Tracker email is here:
\tikiwiki\templates\mail\tracker_changed_notification_subject.tpl

I changed it to this so that it would improve the way it looks in emails:

{$mail_trackerName}{tr} - #{/tr}{$mail_itemId}{tr} modified.{/tr}

Tags: , , , , , , , , , , ,

Override the window.onload javascript function

1. Creates a blank function
2. Checks onload for a function.
2a. Sets the originial onload function as temp
3. calls the new function initMap() before the originial temp onload function.

Pretty cool!

Code:

1
2
3
4
5
6
7
var temp=function(){ return 1;};
if( window.onload )
{
      //override "placeholder" with whatever already exists in onload
     temp = window.onload;
}
window.onload=function(){ TheFunctionYouWantToCall(); temp();};

Tags:

Rotating Circular Periodic Table – Javascript

Circular_form_of_periodic_table_sm

I just saw an article on this site about the merits of a circular periodic table by Mohd Abubakr Design

I thought it would be nice to have one that rotates. So I used the jQuery and jQuery-Rotate library on it to make it spin.

I hope this will be help someone and I hope to make additions to it in the future.
[[View Rotating Circular Periodic Table]]

Tags: , , , , , , , , , , , ,

DanFolkes FLVPlayer – Create your own FLVPlayer (like jw-flv-player) with no branding

DanFolkes-FLVPlayer

Using Flash CS4: Read the rest of this entry »

Tags: , , , , , , , ,

Started to work on a Simple Photo Slideshow.

It’s going to be a lot like:
http://www.evrium.com/store/fg2p_details.php
But much cheaper.

Tags: , , , ,

Hubble Image RSS Feed

hs-2009-13-a-web

I have used Google Reader to mash two image rss feeds together for Hubble.

Here is the HTML page for it:
https://www.google.com/reader/shared/user%2F15478232717259537591%2Flabel%2FHubble

Here is the RSS Feed:
http://www.google.com/reader/public/atom/user%2F15478232717259537591%2Flabel%2FHubble

Based off of:
http://hubblesite.org/newscenter/newscenter_rss.php
and
http://www.spacetelescope.org/rss/feed.xml

Enjoy space nerds.

Tags: , , , , , , , , , , , , , , , ,

IP Locator Webservice – PHP – Ipmap – Command Line

This is similar to my Python script here:
http://danfolkes.com/index.php/2009/04/29/ipmapcom-python/

It uses this sites service to pull the location of each user:
http://www.ipmap.com/

It outputs in XML, Plain Text, and HTML.
Fields:

  • ip
  • hostname
  • ipreverse
  • country
  • region
  • city
  • blacklist
  • gmaps

HERE IS THE LINK TO THE WEB SERVICE SITE:
http://www.danfolkes.com/ipmaps/

IPMap Python Ip Address Locator Command Line Script

ipmap python ip location geocode

This program uses this site IpMap to get peoples location based off of their IP address.

It’s written in python. Enjoy.

Download SourceGPLv3 Code. Give back.
Usage:
python ipmap.py 74.125.45.100 all
python ipmap.py 74.125.45.100
python ipmap.py (This will get you the help screen)

Args:
all = Prints all details
nomap = Gets All, no map
loc = Gets: Country, Region, City
Read the rest of this entry »

Tags: , , , , , , , ,

CWS – Chord Web Service

cwd-chord-web-service

I am creating a web service for musicians that will allow them to reference an abundance of musical references on the fly using AJAX.

Firstly, it will deliver chords and fingerings of chords for guitars to the users websites (think Google Maps).

My goal is to enhance the web.

Here is the site: http://cws.danfolkes.com

It’s still in development, but it’s getting close to launch.

Let me know what you think (only if it’s nice) :-D

Tags: , , , , , , , , , ,