Archive for the 'Uncategorized' Category

Latest Database design for ccTiddly

erm2.jpg

and the sql :


-- phpMyAdmin SQL Dump
-- version 2.10.1
-- http://www.phpmyadmin.net
--
-- Host: localhost
-- Generation Time: Nov 09, 2007 at 01:32 PM
-- Server version: 5.0.41
-- PHP Version: 5.2.2

SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";

--
-- Database: `permissions`
--

-- --------------------------------------------------------

--
-- Table structure for table `admin_of_instance`
--

CREATE TABLE `admin_of_instance` (
`user_id` varchar(255) NOT NULL,
`instance_name` varchar(100) NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

--
-- Dumping data for table `admin_of_instance`
--

-- --------------------------------------------------------

--
-- Table structure for table `group`
--

CREATE TABLE `group` (
`name` varchar(50) NOT NULL,
`desc` mediumtext NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

--
-- Dumping data for table `group`
--

-- --------------------------------------------------------

--
-- Table structure for table `group_membership`
--

CREATE TABLE `group_membership` (
`user_id` varchar(255) NOT NULL,
`group_name` varchar(50) NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

--
-- Dumping data for table `group_membership`
--

-- --------------------------------------------------------

--
-- Table structure for table `instance`
--

CREATE TABLE `instance` (
`name` varchar(100) NOT NULL,
`lang` varchar(10) NOT NULL,
`keep_revision` int(1) NOT NULL,
`require_login` int(1) NOT NULL,
`session_expire` int(10) NOT NULL,
`tag_tiddler_with_modifier` int(1) NOT NULL,
`char_set` varchar(10) NOT NULL,
`hashseed` varchar(50) NOT NULL,
`debug` int(1) NOT NULL,
`status` varchar(10) NOT NULL,
`tiddlywiki_type` varchar(30) NOT NULL,
`default_anonymous_perm` varchar(4) NOT NULL,
`default_user_perm` varchar(4) NOT NULL,
`rss_group` varchar(50) NOT NULL,
`markup_group` varchar(50) NOT NULL,
PRIMARY KEY  (`name`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

--
-- Dumping data for table `instance`
--

INSERT INTO `instance` (`name`, `lang`, `keep_revision`, `require_login`, `session_expire`, `tag_tiddler_with_modifier`, `char_set`, `hashseed`, `debug`, `status`, `tiddlywiki_type`, `default_anonymous_perm`, `default_user_perm`, `rss_group`, `markup_group`) VALUES
('permissions', 'en', 1, 0, 0, 0, 'utf8', '', 0, '', 'TiddlyWiki', '', '', '', '');

-- --------------------------------------------------------

--
-- Table structure for table `login_session`
--

CREATE TABLE `login_session` (
`user_id` varchar(255) NOT NULL,
`session_token` varchar(150) NOT NULL COMMENT 'username+password+time',
`expire` int(20) NOT NULL,
`ip` varchar(15) NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

--
-- Dumping data for table `login_session`
--

-- --------------------------------------------------------

--
-- Table structure for table `permissions`
--

CREATE TABLE `permissions` (
`read` int(1) NOT NULL,
`insert` int(1) NOT NULL,
`edit` int(1) NOT NULL,
`delete` int(1) NOT NULL,
`group_name` varchar(50) NOT NULL,
`instance_name` varchar(100) NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

--
-- Dumping data for table `permissions`
--

-- --------------------------------------------------------

--
-- Table structure for table `tiddler`
--

CREATE TABLE `tiddler` (
`id` int(11) NOT NULL auto_increment,
`instance_name` varchar(100) NOT NULL,
`title` text NOT NULL,
`body` mediumtext NOT NULL,
`fields` text NOT NULL,
`tags` text NOT NULL,
`modifier` varchar(255) NOT NULL,
`creator` varchar(255) NOT NULL,
`modified` varchar(12) NOT NULL,
`created` varchar(12) NOT NULL,
`version` int(11) NOT NULL,
PRIMARY KEY  (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;

--
-- Dumping data for table `tiddler`
--

-- --------------------------------------------------------

--
-- Table structure for table `tiddler_revision`
--

CREATE TABLE `tiddler_revision` (
`id` int(11) NOT NULL auto_increment,
`title` text NOT NULL,
`body` mediumtext NOT NULL,
`fields` text NOT NULL,
`modified` varchar(12) NOT NULL,
`modifier` varchar(255) NOT NULL,
`revision` int(11) NOT NULL,
`tags` text NOT NULL,
`tiddler_id` int(11) NOT NULL,
PRIMARY KEY  (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;

--
-- Dumping data for table `tiddler_revision`
--

-- --------------------------------------------------------

--
-- Table structure for table `user`
--

CREATE TABLE `user` (
`id` varchar(255) NOT NULL,
`password` varchar(50) NOT NULL,
`short_name` varchar(50) NOT NULL,
`long_name` varchar(100) NOT NULL,
PRIMARY KEY  (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

--
-- Dumping data for table `user`
--

links for 2007-11-04

  • Discover places around you. The places you touch stand out in the map. As your network grows, you see all the places everyone you know has touched as well. It’s easy and it’s fun!
    (tags: location)
  • whrrl demo
  • The parent company of whrrl, Pelago, has raised $7.4 million in funding from Kleiner Perkins Caufield & Byers, Jeff Bezos and Trilogy Equity Partners. Currently, whrrl supports AT&T, Sprint and T-Mobile customers, on about 10 phone models. There will also

links for 2007-11-03

Proposed ccTiddly Database Structure

Over the past few week I have been working with cool cold, Martin and Jeremy to decide where we want to take ccTiddly going forward. The idea is to make ccTiddly completely self service without removing any functionality. In order to do this we need to store what is currently stored in the /config/default.php file and store it in a single database.

This is the currently the proposed design. Any comments and suggestions are welcome. I will be publishing more about road map for this project very soon. erm_summary.jpg

erm1.jpg


Note : I have included the original ccTiddly tables in the below SQL.  They will be removed but are in place so that we can test as we build


-- --------------------------------------------------------

--
-- Table structure for table `admin_of_instance`
--

CREATE TABLE `admin_of_instance` (
`user_username` varchar(50) NOT NULL,
`instance_name` varchar(100) NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

-- --------------------------------------------------------

--
-- Table structure for table `group_membership`
--

CREATE TABLE `group_membership` (
`user_username` varchar(50) NOT NULL,
`groupname` varchar(50) NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

-- --------------------------------------------------------

--
-- Table structure for table `instance`
--

CREATE TABLE `instance` (
`name` varchar(100) NOT NULL,
`lang` varchar(10) NOT NULL,
`keep_revision` int(1) NOT NULL,
`require_login` int(1) NOT NULL,
`cookie_expire` int(1) NOT NULL,
`tag_tiddler_with_modifier` int(1) NOT NULL,
`char_set` varchar(10) NOT NULL,
`hashseed` varchar(50) NOT NULL,
`debug` int(1) NOT NULL,
`status` varchar(10) NOT NULL,
PRIMARY KEY  (`name`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

-- --------------------------------------------------------

--
-- Table structure for table `privileges`
--

CREATE TABLE `privileges` (
`id` int(11) NOT NULL auto_increment,
`read` int(1) NOT NULL,
`insert` int(1) NOT NULL,
`edit` int(1) NOT NULL,
`delete` int(1) NOT NULL,
`group_membership_groupname` varchar(50) NOT NULL,
PRIMARY KEY  (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;

-- --------------------------------------------------------

--
-- Table structure for table `tiddler`
--

CREATE TABLE `tiddler` (
`id` int(11) NOT NULL auto_increment,
`instance_name` varchar(100) NOT NULL,
`title` text NOT NULL,
`body` mediumtext NOT NULL,
`fields` text NOT NULL,
`tags` text NOT NULL,
`modifier` varchar(50) NOT NULL,
`creator` varchar(50) NOT NULL,
`modified` varchar(12) NOT NULL,
`created` varchar(12) NOT NULL,
`version` int(11) NOT NULL,
`epoch_modified` int(15) NOT NULL,
`epoch_created` int(15) NOT NULL,
PRIMARY KEY  (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;

-- --------------------------------------------------------

--
-- Table structure for table `tiddler_revision`
--

CREATE TABLE `tiddler_revision` (
`id` int(11) NOT NULL auto_increment,
`title` text NOT NULL,
`body` text NOT NULL,
`fields` text NOT NULL,
`modified` varchar(12) NOT NULL,
`modifier` varchar(50) NOT NULL,
`revision` int(11) NOT NULL,
`tags` text NOT NULL,
`tiddler_id` int(11) NOT NULL,
`epoch_modified` int(15) NOT NULL,
PRIMARY KEY  (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;

-- --------------------------------------------------------

--
-- Table structure for table `tiddly_wiki_entry`
--

CREATE TABLE `tiddly_wiki_entry` (
`id` int(11) NOT NULL auto_increment,
`title` varchar(255) NOT NULL default '',
`body` text NOT NULL,
`fields` text NOT NULL,
`modified` varchar(128) NOT NULL default '',
`created` varchar(128) NOT NULL default '',
`modifier` varchar(255) NOT NULL default '',
`creator` varchar(255) NOT NULL default '',
`version` int(11) NOT NULL default '0',
`tags` varchar(255) NOT NULL default '',
PRIMARY KEY  (`id`)
) ENGINE=MyISAM  DEFAULT CHARSET=latin1 AUTO_INCREMENT=2 ;

-- --------------------------------------------------------

--
-- Table structure for table `tiddly_wiki_entry_version`
--

CREATE TABLE `tiddly_wiki_entry_version` (
`id` int(11) NOT NULL auto_increment,
`title` varchar(255) NOT NULL default '',
`body` text NOT NULL,
`fields` text NOT NULL,
`modified` varchar(128) NOT NULL default '',
`modifier` varchar(255) NOT NULL default '',
`version` int(11) NOT NULL default '0',
`tags` varchar(255) NOT NULL default '',
`oid` int(11) NOT NULL,
PRIMARY KEY  (`id`)
) ENGINE=MyISAM  DEFAULT CHARSET=latin1 AUTO_INCREMENT=3 ;

-- --------------------------------------------------------

--
-- Table structure for table `user`
--

CREATE TABLE `user` (
`username` varchar(50) NOT NULL,
`password` varchar(50) NOT NULL,
`empoyee_id` varchar(200) NOT NULL,
PRIMARY KEY  (`username`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
<code><strong>
</strong></code>

links for 2007-11-01

Video on Open Social

As the imminent release of Open Social draws closer we are starting to see more info about it :

http://blog.pmarca.com/2007/10/open-social-scr.html

links for 2007-10-31

Facebook Screen Scraping – Get your friends back from Facebook and into TiddlyWiki!

One of the great things about TiddlyWiki is that it can import information from any number of sources, what with all the fuss going on around the walled gardens of facebook this seemed like a great application. This is not a finished application, far from it. It does however prove that you can get your information back from facebook in a form you can control.

In this particular example I have only extracted the list of friends. The code is also there to import your news feed (from which you could then generate an RSS feed!) although it requires some more coding to get it working. Currently there are two lines in the recipe file which are commented out :

#tiddler: ../../feeds/FacebookNewsFeed.tiddler
#tiddler: ../../adaptors/FacebookNewsAdaptorPlugin.js

uncommenting this should let you play with the news feed adaptor.

Unfortunately the login is also not working. To import your friends you will need to have two tabs open, one logged into Facebook, and the other using the Facebook Tiddlywiki import. You can ignore the prompts.

So how does it all work?

So firstly I should thank Martin Budden who I have been constantly asking for help recently. He is responsible for creating the original adaptors and helping me get them started.

In order to use this code you will need to become familar with the process of cooking a TiddlyWiki. Hopefully this link will help you :

http://trac.tiddlywiki.org/wiki/ProductionProcess
If not please let me know and we will try to get a better guide written.

You can see the files which make up this vertical from the rest.html.recipe. Below is quick summary of each of the important files :

taggingContent.tiddler

Its used by the links to display all tiddlers tagged news.

feeds/FacebookFriendsFeed.tiddler

Tells tiddlyWiki that there is a facebook friends feed available.

adaptors/FacebookFriendsAdaptorPlugin.js

Tells TiddlyWiki how to deal with the information in the facebook friends feed. This is where most of the screen scraping is done.

I hope this gives enough info for people to start playing around. If there is any more detail required then please let me know via a comment. The source for this project can be found :

http://svn.tiddlywiki.org/Trunk/contributors/SimonMcManus/verticals/testFacebook/

enjoy.

links for 2007-10-23

  • ta-data, the site’s underlying database allows Twine to interpret the information you put into it, automatically categorizing data, applying a set of relevant tags, following links to pull in related information, and so on. Its aim is to provide each me
  • oriented applications. A typical real-world document oriented activity, if it weren’t computerized, would consist mostly of physical paper documents. These documents would need to get sent around, edited, photocopied, approved, denied, pinned to the wall,
  • app this makes django look old hat.

links for 2007-10-20

Next Page »


My Links