分享一下我老师大神的人工智能教程!零基础,通俗易懂!http://blog.csdn.net/jiangjunshow
也欢迎大家转载本篇文章。分享知识,造福人民,实现我们中华民族伟大复兴!
--- cdb_forums.6.1.discuz.sqlDiscuz! 7.0增加字段如下:
+++ cdb_forums.6.1.supesite.sql
@@ -30,15 +30,17 @@
`modnewposts` tinyint(1) NOT NULL default '0',
`jammer` tinyint(1) NOT NULL default '0',
`disablewatermark` tinyint(1) NOT NULL default '0',
`inheritedmod` tinyint(1) NOT NULL default '0',
`autoclose` smallint(6) NOT NULL default '0',
`forumcolumns` tinyint(3) unsigned NOT NULL default '0',
`threadcaches` tinyint(1) NOT NULL default '0',
`alloweditpost` tinyint(1) unsigned NOT NULL default '1',
`simple` tinyint(1) unsigned NOT NULL,
`modworks` tinyint(1) unsigned NOT NULL,
`allowtag` tinyint(1) NOT NULL default '1',
+ `updateline` int(10) NOT NULL default '0',
+ `allowpost` tinyint(1) NOT NULL default '0',
PRIMARY KEY (`fid`),
KEY `forum` (`status`,`type`,`displayorder`),
KEY `fup` (`fup`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=3 ;
--- cdb_forums.7.0.supesite.sql其中allowpost字段用于SupeSite X-SpaceUC的网站管理平台中“论坛相关设置”菜单的“论坛版块”菜单项的“是否允许导入”列。当选中“是否允许导入”复选框时,allowpost字段的值为1,当取消“是否允许导入”复选框时,allowpost字段的值为0。
+++ cdb_forums.7.0.discuz.sql
@@ -32,17 +32,15 @@
`jammer` tinyint(1) NOT NULL default '0',
`disablewatermark` tinyint(1) NOT NULL default '0',
`inheritedmod` tinyint(1) NOT NULL default '0',
`autoclose` smallint(6) NOT NULL default '0',
`forumcolumns` tinyint(3) unsigned NOT NULL default '0',
`threadcaches` tinyint(1) NOT NULL default '0',
`alloweditpost` tinyint(1) unsigned NOT NULL default '1',
`simple` tinyint(1) unsigned NOT NULL,
`allowtag` tinyint(1) NOT NULL default '1',
`modworks` tinyint(1) unsigned NOT NULL,
`allowglobalstick` tinyint(1) NOT NULL default '1',
- `updateline` int(10) NOT NULL default '0',
- `allowpost` tinyint(1) NOT NULL default '0',
PRIMARY KEY (`fid`),
KEY `forum` (`status`,`type`,`displayorder`),
KEY `fup` (`fup`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin AUTO_INCREMENT=35 ;
--- common.inc.6.1.discuz.php
+++ common.inc.6.1.supesite.php
@@ -261,28 +261,28 @@
}
$auditstatuson = !empty($mod) && $mod == 'edit' &&in_array($adminid, array(1, 2, 3)) && $allowmodpost ? true :false;
$page = isset($page) ? max(1, intval($page)) : 1;
$tid = isset($tid) && is_numeric($tid) ? $tid : 0;
$fid = isset($fid) && is_numeric($fid) ? $fid : 0;
$typeid = isset($typeid) ? intval($typeid) : 0;
if(!empty($tid) || !empty($fid)) {
if(empty($tid)) {
- $forum = $db->fetch_first("SELECT f.fid, f.*, ff.* $accessadd1 $modadd1, f.fid AS fid
+ $forum =$db->fetch_first("SELECT f.fid, f.fup, f.type, f.name, f.status,f.displayorder, f.styleid, f.threads, f.posts, f.todayposts,f.lastpost, f.allowsmilies, f.allowhtml, f.allowbbcode, f.allowimgcode,f.allowmediacode, f.allowanonymous, f.allowshare, f.allowpostspecial,f.allowspecialonly, f.alloweditrules, f.recyclebin, f.modnewposts,f.jammer, f.disablewatermark, f.inheritedmod, f.autoclose,f.forumcolumns, f.threadcaches, f.alloweditpost, f.simple, f.modworks,f.allowtag, ff.* $accessadd1 $modadd1, f.fid AS fid
FROM {$tablepre}forums f
LEFT JOIN {$tablepre}forumfields ff ON ff.fid=f.fid $accessadd2 $modadd2
WHERE f.fid='$fid'");
} else {
- $forum =$db->fetch_first("SELECT t.tid,t.closed,".(defined('SQL_ADD_THREAD') ? SQL_ADD_THREAD : '')." f.*,ff.* $accessadd1 $modadd1, f.fid AS fid
+ $forum =$db->fetch_first("SELECT t.tid,t.closed,".(defined('SQL_ADD_THREAD') ? SQL_ADD_THREAD : '')." f.fid,f.fup, f.type, f.name, f.status, f.displayorder, f.styleid, f.threads,f.posts, f.todayposts, f.lastpost, f.allowsmilies, f.allowhtml,f.allowbbcode, f.allowimgcode, f.allowmediacode, f.allowanonymous,f.allowshare, f.allowpostspecial, f.allowspecialonly, f.alloweditrules,f.recyclebin, f.modnewposts, f.jammer, f.disablewatermark,f.inheritedmod, f.autoclose, f.forumcolumns, f.threadcaches,f.alloweditpost, f.simple, f.modworks, f.allowtag, ff.* $accessadd1$modadd1, f.fid AS fid
FROM {$tablepre}threads t
INNER JOIN {$tablepre}forums f ON f.fid=t.fid
LEFT JOIN {$tablepre}forumfields ff ON ff.fid=f.fid $accessadd2 $modadd2
WHERE t.tid='$tid'".($auditstatuson ? '' : " AND t.displayorder>='0'")." LIMIT 1");
$tid = $forum['tid'];
}
if($forum) {
$fid = $forum['fid'];
$forum['ismoderator'] = !empty($forum['ismoderator']) || $adminid == 1 || $adminid == 2 ? 1 : 0;
foreach(array('postcredits', 'replycredits','threadtypes', 'digestcredits', 'postattachcredits','getattachcredits') as $key) {
Discuz! 7.0可以通过如下补丁解决。
--- common.inc.7.0.supesite.php
+++ common.inc.7.0.discuz.php
@@ -276,28 +276,28 @@
$page = isset($page) ? max(1, intval($page)) : 1;
$tid = isset($tid) && is_numeric($tid) ? $tid : 0;
$fid = isset($fid) && is_numeric($fid) ? $fid : 0;
$typeid = isset($typeid) ? intval($typeid) : 0;
$modthreadkey = isset($modthreadkey) && $modthreadkey == modthreadkey($tid) ? $modthreadkey : '';
$auditstatuson = $modthreadkey ? true : false;
if(!empty($tid) || !empty($fid)) {
if(empty($tid)) {
- $forum =$db->fetch_first("SELECT f.fid, f.fup, f.type, f.name, f.status,f.displayorder, f.styleid, f.threads, f.posts, f.todayposts,f.lastpost, f.allowsmilies, f.allowhtml, f.allowbbcode, f.allowimgcode,f.allowmediacode, f.allowanonymous, f.allowshare, f.allowpostspecial,f.allowspecialonly, f.alloweditrules, f.allowfeed, f.recyclebin,f.modnewposts, f.jammer, f.disablewatermark, f.inheritedmod,f.autoclose, f.forumcolumns, f.threadcaches, f.alloweditpost, f.simple,f.modworks, f.allowtag, f.allowglobalstick, ff.* $accessadd1 $modadd1,f.fid AS fid
+ $forum = $db->fetch_first("SELECT f.fid, f.*, ff.* $accessadd1 $modadd1, f.fid AS fid
FROM {$tablepre}forums f
LEFT JOIN {$tablepre}forumfields ff ON ff.fid=f.fid $accessadd2 $modadd2
WHERE f.fid='$fid'");
} else {
- $forum =$db->fetch_first("SELECT t.tid,t.closed,".(defined('SQL_ADD_THREAD') ? SQL_ADD_THREAD : '')." f.fid,f.fup, f.type, f.name, f.status, f.displayorder, f.styleid, f.threads,f.posts, f.todayposts, f.lastpost, f.allowsmilies, f.allowhtml,f.allowbbcode, f.allowimgcode, f.allowmediacode, f.allowanonymous,f.allowshare, f.allowpostspecial, f.allowspecialonly, f.alloweditrules,f.allowfeed, f.recyclebin, f.modnewposts, f.jammer, f.disablewatermark,f.inheritedmod, f.autoclose, f.forumcolumns, f.threadcaches,f.alloweditpost, f.simple, f.modworks, f.allowtag, f.allowglobalstick,ff.* $accessadd1 $modadd1, f.fid AS fid
+ $forum =$db->fetch_first("SELECT t.tid,t.closed,".(defined('SQL_ADD_THREAD') ? SQL_ADD_THREAD : '')." f.*,ff.* $accessadd1 $modadd1, f.fid AS fid
FROM {$tablepre}threads t
INNER JOIN {$tablepre}forums f ON f.fid=t.fid
LEFT JOIN {$tablepre}forumfields ff ON ff.fid=f.fid $accessadd2 $modadd2
WHERE t.tid='$tid'".($auditstatuson ? '' : " AND t.displayorder>='0'")." LIMIT 1");
$tid = $forum['tid'];
}
if($forum) {
$fid = $forum['fid'];
$forum['ismoderator'] = !empty($forum['ismoderator']) || $adminid == 1 || $adminid == 2 ? 1 : 0;
foreach(array('postcredits', 'replycredits','threadtypes', 'threadsorts', 'digestcredits', 'postattachcredits','getattachcredits') as $key) {
Discuz! 6.1 发送HTML格式电子邮件
Discuz! 6.1~7.0 安装SupeSite后导致安全漏洞
Discuz! 6.1 不修改模板在贴子上增加收藏按钮
Discuz! 6.1 cpmsg函数在IE下和Firefox下表现不一致