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}

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();};

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]]

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

DanFolkes-FLVPlayer

Using Flash CS4: Continue reading “DanFolkes FLVPlayer – Create your own FLVPlayer (like jw-flv-player) with no branding”

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.

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
Continue reading “IPMap Python Ip Address Locator Command Line Script”

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) 😀

Python – Cell Phone Number Pad Input V2

This is a rewrite of my original post. This rewrite was made by Rami Davis [ramidavis at y a h o o .c o m] XDA Dev Forums.

It would go perfect with this:
http://www.flickr.com/photos/svofski/3383950702/in/pool-make

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
#!/usr/bin/python3
#using python3
 
import time
 
#Cellphone keyboard imitation
cell_keyboard = {
    "0" : (" "),
    "1" : ("!","@","#","$","%","^","&","*","(",")"),
    "2" : ("a","b","c","A","B","C"),
    "3" : ("d","e","f","D","E","F"),
    "4" : ("g","h","i","G","H","I"),
    "5" : ("j","k","l","J","K","K"),
    "6" : ("m","n","o","M","N","O"),
    "7" : ("p","q","r","s","P","Q","R","S"),
    "8" : ("t","u","v","T","U","V"),
    "9" : ("w","x","y","z","W","X","Y","Z"),
    "#" : (" "), #add something here
    "*" : (" ")
}
 
THRESHOLD = 1.0         # Constant: Seconds before resetting the keyboard
user_input = ""         # Current user input
last_key = ["", 0]         # Last key and repetitions.
 
print("Valid characters: 0-9 # * and q to quit")
 
while not user_input == "q":
    try:
        #Measure the time it takes to respond.
        response_time = time.time()
        user_input = input(">>")[0]
        response_time = time.time() - response_time
    except IndexError:
        user_input = ""
 
    #Check if it's valid
    if user_input in cell_keyboard:
 
        #If it matches the last key
        if user_input == last_key[0]:
 
            # And it was within threshold
            if response_time < THRESHOLD:
                last_key[1] += 1
            else:
                last_key[1] = 0
        else:
            # Assign the new key and 0 repetitions
            last_key[0] = user_input
            last_key[1] = 0
 
        #Now request the element on the keyboard.
        try:
            print(cell_keyboard[last_key[0]][last_key[1]])
        except IndexError:
            last_key[1] = 0
            print(cell_keyboard[last_key[0]][last_key[1]])
 
    else:
        print("Not a valid key.")

Thanks Rami!