Dotclear


Ignore:
Files:
48 edited

Legend:

Unmodified
Added
Removed
  • admin/blogs.php

    r1553 r1668  
    134134           
    135135          echo 
    136           '<table class="clear"><tr>'. 
    137           '<th>'.__('Blog name').'</th>'. 
    138           '<th class="nowrap">'.__('Last update').'</th>'. 
    139           '<th class="nowrap">'.__('Entries (all types)').'</th>'. 
    140           '<th class="nowrap">'.__('Blog ID').'</th>'. 
    141           '<th>&nbsp;</th>'. 
    142           '<th class="nowrap">'.__('Status').'</th>'. 
     136          '<table class="clear"><caption class="hidden">'.__('Blogs list').'</caption><tr>'. 
     137          '<th scope="col" class="nowrap">'.__('Blog id').'</th>'. 
     138          '<th scope="col">'.__('Blog name').'</th>'. 
     139          '<th scope="col" class="nowrap">'.__('Entries (all types)').'</th>'. 
     140          '<th scope="col" class="nowrap">'.__('Last update').'</th>'. 
     141          '<th scope="col" class="nowrap">'.__('Status').'</th>'. 
    143142          '</tr>'; 
    144143           
     
    164163     if ($GLOBALS['core']->auth->isSuperAdmin()) { 
    165164          $edit_link =  
    166           '<a href="blog.php?id='.$blog_id.'" '. 
    167           'title="'.sprintf(__('Edit blog %s'),$blog_id).'">'. 
    168           __('edit').'</a>'; 
     165          '<a href="blog.php?id='.$blog_id.'"  title="'.sprintf(__('Edit blog settings for %s'),$blog_id).'">'. 
     166          '<img src="images/edit-mini.png" alt="'.__('Edit blog settings').'" /> '.$blog_id.'</a> '; 
    169167     } 
    170168      
     
    177175     return 
    178176     '<tr class="line">'. 
     177     '<td class="nowrap">'.$edit_link.'</td>'. 
    179178     '<td class="maximal"><a href="index.php?switchblog='.$rs->blog_id.'" '. 
    180179     'title="'.sprintf(__('Switch to blog %s'),$rs->blog_id).'">'. 
    181180     html::escapeHTML($rs->blog_name).'</a></td>'. 
    182      '<td class="nowrap">'.$blog_upddt.'</td>'. 
    183      '<td class="nowrap">'.$core->countBlogPosts($rs->blog_id).'</td>'. 
    184      '<td class="nowrap">'.$blog_id.'</td>'. 
    185      '<td>'.$edit_link.'</td>'. 
     181     '<td class="nowrap count">'.$core->countBlogPosts($rs->blog_id).'</td>'. 
     182     '<td class="nowrap count">'.$blog_upddt.'</td>'. 
    186183     '<td class="status">'.$img_status.'</td>'. 
    187184     '</tr>'; 
  • admin/media.php

    r1636 r1678  
    422422{ 
    423423     echo 
    424      '<p class="zip-dl"><a href="'.html::escapeURL($page_url).'&amp;zipdl=1">'. 
     424     '<p class="zip-dl"><a class="submit" href="'.html::escapeURL($page_url).'&amp;zipdl=1">'. 
    425425     __('Download this directory as a zip file').'</a></p>'; 
    426426} 
  • admin/style/default.css

    r1812 r1814  
    578578     padding: 1em 3em; 
    579579     vertical-align: top; 
    580      border: 1px solid #ccc; 
     580     border: 1px solid #ddd; 
     581     border-collapse: collapse; 
     582} 
     583.db-item h3 { 
     584     font-weight: normal; 
    581585} 
    582586#dashboard-items img { 
     
    752756     position: static; 
    753757} 
    754 .media-col-0 { 
     758/*.media-col-0 { 
    755759     clear: left; 
    756760} 
     
    779783     margin: 0 0 0 60px; 
    780784     padding: 0; 
    781 } 
     785}*/ 
    782786li.media-action { 
    783787     display: block; 
     
    795799li.media-action input { 
    796800     border: none; 
     801} 
     802.media-item { 
     803     position: relative; 
     804     border: 1px solid #ccc; 
     805     margin: 1em; 
     806     padding: 1em; 
     807     width: 300px; 
     808     height: 120px; 
     809     display: inline-block; 
     810     vertical-align: top; 
     811} 
     812div.media-list .media-item { 
     813} 
     814a.media-icon { 
     815     display: block; 
     816     border-bottom: none; 
     817     margin: 0 auto;  
     818} 
     819.media-icon img { 
     820     display: block; 
     821} 
     822.media-item ul { 
     823     display: block; 
     824     list-style: none; 
     825     margin: 0; 
     826     padding: 0; 
    797827} 
    798828/* ------------------------------------------------------------------ preferences */ 
     
    13061336     border-style: solid; 
    13071337     border-color: #e3e3e3; 
    1308      padding: .3em .5em; 
     1338     padding: .3em 1em .3em .5em; 
    13091339     vertical-align: top; 
    13101340} 
     
    13141344     border-color: #ccc; 
    13151345     background: #f3f3ff; 
    1316      padding: .3em .5em; 
     1346     padding: .3em 1em .3em .5em; 
    13171347     vertical-align: top; 
    13181348     text-align: left; 
     
    13391369     white-space: nowrap; 
    13401370     vertical-align: top; 
     1371} 
     1372table .count { 
     1373     text-align: right; 
     1374     padding-right: 1.5em; 
    13411375} 
    13421376table.settings, table.prefs { 
  • inc/admin/lib.pager.php

    r1622 r1670  
    136136          '<td class="maximal" scope="row"><a href="'.$this->core->getPostAdminURL($this->rs->post_type,$this->rs->post_id).'">'. 
    137137          html::escapeHTML($this->rs->post_title).'</a></td>'. 
    138           '<td class="nowrap">'.dt::dt2str(__('%Y-%m-%d %H:%M'),$this->rs->post_dt).'</td>'. 
     138          '<td class="nowrap count">'.dt::dt2str(__('%Y-%m-%d %H:%M'),$this->rs->post_dt).'</td>'. 
    139139          '<td class="nowrap">'.$cat_title.'</td>'. 
    140140          '<td class="nowrap">'.html::escapeHTML($this->rs->user_id).'</td>'. 
    141           '<td class="nowrap">'.$this->rs->nb_comment.'</td>'. 
    142           '<td class="nowrap">'.$this->rs->nb_trackback.'</td>'. 
     141          '<td class="nowrap count">'.$this->rs->nb_comment.'</td>'. 
     142          '<td class="nowrap count">'.$this->rs->nb_trackback.'</td>'. 
    143143          '<td class="nowrap status">'.$img_status.' '.$selected.' '.$protected.' '.$attach.'</td>'. 
    144144          '</tr>'; 
     
    234234          'title="'.html::escapeHTML($this->rs->getURL()).'">'. 
    235235          html::escapeHTML($this->rs->post_title).'</a></td>'. 
    236           '<td class="nowrap">'.dt::dt2str(__('%Y-%m-%d %H:%M'),$this->rs->post_dt).'</td>'. 
     236          '<td class="nowrap count">'.dt::dt2str(__('%Y-%m-%d %H:%M'),$this->rs->post_dt).'</td>'. 
    237237          '<td class="nowrap">'.html::escapeHTML($this->rs->user_id).'</td>'. 
    238238          '<td class="nowrap status">'.$img_status.' '.$selected.' '.$protected.' '.$attach.'</td>'. 
     
    260260               $html_block = 
    261261               '<table><caption class="hidden">'.__('Comments and trackbacks list').'</caption><tr>'. 
    262                '<th colspan="3" scope="col" abbr="comm" class="first">'.__('Type and author').'</th>'. 
     262               '<th colspan="2" scope="col" abbr="comm" class="first">'.__('Type').'</th>'. 
     263               '<th scope="col">'.__('Author').'</th>'. 
    263264               '<th scope="col">'.__('Date').'</th>'. 
    264265               '<th scope="col" class="txt-center">'.__('Status').'</th>'. 
     
    326327               $post_title = mb_strcut($post_title,0,57).'...'; 
    327328          } 
     329          $comment_title = sprintf(__('Edit the %1$s from %2$s'), 
     330               $this->rs->comment_trackback ? __('trackback') : __('comment'), 
     331               html::escapeHTML($this->rs->comment_author)); 
    328332           
    329333          $res = '<tr class="line'.($this->rs->comment_status != 1 ? ' offline' : '').'"'. 
     
    333337          '<td class="nowrap">'. 
    334338          form::checkbox(array('comments[]'),$this->rs->comment_id,'','','',0).'</td>'. 
    335           '<td class="status txt-center">'. 
    336                '<a href="'.$comment_url.'">'. 
    337                '<img src="images/edit-mini.png" alt="" title="'.__('Edit').'" /> '. 
    338                '</a>'.'</td>'. 
    339           '<td class="maximal" scope="row">'.($this->rs->comment_trackback ? __('trackback from') : __('comment from')).' '. 
    340                '<a href="'.$author_url.'">'.html::escapeHTML($this->rs->comment_author).'</a></td>'. 
    341           '<td class="nowrap">'.dt::dt2str(__('%Y-%m-%d %H:%M'),$this->rs->comment_dt).'</td>'. 
     339          '<td class="nowrap" abbr="'.__('Type and author').'" scope="raw">'. 
     340               '<a href="'.$comment_url.'" title="'.$comment_title.'">'. 
     341               '<img src="images/edit-mini.png" alt="'.__('Edit').'"/> '. 
     342               ($this->rs->comment_trackback ? __('trackback') : __('comment')).' '.'</a></td>'. 
     343          '<td class="nowrap maximal"><a href="'.$author_url.'">'.html::escapeHTML($this->rs->comment_author).'</a></td>'. 
     344          '<td class="nowrap count">'.dt::dt2str(__('%Y-%m-%d %H:%M'),$this->rs->comment_dt).'</td>'. 
    342345          '<td class="nowrap status txt-center">'.$img_status.'</td>'. 
    343346          '<td class="nowrap"><a href="'.$post_url.'">'. 
     
    372375               '<th scope="col">'.__('Last Name').'</th>'. 
    373376               '<th scope="col">'.__('Display name').'</th>'. 
    374                '<th scope="col" class="nowrap">'.__('Entries').'</th>'. 
     377               '<th scope="col" class="nowrap">'.__('Entries (all types)').'</th>'. 
    375378               '</tr>%s</table>'; 
    376379                
     
    418421          '<td class="nowrap">'.html::escapeHTML($this->rs->user_name).'</td>'. 
    419422          '<td class="nowrap">'.html::escapeHTML($this->rs->user_displayname).'</td>'. 
    420           '<td class="nowrap"><a href="posts.php?user_id='.$this->rs->user_id.'">'. 
     423          '<td class="nowrap count"><a href="posts.php?user_id='.$this->rs->user_id.'">'. 
    421424          $this->rs->nb_post.'</a></td>'. 
    422425          '</tr>'; 
  • inc/core/class.dc.trackback.php

    r1179 r1674  
    8080          } 
    8181           
    82           $data = array( 
    83                'title' => $post_title, 
    84                'excerpt' => $post_excerpt, 
    85                'url' => $post_url, 
    86                'blog_name' => trim(html::escapeHTML(html::clean($this->core->blog->name))) 
    87                //,'__debug' => false 
    88           ); 
    89            
    90           # Ping 
    91           try 
    92           { 
    93                $http = self::initHttp($url,$path); 
    94                $http->post($path,$data,'UTF-8'); 
    95                $res = $http->getContent(); 
    96           } 
    97           catch (Exception $e) 
    98           { 
    99                throw new Exception(__('Unable to ping URL')); 
    100           } 
    101            
    102           $pattern = 
    103           '|<response>.*<error>(.*)</error>(.*)'. 
    104           '(<message>(.*)</message>(.*))?'. 
    105           '</response>|msU'; 
    106            
    107           if (!preg_match($pattern,$res,$match)) 
    108           { 
    109                throw new Exception(sprintf(__('%s is not a ping URL'),$url)); 
    110           } 
    111            
    112           $ping_error = trim($match[1]); 
    113           $ping_msg = (!empty($match[4])) ? $match[4] : ''; 
     82          $ping_parts = explode('|',$url); 
     83           
     84          # Let's walk by the trackback way 
     85          if (count($ping_parts) < 2) { 
     86               $data = array( 
     87                    'title' => $post_title, 
     88                    'excerpt' => $post_excerpt, 
     89                    'url' => $post_url, 
     90                    'blog_name' => trim(html::escapeHTML(html::clean($this->core->blog->name))) 
     91                    //,'__debug' => false 
     92               ); 
     93                
     94               # Ping 
     95               try 
     96               { 
     97                    $http = self::initHttp($url,$path); 
     98                    $http->post($path,$data,'UTF-8'); 
     99                    $res = $http->getContent(); 
     100               } 
     101               catch (Exception $e) 
     102               { 
     103                    throw new Exception(__('Unable to ping URL')); 
     104               } 
     105                
     106               $pattern = 
     107               '|<response>.*<error>(.*)</error>(.*)'. 
     108               '(<message>(.*)</message>(.*))?'. 
     109               '</response>|msU'; 
     110                
     111               if (!preg_match($pattern,$res,$match)) 
     112               { 
     113                    throw new Exception(sprintf(__('%s is not a ping URL'),$url)); 
     114               } 
     115                
     116               $ping_error = trim($match[1]); 
     117               $ping_msg = (!empty($match[4])) ? $match[4] : ''; 
     118          } 
     119          # Damnit ! Let's play pingback 
     120          else { 
     121               try { 
     122                    $xmlrpc = new xmlrpcClient($ping_parts[0]); 
     123                    $res = $xmlrpc->query('pingback.ping', $post_url, $ping_parts[1]); 
     124                    $ping_error = '0'; 
     125               } 
     126               catch (xmlrpcException $e) { 
     127                    $ping_error = $e->getCode(); 
     128                    $ping_msg = $e->getMessage();  
     129               } 
     130               catch (Exception $e) { 
     131                    throw new Exception(__('Unable to ping URL')); 
     132               } 
     133          } 
    114134           
    115135          if ($ping_error != '0') { 
     
    289309     } 
    290310     //@} 
     311 
     312     /// @name Receive pingbacks 
     313     //@{ 
     314     /** 
     315     Receives a pingback and insert it as a comment of given post. 
     316      
     317     @param    from_url       <b>string</b>       Source URL 
     318     @param    to_url              <b>string</b>       Target URL 
     319     */ 
     320     public function receive_pb($from_url, $to_url) 
     321     { 
     322          $reg = '!^'.preg_quote($this->core->blog->url).'(.*)!'; 
     323          $type = $args = $next = ''; 
     324           
     325          # Are you dumb? 
     326          if (!preg_match($reg, $to_url, $m)) { 
     327               throw new Exception(__('Any chance you ping one of my contents? No? Really?'), 0); 
     328          } 
     329           
     330          # Does the targeted URL look like a registered post type?  
     331          $url_part = $m[1]; 
     332          $p_type = ''; 
     333          $post_types = $this->core->getPostTypes(); 
     334          foreach ($post_types as $k => $v) { 
     335               $reg = '!^'.preg_quote(str_replace('%s', '', $v['public_url'])).'(.*)!'; 
     336               if (preg_match($reg, $url_part, $n)) { 
     337                    $p_type = $k; 
     338                    $post_url = $n[1]; 
     339                    break; 
     340               } 
     341          } 
     342           
     343          if (empty($p_type)) { 
     344               throw new Exception(__('Sorry but you can not ping this type of content.'), 33); 
     345          } 
     346 
     347          # Time to see if we've got a winner... 
     348          $params = array( 
     349               'post_type' => $p_type, 
     350               'post_url' => $post_url, 
     351          ); 
     352          $posts = $this->core->blog->getPosts($params); 
     353           
     354          # Missed!  
     355          if ($posts->isEmpty()) { 
     356               throw new Exception(__('Oops. Kinda "not found" stuff. Please check the target URL twice.'), 33); 
     357          } 
     358           
     359          # Nice try. But, sorry, no. 
     360          if (!$posts->trackbacksActive()) { 
     361               throw new Exception(__('Sorry, dude. This entry does not accept pingback at the moment.'), 33); 
     362          } 
     363 
     364          # OK. We've found our champion. Time to check the remote part. 
     365          try { 
     366               $http = self::initHttp($from_url, $from_path); 
     367                
     368               # First round : just to be sure the ping comes from an acceptable resource type. 
     369               $http->setHeadersOnly(true); 
     370               $http->get($from_path); 
     371               $c_type = explode(';', $http->getHeader('content-type')); 
     372 
     373               # Bad luck. Bye, bye... 
     374               if (!in_array($c_type[0],array('text/html', 'application/xhtml+xml'))) { 
     375                    throw new Exception(__('Your source URL does not look like a supported content type. Sorry. Bye, bye!'), 0); 
     376               } 
     377                
     378               # Second round : let's go fetch and parse the remote content 
     379               $http->setHeadersOnly(false); 
     380               $http->get($from_path); 
     381               $remote_content = $http->getContent(); 
     382 
     383               $charset = mb_detect_encoding($remote_content, 
     384                    'UTF-8,ISO-8859-1,ISO-8859-2,ISO-8859-3,'. 
     385                    'ISO-8859-4,ISO-8859-5,ISO-8859-6,ISO-8859-7,ISO-8859-8,'. 
     386                    'ISO-8859-9,ISO-8859-10,ISO-8859-13,ISO-8859-14,ISO-8859-15'); 
     387 
     388               if (strtolower($charset) != 'utf-8') { 
     389                    $remote_content = iconv($charset,'UTF-8',$remote_content); 
     390               } 
     391                
     392               # We want a title... 
     393               if (!preg_match('!<title>([^<].*?)</title>!mis', $remote_content, $m)) { 
     394                    throw new Exception(__('Where\'s your title?'), 0); 
     395               } 
     396               $title = trim(html::clean($m[1])); 
     397               $title = html::decodeEntities($title); 
     398               $title = html::escapeHTML($title); 
     399               $title = text::cutString($title,60); 
     400                
     401               preg_match('!<body[^>]*?>(.*)?</body>!msi', $remote_content, $m); 
     402               $source = $m[1]; 
     403               $source = preg_replace('![\r\n\s]+!ms',' ',$source); 
     404               $source = preg_replace( "/<\/*(h\d|p|th|td|li|dt|dd|pre|caption|input|textarea|button)[^>]*>/", "\n\n", $source ); 
     405               $source = strip_tags($source, '<a>'); 
     406               $source = explode("\n\n",$source); 
     407                
     408               $excerpt = ''; 
     409               foreach ($source as $line) { 
     410                    if (strpos($line, $to_url) !== false) { 
     411                         if (preg_match("!<a[^>]+?".$to_url."[^>]*>([^>]+?)</a>!", $line, $m)) { 
     412                              $excerpt = strip_tags($line); 
     413                              break; 
     414                         } 
     415                    } 
     416               } 
     417               if ($excerpt) { 
     418                    $excerpt = '(&#8230;) '.text::cutString(html::escapeHTML($excerpt),255).' (&#8230;)'; 
     419               } 
     420               else { 
     421                    $excerpt = '(??)'; 
     422               } 
     423 
     424               $comment = 
     425               "<!-- TB -->\n". 
     426               '<p><strong>'.$title."</strong></p>\n". 
     427               '<p>'.$excerpt.'</p>'; 
     428                
     429               $cur = $this->core->con->openCursor($this->core->prefix.'comment'); 
     430               $cur->comment_author = 'Anonymous blog'; 
     431               $cur->comment_site = (string) $from_url; 
     432               $cur->comment_content = (string) $comment; 
     433               $cur->post_id = $posts->post_id; 
     434               $cur->comment_trackback = 1; 
     435               $cur->comment_status = $this->core->blog->settings->system->trackbacks_pub ? 1 : -1; 
     436               $cur->comment_ip = http::realIP(); 
     437                
     438               # --BEHAVIOR-- publicBeforeTrackbackCreate 
     439               $this->core->callBehavior('publicBeforeTrackbackCreate',$cur); 
     440               if ($cur->post_id) { 
     441                    $comment_id = $this->core->blog->addComment($cur); 
     442                     
     443                    # --BEHAVIOR-- publicAfterTrackbackCreate 
     444                    $this->core->callBehavior('publicAfterTrackbackCreate',$cur,$comment_id); 
     445               } 
     446          } 
     447          catch (Exception $e) { 
     448               throw new Exception(__('Sorry, an internal problem has occured.'), 0); 
     449          } 
     450           
     451          return __('Thanks, mate. It was a pleasure.'); 
     452     } 
     453     //@} 
    291454      
    292455     private static function initHttp($url,&$path) 
     
    346509               for ($i = 0; $i<count($match); $i++) 
    347510               { 
    348                     if (preg_match('/href="(http:\/\/[^"]+)"/ms', $match[$i][1], $matches)) { 
     511                    if (preg_match('/href="((https?:\/)?\/[^"]+)"/ms', $match[$i][1], $matches)) { 
    349512                         $res[$matches[1]] = 1; 
    350513                    } 
     
    358521               for ($i = 0; $i<count($match); $i++) 
    359522               { 
    360                     if (preg_match('/cite="(http:\/\/[^"]+)"/ms', $match[$i][2], $matches)) { 
     523                    if (preg_match('/cite="((https?:\/)?\/[^"]+)"/ms', $match[$i][2], $matches)) { 
    361524                         $res[$matches[1]] = 1; 
    362525                    } 
     
    369532     private function getPingURL($url) 
    370533     { 
     534          if (strpos($url,'/') === 0) { 
     535               $url = http::getHost().$url; 
     536          } 
     537           
    371538          try 
    372539          { 
     
    374541               $http->get($path); 
    375542               $page_content = $http->getContent(); 
     543               $pb_url = $http->getHeader('x-pingback'); 
    376544          } 
    377545          catch (Exception $e) 
     
    380548          } 
    381549           
     550          # If we've got a X-Pingback header and it's a valid URL, it will be enough 
     551          if ($pb_url && filter_var($pb_url,FILTER_VALIDATE_URL) && preg_match('!^https?:!',$pb_url)) { 
     552               return $pb_url.'|'.$url; 
     553          } 
     554           
     555          # No X-Pingback header. A link rel=pingback, maybe ? 
     556          $pattern_pingback = '!<link rel="pingback" href="(.*?)"( /)?>!msi'; 
     557           
     558          if (preg_match($pattern_pingback,$page_content,$m)) { 
     559               $pb_url = $m[1]; 
     560               if (filter_var($pb_url,FILTER_VALIDATE_URL) && preg_match('!^https?:!',$pb_url)) { 
     561                    return $pb_url.'|'.$url; 
     562               } 
     563          } 
     564 
     565          # No pingback ? OK, let's check for a trackback data chunk... 
    382566          $pattern_rdf = 
    383567          '/<rdf:RDF.*?>.*?'. 
     
    388572          preg_match_all($pattern_rdf,$page_content,$rdf_all,PREG_SET_ORDER); 
    389573           
     574          $url_path = parse_url($url, PHP_URL_PATH); 
     575          $sanitized_url = str_replace($url_path, html::sanitizeURL($url_path), $url); 
     576           
    390577          for ($i=0; $i<count($rdf_all); $i++) 
    391578          { 
    392579               $rdf = $rdf_all[$i][1]; 
    393                 
    394                if (preg_match('/dc:identifier="'.preg_quote($url,'/').'"/msi',$rdf)) { 
     580               if (preg_match('/dc:identifier="'.preg_quote($url,'/').'"/msi',$rdf) || 
     581                    preg_match('/dc:identifier="'.preg_quote($sanitized_url,'/').'"/msi',$rdf)) { 
    395582                    if (preg_match('/trackback:ping="(.*?)"/msi',$rdf,$tb_link)) { 
    396583                         return $tb_link[1]; 
  • inc/core/class.dc.xmlrpc.php

    r1179 r1674  
    214214               array('array','integer','string','string'), 
    215215               'Retrieve all of the comment statuses.'); 
     216                
     217          # Pingback support 
     218          $this->addCallback('pingback.ping',array($this,'pingback_ping'), 
     219               array('string', 'string', 'string'), 
     220               'Notify a link to a post.'); 
    216221     } 
    217222      
     
    270275     } 
    271276      
    272      private function setBlog() 
     277     private function setBlog($bypass = false) 
    273278     { 
    274279          if (!$this->blog_id) { 
     
    288293          } 
    289294           
    290           if (!$this->core->blog->settings->system->enable_xmlrpc || 
    291           !$this->core->auth->check('usage,contentadmin',$this->core->blog->id)) { 
     295          if (!$bypass && 
     296               (!$this->core->blog->settings->system->enable_xmlrpc || 
     297               !$this->core->auth->check('usage,contentadmin',$this->core->blog->id))) { 
    292298               $this->core->blog = null; 
    293299               throw new Exception('Not enough permissions on this blog.'); 
     
    16291635          ); 
    16301636     } 
     1637 
     1638     /* Pingback support 
     1639     --------------------------------------------------- */ 
     1640     public function pingback_ping($from_url, $to_url) 
     1641     { 
     1642          # Come on, buddy! Don't make me waste time with this kind of silliness... 
     1643          if (!(filter_var($from_url, FILTER_VALIDATE_URL) && preg_match('!^https?://!',$from_url))) { 
     1644               throw new Exception(__('No valid source URL provided? Try again!'), 0); 
     1645          } 
     1646           
     1647          $this->setBlog(true); 
     1648          $tb = new dcTrackback($this->core); 
     1649          return $tb->receive_pb($from_url, $to_url); 
     1650     } 
    16311651} 
    16321652?> 
  • inc/public/class.dc.template.php

    r1611 r1674  
    7070          $this->addValue('BlogID',array($this,'BlogID')); 
    7171          $this->addValue('BlogURL',array($this,'BlogURL')); 
     72          $this->addValue('BlogXMLRPCURL',array($this,'BlogXMLRPCURL')); 
    7273          $this->addValue('BlogPublicURL',array($this,'BlogPublicURL')); 
    7374          $this->addValue('BlogQmarkURL',array($this,'BlogQmarkURL')); 
     
    906907      
    907908     /*dtd 
     909     <!ELEMENT tpl:BlogXMLRPCURL - O -- Blog XML-RPC URL --> 
     910     */ 
     911     public function BlogXMLRPCURL($attr) 
     912     { 
     913          $f = $this->getFilters($attr); 
     914          return '<?php echo '.sprintf($f,'$core->blog->url.$core->url->getURLFor(\'xmlrpc\',$core->blog->id)').'; ?>'; 
     915     } 
     916      
     917     /*dtd 
    908918     <!ELEMENT tpl:BlogURL - O -- Blog URL --> 
    909919     */ 
  • inc/public/default-templates/post.html

    r932 r1674  
    2525  <link rel="top" href="{{tpl:BlogURL}}" title="{{tpl:lang Home}}" /> 
    2626  <link rel="contents" href="{{tpl:BlogArchiveURL}}" title="{{tpl:lang Archives}}" /> 
     27  <tpl:EntryIf pings_active="1"><link rel="pingback" href="{{tpl:BlogXMLRPCURL}}" /></tpl:EntryIf> 
    2728   
    2829  <tpl:EntryNext><link rel="next" href="{{tpl:EntryURL}}" 
  • inc/public/lib.urlhandlers.php

    r1610 r1674  
    480480                     
    481481                    # The entry 
     482                    if ($_ctx->posts->trackbacksActive()) { 
     483                         header('X-Pingback: '.$core->blog->url.$core->url->getURLFor("xmlrpc",$core->blog->id)); 
     484                    } 
    482485                    self::serveDocument('post.html'); 
    483486               } 
  • locales/bn/plugins.po

    r1636 r1668  
    10601060msgstr "" 
    10611061 
    1062 msgid "Page status:" 
    1063 msgstr "" 
    1064  
    1065 msgid "Page position:" 
    1066 msgstr "" 
    1067  
    1068 msgid "Page lang:" 
    1069 msgstr "" 
    1070  
    1071 msgid "Page password:" 
     1062msgid "Page status" 
     1063msgstr "" 
     1064 
     1065msgid "Page position" 
     1066msgstr "" 
     1067 
     1068msgid "Page lang" 
     1069msgstr "" 
     1070 
     1071msgid "Page password" 
    10721072msgstr "" 
    10731073 
  • locales/ca/plugins.po

    r1636 r1668  
    10561056msgstr "" 
    10571057 
    1058 msgid "Page status:" 
    1059 msgstr "" 
    1060  
    1061 msgid "Page position:" 
    1062 msgstr "" 
    1063  
    1064 msgid "Page lang:" 
    1065 msgstr "" 
    1066  
    1067 msgid "Page password:" 
     1058msgid "Page status" 
     1059msgstr "" 
     1060 
     1061msgid "Page position" 
     1062msgstr "" 
     1063 
     1064msgid "Page lang" 
     1065msgstr "" 
     1066 
     1067msgid "Page password" 
    10681068msgstr "" 
    10691069 
  • locales/cs/plugins.po

    r1636 r1668  
    10651065msgstr "" 
    10661066 
    1067 msgid "Page status:" 
     1067msgid "Page status" 
    10681068msgstr "Stav stránky:" 
    10691069 
    1070 msgid "Page position:" 
     1070msgid "Page position" 
    10711071msgstr "Pozice stránky:" 
    10721072 
    1073 msgid "Page lang:" 
     1073msgid "Page lang" 
    10741074msgstr "Jazyk stránky:" 
    10751075 
    1076 msgid "Page password:" 
     1076msgid "Page password" 
    10771077msgstr "Heslo stránky:" 
    10781078 
  • locales/da/plugins.po

    r1636 r1668  
    10561056msgstr "" 
    10571057 
    1058 msgid "Page status:" 
    1059 msgstr "" 
    1060  
    1061 msgid "Page position:" 
    1062 msgstr "" 
    1063  
    1064 msgid "Page lang:" 
    1065 msgstr "" 
    1066  
    1067 msgid "Page password:" 
     1058msgid "Page status" 
     1059msgstr "" 
     1060 
     1061msgid "Page position" 
     1062msgstr "" 
     1063 
     1064msgid "Page lang" 
     1065msgstr "" 
     1066 
     1067msgid "Page password" 
    10681068msgstr "" 
    10691069 
  • locales/de/plugins.po

    r1636 r1668  
    10661066msgstr "" 
    10671067 
    1068 msgid "Page status:" 
     1068msgid "Page status" 
    10691069msgstr "Status der Seite:" 
    10701070 
    1071 msgid "Page position:" 
     1071msgid "Page position" 
    10721072msgstr "Position der Seite:" 
    10731073 
    1074 msgid "Page lang:" 
     1074msgid "Page lang" 
    10751075msgstr "Sprache der Seite:" 
    10761076 
    1077 msgid "Page password:" 
     1077msgid "Page password" 
    10781078msgstr "Passwort der Seite:" 
    10791079 
  • locales/en/main.po

    r1637 r1670  
    547547 
    548548msgid "Entries (all types)" 
    549 msgstr "Entries &amp; pages" 
     549msgstr "Entries" 
    550550 
    551551msgid "Status" 
  • locales/en/plugins.po

    r1636 r1668  
    10761076msgstr "" 
    10771077 
    1078 msgid "Page status:" 
    1079 msgstr "" 
    1080  
    1081 msgid "Page position:" 
    1082 msgstr "" 
    1083  
    1084 msgid "Page lang:" 
    1085 msgstr "" 
    1086  
    1087 msgid "Page password:" 
     1078msgid "Page status" 
     1079msgstr "" 
     1080 
     1081msgid "Page position" 
     1082msgstr "" 
     1083 
     1084msgid "Page lang" 
     1085msgstr "" 
     1086 
     1087msgid "Page password" 
    10881088msgstr "" 
    10891089 
  • locales/eo/plugins.po

    r1636 r1668  
    10561056msgstr "" 
    10571057 
    1058 msgid "Page status:" 
    1059 msgstr "" 
    1060  
    1061 msgid "Page position:" 
    1062 msgstr "" 
    1063  
    1064 msgid "Page lang:" 
    1065 msgstr "" 
    1066  
    1067 msgid "Page password:" 
     1058msgid "Page status" 
     1059msgstr "" 
     1060 
     1061msgid "Page position" 
     1062msgstr "" 
     1063 
     1064msgid "Page lang" 
     1065msgstr "" 
     1066 
     1067msgid "Page password" 
    10681068msgstr "" 
    10691069 
  • locales/es-ar/plugins.po

    r1636 r1668  
    10681068msgstr "" 
    10691069 
    1070 msgid "Page status:" 
     1070msgid "Page status" 
    10711071msgstr "Estado de la pagina:" 
    10721072 
    1073 msgid "Page position:" 
     1073msgid "Page position" 
    10741074msgstr "Posición de la pagina:" 
    10751075 
    1076 msgid "Page lang:" 
     1076msgid "Page lang" 
    10771077msgstr "Idioma de la pagina:" 
    10781078 
    1079 msgid "Page password:" 
     1079msgid "Page password" 
    10801080msgstr "Contraseña de la pagina:" 
    10811081 
  • locales/es/plugins.po

    r1636 r1668  
    10741074msgstr "" 
    10751075 
    1076 msgid "Page status:" 
     1076msgid "Page status" 
    10771077msgstr "Estado de la página:" 
    10781078 
    1079 msgid "Page position:" 
     1079msgid "Page position" 
    10801080msgstr "Posición de la página:" 
    10811081 
    1082 msgid "Page lang:" 
     1082msgid "Page lang" 
    10831083msgstr "Idioma de la página:" 
    10841084 
    1085 msgid "Page password:" 
     1085msgid "Page password" 
    10861086msgstr "Contraseña de la página:" 
    10871087 
  • locales/eu/plugins.po

    r1636 r1668  
    10561056msgstr "" 
    10571057 
    1058 msgid "Page status:" 
    1059 msgstr "" 
    1060  
    1061 msgid "Page position:" 
    1062 msgstr "" 
    1063  
    1064 msgid "Page lang:" 
    1065 msgstr "" 
    1066  
    1067 msgid "Page password:" 
     1058msgid "Page status" 
     1059msgstr "" 
     1060 
     1061msgid "Page position" 
     1062msgstr "" 
     1063 
     1064msgid "Page lang" 
     1065msgstr "" 
     1066 
     1067msgid "Page password" 
    10681068msgstr "" 
    10691069 
  • locales/fr/main.po

    r1637 r1678  
    171171#, php-format 
    172172msgid "You are about to delete the blog %s. Every entry, comment and category will be deleted." 
    173 msgstr "Vous êtes sur le point de supprimer le blog %s. Tous ses billets, commentaires et catégories seront supprimés." 
     173msgstr "Vous êtes sur le point de supprimer le blog %s. Tous ses billets, pages, commentaires et catégories seront supprimés." 
    174174 
    175175msgid "Please give your password to confirm the blog deletion." 
     
    338338 
    339339msgid "Display smilies on entries and comments" 
    340 msgstr "Afficher des émoticônes dans les billets et commentaires" 
     340msgstr "Afficher des émoticônes dans les billets, pages et commentaires" 
    341341 
    342342#, php-format 
     
    578578 
    579579msgid "Entries (all types)" 
    580 msgstr "Billets &amp; pages" 
     580msgstr "Entrées" 
    581581 
    582582msgid "Status" 
     
    781781 
    782782msgid "Entry title" 
    783 msgstr "Titre du billet" 
     783msgstr "Titre de l'entrée" 
    784784 
    785785msgid "Author" 
     
    13961396 
    13971397msgid "Show entries containing this media" 
    1398 msgstr "Afficher les billets contenant ce média" 
     1398msgstr "Afficher les entrées contenant ce média" 
    13991399 
    14001400msgid "Entries containing this media" 
    1401 msgstr "Billets contenant ce média" 
     1401msgstr "Entrées contenant ce média" 
    14021402 
    14031403msgid "No entry seems contain this media." 
    1404 msgstr "Aucun billet ne semble contenir ce média." 
     1404msgstr "Aucune entrée ne semble contenir ce média." 
    14051405 
    14061406msgid "Image details" 
     
    21272127 
    21282128msgid "Number of entries" 
    2129 msgstr "Nombre de billets" 
     2129msgstr "Nombre d'entrées" 
    21302130 
    21312131msgid "Set permissions" 
     
    22522252 
    22532253msgid "Users with posts cannot be deleted." 
    2254 msgstr "Les utilisateurs ayant écrit des billets ne peuvent être supprimés." 
     2254msgstr "Les utilisateurs ayant écrit des entrées ne peuvent être supprimés." 
    22552255 
    22562256#, php-format 
     
    32733273msgid "Save my options" 
    32743274msgstr "Enregistrer mes options" 
     3275 
     3276msgid "Blog id" 
     3277msgstr "Identifiant" 
     3278 
     3279msgid "Edit blog settings for %s" 
     3280msgstr "Modifier les paramètres de %s" 
     3281 
     3282msgid "Edit blog settings" 
     3283msgstr "Modifier les paramètres du blog" 
     3284 
     3285msgid "Edit the %1$s from %2$s" 
     3286msgstr "Modifier le %1$s de %2$s" 
     3287 
     3288msgid "Backup" 
     3289msgstr "Sauvegarde" 
  • locales/fr/plugins.po

    r1636 r1669  
    12551255msgstr "Voir cette page sur le site" 
    12561256 
    1257 msgid "Page status:" 
    1258 msgstr "État de la page :" 
    1259  
    1260 msgid "Page position:" 
    1261 msgstr "Position de la page :" 
    1262  
    1263 msgid "Page lang:" 
    1264 msgstr "Langue de la page :" 
    1265  
    1266 msgid "Page password:" 
    1267 msgstr "Mot de passe de la page :" 
     1257msgid "Page status" 
     1258msgstr "État de la page" 
     1259 
     1260msgid "Page position" 
     1261msgstr "Position de la page" 
     1262 
     1263msgid "Page lang" 
     1264msgstr "Langue de la page" 
     1265 
     1266msgid "Page password" 
     1267msgstr "Mot de passe de la page" 
    12681268 
    12691269msgid "" 
     
    19841984msgid "Hide in widget Pages" 
    19851985msgstr "Ne pas lister dans le widget Pages" 
     1986 
     1987msgid "Drag widgets here to remove them from this sidebar." 
     1988msgstr "Glisser les widgets ici pour les retirer du volet." 
  • locales/hu/plugins.po

    r1636 r1668  
    10771077msgstr "" 
    10781078 
    1079 msgid "Page status:" 
     1079msgid "Page status" 
    10801080msgstr "Oldal állapota:" 
    10811081 
    1082 msgid "Page position:" 
     1082msgid "Page position" 
    10831083msgstr "Oldal pozíciója:" 
    10841084 
    1085 msgid "Page lang:" 
     1085msgid "Page lang" 
    10861086msgstr "Oldal nyelve:" 
    10871087 
    1088 msgid "Page password:" 
     1088msgid "Page password" 
    10891089msgstr "Oldal jelszava:" 
    10901090 
  • locales/it/plugins.po

    r1636 r1668  
    10561056msgstr "" 
    10571057 
    1058 msgid "Page status:" 
    1059 msgstr "" 
    1060  
    1061 msgid "Page position:" 
    1062 msgstr "" 
    1063  
    1064 msgid "Page lang:" 
    1065 msgstr "" 
    1066  
    1067 msgid "Page password:" 
     1058msgid "Page status" 
     1059msgstr "" 
     1060 
     1061msgid "Page position" 
     1062msgstr "" 
     1063 
     1064msgid "Page lang" 
     1065msgstr "" 
     1066 
     1067msgid "Page password" 
    10681068msgstr "" 
    10691069 
  • locales/ja/plugins.po

    r1636 r1668  
    10721072msgstr "" 
    10731073 
    1074 msgid "Page status:" 
     1074msgid "Page status" 
    10751075msgstr "ページの状態:" 
    10761076 
    1077 msgid "Page position:" 
     1077msgid "Page position" 
    10781078msgstr "ページの位置:" 
    10791079 
    1080 msgid "Page lang:" 
     1080msgid "Page lang" 
    10811081msgstr "ページの言語:" 
    10821082 
    1083 msgid "Page password:" 
     1083msgid "Page password" 
    10841084msgstr "ページのパスワード:" 
    10851085 
  • locales/ko/plugins.po

    r1636 r1668  
    10791079msgstr "" 
    10801080 
    1081 msgid "Page status:" 
     1081msgid "Page status" 
    10821082msgstr "페이지 공개상태 :" 
    10831083 
    1084 msgid "Page position:" 
     1084msgid "Page position" 
    10851085msgstr "페이지 위치 :" 
    10861086 
    1087 msgid "Page lang:" 
     1087msgid "Page lang" 
    10881088msgstr "페이지 언어 :" 
    10891089 
    1090 msgid "Page password:" 
     1090msgid "Page password" 
    10911091msgstr "페이지 비밀번호 :" 
    10921092 
  • locales/lt/plugins.po

    r1499 r1668  
    10241024msgstr "Peržiūrėti puslapį" 
    10251025 
    1026 msgid "Page status:" 
     1026msgid "Page status" 
    10271027msgstr "Puslapio statusas:" 
    10281028 
    1029 msgid "Page position:" 
     1029msgid "Page position" 
    10301030msgstr "Puslapio pozicija:" 
    10311031 
    1032 msgid "Page lang:" 
     1032msgid "Page lang" 
    10331033msgstr "Puslapio kalba:" 
    10341034 
    1035 msgid "Page password:" 
     1035msgid "Page password" 
    10361036msgstr "Puslapio slaptažodis:" 
    10371037 
  • locales/nl/plugins.po

    r1636 r1668  
    10571057msgstr "" 
    10581058 
    1059 msgid "Page status:" 
    1060 msgstr "" 
    1061  
    1062 msgid "Page position:" 
    1063 msgstr "" 
    1064  
    1065 msgid "Page lang:" 
    1066 msgstr "" 
    1067  
    1068 msgid "Page password:" 
     1059msgid "Page status" 
     1060msgstr "" 
     1061 
     1062msgid "Page position" 
     1063msgstr "" 
     1064 
     1065msgid "Page lang" 
     1066msgstr "" 
     1067 
     1068msgid "Page password" 
    10691069msgstr "" 
    10701070 
  • locales/oc/plugins.po

    r1636 r1668  
    10561056msgstr "" 
    10571057 
    1058 msgid "Page status:" 
    1059 msgstr "" 
    1060  
    1061 msgid "Page position:" 
    1062 msgstr "" 
    1063  
    1064 msgid "Page lang:" 
    1065 msgstr "" 
    1066  
    1067 msgid "Page password:" 
     1058msgid "Page status" 
     1059msgstr "" 
     1060 
     1061msgid "Page position" 
     1062msgstr "" 
     1063 
     1064msgid "Page lang" 
     1065msgstr "" 
     1066 
     1067msgid "Page password" 
    10681068msgstr "" 
    10691069 
  • locales/pl/plugins.po

    r1636 r1668  
    10611061msgstr "" 
    10621062 
    1063 msgid "Page status:" 
     1063msgid "Page status" 
    10641064msgstr "Stan strony:" 
    10651065 
    1066 msgid "Page position:" 
     1066msgid "Page position" 
    10671067msgstr "Pozycja strony:" 
    10681068 
    1069 msgid "Page lang:" 
     1069msgid "Page lang" 
    10701070msgstr "Język strony:" 
    10711071 
    1072 msgid "Page password:" 
     1072msgid "Page password" 
    10731073msgstr "Hasło strony" 
    10741074 
  • locales/pt-br/plugins.po

    r1636 r1668  
    10561056msgstr "" 
    10571057 
    1058 msgid "Page status:" 
    1059 msgstr "" 
    1060  
    1061 msgid "Page position:" 
    1062 msgstr "" 
    1063  
    1064 msgid "Page lang:" 
    1065 msgstr "" 
    1066  
    1067 msgid "Page password:" 
     1058msgid "Page status" 
     1059msgstr "" 
     1060 
     1061msgid "Page position" 
     1062msgstr "" 
     1063 
     1064msgid "Page lang" 
     1065msgstr "" 
     1066 
     1067msgid "Page password" 
    10681068msgstr "" 
    10691069 
  • locales/pt/plugins.po

    r1636 r1668  
    10731073msgstr "" 
    10741074 
    1075 msgid "Page status:" 
     1075msgid "Page status" 
    10761076msgstr "Estatutos da página:" 
    10771077 
    1078 msgid "Page position:" 
     1078msgid "Page position" 
    10791079msgstr "Posição da página:" 
    10801080 
    1081 msgid "Page lang:" 
     1081msgid "Page lang" 
    10821082msgstr "Língua da página:" 
    10831083 
    1084 msgid "Page password:" 
     1084msgid "Page password" 
    10851085msgstr "Senha da página:" 
    10861086 
  • locales/ro/plugins.po

    r1636 r1668  
    10681068msgstr "" 
    10691069 
    1070 msgid "Page status:" 
    1071 msgstr "" 
    1072  
    1073 msgid "Page position:" 
    1074 msgstr "" 
    1075  
    1076 msgid "Page lang:" 
    1077 msgstr "" 
    1078  
    1079 msgid "Page password:" 
     1070msgid "Page status" 
     1071msgstr "" 
     1072 
     1073msgid "Page position" 
     1074msgstr "" 
     1075 
     1076msgid "Page lang" 
     1077msgstr "" 
     1078 
     1079msgid "Page password" 
    10801080msgstr "" 
    10811081 
  • locales/ru/plugins.po

    r1636 r1668  
    10641064msgstr "" 
    10651065 
    1066 msgid "Page status:" 
     1066msgid "Page status" 
    10671067msgstr "Статус страницы:" 
    10681068 
    1069 msgid "Page position:" 
     1069msgid "Page position" 
    10701070msgstr "Позиция страницы:" 
    10711071 
    1072 msgid "Page lang:" 
     1072msgid "Page lang" 
    10731073msgstr "Язык страницы:" 
    10741074 
    1075 msgid "Page password:" 
     1075msgid "Page password" 
    10761076msgstr "Пароль страницы:" 
    10771077 
  • locales/sr/plugins.po

    r1636 r1668  
    10561056msgstr "" 
    10571057 
    1058 msgid "Page status:" 
    1059 msgstr "" 
    1060  
    1061 msgid "Page position:" 
    1062 msgstr "" 
    1063  
    1064 msgid "Page lang:" 
    1065 msgstr "" 
    1066  
    1067 msgid "Page password:" 
     1058msgid "Page status" 
     1059msgstr "" 
     1060 
     1061msgid "Page position" 
     1062msgstr "" 
     1063 
     1064msgid "Page lang" 
     1065msgstr "" 
     1066 
     1067msgid "Page password" 
    10681068msgstr "" 
    10691069 
  • locales/sv/plugins.po

    r1636 r1668  
    10561056msgstr "" 
    10571057 
    1058 msgid "Page status:" 
    1059 msgstr "" 
    1060  
    1061 msgid "Page position:" 
    1062 msgstr "" 
    1063  
    1064 msgid "Page lang:" 
    1065 msgstr "" 
    1066  
    1067 msgid "Page password:" 
     1058msgid "Page status" 
     1059msgstr "" 
     1060 
     1061msgid "Page position" 
     1062msgstr "" 
     1063 
     1064msgid "Page lang" 
     1065msgstr "" 
     1066 
     1067msgid "Page password" 
    10681068msgstr "" 
    10691069 
  • locales/te/plugins.po

    r1636 r1668  
    10611061msgstr "" 
    10621062 
    1063 msgid "Page status:" 
     1063msgid "Page status" 
    10641064msgstr "పేజీ స్థితి:" 
    10651065 
    1066 msgid "Page position:" 
     1066msgid "Page position" 
    10671067msgstr "పేజీ స్థానం:" 
    10681068 
    1069 msgid "Page lang:" 
     1069msgid "Page lang" 
    10701070msgstr "పేజీ భాష:" 
    10711071 
    1072 msgid "Page password:" 
     1072msgid "Page password" 
    10731073msgstr "పేజీ సంకేతపదం:" 
    10741074 
  • locales/tr/plugins.po

    r1636 r1668  
    10611061msgstr "" 
    10621062 
    1063 msgid "Page status:" 
    1064 msgstr "" 
    1065  
    1066 msgid "Page position:" 
    1067 msgstr "" 
    1068  
    1069 msgid "Page lang:" 
    1070 msgstr "" 
    1071  
    1072 msgid "Page password:" 
     1063msgid "Page status" 
     1064msgstr "" 
     1065 
     1066msgid "Page position" 
     1067msgstr "" 
     1068 
     1069msgid "Page lang" 
     1070msgstr "" 
     1071 
     1072msgid "Page password" 
    10731073msgstr "" 
    10741074 
  • locales/zh-cn/plugins.po

    r1636 r1668  
    10711071msgstr "" 
    10721072 
    1073 msgid "Page status:" 
     1073msgid "Page status" 
    10741074msgstr "页面状态:" 
    10751075 
    1076 msgid "Page position:" 
     1076msgid "Page position" 
    10771077msgstr "页面位置:" 
    10781078 
    1079 msgid "Page lang:" 
     1079msgid "Page lang" 
    10801080msgstr "页面语言:" 
    10811081 
    1082 msgid "Page password:" 
     1082msgid "Page password" 
    10831083msgstr "页面密码:" 
    10841084 
  • plugins/pages/_public.php

    r1179 r1674  
    181181                     
    182182                    # The entry 
     183                    if ($_ctx->posts->trackbacksActive()) { 
     184                         header('X-Pingback: '.$core->blog->url.$core->url->getURLFor("xmlrpc",$core->blog->id)); 
     185                    } 
    183186                    $core->tpl->setPath($core->tpl->getPath(), dirname(__FILE__).'/default-templates'); 
    184187                    self::serveDocument('page.html'); 
  • plugins/pages/default-templates/page.html

    r725 r1674  
    2525  <link rel="top" href="{{tpl:BlogURL}}" title="{{tpl:lang Home}}" /> 
    2626  <link rel="contents" href="{{tpl:BlogArchiveURL}}" title="{{tpl:lang Archives}}" /> 
     27  <tpl:EntryIf pings_active="1"><link rel="pingback" href="{{tpl:BlogXMLRPCURL}}" /></tpl:EntryIf> 
    2728   
    2829  <link rel="alternate" type="application/atom+xml" title="Atom 1.0" href="{{tpl:BlogFeedURL type="atom"}}" /> 
  • plugins/pages/page.php

    r1625 r1668  
    403403               'items' => array( 
    404404                    'post_status' =>  
    405                          '<p><label for="post_status" class="ib">'.__('Page status:').'</label> '. 
     405                         '<p><label for="post_status" class="ib">'.__('Page status').'</label> '. 
    406406                         form::combo('post_status',$status_combo,$post_status,'','',!$can_publish). 
    407407                         '</p>', 
     
    411411                         '</p>', 
    412412                    'post_lang' => 
    413                          '<p><label for="post_lang" class="ib">'.__('Page lang:').'</label>'. 
     413                         '<p><label for="post_lang" class="ib">'.__('Page lang').'</label>'. 
    414414                         form::combo('post_lang',$lang_combo,$post_lang). 
    415415                         '</p>', 
     
    426426               'items' => array( 
    427427                    'post_position' =>  
    428                          '<p><label for="post_position" class="classic">'.__('Page position:').'</label> '. 
     428                         '<p><label for="post_position" class="classic">'.__('Page position').'</label> '. 
    429429                         form::field('post_position',3,3,(string) $post_position). 
    430430                         '</p>')), 
  • plugins/widgets/index.php

    r1659 r1669  
    165165  <?php echo file_get_contents(dirname(__FILE__).'/style.css'); ?> 
    166166  </style> 
    167      <script type="text/javascript" src="js/jquery/jquery-ui.custom.js"></script> 
    168   <script type="text/javascript" src="index.php?pf=widgets/widgets.js"></script> 
     167  <?php 
     168          echo 
     169               dcPage::jsLoad('js/jquery/jquery-ui.custom.js'). 
     170               dcPage::jsLoad('index.php?pf=widgets/widgets.js'); 
     171  ?> 
    169172  <?php  
    170173     $core->auth->user_prefs->addWorkspace('accessibility');  
     
    220223echo 
    221224'<div id="sidebarNav" class="widgets fieldset">'. 
    222 sidebarWidgets('dndnav',__('Navigation sidebar'),$widgets_nav,'nav',$__default_widgets['nav'],$j). 
    223 '</div>'. 
    224 '<ul class="sortable-delete"><li class="sortable-delete-placeholder">'.__('Drag here to delete').'</li></ul>'; 
     225sidebarWidgets('dndnav',__('Navigation sidebar'),$widgets_nav,'nav',$__default_widgets['nav'],$j); 
     226echo '</div>'; 
    225227 
    226228# Extra sidebar 
    227229echo 
    228230'<div id="sidebarExtra" class="widgets fieldset">'. 
    229 sidebarWidgets('dndextra',__('Extra sidebar'),$widgets_extra,'extra',$__default_widgets['extra'],$j). 
    230 '</div>'. 
    231 '<ul class="sortable-delete"><li class="sortable-delete-placeholder">'.__('Drag here to delete').'</li></ul>'; 
     231sidebarWidgets('dndextra',__('Extra sidebar'),$widgets_extra,'extra',$__default_widgets['extra'],$j); 
     232echo '</div>'; 
    232233 
    233234# Custom sidebar 
    234235echo 
    235236'<div id="sidebarCustom" class="widgets fieldset">'. 
    236 sidebarWidgets('dndcustom',__('Custom sidebar'),$widgets_custom,'custom',$__default_widgets['custom'],$j). 
    237 '</div>'. 
    238 '<ul class="sortable-delete"><li class="sortable-delete-placeholder">'.__('Drag here to delete').'</li></ul>'; 
     237sidebarWidgets('dndcustom',__('Custom sidebar'),$widgets_custom,'custom',$__default_widgets['custom'],$j); 
     238echo '</div>'; 
    239239 
    240240echo 
     
    322322     } 
    323323      
    324      if ($widgets->isEmpty()) { 
    325           $res .= '<p class="empty-widgets">'.__('No widget.').'</p>'; 
    326      } else { 
    327           $res .= '<p class="empty-widgets" style="display: none;">'.__('No widget.').'</p>'; 
    328      } 
     324     $res .= '<p class="empty-widgets" '.(!$widgets->isEmpty() ? 'style="display: none;"' : '').'>'.__('No widget.').'</p>'; 
    329325      
    330326     $res .= '<ul id="'.$id.'" class="connected">'; 
     
    350346      
    351347     $res .= '</ul>'; 
     348 
     349     if ($i > 0) { 
     350          $res .= '<ul class="sortable-delete"><li class="sortable-delete-placeholder">'. 
     351               __('Drag widgets here to remove them from this sidebar.').'</li></ul>'; 
     352     } 
    352353      
    353354     return $res; 
  • plugins/widgets/style.css

    r1661 r1669  
    2424} 
    2525.widgets.fieldset.if-drag { 
    26      margin-bottom: 0; 
    27      border-radius: 6px 6px 0 0; 
    28     border-bottom: 1px dashed #FF0000; 
     26     padding-bottom: 0; 
     27     border-radius: .5em; 
    2928} 
    3029#dndnav, #dndextra, #dndcustom { 
     
    3433#dndnav > li, 
    3534#dndextra > li, 
    36 #dndcustom > li, 
    37 .sortable-delete > li { 
    38      padding: O; 
     35#dndcustom > li { 
     36     padding: 0; 
    3937     border: 1px solid #999; 
    4038     margin-bottom: 1em; 
     
    4644.sortable-delete > li.ui-sortable-placeholder { 
    4745     border: 1px dashed #999; 
    48      height: 2rem; 
    49      padding: 3px; 
     46     height: 2em; 
     47     padding: .3em; 
    5048} 
    51  
     49.sortable-delete > li.ui-sortable-placeholder { 
     50     border-width: 2px; 
     51     border-color: red; 
     52} 
    5253.sortable-delete { 
    5354     display: none; 
    5455} 
    5556.sortable-delete.if-drag { 
    56     border: 1px solid #999999; 
    57     border-top: 0; 
    58     border-radius: 0 0 6px 6px; 
    59     color: #000000; 
     57    border: 1px dotted #999; 
     58    color: #000; 
    6059    font-weight: bold; 
    61     list-style: none outside none; 
    62     margin: 0 0 2em; 
    63     min-height: 25px; 
    64     padding: 4px; 
     60    list-style-type: none; 
     61    margin: 0 0 1em; 
     62    padding: .5em 1em; 
    6563    display: block; 
     64    background: #fafafa; 
    6665} 
    6766.sortable-delete > li { 
     
    7069.sortable-delete > li.sortable-delete-placeholder { 
    7170    border: 0 none; 
    72     color: #FF0000; 
    73     font-size: 1rem; 
    74     font-weight: normal; 
     71    color: #aaa; 
     72    font-size: 1em; 
     73    font-weight: bold; 
    7574    text-align: center; 
    7675} 
    77  
    7876.widget-name { 
    7977     background: #eef; 
     
    9189.widget-name a.aexpand:visited { 
    9290    border: 0 none; 
    93     color: #000000; 
     91    color: #000; 
    9492    text-decoration: none; 
    9593} 
Note: See TracChangeset for help on using the changeset viewer.

Sites map