Changeset 7139

Show
Ignore:
Timestamp:
10/07/08 11:02:13 (3 months ago)
Author:
simonmcmanus
Message:

cct - adding life stream fixes

Location:
Trunk/association/serversides/cctiddly/Trunk/tiddlers/plugins
Files:
3 modified

Legend:

Unmodified
Added
Removed
  • Trunk/association/serversides/cctiddly/Trunk/tiddlers/plugins/deliciousAdaptor.js

    r7135 r7139  
    55deliciousAdaptor.serverType = 'delicious'; 
    66 
    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  
    167// convert ISO 8601 timestamp to Date instance 
    17 function convertISOTimestamp(str) { // TODO: rename 
     8function convertISOTimestamp1(str) { // TODO: rename 
    189        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], 
    2011                components[4], components[5], components[6]); 
    2112} 
     
    2314deliciousAdaptor.doHttpGET = function(uri,callback,params,headers,data,contentType,username,password) 
    2415{ 
    25         displayMessage("1"); 
    26         uri = "release/handle/proxy.php?feed="+uri; 
     16        uri = window.url+"/handle/proxy.php?feed="+uri; 
    2717    return doHttp('GET',uri,data,contentType,username,password,callback,params,headers); 
    2818}; 
     
    4838 
    4939deliciousAdaptor.createTiddler = function(data) { 
    50         var date = convertISOTimestamp(data.dt); 
     40        console.log(data.dt); 
     41        var date = convertISOTimestamp1(data.dt); 
    5142        var tiddler = new Tiddler(data.d); 
    5243        fields = {}; 
  • Trunk/association/serversides/cctiddly/Trunk/tiddlers/plugins/flickrAdaptor.js

    r7137 r7139  
    1515} 
    1616 
    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 
    2318 
    2419flickrAdaptor.doHttpGET = function(uri,callback,params,headers,data,contentType,username,password) 
     
    4439 
    4540function createTiddler(i){ 
    46         var date = convertISOTimestamp(i.published); 
     41        var date = convertISOTimestamp1(i.published); 
    4742        var tiddler = new Tiddler(i.title); 
    4843        fields = {}; 
  • Trunk/association/serversides/cctiddly/Trunk/tiddlers/plugins/twitterAdaptor.js

    r7135 r7139  
    2525twitterAdaptor.doHttpGET = function(uri,callback,params,headers,data,contentType,username,password) 
    2626{ 
    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); 
    2828}; 
    2929