Changeset 7139
- Timestamp:
- 10/07/08 11:02:13 (3 months ago)
- Location:
- Trunk/association/serversides/cctiddly/Trunk/tiddlers/plugins
- Files:
-
- 3 modified
-
deliciousAdaptor.js (modified) (3 diffs)
-
flickrAdaptor.js (modified) (2 diffs)
-
twitterAdaptor.js (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
Trunk/association/serversides/cctiddly/Trunk/tiddlers/plugins/deliciousAdaptor.js
r7135 r7139 5 5 deliciousAdaptor.serverType = 'delicious'; 6 6 7 // convert short-month string (mmm) to month number (zero-based)8 function convertShortMonth(text) {9 for(var i = 0; i < config.messages.dates.shortMonths.length; i++) { // XXX: inefficient!?10 if(text == config.messages.dates.shortMonths[i]) {11 return i;12 }13 }14 }15 16 7 // convert ISO 8601 timestamp to Date instance 17 function convertISOTimestamp (str) { // TODO: rename8 function convertISOTimestamp1(str) { // TODO: rename 18 9 var components = str.match(/(\d+)-(\d+)-(\d+)T(\d+):(\d+):(\d+)/); 19 return new Date(components[1], components[2] , components[3],10 return new Date(components[1], components[2] - 1, components[3], 20 11 components[4], components[5], components[6]); 21 12 } … … 23 14 deliciousAdaptor.doHttpGET = function(uri,callback,params,headers,data,contentType,username,password) 24 15 { 25 displayMessage("1"); 26 uri = "release/handle/proxy.php?feed="+uri; 16 uri = window.url+"/handle/proxy.php?feed="+uri; 27 17 return doHttp('GET',uri,data,contentType,username,password,callback,params,headers); 28 18 }; … … 48 38 49 39 deliciousAdaptor.createTiddler = function(data) { 50 var date = convertISOTimestamp(data.dt); 40 console.log(data.dt); 41 var date = convertISOTimestamp1(data.dt); 51 42 var tiddler = new Tiddler(data.d); 52 43 fields = {}; -
Trunk/association/serversides/cctiddly/Trunk/tiddlers/plugins/flickrAdaptor.js
r7137 r7139 15 15 } 16 16 17 // convert ISO 8601 timestamp to Date instance 18 function convertISOTimestamp(str) { // TODO: rename 19 var components = str.match(/(\d+)-(\d+)-(\d+)T(\d+):(\d+):(\d+)/); 20 return new Date(components[1], components[2], components[3], 21 components[4], components[5], components[6]); 22 } 17 23 18 24 19 flickrAdaptor.doHttpGET = function(uri,callback,params,headers,data,contentType,username,password) … … 44 39 45 40 function createTiddler(i){ 46 var date = convertISOTimestamp (i.published);41 var date = convertISOTimestamp1(i.published); 47 42 var tiddler = new Tiddler(i.title); 48 43 fields = {}; -
Trunk/association/serversides/cctiddly/Trunk/tiddlers/plugins/twitterAdaptor.js
r7135 r7139 25 25 twitterAdaptor.doHttpGET = function(uri,callback,params,headers,data,contentType,username,password) 26 26 { 27 return doHttp('GET',"/release/release/handle/proxy.php?feed="+uri,data,contentType,username,password,callback,params,headers);27 return doHttp('GET',window.url+"/handle/proxy.php?feed="+uri,data,contentType,username,password,callback,params,headers); 28 28 }; 29 29
