Changeset 1604


Ignore:
Timestamp:
Nov 10, 2006, 2:10:42 AM (17 years ago)
Author:
rvelices
Message:
 
Location:
trunk
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/admin/include/functions_plugins.inc.php

    r1590 r1604  
    4242          )
    4343      {
    44         $plugin = array('name'=>'?', 'version'=>'0', 'uri'=>'', 'description'=>'');
     44        $plugin = array('name'=>$file, 'version'=>'0', 'uri'=>'', 'description'=>'');
    4545        $plg_data = implode( '', file($path.'/main.inc.php') );
    4646
  • trunk/admin/rating.php

    r1548 r1604  
    213213$images = array();
    214214$result = pwg_query($query);
    215 while ($row = mysql_fetch_array($result))
     215while ($row = mysql_fetch_assoc($result))
    216216{
    217217  array_push($images, $row);
     
    220220foreach ($images as $image)
    221221{
    222   $thumbnail_src = get_thumbnail_src($image['path'], $image['tn_ext']);
    223 
    224   /*$image_url = make_picture_url(
    225       array(
    226         'category' => $image['storage_category_id'],
    227         'image_id' => $image['id'],
    228         'image_file' => $image['file'],
    229       )
    230     );*/
     222  $thumbnail_src = get_thumbnail_url($image);
     223
    231224  $image_url = PHPWG_ROOT_PATH.'admin.php?page=picture_modify'.
    232225            '&image_id='.$image['id'];
  • trunk/feed.php

    r1550 r1604  
    127127include_once(PHPWG_ROOT_PATH.'include/feedcreator.class.php');
    128128
    129 $base_url = 'http://'.$_SERVER["HTTP_HOST"].cookie_path();
     129$base_url = get_host_url().cookie_path();
    130130if ( strrpos($base_url, '/') !== strlen($base_url)-1 )
    131131{
     
    190190$result = pwg_query($query);
    191191$dates = array();
    192 while ($row = mysql_fetch_array($result))
     192while ($row = mysql_fetch_assoc($result))
    193193{
    194194  array_push($dates, $row);
     
    233233;';
    234234  $result = pwg_query($query);
    235   while ($row = mysql_fetch_array($result))
     235  while ($row = mysql_fetch_assoc($result))
    236236  {
    237     $tn_src = get_thumbnail_src($row['path'], @$row['tn_ext']);
     237    $tn_src = get_thumbnail_url($row);
    238238    $item->description .= '<img src="'.$tn_src.'"/>';
    239239  }
  • trunk/include/functions_plugins.inc.php

    r1590 r1604  
    5555      if ( $handler['function'] == $func )
    5656      {
    57         return true;
     57        return false;
    5858      }
    5959    }
     
    231231
    232232
     233function load_plugin($plugin)
     234{
     235  $file_name = PHPWG_PLUGINS_PATH.$plugin['id'].'/main.inc.php';
     236  if ( file_exists($file_name) )
     237  {
     238    include_once( $file_name );
     239  }
     240}
     241
    233242/*loads all the plugins on startup*/
    234243function load_plugins()
     
    242251  $plugins = get_db_plugins('active');
    243252  foreach( $plugins as $plugin)
    244   {
    245     $file_name = PHPWG_PLUGINS_PATH.$plugin['id'].'/main.inc.php';
    246     if ( file_exists($file_name) )
    247     {
    248       include_once( $file_name );
    249     }
     253  {// include main from a function to avoid using same function context
     254    load_plugin($plugin);
    250255  }
    251256  trigger_action('plugins_loaded');
  • trunk/include/section_init.inc.php

    r1597 r1604  
    653653  }
    654654}
     655
     656trigger_action('loc_end_section_init');
    655657?>
  • trunk/index.php

    r1537 r1604  
    3030include_once( PHPWG_ROOT_PATH.'include/common.inc.php' );
    3131include(PHPWG_ROOT_PATH.'include/section_init.inc.php');
     32
     33trigger_action('loc_begin_index');
    3234
    3335// +-----------------------------------------------------------------------+
     
    240242}
    241243//------------------------------------------------------- category informations
    242 if (
    243   $page['navigation_bar'] != ''
    244   or (isset($page['comment']) and $page['comment'] != '')
    245   )
    246 {
    247   $template->assign_block_vars('cat_infos',array());
    248 }
     244
    249245// navigation bar
    250246if ($page['navigation_bar'] != '')
     
    287283}
    288284
    289 if (isset($page['category']))
    290 {
    291   // category comment
    292   if (isset($page['comment']) and $page['comment'] != '')
    293   {
    294     $template->assign_block_vars(
    295       'cat_infos.comment',
    296       array(
    297         'COMMENTS' => $page['comment']
    298         )
    299       );
    300   }
     285// category comment
     286if (isset($page['comment']) and $page['comment'] != '')
     287{
     288  $template->assign_block_vars(
     289    'cat_infos.comment',
     290    array(
     291      'COMMENTS' => $page['comment']
     292      )
     293    );
    301294}
    302295//------------------------------------------------------------ log informations
    303296pwg_log('category', $page['title']);
    304297
     298trigger_action('loc_end_index');
    305299$template->parse('index');
    306300include(PHPWG_ROOT_PATH.'include/page_tail.php');
Note: See TracChangeset for help on using the changeset viewer.