分享

Biweb 做栏目

 weiledream 2011-10-21


今天自己在肖飞老师的指点下 ,最多用了三分钟,自己就做了一个栏目,包括前台和后天,这就是速度~~~
  呵呵 这就是Biweb的优点之一,开发速度快~~~~~·
   我先拿Biweb里面的新闻系统来做实验哈
   第一步要改的就是每个栏目里面的install.php加入你要添加的字段,和删除你不要的字段
  $sql[] = "CREATE TABLE IF NOT EXISTS `".$arrGPdoDB['db_tablepre']."news` (
   `id` int(10) unsigned NOT NULL auto_increment,
   `type_id` tinyint(3) unsigned default '0',
   `type_roue_id` varchar(80) default NULL,
   `user_id` int(10) unsigned default '0',
   `tag` varchar(30) default NULL,
   `price` int(10) unsigned default '0',
   `bedeck` tinyint(3) unsigned default '0',
   `title` varchar(100) default NULL,
   `title_md5` char(32) default NULL,
   `linkurl` varchar(100) default NULL,
   `summary` varchar(".$intDbSummaryLen.") default NULL,
   `structon_tb` mediumtext,
   `thumbnail` varchar(100) default NULL,
   `submit_date` datetime default '0000-00-00 00:00:00',
   `topflag` tinyint(1) default '0',
   `recommendflag` tinyint(1) default '0',
   `stars` tinyint(1) default '0',
   `clicktimes` mediumint(10) unsigned default '0',
   `pass` tinyint(1) default '1',
   PRIMARY KEY (`id`),
   KEY `user_id` (`user_id`),
   KEY `type_id` (`type_id`),
   KEY `title_md5` (`title_md5`),
   KEY `submit_date` (`submit_date`)
  ) ENGINE=MyISAM {$extend} COMMENT='动态新闻表' ;";   
  第二部 就是在news\admin\templats.submit.html中添加你的字段的 输入
   eg:
<?{$arrData.meta_Description}?><BR><BR>把上面的改成你添加字段的东西~~~   也要把你删除 的东西 给删除  详细得你自己去琢磨 呵呵 我语文学得不好 没法 表达不出来  请见谅        第三步 然后把<BR>第三步<BR>news\config\var.inc.php改改   $arrGPdoDB['db_table_field']=array('id'=>'','type_id'=>1,'type_roue_id'=>'','user_id'=>1,'tag'=>'','price'=>0,'bedeck'=>0,'title'=>'','title_md5'=>'','linkurl'=>'','summary'=>'','structon_tb'=>array('meta_Title','meta_Description','meta_Keywords','price','author','intro','author','photo'),'thumbnail'=>'','submit_date'=>date('Y-m-d H:i:s'),'topflag'=>0,'recommendflag'=>0,'stars'=>0,'clicktimes'=>0,'pass'=>1); //字段数组,将要显示的字段名称写入该数组  $arrGPdoDB['htmlspecialchars'] = array('intro','summary','tag');      时间有限 我就说到这里 呵呵 有事我得到太原去了~~~      这就三处你改了 一个全新的栏目就出来了~~~~~~~~~~~··   速度快吧     其他的msql的操作就不用你写了   Biweb系统都已经写好了      我还在学Biweb系统 有兴趣的可以试一试 我觉得很不错     顶一下哈 <br /></DIV>
<DIV class="vfoot">#日志日期:2009-9-4 星期五(Friday)   晴
 <input id='iptInfo' name='iptInfo' type='hidden' value='推荐你看一看这篇文章:Biweb 做栏目,http://blog.tianya.cn/blogger/post_show.asp?idWriter=0%26Key=0%26BlogID=2268069%26PostID=18848379'/><a href="#" onclick="copyValue('iptInfo');return false;">复制链接</a> <a href="javascript:void(0)" onclick="javascript:openwindow('BloggerPostAlarm.asp?idWriter=0&Key=0&BlogID=2268069&PostID=18676056&Title=Biweb 做栏目');">举报</a> </DIV><br />
<div class="restore">
 
 <div id="divRecommend" align="center">
<a href="http://blog.tianya.cn/admin/Expertpost_show.asp?BlogID=687238&PostID=36189524&idWriter=5377498&Key=293361244" target="_blank"><font color="red">地球已经无法阻止我们的道德堕落了</font></a>
</div>

<script>
 function openwindow(url)
    {
    window.open(url,"","width=480,height=250,resizable=0,status=0,menubar=0,scrollbars=0");
    return false;
    }
</script>
<BR><A NAME="Bottom"></A>


 <script language="javascript">
 <!--
 function CheckSubmit(f) {
  var  b=f.comment.value
  if (b=="")
  {
   alert("内容不能为空!")
   return false
  }
  if (f.validate_key.value=="")
  {
   alert("验证码不能为空!")
   return false
  }
  
   textRange = document.frm_comment.comment.createTextRange();
   textRange.execCommand("Copy");
   var the_box=f.check_1
  
   if (the_box.checked ==true) {
    
     //if(f.nickname.value==""){
     // alert("对不起,昵称不能为空!")
     // return false
           // }
            //if(f.homepage.value!=""){
            
             //if(f.homepage.value.length<12 && (f.homepage.value.substring(0,6)!='http://' ||f.homepage.value.substring(0,6)!='http://' ||f.homepage.value.substring(0,6)!='https://')){
                 // alert("请输入正确的主页地址,以http://开始!")
      // return false
             //}
           // }     
           if (b=="")
    {
     alert("内容不能为空!")
     return false
    }
    if (f.validate_key.value=="")
    {
     alert("验证码不能为空!")
     return false
    }
  }
  
  return true

 }
 function switchLight() {

         var the_box = window.document.frm_comment.check_1;
 
         if (the_box.checked == false)
   {
            document.all("object1").style.display = '';
         }
   else
   {
            document.all("object1").style.display = "none";
         }
 }
 //-->
 </script> 
 <form name="frm_comment" id="frm_comment" method="post" action="post_show.asp?idWriter=0&Key=0#Bottom" onsubmit="javascript:bloggooglesubmit()">
<!--由于增加了专栏的模板导致POSTID和BlogID会出现重新赋值所以用Request确保取得是URL得值-->
 <input type="hidden" name="BlogID" value="2268069" ID="Hidden1">
 <input type="hidden" name="PostID" value="18848379" ID="Hidden2">
<br><A HREF="http://passport.tianya.cn/register/default.jsp?sourceURL=http%3A%2F%2Fblog.tianya.cn" target="_blank"><font color=red>新人注册>></font></A><div ID='object1' ><br>登录名:<input type='text' name='strWriter' value='' size=14 class=input>  口令:<input type='password' name='strPassword' value='' size=14 class=input></div>
 <BR>输入您的评论:(不支持HTML标签)<br>
 <textarea name="comment" rows=8 cols=70 class=input ID="Textarea1">

    本站是提供个人知识管理的网络存储空间,所有内容均由用户发布,不代表本站观点。请注意甄别内容中的联系方式、诱导购买等信息,谨防诈骗。如发现有害或侵权内容,请点击一键举报。
    转藏 分享 献花(0

    0条评论

    发表

    请遵守用户 评论公约