Dotclear

Changeset 776:4ce635c0ca26 for plugins


Ignore:
Timestamp:
12/02/11 08:50:18 (14 years ago)
Author:
Dsls <dsls@…>
Branch:
default
Message:

Last updates to getURLFor : removed blog url from function

Location:
plugins
Files:
9 edited

Legend:

Unmodified
Added
Removed
  • plugins/antispam/index.php

    r773 r776  
    211211     if (DC_ADMIN_URL) 
    212212     { 
    213           $ham_feed = $core->url->getURLFor('hamfeed',$code = dcAntispam::getUserCode($core)); 
    214           $spam_feed = $core->url->getBase('spamfeed',$code = dcAntispam::getUserCode($core)); 
     213          $ham_feed = $core->blog->url.$core->url->getURLFor( 
     214               'hamfeed', 
     215               $code = dcAntispam::getUserCode($core) 
     216          ); 
     217          $spam_feed = $core->blog->url.$core->url->getURLFor( 
     218               'spamfeed', 
     219               $code = dcAntispam::getUserCode($core) 
     220          ); 
    215221 
    216222          echo 
  • plugins/blogroll/_public.php

    r773 r776  
    5454     { 
    5555          $f = $GLOBALS['core']->tpl->getFilters($attr); 
    56           return '<?php echo '.sprintf($f,'$core->url->getURLFor("xbel")').'; ?>'; 
     56          return '<?php echo '.sprintf($f,'$core->blog->url.$core->url->getURLFor("xbel")').'; ?>'; 
    5757     } 
    5858      
  • plugins/pages/_prepend.php

    r270 r776  
    1515$core->url->register('pagespreview','pagespreview','^pagespreview/(.+)$',array('urlPages','pagespreview')); 
    1616 
    17 $core->setPostType('page','plugin.php?p=pages&act=page&id=%d',$core->url->getBase('pages').'/%s'); 
     17$core->setPostType('page','plugin.php?p=pages&act=page&id=%d',$core->url->getURLFor('pages','%s')); 
    1818 
    1919# We should put this as settings later 
  • plugins/pages/page.php

    r773 r776  
    391391 
    392392     if ($post_id) { 
    393           $preview_url = 
     393          $preview_url = $core->blog->url. 
    394394          $core->url->getURLFor('pagespreview', 
    395395          $core->auth->userID().'/'. 
  • plugins/simpleMenu/_install.php

    r683 r776  
    2121$menu_default = array( 
    2222     array('label' => 'Home', 'descr' => 'Recent posts', 'url' => $blog_url), 
    23      array('label' => 'Archives', 'descr' => '', 'url' => $blog_url.$core->url->getBase('archive')) 
     23     array('label' => 'Archives', 'descr' => '', 'url' => $blog_url.$core->url->getURLFor('archive')) 
    2424); 
    2525$core->blog->settings->system->put('simpleMenu',serialize($menu_default),'string','simpleMenu default menu',false,true); 
  • plugins/simpleMenu/index.php

    r751 r776  
    168168                         $item_label = $item_select_label; 
    169169                         $item_descr = sprintf(__('Switch to %s language'),$item_select_label); 
    170                          $item_url .= $core->url->getBase('lang').$item_select; 
     170                         $item_url .= $core->url->getURLFor('lang',$item_select); 
    171171                         break; 
    172172                    case 'category': 
     
    174174                         $item_label = $item_select_label; 
    175175                         $item_descr = __('Recent Posts from this category'); 
    176                          $item_url .= $core->url->getBase('category').'/'.$item_select; 
     176                         $item_url .= $core->url->getURLFor('category',$item_select); 
    177177                         break; 
    178178                    case 'archive': 
     
    181181                              $item_label = __('Archives'); 
    182182                              $item_descr = $first_year.($first_year != $last_year ? ' - '.$last_year : ''); 
    183                               $item_url .= $core->url->getBase('archive'); 
     183                              $item_url .= $core->url->getURLFor('archive'); 
    184184                         } else { 
    185185                              $item_label = $item_select_label; 
    186186                              $item_descr = sprintf(__('Posts from %s'),$item_select_label); 
    187                               $item_url .= $core->url->getBase('archive').'/'.substr($item_select,0,4).'/'.substr($item_select,-2); 
     187                              $item_url .= $core->url->getURLFor('archive',substr($item_select,0,4).'/'.substr($item_select,-2)); 
    188188                         } 
    189189                         break; 
     
    199199                              $item_label = __('All tags'); 
    200200                              $item_descr = ''; 
    201                               $item_url .= $core->url->getBase('tags'); 
     201                              $item_url .= $core->url->getURLFor('tags'); 
    202202                         } else { 
    203203                              $item_label = $item_select_label; 
    204204                              $item_descr = sprintf(__('Recent posts for %s tag'),$item_select_label); 
    205                               $item_url .= $core->url->getBase('tag').'/'.$item_select; 
     205                              $item_url .= $core->url->getURLFor('tag',$item_select); 
    206206                         } 
    207207                         break; 
  • plugins/tags/_admin.php

    r773 r776  
    6363           
    6464           
    65           $tag_url = html::stripHostURL($GLOBALS['core']->blog->url.$GLOBALS['core']->url->getBase('tag')); 
     65          $tag_url = html::stripHostURL($GLOBALS['core']->blog->url.$GLOBALS['core']->url->getURLFor('tag')); 
    6666          $res['url'] = $tag_url.'/'.rawurlencode(dcMeta::sanitizeMetaID($url)); 
    6767          $res['content'] = $content; 
     
    102102     public static function postHeaders() 
    103103     { 
    104           $tag_url = $GLOBALS['core']->url->getURLFor('tag'); 
    105            
    106           $opts = $GLOBALS['core']->auth->getOptions(); 
     104          $tag_url = $GLOBALS['core']->blog->url.$GLOBALS['core']->url->getURLFor('tag'); 
     105           
     106          $opts = $GLOBALS['core']->blog->url.$GLOBALS['core']->auth->getOptions(); 
    107107          $type = isset($opts['tag_list_format']) ? $opts['tag_list_format'] : 'more'; 
    108108           
     
    131131     public static function postsActionsHeaders() 
    132132     { 
    133           $tag_url = $GLOBALS['core']->url->getURLFor('tag'); 
     133          $tag_url = $GLOBALS['core']->blog->url.$GLOBALS['core']->url->getURLFor('tag'); 
    134134           
    135135          $opts = $GLOBALS['core']->auth->getOptions(); 
  • plugins/tags/_public.php

    r773 r776  
    186186     { 
    187187          $f = $GLOBALS['core']->tpl->getFilters($attr); 
    188           return '<?php echo '.sprintf($f,'$core->url->getURLFor("tag",'. 
     188          return '<?php echo '.sprintf($f,'$core->blog->url.$core->url->getURLFor("tag",'. 
    189189          'rawurlencode($_ctx->meta->meta_id))').'; ?>'; 
    190190     } 
     
    193193     { 
    194194          $f = $GLOBALS['core']->tpl->getFilters($attr); 
    195           return '<?php echo '.sprintf($f,'$$core->url->getURLFor("tags")').'; ?>'; 
     195          return '<?php echo '.sprintf($f,'$core->blog->url.$core->url->getURLFor("tags")').'; ?>'; 
    196196     } 
    197197      
     
    205205           
    206206          $f = $GLOBALS['core']->tpl->getFilters($attr); 
    207           return '<?php echo '.sprintf($f,'$core->url->getURLFor("tag_feed",'. 
     207          return '<?php echo '.sprintf($f,'$core->blog->url.$core->url->getURLFor("tag_feed",'. 
    208208          'rawurlencode($_ctx->meta->meta_id)."/'.$type.'")').'; ?>'; 
    209209     } 
     
    247247          { 
    248248               $res .= 
    249                '<li><a href="'.$core->url->getURLFor('tag',rawurlencode($rs->meta_id)).'" '. 
     249               '<li><a href="'.$core->blog->url.$core->url->getURLFor('tag',rawurlencode($rs->meta_id)).'" '. 
    250250               'class="tag'.$rs->roundpercent.'" rel="tag">'. 
    251251               $rs->meta_id.'</a> </li>'; 
     
    257257          { 
    258258               $res .= 
    259                '<p><strong><a href="'.$core->url->getURLFor("tags").'">'. 
     259               '<p><strong><a href="'.$core->blog->url.$core->url->getURLFor("tags").'">'. 
    260260               html::escapeHTML($w->alltagslinktitle).'</a></strong></p>'; 
    261261          } 
  • plugins/widgets/_widgets_functions.php

    r741 r776  
    5050          $res .= 
    5151          '<li class="topnav-arch">'. 
    52           '<a href="'.$core->blog->url.$core->url->getBase("archive").'">'. 
     52          '<a href="'.$core->blog->url.$core->url->getURLFor("archive").'">'. 
    5353          __('Archives').'</a></li>'. 
    5454          '</ul>'. 
     
    9191                
    9292               $res .= 
    93                '<a href="'.$core->blog->url.$core->url->getBase('category').'/'. 
    94                $rs->cat_url.'">'. 
     93               '<a href="'.$core->blog->url.$core->url->getURLFor('category', $rs->cat_url).'">'. 
    9594               html::escapeHTML($rs->cat_title).'</a>'. 
    9695               ($w->postcount ? ' <span>('.$rs->nb_post.')</span>' : ''); 
     
    171170               ' <li>'. 
    172171               sprintf($l, 
    173                     '<a href="'.$core->blog->url.$core->url->getBase('lang').$rs->post_lang.'" '. 
     172                    '<a href="'.$core->url->getURLFor('lang',$rs->post_lang).'" '. 
    174173                    'class="lang-'.$rs->post_lang.'">'. 
    175174                    $lang_name.'</a>'). 
     
    203202          $res .= 
    204203          '<li><a type="'.$mime.'" '. 
    205           'href="'.$core->blog->url.$core->url->getBase('feed').'/'.$type.'" '. 
     204          'href="'.$core->blog->url.$core->url->getURLFor('feed', $type).'" '. 
    206205          'title="'.sprintf($p_title,($type == 'atom' ? 'Atom' : 'RSS')).'" class="feed">'. 
    207206          __('Entries feed').'</a></li>'; 
     
    211210               $res .= 
    212211               '<li><a type="'.$mime.'" '. 
    213                'href="'.$core->blog->url.$core->url->getBase('feed').'/'.$type.'/comments" '. 
     212               'href="'.$core->blog->url.$core->url->getURLFor('feed',$type.'/comments').'" '. 
    214213               'title="'.sprintf($c_title,($type == 'atom' ? 'Atom' : 'RSS')).'" class="feed">'. 
    215214               __('Comments feed').'</a></li>'; 
Note: See TracChangeset for help on using the changeset viewer.

Sites map