Dotclear


Ignore:
Timestamp:
03/26/09 22:36:27 (14 years ago)
Author:
Moe
Message:

Contribute 1.0-alpha12 :

  • improved <form> on posts administration page
File:
1 edited

Legend:

Unmodified
Added
Removed
  • plugins/contribute/_admin.php

    r909 r950  
    111111          if (!empty($author)) 
    112112          {          
    113                $str .=  '<p>'. 
     113               $str .= '<p>'. 
    114114               '<label class="classic" for="contribute_author">'. 
    115115               __('Author:'). 
     
    118118               '</p>'; 
    119119                
    120                $mailto = ''; 
     120               $str .= '<p>'. 
     121               '<label class="classic" for="contribute_mail">'. 
     122               __('Email:'). 
     123               form::field('contribute_mail',10,255,html::escapeHTML($mail),'maximal'). 
     124               '</label>'; 
     125                
     126               # mailto: link 
    121127               if ((!empty($mail)) && (text::isEmail($mail))) 
    122128               { 
    123                     $mailto = '<br />'.'<a href="mailto:'.html::escapeHTML($mail).'">'. 
     129                    $str .= '<br />'.'<a href="mailto:'.html::escapeHTML($mail).'">'. 
    124130                         __('Send an e-mail').'</a>'; 
    125131               } 
    126132                
    127                $str .=  '<p>'. 
    128                '<label class="classic" for="contribute_mail">'. 
    129                __('Email:'). 
    130                form::field('contribute_mail',10,255,html::escapeHTML($mail),'maximal'). 
    131                '</label>'. 
    132                $mailto. 
    133                '</p>'; 
     133               $str .= '</p>'; 
    134134                
    135                $link = ''; 
     135               $str .= '<p>'. 
     136               '<label class="classic" for="contribute_site">'. 
     137               __('Web site:'). 
     138               form::field('contribute_site',10,255,html::escapeHTML($site),'maximal'). 
     139               '</label>'; 
    136140                
     141               # display a link to the site 
    137142               # prevent malformed URLs 
    138143               # inspirated by /dotclear/inc/clearbricks/net.http/class.net.http.php 
     
    140145               { 
    141146                    $parsed_url = @parse_url($site); 
    142                     $host = (($parsed_url != false) ? '['.$parsed_url['host'].']' : ''); 
    143                     if (!empty($host)) 
     147                    if (($parsed_url !== false) && isset($parsed_url['host'])) 
    144148                    { 
    145                          $link = '<br />'.'<a href="'.html::escapeHTML($site).'">'. 
    146                               html::escapeHTML($host).'</a>'; 
     149                         $str .= '<br />'.'[<a href="'.html::escapeHTML($site).'"'. 
     150                              ' title="'.html::escapeHTML($site).'">'. 
     151                              html::escapeHTML($parsed_url['host']).'</a>]'; 
    147152                    } 
    148153               } 
    149154                
    150                $str .=  '<p>'. 
    151                '<label class="classic" for="contribute_site">'. 
    152                __('Web site:'). 
    153                form::field('contribute_site',10,255,html::escapeHTML($site),'maximal'). 
    154                '</label>'. 
    155                $link. 
    156                '</p>'; 
     155               $str .= '</p>'; 
    157156                
    158157               echo 
Note: See TracChangeset for help on using the changeset viewer.

Sites map