Show
Ignore:
Timestamp:
03/04/07 02:59:37 (2 years ago)
Author:
jm3
Message:

Finished support for not-so-nice delicious hybrid bookmark format (it looks like traditional netscape, but with an added tags attribute and comments).
Whatevs, we rock, add it to the list of things we support, it works, you're sexy, your links will all import, comments intact. Hi.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • feedmelinks/import/present-clean-pre-flight-input.inc.php

    r1336 r1375  
    1515 
    1616%> 
    17 <div id="newLinks" class="box"
     17<div
    1818        <div class="subhead"> 
    1919                new tags to be created: 
    2020        </div> 
    21         <div
    22 <% 
     21        <div style="border: 1px solid #cdcdcd; padding: 2.0em; margin: 0.2em; font-size: 16px;"
     22<?php 
    2323        for( $i = 0; $i < $ts; $i++ ) { 
    2424                $line = rtrim( $tags[$i] ); 
     
    2727                if( substr( $line, 0, 2 ) == "X " ) { 
    2828                        $tag = preg_replace( "/^X /", "", $line ); 
    29                         echo row_wrap( " <span class='subtle'>Ignoring duplicate tag $tag</span>", ($i % 2 == 0) ? 1 : 0 ) . "\n"; 
     29                        echo "<span class='subtle'>Ignoring duplicate tag $tag</span>" . ",\n"; 
    3030                } else { 
    3131                        ++$num_tags; 
    32                         echo row_wrap( " <span class='hot'>Create tag: $line</span>", ($i % 2 == 0) ? 1 : 0 ) . "\n"; 
     32                        echo "<span class='hot'>$line</span>, \n"; 
    3333                } 
    34                 echo "</div>\n"; 
    3534        } 
    36 %
     35?
    3736        </div> 
    3837</div> 
     
    4039<div id="newLinks" class="box"> 
    4140        <div class="subhead"> 
    42                 new favorites to be imported: 
     41                new links to be imported: 
    4342        </div> 
    44 <% 
     43<?php 
    4544        for( $i = 0; $i < $ls; $i++ ) { 
    4645                $line = rtrim( $links[$i] ); 
    4746                $l = preg_split( "/$delimeter/", $line ); 
     47                $delimeter = "___DELIMETER___"; # FIXME: this is supposed to be pased in as one ofthe args in the XML but its not 
    4848                $url = $l[0]; 
    4949                $name = $l[1]; 
    5050                $max_length = 65; 
     51                if( $debug ) 
     52                        print_r ( $l ); 
    5153                if( ! $line )  
    5254                        continue; 
     
    5759                        ++$num_links; 
    5860                        $url = getCompactString( $url, $max_length ); 
    59                         echo row_wrap( " <span class='hot'><a target='external' href='$url'>$url</a></span>", ($i % 2 == 0) ? 1 : 0 ); 
     61                        $pieces  = get_imported_link_and_comment( $name ); 
     62                        $name    = $pieces[0]; 
     63                        $comment = $pieces[1]; 
     64                        echo row_wrap( " <span class='hot'><a target='external' href='$url'>$name</a></span><br>$comment", ($i % 2 == 0) ? 1 : 0 ); 
    6065                } 
    6166                echo "</div>\n"; 
    6267        } 
    63 %
     68?
    6469        </div> 
    6570</div>