묻고답하기

오픈소스 프로그램을 수정해서 쓰고 있었는데요, (수정은 제가 안했고요..,)
수정전 소스가 이거고요.....

foreach ($results as $result) {
    if ($result['image'] && file_exists(DIR_IMAGE . $result['image'])) {
     $this->data['product_images'][] = array(
      '+ 'preview' => $this->model_tool_image->resize($result['image'], 100, 100),
      'file'    => $result['image']
     );
    } else {
     $this->data['product_images'][] = array(
      'preview' => $this->model_tool_image->resize('no_image.jpg', 100, 100),
      'file'    => $result['image']
     );
    }
   }
  }

수정해서 쓰던 소스는 이거에요...(빨간부분이 추가됨)

  foreach ($results as $result) {
   
    if ($result['image'] && file_exists(DIR_IMAGE . $result['image'])) {
     $this->data['product_images'][] = array(
      '+ 'preview' => $this->model_tool_image->resize($result['image'], 100, 100),
      'file'    => $result['image'],       'product_color_id'    => $result['product_color_id']     

     );
    } else {
     $this->data['product_images'][] = array(
      'preview' => $this->model_tool_image->resize('no_image.jpg', 100, 100),
      'file'    => $result['image'],       'product_color_id'    => $result['product_color_id'] 
     );     }    }   }   $this->data['product_colors'] = array();   if (isset($product_info)) {    $results = $this->model_catalog_product->getProductColors($this->request->get['product_id']);      foreach ($results as $result) {         if ($result['color'] && file_exists(DIR_IMAGE . $result['color'])) {      $this->data['product_colors'][] = array(       'preview' => $this->model_tool_image->resize($result['color'], 30, 30),       'file'    => $result['color'],       'product_color_id'    => $result['product_color_id'],       'name'    => $result['name']      );     } else {      $this->data['product_colors'][] = array(       'preview' => $this->model_tool_image->resize('no_image.jpg', 30, 30),       'file'    => $result['color'],       'product_color_id'    => 0,       'name'    => ''           );
    }
   }
  }
  $this->data['product_sizes'] = array();   if (isset($product_info)) {    $results = $this->model_catalog_product->getProductSizes($this->request->get['product_id']);      foreach ($results as $result) {      $this->data['product_sizes'][] = $result['size'];    }

  }

그리고 저 오픈소스 플그램이 업데이트가 되어서요.. 저는 php를 잘 모르고 해서
문서를 서로 대조해서, 추가된 위치와 부분을 찾아 필요한데로 추가해서 쓰려고 했는데,
코딩 형식이 조금 바뀌엇더라구요....ㅜㅜ 업데이트 된 소스 는 ::

foreach ($results as $result) {
   $action = array();
   
   $action[] = array(
    'text' => $this->language->get('text_edit'),
    '+ 'href' => $this->url->link('catalog/product/update', 'token=' . $this->session->data['token'] . '&product_id=' . $result['product_id'] . $url, 'SSL')
   );
   
   if ($result['image'] && file_exists(DIR_IMAGE . $result['image'])) {
    $image = $this->model_tool_image->resize($result['image'], 40, 40);
   } else {
    $image = $this->model_tool_image->resize('no_image.jpg', 40, 40);
   }
 
   $product_specials = $this->model_catalog_product->getProductSpecials($result['product_id']);

   if ($product_specials) {
                $special = reset($product_specials);
                if(($special['date_start'] != '0000-00-00' && $special['date_start'] > date('Y-m-d')) || ($special['date_end'] != '0000-00-00' && $special['date_end'] < date('Y-m-d'))) {
                    $special = FALSE;
                }
            } else {
                $special = FALSE;
            }
 
        $this->data['products'][] = array(
    'product_id'       => $result['product_id'],
    'name'             => $result['name'],
    'model'            => $result['model'],
    'price'            => $result['price'],
    'special'          => $special['price'],
    'image'            => $image,    'quantity'         => $result['quantity'],
    'status'+ '           => ($result['status'] ? $this->language->get('text_enabled') : $this->language->get('text_disabled')),
    'selected'         => isset($this->request->post['selected']) && in_array($result['product_id'], $this->request->post['selected']),
    'action'           => $action


보니까 업데이트 버젼 코딩엔 키값(?) 주고 하는 부분의 형식이 바뀌고 한것 같은데..
'file'도 없고요... 두번째 소스에 빨간 부분의 내용을 이 업데이트된 부분에 추가해서 쓰고싶은데..
자비를좀 배풀어 주세요..!! ㅜㅜ

글쓴이 제목 최종 글
XE 공지 글 쓰기,삭제 운영방식 변경 공지 [16] 2019.03.05 by 남기남
쭈영 최근문서출력 작성자 넣기(재질문)-송동우님 한번만 봐주세요 ㅠㅠ [4] 2011.06.08 by 송동우
피크루스 ssl 지정시 로그인이 안돼는 이유가 뭐죠??  
은妃 짧은 PHP 수정좀 도와주세요!><  
powerima™ 게시판에 상단 내용추가와 하단내용추가를 적용했어요 [1] 2011.06.08 by powerima™
2년후 제로보드 rss 에 이미지 경로 표시하는 방법좀 알려주세요  
freemanworld 첨부파일에 대한 질문입니다. 도와 주세요.. [1] 2011.06.08 by ksdwm72
dasoni09 xe1.4.5.7설치 문제입니다. [1] 2011.06.08 by ksdwm72
순수의시절 인기게시물 위젯좀 찾아주세요~~~ [3] 2011.06.08 by 순수의시절
나의해 [나의해] 앙띠2님 감사합니다 [1] 2011.06.08 by 앙띠2
김홍기425 도메인 연결 과 기본 url의 문제~ [1] 2011.06.08 by 송동우
김희수121 외부페이지에 위젯추가하는 방법 좀 부탁드립니다. [1] 2011.06.08 by 송동우
금정이1 게시판 생성 [4] 2011.06.08 by 금정이1
엔드라이프 첨부파일 128메가 오류 질문 HTTP 500 [2] 2011.06.08 by Happiness
은빛하늘264 게시판 권한설정이 안되는데, 답변부탁드립니다. [1] 2011.06.08 by 송동우
김희수121 외부페이지관련 답변주셨던 송동우님 도움 많이 됐습니다. 꾸벅*^* [1] 2011.06.08
rigel XE에서 스크롤바가 멋대로 움직입니다.  
김희수121 게시물 파일첨부시 오류와 외부페이지에서 플래시 실종.. [1] 2011.06.08 by 송동우
한재민311 스팸회원가입을 어떻게 차단하나요? [1] 2011.06.08 by 송동우
오대영582 최근게시물 클릭시 gallery view로 나오게 할려면 [1] 2011.06.08 by 송동우
DigitalOpera 숫자범위 검색이 가능하게 할 수 있는 방법이 있나요?  
khrireg 소스 수정 문의 ㅡㅜ 도와주세요 file  
육성규 익스플로어버젼에 따른... [1] 2011.06.08 by 송동우
rigel 이것저것 설치하고 지우고 다시 깔다보니 댓글 기능을 사용할수 없게 되었습니다 [1] 2011.06.08 by 송동우
임우성981 6일후 이용권한 획득  
나의해 [나의해질문] ↓ 아랫글 파일첨부 및 레이아웃 링크 걸었습니다 ^^ (냉무)  
나의해 [나의해질문] 레이아웃에 이미지를 삽입 및 링크 [2] file 2011.06.08 by 앙띠2
이동일636 윈도우 서버에서 트래픽 제한 또는 대역폭 제한이 있나요??  
별이예요 혹시 이런 애드온 있나요??  
ex-team EX보드의 new표시 기간 설정 문의합니다~ [3] 2011.06.08 by 송동우
디테일크로키 게시판 형식을 아래와 같이 할려면 어떻게 해야 하나요? [1] 2011.06.08 by 송동우