uchome 的动态存在uchome_feed这个表里面
这个表我们主要用
icon
title_template
body_template
title_data
body_data
image_1,image_1_links,image_2,image_2_link
这几个字段
在取的时候以ICON为条件
title_template 标题的模版
body_template 内容的模板的样式
body_data 内容
title_data 标题
image_1,image_1_links,image_2,image_2_link 放图片的位置
调取是主要用
首先是调用,
include_once(S_ROOT.'./source/function_feed.php');这个文件
feed_publish($id, 'idtype', $olds ? 0 : 1);
这里主要传递2个参数,一个是$id 一个是idtype
然后在function_feed这个文件进行处理
判断穿进去的 idtype
case: idtype
查询数据库
取出uid title content
存在$setarr这个数组里面
模版的样式可以直接写入数据库,
也可以根据自己的需求修改
如果有模版的样式,则以数据库为准,模版的样式会外套在数据库样式的外面!
在调用解析的时候,
模版判断ICON这个字段的内容
取出所有的数据!
然后就是模板显示了