Website each section has a different banner big picture, can be added for the convenience of the customer directly in the background section of the column and replace this picture, we need to dedecms secondary development, increase the column image upload option.
Pursuing a dream columns add banner big picture upload options
1. give database tables add a field dede_arctype
Background - System - System Settings - SQL command line tool
ALTER TABLE `dede_arctype` ADD `typebigpic` CHAR( 255 ) NOT NULL DEFAULT '';
2. Open \ dede \ templets \ catalog_add.htm search
name="typename"
Was added in its </ tr> below
<script language='javascript' src="js/main.js"></script> <tr id="pictable"> <td height="24" colspan="6"> <table border="0" cellspacing="0" cellpadding="0"> <tr> <td width="158"> 图片地址:</td> <td width="560"> <table width="100%" border="0" cellspacing="1" cellpadding="1"> <tr> <td height="30"> <input name="typebigpic" type="text" id="picname" style="width:220px" value="" /> <input type="button" name="Submit2" value="站内选择" style="margin-left:8px;" onClick="SelectImage('form1.picname','');" class='np coolbg'/> </td> </tr> </table> </td> <td width="270"> <style> .divpre,.divpre img{height:50px;} </style> <img src="images/pview.gif" width="100" height="50" id="picview" name="picview"> </td> </tr> </table> </td> </tr>
3. Open the \ dede \ templets \ catalog_edit.htm search
name="typename"
Was added in its </ tr> below
<script language='javascript' src="js/main.js"></script> <tr id="pictable"> <td height="24" colspan="6"> <table border="0" cellspacing="0" cellpadding="0"> <tr> <td width="158"> 图片地址:</td> <td width="560"> <table width="100%" border="0" cellspacing="1" cellpadding="1"> <tr> <td height="30"> <input name="typebigpic" type="text" id="picname" style="width:220px" value="<?php echo $myrow['typebigpic']?>" /> <input type="button" name="Submit2" value="站内选择" style="margin-left:8px;" onClick="SelectImage('form1.picname','');" class='np coolbg'/> </td> </tr> </table> </td> <td width="270"> <style> .divpre,.divpre img{height:50px;} </style> <img src="<?php if($myrow['typebigpic']!="") echo $myrow['typebigpic']; else echo "images/pview.gif";?>" width="100" height="50" id="picview" name="picview"> </td> </tr> </table> </td> </tr>
4. Open the \ dede \ catalog_add.php search
$in_query = "INSERT INTO `dede_arctype`(reid,topid,sortrank,typename
Change
$in_query = "INSERT INTO `dede_arctype`(reid,topid,sortrank,typename,typebigpic
Continue Search
VALUES('$reid','$topid','$sortrank','$typename'
Change
VALUES('$reid','$topid','$sortrank','$typename','$typebigpic'
5. Open \ dede \ catalog_edit.php search
`smalltypes`='$smalltypes'
Change
`smalltypes`='$smalltypes',`typebigpic`='$typebigpic'
6. Open \ include \ taglib \ channelartlist.lib.php search
typedir
Change
typedir,typebigpic
7. Open \ include \ taglib \ channel.lib.php search
typedir
Change
typedir,typebigpic
Note: This file has four needs change
8. Open \ include \ taglib \ type.lib.php search
typedir
Change
typedir,typebigpic
9.\include\arc.listview.class.php 搜索
// set the environment variable
Add below it
$this->Fields['typebigpic'] = $this->TypeLink->TypeInfos['typebigpic'];
The effect of the background section
Calling the front desk template label
{dede:channelartlist}{dede:field.typebigpic/}{/dede:channelartlist} {dede:channel}[field:typebigpic/]{/dede:channel} {dede:type}[field:typebigpic/]{/dede:type}
Part list page alone call
{dede:field.typebigpic/}