Dotclear

Changeset 1003


Ignore:
Timestamp:
04/08/09 15:08:01 (14 years ago)
Author:
Moe
Message:

Link Summarizer 0.1.2 :

  • removed useless condition, preg_match_all() already select all the links
Location:
plugins/linkSummarizer
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • plugins/linkSummarizer/_define.php

    r792 r1003  
    3333     /* Description*/                'Extracts links from posts', 
    3434     /* Author */                    'Moe (http://gniark.net/)', 
    35      /* Version */                   '0.1.1', 
     35     /* Version */                   '0.1.2', 
    3636     /* Permissions */               'admin,contentadmin' 
    3737); 
  • plugins/linkSummarizer/_public.php

    r791 r1003  
    6060               $size = count($ms[0])-1; 
    6161                
    62                if ($size > 0) 
     62               for ($i = 0;$i <= $size;$i++) 
    6363               { 
    64                     for ($i = 0;$i <= $size;$i++) 
     64                    $a = $ms[2][$i]; 
     65                     
     66                    preg_match('/href="(.*?)"/msu',$a,$href); 
     67                    $href = $href[1]; 
     68                     
     69                    if (strpos($href,'#') === 0) 
    6570                    { 
    66                          $a = $ms[2][$i]; 
    67                           
    68                          preg_match('/href="(.*?)"/msu',$a,$href); 
    69                          $href = $href[1]; 
    70                           
    71                          if (strpos($href,'#') === 0) 
    72                          { 
    73                               continue; 
    74                          } 
    75                           
    76                          $content = html::clean($ms[3][$i]); 
    77                          if (empty($content)) 
    78                          { 
    79                               $content = text::cutString($href,80); 
    80                          } 
    81                           
    82                          $links[] = '<a '.$a.'>'.$content.'</a>'; 
     71                         continue; 
    8372                    } 
     73                     
     74                    $content = html::clean($ms[3][$i]); 
     75                    if (empty($content)) 
     76                    { 
     77                         $content = text::cutString($href,80); 
     78                    } 
     79                     
     80                    $links[] = '<a '.$a.'>'.$content.'</a>'; 
    8481               } 
    8582                
  • plugins/linkSummarizer/locales/fr/main.po

    r792 r1003  
    44"Report-Msgid-Bugs-To: \n" 
    55"POT-Creation-Date: 2009-02-19 23:31+0100\n" 
    6 "PO-Revision-Date: 2009-02-19 23:31+0100\n" 
     6"PO-Revision-Date: 2009-02-19 23:36+0100\n" 
    77"Last-Translator: Moe <poedit@gniark.net>\n" 
    88"Language-Team: Moe <poedit@gniark.net>\n" 
     
    3636 
    3737#: index.php:84 
    38 #, fuzzy 
    3938msgid "Display the links summary only in post context" 
    4039msgstr "Afficher le résumé des liens seulement dans le contexte d'un billet" 
Note: See TracChangeset for help on using the changeset viewer.

Sites map