Home » Support Forums for PMBT 2.X » Development of 2.X » New PMBT forum testers needed
( ) 1 Vote
| | | | | | |
| Re: New PMBT forum testers needed [message #3766 is a reply to message #3614] |
Fri, 19 March 2010 08:10   |
Vrasidas  Messages: 17 Registered: October 2009 |
Leecher |
|
|
there are some erros in forums.php, there should be:
line 194: $db->sql_query("INSERT INTO ".$db_prefix."_forum_topics (userid, subject, forumid) VALUES ('".$userid."', '".$subject."', '".$forumid."')") or forumsqlerr(__FILE__, __LINE__);
line 708: $db->sql_query("UPDATE ".$db_prefix."_forum_posts SET body='".$body."', editedat=NOW(), editedby=".$user->id." WHERE id='".$postid."'") or forumsqlerr(__FILE__, __LINE__);
|
|
|
| Re: New PMBT forum testers needed [message #3768 is a reply to message #3765] |
Fri, 19 March 2010 11:41   |
|
Quote:We miss report.php I seem to have lost it when I moved My site so I need to rewrite it!
Quote:there are some erros in forums.php, there should be:
Thanks fixes aplyed well be posting updates this weekend!
[Updated on: Fri, 19 March 2010 11:43]
|
|
| | | | |
| Re: New PMBT forum testers needed [message #4120 is a reply to message #4119] |
Tue, 11 May 2010 13:49   |
|
is your tracker prefix torrent_ ?
are you using the beta 2 version?
Try this one
CREATE TABLE IF NOT EXISTS `torrent_forum_config` (
`forum_open` enum('true','false') collate utf8_bin NOT NULL default 'false',
`board_disable_msg` text collate utf8_bin NOT NULL,
`censor_words` enum('true','false') collate utf8_bin NOT NULL default 'false',
`postsper_page` int(10) NOT NULL,
`topics_per_page` int(10) NOT NULL,
`max_subject_length` int(10) NOT NULL,
`max_post_length` int(10) NOT NULL,
`show_latest_topic` enum('true','false') collate utf8_bin NOT NULL default 'false',
`search_word_min` int(10) NOT NULL,
`allow_bookmarks` enum('true','false') collate utf8_bin NOT NULL default 'false',
`shout_new_topic` enum('true','false') collate utf8_bin NOT NULL default 'false',
`shout_new_post` enum('true','false') collate utf8_bin NOT NULL default 'false'
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
INSERT INTO `torrent_forum_config` (`forum_open`, `board_disable_msg`, `censor_words`, `postsper_page`, `topics_per_page`, `max_subject_length`, `max_post_length`, `show_latest_topic`, `search_word_min`, `allow_bookmarks`, `shout_new_topic`, `shout_new_post`) VALUES
('true', '', 'true', 15, 15, 50, 150, 'false', 5, 'true', 'true', 'true');
CREATE TABLE IF NOT EXISTS `torrent_forumcats` (
`id` int(10) unsigned NOT NULL auto_increment,
`name` varchar(60) NOT NULL default '',
`sort` int(10) unsigned NOT NULL default '0',
PRIMARY KEY (`id`)
) ENGINE=MyISAM ;
CREATE TABLE IF NOT EXISTS `torrent_forum_forums` (
`sort` tinyint(3) unsigned NOT NULL default '0',
`id` int(10) unsigned NOT NULL auto_increment,
`name` varchar(60) NOT NULL default '',
`description` varchar(200) default NULL,
`minclassread` varchar(225) NOT NULL,
`minclasswrite` varchar(225) NOT NULL,
`moderator` varchar(225) character set utf8 collate utf8_bin NOT NULL,
`category` tinyint(2) NOT NULL default '0',
`show_topic` tinyint(2) NOT NULL default '0',
PRIMARY KEY (`id`)
) ENGINE=MyISAM ;
CREATE TABLE IF NOT EXISTS `torrent_forum_posts` (
`id` int(10) unsigned NOT NULL auto_increment,
`topicid` int(10) unsigned NOT NULL default '0',
`userid` int(10) unsigned NOT NULL default '0',
`added` datetime default NULL,
`body` text,
`editedby` int(10) unsigned NOT NULL default '0',
`editedat` datetime NOT NULL default '0000-00-00 00:00:00',
PRIMARY KEY (`id`),
KEY `topicid` (`topicid`),
KEY `userid` (`userid`),
FULLTEXT KEY `body` (`body`)
) ENGINE=MyISAM;
CREATE TABLE IF NOT EXISTS `torrent_forum_readposts` (
`id` int(10) unsigned NOT NULL auto_increment,
`userid` int(10) unsigned NOT NULL default '0',
`topicid` int(10) unsigned NOT NULL default '0',
`lastpostread` int(10) unsigned NOT NULL default '0',
PRIMARY KEY (`id`),
KEY `userid` (`id`),
KEY `topicid` (`topicid`)
) ENGINE=MyISAM;
CREATE TABLE IF NOT EXISTS `torrent_forum_topics` (
`id` int(10) unsigned NOT NULL auto_increment,
`userid` int(10) unsigned NOT NULL default '0',
`subject` varchar(40) default NULL,
`locked` enum('yes','no') NOT NULL default 'no',
`forumid` int(10) unsigned NOT NULL default '0',
`lastpost` int(10) unsigned NOT NULL default '0',
`moved` enum('yes','no') NOT NULL default 'no',
`sticky` enum('yes','no') NOT NULL default 'no',
`views` int(10) NOT NULL default '0',
PRIMARY KEY (`id`),
KEY `userid` (`userid`),
KEY `subject` (`subject`),
KEY `lastpost` (`lastpost`)
) ENGINE=MyISAM;
CREATE TABLE IF NOT EXISTS `torrent_bookmarks` (
`topic_id` int(10) unsigned NOT NULL default '0',
`user_id` int(10) unsigned NOT NULL default '0'
) ENGINE=MyISAM;
ALTER TABLE`torrent_users` ADD `signature` varchar(200) NOT NULL default '';
ALTER TABLE`torrent_users` ADD `forumbanned` enum('yes','no') character set utf8 collate utf8_bin NOT NULL default 'no';
[Updated on: Tue, 11 May 2010 13:55]
|
|
| | | | |
| Re: New PMBT forum testers needed [message #4379 is a reply to message #4378] |
Mon, 05 July 2010 15:09   |
|
in forums.php find
if ($action == "viewunread") {
$userid = $user->id;
$maxresults = 25;
$res = $db->sql_query("SELECT id, forumid, subject, lastpost FROM ".$db_prefix."_forum_topics ORDER BY lastpost") or forumsqlerr(__FILE__, __LINE__);
stdhead();
forum_table("Topics with unread posts");
forumheader("New Topics");
$n = 0;
$uc = $user->group;
while ($arr = $db->sql_fetchrow($res)) {
$topicid = $arr['id'];
$forumid = $arr['forumid'];
//---- Check if post is read
$r = $db->sql_query("SELECT lastpostread FROM ".$db_prefix."_forum_readposts WHERE userid=$userid AND topicid=$topicid") or forumsqlerr(__FILE__, __LINE__);
$a = $db->sql_fetchrow($r);
if ($a && $a[0] == $arr['lastpost'])
continue;
//---- Check access & get forum name
$r = $db->sql_query("SELECT name, minclassread FROM ".$db_prefix."_forum_forums WHERE id=$forumid") or forumsqlerr(__FILE__, __LINE__);
$a = $db->sql_fetchrow($r);
if ($a['minclassread'] == "0" OR in_array($uc,explode(" ", $a['minclassread'])))
continue;
++$n;
if ($n > $maxresults)
break;
$forumname = $a['name'];
if ($n == 1) {
print("<center><table border=1 cellspacing=0 cellpadding=5 width=95%>\n");
print("<tr><td class=alt3 align=left>Topic</td><td class=alt3 align=left>Forum</td></tr>\n");
}
print("<tr><td align=left><table border=0 cellspacing=0 cellpadding=0><tr><td class=embedded>" .
"<img src=". $siteurl ."/images/unlockednew.gif style='margin-right: 5px'></td><td class=embedded>" .
"<a href=forums.php?action=viewtopic&topicid=$topicid&page=last#last><b>" . stripslashes(htmlspecialchars($arr["subject"])) ."</b></a></td></tr></table></td><td align=left><a href=forums.php?action=viewforum&forumid=$forumid><b>$forumname</b></a></td></tr>\n");
}
if ($n > 0) {
print("</table>\n");
if ($n > $maxresults)
print("<p>More than $maxresults items found, displaying first $maxresults.</p>\n");
print("<p><a href=forums.php?catchup><b>Mark All Forums Read.</b></a></center><br></p>\n");
}
else
print("<b>Nothing found</b>");
forum_table_close();
stdfoot();
include'footer.php';
die;
}
and replace with
if ($action == "viewunread") {
$userid = $user->id;
$maxresults = 25;
$res = $db->sql_query("SELECT id, forumid, subject, lastpost FROM ".$db_prefix."_forum_topics ORDER BY lastpost") or forumsqlerr(__FILE__, __LINE__);
stdhead();
forum_table("Topics with unread posts");
forumheader("New Topics");
$n = 0;
$uc = $user->group;
while ($arr = $db->sql_fetchrow($res)) {
$topicid = $arr['id'];
$forumid = $arr['forumid'];
//---- Check if post is read
$r = $db->sql_query("SELECT lastpostread FROM ".$db_prefix."_forum_readposts WHERE userid=$userid AND topicid=$topicid") or forumsqlerr(__FILE__, __LINE__);
$a = $db->sql_fetchrow($r);
if ($a && $a[0] == $arr['lastpost'])
continue;
//---- Check access & get forum name
$r = $db->sql_query("SELECT name, minclassread FROM ".$db_prefix."_forum_forums WHERE id=$forumid") or forumsqlerr(__FILE__, __LINE__);
$a = $db->sql_fetchrow($r);
if ($a['minclassread'] == "0" OR !in_array($uc,explode(" ", $a['minclassread'])))
continue;
++$n;
if ($n > $maxresults)
break;
$forumname = $a['name'];
if ($n == 1) {
print("<center><table border=1 cellspacing=0 cellpadding=5 width=95%>\n");
print("<tr><td class=alt3 align=left>Topic</td><td class=alt3 align=left>Forum</td></tr>\n");
}
print("<tr><td align=left><table border=0 cellspacing=0 cellpadding=0><tr><td class=embedded>" .
"<img src=\"". $themedir . $topic_unread . "\" style='margin-right: 5px'></td><td class=embedded>" .
"<a href=forums.php?action=viewtopic&topicid=$topicid&page=last#last><b>" . stripslashes(htmlspecialchars($arr["subject"])) ."</b></a></td></tr></table></td><td align=left><a href=forums.php?action=viewforum&forumid=$forumid><b>$forumname</b></a></td></tr>\n");
}
if ($n > 0) {
print("</table>\n");
if ($n > $maxresults)
print("<p>More than $maxresults items found, displaying first $maxresults.</p>\n");
print("<p><a href=forums.php?catchup><b>Mark All Forums Read.</b></a></center><br></p>\n");
}
else
print("<b>Nothing found</b>");
forum_table_close();
stdfoot();
include'footer.php';
die;
}
|
|
| |
Goto Forum:
Current Time: Fri Jul 30 04:23:49 BST 2010
Total time taken to generate the page: 0.01206 seconds
|