Ignore:
Timestamp:
Aug 17, 2010, 1:42:35 AM (14 years ago)
Author:
Gotcha
Message:

bug:1800
bug:1801
Typo & CSS

File:
1 edited

Legend:

Unmodified
Added
Removed
  • extensions/piwishack/include/class.inc.php

    r5495 r6771  
    277277                  str_replace('./', '', get_image_url($row)).'\" /></a>';
    278278                $S .= '\n\n';
     279      }
     280
     281      unset_make_full_url();
     282    }
     283
     284    return $S;
     285  }
     286 
     287  function get_view_post_on_a_forum()
     288  {
     289    global $page, $lang_info;
     290
     291    $list = array();
     292 
     293    $S = '';
     294
     295    switch (script_basename())
     296    {
     297      case 'index':
     298      {
     299        global $pictures;
     300
     301        if (isset($pictures))
     302        {
     303          $list = $pictures;
     304        }
     305        break;
     306      }
     307      case 'picture':
     308      {
     309        global $picture;
     310
     311        if (isset($picture['current']))
     312        {
     313          $list[] = $picture['current'];
     314        }
     315        break;
     316      }
     317    }
     318
     319    if (empty($list) and !empty($page['items']))
     320    {
     321      $query = '
     322          SELECT *
     323      FROM '.IMAGES_TABLE.'
     324      WHERE id IN ('.implode(',', $page['items']).')
     325          ;';
     326
     327      $result = pwg_query($query);
     328
     329      while ($row = mysql_fetch_assoc($result))
     330      {
     331        $row['rank'] = $page['rank_of'][ $row['id'] ];
     332        array_push($list, $row);
     333      }
     334
     335      usort($list, 'rank_compare');
     336  }
     337      if (!empty($list))
     338    {
     339          include_once(PHPWG_ROOT_PATH.'/include/functions_picture.inc.php');
     340      set_make_full_url();
     341
     342      foreach ($list as $row)
     343      {
     344           /*
     345           Affichage de la vue normale sur des forums.
     346           EXEMPLE
     347           [url={$ROOT_WAY}{$current.U_IMG}][img]{$ROOT_WAY}{$SRC_IMG|@replace:'./':''}[/img][/url]
     348           */
     349            $S .= '[url='.
     350          duplicate_picture_url(
     351            array(
     352              'image_id' => $row['id'],
     353              'image_file' => $row['file'],
     354              )).'][img]'.
     355                  str_replace('/./', '/', get_image_url($row)).'[/img][/url]';
     356            $S .= '\n\n';
    279357      }
    280358
     
    571649      $js = '
    572650  <script type="text/javascript">
    573     var theController = window.open("", "'.$this->plugin_name.'_controller", "alwaysRaised=yes,dependent=yes,toolbar=no,height=843,width=1220,menubar=no,resizable=yes,scrollbars=yes,status=no");';
     651    var theController = window.open("", "'.$this->plugin_name.'_controller", "alwaysRaised=yes,dependent=yes,toolbar=no,height=807,width=1220,menubar=no,resizable=yes,scrollbars=yes,status=no");';
    574652
    575653    if ($this->to_close)
     
    592670    theController.document.getElementsByName("thumb_Post_on_a_forum")[0].value = "'.$this->get_thumb_post_on_a_forum().'";
    593671        theController.document.getElementsByName("view_Post_on_a_website")[0].value = "'.$this->get_view_post_on_a_website().'";
     672        theController.document.getElementsByName("view_Post_on_a_forum")[0].value = "'.$this->get_view_post_on_a_forum().'";
    594673        theController.document.getElementsByName("view_Direct_link")[0].value = "'.$this->get_view_direct_link().'";
    595674    theController.document.getElementsByName("p_Perso_writer_01")[0].value = "'.$this->get_p_perso_writer_01().'";
Note: See TracChangeset for help on using the changeset viewer.