destoon供應產品頁如何上傳顯示5張縮略圖

2018-03-01 1282瀏覽
 
Destoon默認的詳情頁只能顯示3張縮略圖,由于需求,我們需要修改成5張圖。一共需要修改6個頁面和一個phpmyadmin......

destoon默認詳情頁主圖下面只有3張縮略小圖,如圖:

默認的destoon詳情頁只有3張縮略小圖

由于需求,我們需要將3張圖增加至5張。然而就是這樣一個看似很簡單的問題,在初期我們整整折騰了3天才解決!下面來將實現此功能的詳細步驟記錄下來,以便日后備用。注意:此教程制作時是destoon v5.0版本,由于不同版本寫法略有改變,可能文章中提及的行號與看官看到的并不對稱,請仔細看圖,根據圖片中上下段代碼進行修改。

詳情頁展示的圖片都是從后臺調取出來的,如果想要在詳情頁展示5張圖片,我們必須要在數據庫中添加字段及修改后臺源碼。藝靈會告訴你:這樣一個小小的功能,你需要修改6個頁面么?坑爹的destoon!!!由于修改頁面之多以及細節繁雜,如有需要此功能的看官請仔細看好每一處修改的內容,以免出錯,建議修改前做好備份工作。

一、修改mall.class.php

先來張后臺上傳圖片那里默認的界面吧,如圖: 


下面是查找控制這里圖片的源碼頁面。路徑:根目錄/module/mall/mall.class.php,用dw等其它編碼軟件打開文件。找到第19行,在'thumb1','thumb2',后面增加'thumb3','thumb4',。如圖:


 thumb是在數據字典中的解釋是:標題圖,很明顯,默認是3張圖,我們再增加2張才能顯示5張。

由于我們新添加的字段thumb3,thumb4并不存在原數據庫中,所以我們需要在phpmyadmin中添加這兩個字段。

在瀏覽器中打開你的phpmyadmin,輸入密碼進去后找到destoon_mall表,然后在thumb2的下面新增thumb3,thumb4。如圖:

在phpmyadmin中添加兩個字段

添加完表字段后繼續來修改mall.class.php頁面。

85行左右

  1. <!--新增代碼-->
  2. if($post['thumb3']) $new .= '<img src=http://www.tukkpt.live/skin/default/image/nopic.gif'.$post['thumb3'].'http://www.tukkpt.live/skin/default/image/nopic.gif>';
  3. if($post['thumb4']) $new .= '<img src=http://www.tukkpt.live/skin/default/image/nopic.gif'.$post['thumb4'].'http://www.tukkpt.live/skin/default/image/nopic.gif>';

92行左右

  1. <!--新增代碼-->
  2. if($r['thumb3']) $old .= '<img src=http://www.tukkpt.live/skin/default/image/nopic.gif'.$r['thumb3'].'http://www.tukkpt.live/skin/default/image/nopic.gif>';
  3. if($r['thumb4']) $old .= '<img src=http://www.tukkpt.live/skin/default/image/nopic.gif'.$r['thumb4'].'http://www.tukkpt.live/skin/default/image/nopic.gif>';

如圖: 

155行左右

  1. <!--修改源碼,黃色高亮為新增-->
  2. clear_upload($post['content'].$post['thumb'].$post['thumb1'].$post['thumb2'].$post['thumb3'].$post['thumb4'], $this->itemid);

171行左右

  1. <!--修改源碼,黃色高亮為新增-->
  2. clear_upload($post['content'].$post['thumb'].$post['thumb1'].$post['thumb2'].$post['thumb3'].$post['thumb4'], $this->itemid);

如圖: 

252行左右

  1. <!--新增代碼-->
  2. if($r['thumb3']) delete_upload($r['thumb3'], $userid);
  3. if($r['thumb4']) delete_upload($r['thumb4'], $userid);

如圖: 

好了,第一個頁面已修改完畢,然而這只是一個頁面,還有5個頁面需要修改才能成功顯示5圖,是不是非常坑爹?!

二、修改edit.tpl.php

路徑:根目錄/module/mall/admin/template/edit.tpl.php,打開文件后開始修改。

87行左右

  1. <!--新增代碼-->
  2. <input type=http://www.tukkpt.live/skin/default/image/nopic.gifhiddenhttp://www.tukkpt.live/skin/default/image/nopic.gif name=http://www.tukkpt.live/skin/default/image/nopic.gifpost[thumb3]http://www.tukkpt.live/skin/default/image/nopic.gif id=http://www.tukkpt.live/skin/default/image/nopic.gifthumb3http://www.tukkpt.live/skin/default/image/nopic.gif value=http://www.tukkpt.live/skin/default/image/nopic.gif<?php echo $thumb3;?>http://www.tukkpt.live/skin/default/image/nopic.gif/>
  3. <input type=http://www.tukkpt.live/skin/default/image/nopic.gifhiddenhttp://www.tukkpt.live/skin/default/image/nopic.gif name=http://www.tukkpt.live/skin/default/image/nopic.gifpost[thumb4]http://www.tukkpt.live/skin/default/image/nopic.gif id=http://www.tukkpt.live/skin/default/image/nopic.gifthumb4http://www.tukkpt.live/skin/default/image/nopic.gif value=http://www.tukkpt.live/skin/default/image/nopic.gif<?php echo $thumb4;?>http://www.tukkpt.live/skin/default/image/nopic.gif/>

94行左右

  1. <!--新增代碼-->
  2. <td width=http://www.tukkpt.live/skin/default/image/nopic.gif120http://www.tukkpt.live/skin/default/image/nopic.gif><img src=http://www.tukkpt.live/skin/default/image/nopic.gif<?php echo $thumb3 ? $thumb3 : DT_SKIN.'image/waitpic.gif';?>http://www.tukkpt.live/skin/default/image/nopic.gif width=http://www.tukkpt.live/skin/default/image/nopic.gif100http://www.tukkpt.live/skin/default/image/nopic.gif height=http://www.tukkpt.live/skin/default/image/nopic.gif100http://www.tukkpt.live/skin/default/image/nopic.gif id=http://www.tukkpt.live/skin/default/image/nopic.gifshowthumb3http://www.tukkpt.live/skin/default/image/nopic.gif title=http://www.tukkpt.live/skin/default/image/nopic.gif預覽圖片http://www.tukkpt.live/skin/default/image/nopic.gif alt=http://www.tukkpt.live/skin/default/image/nopic.gifhttp://www.tukkpt.live/skin/default/image/nopic.gifhttp://www.tukkpt.live/skin/default/image/nopic.gifif(this.src.indexOf('waitpic.gif') == -1){_preview(Dd('showthumb3').src, 1);}else{Dalbum(3,<?php echo $moduleid;?>,<?php echo $MOD['thumb_width'];?>,<?php echo $MOD['thumb_height'];?>, Dd('thumb3').value, true);}http://www.tukkpt.live/skin/default/image/nopic.gif/></td>
  3. <td width=http://www.tukkpt.live/skin/default/image/nopic.gif120http://www.tukkpt.live/skin/default/image/nopic.gif><img src=http://www.tukkpt.live/skin/default/image/nopic.gif<?php echo $thumb4 ? $thumb4 : DT_SKIN.'image/waitpic.gif';?>http://www.tukkpt.live/skin/default/image/nopic.gif width=http://www.tukkpt.live/skin/default/image/nopic.gif100http://www.tukkpt.live/skin/default/image/nopic.gif height=http://www.tukkpt.live/skin/default/image/nopic.gif100http://www.tukkpt.live/skin/default/image/nopic.gif id=http://www.tukkpt.live/skin/default/image/nopic.gifshowthumb4http://www.tukkpt.live/skin/default/image/nopic.gif title=http://www.tukkpt.live/skin/default/image/nopic.gif預覽圖片http://www.tukkpt.live/skin/default/image/nopic.gif alt=http://www.tukkpt.live/skin/default/image/nopic.gifhttp://www.tukkpt.live/skin/default/image/nopic.gifhttp://www.tukkpt.live/skin/default/image/nopic.gifif(this.src.indexOf('waitpic.gif') == -1){_preview(Dd('showthumb4').src, 1);}else{Dalbum(4,<?php echo $moduleid;?>,<?php echo $MOD['thumb_width'];?>,<?php echo $MOD['thumb_height'];?>, Dd('thumb4').value, true);}http://www.tukkpt.live/skin/default/image/nopic.gif/></td>

101行左右

  1. <!--新增代碼-->
  2. <td><spanhttp://www.tukkpt.live/skin/default/image/nopic.gifDalbum(3,<?php echo $moduleid;?>,<?php echo $MOD['thumb_width'];?>,<?php echo $MOD['thumb_height'];?>, Dd('thumb3').value, true);http://www.tukkpt.live/skin/default/image/nopic.gif class=http://www.tukkpt.live/skin/default/image/nopic.gifjthttp://www.tukkpt.live/skin/default/image/nopic.gif><img src=http://www.tukkpt.live/skin/default/image/nopic.gif<?php echo $MODULE[2]['linkurl'];?>image/img_upload.gifhttp://www.tukkpt.live/skin/default/image/nopic.gif width=http://www.tukkpt.live/skin/default/image/nopic.gif12http://www.tukkpt.live/skin/default/image/nopic.gif height=http://www.tukkpt.live/skin/default/image/nopic.gif12http://www.tukkpt.live/skin/default/image/nopic.gif title=http://www.tukkpt.live/skin/default/image/nopic.gif上傳http://www.tukkpt.live/skin/default/image/nopic.gif/></span>  <img src=http://www.tukkpt.live/skin/default/image/nopic.gif<?php echo $MODULE[2]['linkurl'];?>image/img_select.gifhttp://www.tukkpt.live/skin/default/image/nopic.gif width=http://www.tukkpt.live/skin/default/image/nopic.gif12http://www.tukkpt.live/skin/default/image/nopic.gif height=http://www.tukkpt.live/skin/default/image/nopic.gif12http://www.tukkpt.live/skin/default/image/nopic.gif title=http://www.tukkpt.live/skin/default/image/nopic.gif選擇http://www.tukkpt.live/skin/default/image/nopic.gifhttp://www.tukkpt.live/skin/default/image/nopic.gifselAlbum(3);http://www.tukkpt.live/skin/default/image/nopic.gif/>  <spanhttp://www.tukkpt.live/skin/default/image/nopic.gifdelAlbum(3, 'wait');http://www.tukkpt.live/skin/default/image/nopic.gif class=http://www.tukkpt.live/skin/default/image/nopic.gifjthttp://www.tukkpt.live/skin/default/image/nopic.gif><img src=http://www.tukkpt.live/skin/default/image/nopic.gif<?php echo $MODULE[2]['linkurl'];?>image/img_delete.gifhttp://www.tukkpt.live/skin/default/image/nopic.gif width=http://www.tukkpt.live/skin/default/image/nopic.gif12http://www.tukkpt.live/skin/default/image/nopic.gif height=http://www.tukkpt.live/skin/default/image/nopic.gif12http://www.tukkpt.live/skin/default/image/nopic.gif title=http://www.tukkpt.live/skin/default/image/nopic.gif刪除http://www.tukkpt.live/skin/default/image/nopic.gif/></span></td>
  3. <td><spanhttp://www.tukkpt.live/skin/default/image/nopic.gifDalbum(4,<?php echo $moduleid;?>,<?php echo $MOD['thumb_width'];?>,<?php echo $MOD['thumb_height'];?>, Dd('thumb4').value, true);http://www.tukkpt.live/skin/default/image/nopic.gif class=http://www.tukkpt.live/skin/default/image/nopic.gifjthttp://www.tukkpt.live/skin/default/image/nopic.gif><img src=http://www.tukkpt.live/skin/default/image/nopic.gif<?php echo $MODULE[2]['linkurl'];?>image/img_upload.gifhttp://www.tukkpt.live/skin/default/image/nopic.gif width=http://www.tukkpt.live/skin/default/image/nopic.gif12http://www.tukkpt.live/skin/default/image/nopic.gif height=http://www.tukkpt.live/skin/default/image/nopic.gif12http://www.tukkpt.live/skin/default/image/nopic.gif title=http://www.tukkpt.live/skin/default/image/nopic.gif上傳http://www.tukkpt.live/skin/default/image/nopic.gif/></span>  <img src=http://www.tukkpt.live/skin/default/image/nopic.gif<?php echo $MODULE[2]['linkurl'];?>image/img_select.gifhttp://www.tukkpt.live/skin/default/image/nopic.gif width=http://www.tukkpt.live/skin/default/image/nopic.gif12http://www.tukkpt.live/skin/default/image/nopic.gif height=http://www.tukkpt.live/skin/default/image/nopic.gif12http://www.tukkpt.live/skin/default/image/nopic.gif title=http://www.tukkpt.live/skin/default/image/nopic.gif選擇http://www.tukkpt.live/skin/default/image/nopic.gifhttp://www.tukkpt.live/skin/default/image/nopic.gifselAlbum(4);http://www.tukkpt.live/skin/default/image/nopic.gif/>  <spanhttp://www.tukkpt.live/skin/default/image/nopic.gifdelAlbum(4, 'wait');http://www.tukkpt.live/skin/default/image/nopic.gif class=http://www.tukkpt.live/skin/default/image/nopic.gifjthttp://www.tukkpt.live/skin/default/image/nopic.gif><img src=http://www.tukkpt.live/skin/default/image/nopic.gif<?php echo $MODULE[2]['linkurl'];?>image/img_delete.gifhttp://www.tukkpt.live/skin/default/image/nopic.gif width=http://www.tukkpt.live/skin/default/image/nopic.gif12http://www.tukkpt.live/skin/default/image/nopic.gif height=http://www.tukkpt.live/skin/default/image/nopic.gif12http://www.tukkpt.live/skin/default/image/nopic.gif title=http://www.tukkpt.live/skin/default/image/nopic.gif刪除http://www.tukkpt.live/skin/default/image/nopic.gif/></span></td>

如圖:

修改edit.tpl.php頁面

三、修改module.func.php

路徑:根目錄/include/module.func.php,打開文件后開始修改。

240行左右

  1. <!--新增代碼-->
  2. if($item['thumb3'] && !preg_match(http://www.tukkpt.live/skin/default/image/nopic.gif/^[a-z0-9\-\.\:\/]{50,}$/ihttp://www.tukkpt.live/skin/default/image/nopic.gif, $item['thumb3'])) $item['thumb3'] = '';
  3. if($item['thumb4'] && !preg_match(http://www.tukkpt.live/skin/default/image/nopic.gif/^[a-z0-9\-\.\:\/]{50,}$/ihttp://www.tukkpt.live/skin/default/image/nopic.gif, $item['thumb4'])) $item['thumb4'] = '';

248行左右

  1. <!--新增代碼-->
  2. $imgs[] = $item['thumb3'] ? $item['thumb3'] : $nopic;
  3. $imgs[] = $item['thumb4'] ? $item['thumb4'] : $nopic;

255行左右

  1. <!--新增代碼-->
  2. $imgs[] = $item['thumb3'] ? str_replace('.thumb.', '.middle.', $item['thumb3']) : $nopic;
  3. $imgs[] = $item['thumb4'] ? str_replace('.thumb.', '.middle.', $item['thumb4']) : $nopic;

如圖:

修改module.func.php頁面

好了,我們再到后臺隨便添加一款商品做下測試吧。經測試,已經可以成功添加第4張,第5張圖片,并且前臺頁面可以展示,效果圖: 

前臺已經可以展示5張圖片

你以為這樣就完了嗎?當然沒有啦!因為現在改的是超級管理員的后臺,而商家后臺仍是3張圖片,不信你看。

是不是有種想拿塊板磚拍人的沖動?前面修改了十幾處才好不容易將3張圖修改成5張圖,現在又要修改商家頁面,destoon坑爹無極限啊!!!

四、修改my.inc.php

路徑:根目錄/module/mall/my.inc.php,打開文件后開始修改。

79行左右

  1. <!--修改源碼,黃色高亮為新增-->
  2. if(!$IMVIP && $MG['uploadpt']) $post['thumb1'] = $post['thumb2'] = $post['thumb3'] = $post['thumb4'] ='';

149行左右

  1. <!--修改源碼,黃色高亮為新增-->
  2. $thumb = $thumb1 = $thumb2 = $thumb3 = $thumb4 = '';

189行左右

  1. <!--新增代碼-->
  2. $post['thumb3'] = $item['thumb3'];
  3. $post['thumb4'] = $item['thumb4'];

如圖:

修改my.inc.php頁面

五、修改my_mall.htm

路徑:根目錄/template/文件夾/member/my_mall.htm,打開文件后開始修改。

89行左右

  1. <!--新增代碼-->
  2. <input type=http://www.tukkpt.live/skin/default/image/nopic.gifhiddenhttp://www.tukkpt.live/skin/default/image/nopic.gif name=http://www.tukkpt.live/skin/default/image/nopic.gifpost[thumb3]http://www.tukkpt.live/skin/default/image/nopic.gif id=http://www.tukkpt.live/skin/default/image/nopic.gifthumb3http://www.tukkpt.live/skin/default/image/nopic.gif value=http://www.tukkpt.live/skin/default/image/nopic.gif{$thumb3}http://www.tukkpt.live/skin/default/image/nopic.gif/>
  3. <input type=http://www.tukkpt.live/skin/default/image/nopic.gifhiddenhttp://www.tukkpt.live/skin/default/image/nopic.gif name=http://www.tukkpt.live/skin/default/image/nopic.gifpost[thumb4]http://www.tukkpt.live/skin/default/image/nopic.gif id=http://www.tukkpt.live/skin/default/image/nopic.gifthumb4http://www.tukkpt.live/skin/default/image/nopic.gif value=http://www.tukkpt.live/skin/default/image/nopic.gif{$thumb4}http://www.tukkpt.live/skin/default/image/nopic.gif/>

99行左右

  1. <!--新增代碼-->
  2. <td width=http://www.tukkpt.live/skin/default/image/nopic.gif120http://www.tukkpt.live/skin/default/image/nopic.gif><img src=http://www.tukkpt.live/skin/default/image/nopic.gif{if $thumb3}{$thumb3}{else}{DT_SKIN}image/waitpic.gif{/if}http://www.tukkpt.live/skin/default/image/nopic.gif width=http://www.tukkpt.live/skin/default/image/nopic.gif100http://www.tukkpt.live/skin/default/image/nopic.gif height=http://www.tukkpt.live/skin/default/image/nopic.gif100http://www.tukkpt.live/skin/default/image/nopic.gif id=http://www.tukkpt.live/skin/default/image/nopic.gifshowthumb3http://www.tukkpt.live/skin/default/image/nopic.gif title=http://www.tukkpt.live/skin/default/image/nopic.gif預覽圖片http://www.tukkpt.live/skin/default/image/nopic.gif alt=http://www.tukkpt.live/skin/default/image/nopic.gifhttp://www.tukkpt.live/skin/default/image/nopic.gifhttp://www.tukkpt.live/skin/default/image/nopic.gifif(this.src.indexOf('waitpic.gif') == -1){_preview(Dd('showthumb3').src, 1);}else{Dalbum(3,{$moduleid},{$MOD[thumb_width]},{$MOD[thumb_height]}, Dd('thumb3').value, true);}http://www.tukkpt.live/skin/default/image/nopic.gif/></td>
  3. <td width=http://www.tukkpt.live/skin/default/image/nopic.gif120http://www.tukkpt.live/skin/default/image/nopic.gif><img src=http://www.tukkpt.live/skin/default/image/nopic.gif{if $thumb4}{$thumb4}{else}{DT_SKIN}image/waitpic.gif{/if}http://www.tukkpt.live/skin/default/image/nopic.gif width=http://www.tukkpt.live/skin/default/image/nopic.gif100http://www.tukkpt.live/skin/default/image/nopic.gif height=http://www.tukkpt.live/skin/default/image/nopic.gif100http://www.tukkpt.live/skin/default/image/nopic.gif id=http://www.tukkpt.live/skin/default/image/nopic.gifshowthumb4http://www.tukkpt.live/skin/default/image/nopic.gif title=http://www.tukkpt.live/skin/default/image/nopic.gif預覽圖片http://www.tukkpt.live/skin/default/image/nopic.gif alt=http://www.tukkpt.live/skin/default/image/nopic.gifhttp://www.tukkpt.live/skin/default/image/nopic.gifhttp://www.tukkpt.live/skin/default/image/nopic.gifif(this.src.indexOf('waitpic.gif') == -1){_preview(Dd('showthumb4').src, 1);}else{Dalbum(4,{$moduleid},{$MOD[thumb_width]},{$MOD[thumb_height]}, Dd('thumb4').value, true);}http://www.tukkpt.live/skin/default/image/nopic.gif/></td>

111行左右

  1. <!--新增代碼-->
  2. <td><img src=http://www.tukkpt.live/skin/default/image/nopic.gif{DT_STATIC}{$MODULE[2][moduledir]}/image/img_upload.gifhttp://www.tukkpt.live/skin/default/image/nopic.gif width=http://www.tukkpt.live/skin/default/image/nopic.gif12http://www.tukkpt.live/skin/default/image/nopic.gif height=http://www.tukkpt.live/skin/default/image/nopic.gif12http://www.tukkpt.live/skin/default/image/nopic.gif title=http://www.tukkpt.live/skin/default/image/nopic.gif上傳http://www.tukkpt.live/skin/default/image/nopic.gifhttp://www.tukkpt.live/skin/default/image/nopic.gifDalbum(3,{$moduleid},{$MOD[thumb_width]},{$MOD[thumb_height]}, Dd('thumb3').value, true);http://www.tukkpt.live/skin/default/image/nopic.gif/>  <img src=http://www.tukkpt.live/skin/default/image/nopic.gif{DT_STATIC}{$MODULE[2][moduledir]}/image/img_select.gifhttp://www.tukkpt.live/skin/default/image/nopic.gif width=http://www.tukkpt.live/skin/default/image/nopic.gif12http://www.tukkpt.live/skin/default/image/nopic.gif height=http://www.tukkpt.live/skin/default/image/nopic.gif12http://www.tukkpt.live/skin/default/image/nopic.gif title=http://www.tukkpt.live/skin/default/image/nopic.gif選擇http://www.tukkpt.live/skin/default/image/nopic.gifhttp://www.tukkpt.live/skin/default/image/nopic.gifselAlbum(3);http://www.tukkpt.live/skin/default/image/nopic.gif/>  <img src=http://www.tukkpt.live/skin/default/image/nopic.gif{DT_STATIC}{$MODULE[2][moduledir]}/image/img_delete.gifhttp://www.tukkpt.live/skin/default/image/nopic.gif width=http://www.tukkpt.live/skin/default/image/nopic.gif12http://www.tukkpt.live/skin/default/image/nopic.gif height=http://www.tukkpt.live/skin/default/image/nopic.gif12http://www.tukkpt.live/skin/default/image/nopic.gif title=http://www.tukkpt.live/skin/default/image/nopic.gif刪除http://www.tukkpt.live/skin/default/image/nopic.gifhttp://www.tukkpt.live/skin/default/image/nopic.gifdelAlbum(3,'wait');http://www.tukkpt.live/skin/default/image/nopic.gif/></td>
  3. <td><img src=http://www.tukkpt.live/skin/default/image/nopic.gif{DT_STATIC}{$MODULE[2][moduledir]}/image/img_upload.gifhttp://www.tukkpt.live/skin/default/image/nopic.gif width=http://www.tukkpt.live/skin/default/image/nopic.gif12http://www.tukkpt.live/skin/default/image/nopic.gif height=http://www.tukkpt.live/skin/default/image/nopic.gif12http://www.tukkpt.live/skin/default/image/nopic.gif title=http://www.tukkpt.live/skin/default/image/nopic.gif上傳http://www.tukkpt.live/skin/default/image/nopic.gifhttp://www.tukkpt.live/skin/default/image/nopic.gifDalbum(4,{$moduleid},{$MOD[thumb_width]},{$MOD[thumb_height]}, Dd('thumb4').value, true);http://www.tukkpt.live/skin/default/image/nopic.gif/>  <img src=http://www.tukkpt.live/skin/default/image/nopic.gif{DT_STATIC}{$MODULE[2][moduledir]}/image/img_select.gifhttp://www.tukkpt.live/skin/default/image/nopic.gif width=http://www.tukkpt.live/skin/default/image/nopic.gif12http://www.tukkpt.live/skin/default/image/nopic.gif height=http://www.tukkpt.live/skin/default/image/nopic.gif12http://www.tukkpt.live/skin/default/image/nopic.gif title=http://www.tukkpt.live/skin/default/image/nopic.gif選擇http://www.tukkpt.live/skin/default/image/nopic.gifhttp://www.tukkpt.live/skin/default/image/nopic.gifselAlbum(4);http://www.tukkpt.live/skin/default/image/nopic.gif/>  <img src=http://www.tukkpt.live/skin/default/image/nopic.gif{DT_STATIC}{$MODULE[2][moduledir]}/image/img_delete.gifhttp://www.tukkpt.live/skin/default/image/nopic.gif width=http://www.tukkpt.live/skin/default/image/nopic.gif12http://www.tukkpt.live/skin/default/image/nopic.gif height=http://www.tukkpt.live/skin/default/image/nopic.gif12http://www.tukkpt.live/skin/default/image/nopic.gif title=http://www.tukkpt.live/skin/default/image/nopic.gif刪除http://www.tukkpt.live/skin/default/image/nopic.gifhttp://www.tukkpt.live/skin/default/image/nopic.gifdelAlbum(4,'wait');http://www.tukkpt.live/skin/default/image/nopic.gif/></td>

如圖: 

六、修改post.func.php

路徑:根目錄/include/post.func.php,打開文件后開始修改。

777行左右

  1. <!--新增代碼-->
  2. if(isset($post['thumb3']) && !is_url($post['thumb3'])) $post['thumb3'] = '';
  3. if(isset($post['thumb4']) && !is_url($post['thumb4'])) $post['thumb4'] = '';

如圖: 

好了,終于修改完了,商家后臺也可以上傳5張圖片了,如圖: 

小結

雖然修改的頁面很多,但基本上都是添加那兩個thumb3,thumb4這兩個字段代碼。如有疑問,可在下方評論區中留言。

----------完----------


竞彩足球比分直播