Quote
Yoda wrote:
The full and latest Forum package download you can grab here
Warning: in_array(): Wrong datatype for second argument in /home/gojuryun/public_html/search.php on line 40
>Articles
Warning: in_array(): Wrong datatype for second argument in /home/gojuryun/public_html/search.php on line 41
>News
Warning: in_array(): Wrong datatype for second argument in /home/gojuryun/public_html/search.php on line 42
>Forum Posts
Warning: in_array(): Wrong datatype for second argument in /home/gojuryun/public_html/search.php on line 43
>Downloads
Warning: in_array(): Wrong datatype for second argument in /home/gojuryun/public_html/search.php on line 44
>Web Links
Warning: in_array(): Wrong datatype for second argument in /home/gojuryun/public_html/search.php on line 45
>Members
Warning: in_array(): Wrong datatype for second argument in /home/gojuryun/public_html/search.php on line 46
>Custom Pages
".BASEDIR."forum/viewthread.php?".$rowstart."forum_id=".$data['forum_id']."&thread_id=".$data['thread_id']."#".$data['post_id']."'>
Quote
rsmarsha wrote:
I think i might have solved the problem of it not showing all the posts, time will tell. :)
I've removed some of the code in newposts.php and merged 3 queries into 1 as one query was not really needed.
<?php
/*---------------------------------------------------+
| PHPFusion 6 Content Management System
+----------------------------------------------------+
| Copyright © 2002 - 2005 Nick Jones
| http://www.php-fusion.co.uk/
+----------------------------------------------------+
| Released under the terms & conditions of v2 of the
| GNU General Public License. For details refer to
| the included gpl.txt file or visit http://gnu.org
| Updated to v6.0 by janmol / janm@janm.dk
| English language by Helmuth Mikkelsen helmuthm@gmail.com
+----------------------------------------------------*/
@include "../config.php";
include "../maincore.php";
include BASEDIR."subheader.php";
include BASEDIR."side_left.php";
if (empty($lastvisited)) { $lastvisited = time(); }
opentable("New posts since your last visit");
if (!iMEMBER) {
echo "<center><br>You have to login to use this feature<br><br><br></center>";
}else{
$result = dbquery("SELECT * FROM ".$db_prefix."forums WHERE forum_access ='".iMember."' ORDER BY forum_id");
$query = "SELECT * FROM ".$db_prefix."posts INNER JOIN ".$db_prefix."users ON ".$db_prefix."posts.post_author=".$db_prefix."users.user_id WHERE ".$db_prefix."posts.post_datestamp >$lastvisited ORDER BY post_datestamp ASC";
$result = dbquery($query);
if (dbrows($result) != 0) {
echo "<table border='0' cellspacing='0' cellpadding='0' width='100%'
class='tbl-border'>
<tr>
<td>
<table border='0' cellspacing='1' cellpadding='0' width='100%'>
<tr>
<td class='tbl2'><b>Subject</b></td>
<td class='tbl2'><b>Heading</b></td>
<td align='center' class='tbl2' width='100'><b>Author</b></td>
<td align='right' class='tbl2' width='120'><b>Date</b></td>
";
$forumidnum=0;
$replycount=0;
while ($data = dbarray($result)) {
$result2 = dbquery("SELECT * FROM ".$db_prefix."posts WHERE
thread_id='".$data['thread_id']."' AND post_id<'".$data['post_id']."' ORDER BY post_id DESC");
$rows = dbrows($result2);
if ($rows > 20) {
$rowstart = ceil($rows / 20);
$rowstart = "rowstart=".(($rowstart-1)*20)."&";
} else {
$rowstart = "";
}
$result2 = dbquery("SELECT * FROM ".$db_prefix."forums
WHERE forum_id='".$data['forum_id']."'");
$data2 = dbarray($result2);
$forum_name = $data['forum_name'];
if(checkgroup($data2['forum_access'])) {
$replycount++;
if ($forumidnum!=$data2['forum_id']){
$forumidnum=$data2['forum_id'];
echo "<tr>
<td class='tbl1'><a href='".BASEDIR."forum/viewforum.php?forum_id=
".$data2['forum_id']."&forum_cat=".$data2['forum_cat']."'>".$data2['forum_name']."</a></td>
<td class='tbl1'><a href='".BASEDIR."forum/viewthread.php?
".$rowstart."forum_id=".$data['forum_id']."&thread_id=".$data['thread_id']."#".$data['post_id'
]."'>".$data['post_subject']."</a></td>
<td align='center' class='tbl1'><a href='".BASEDIR."profile.php?lookup=
".$data['post_author']."'>".$data['user_name']."</a></td>
<td align='right' class='tbl1'>".strftime($settings['forumdate'],
$data['post_datestamp']+($settings['timeoffset']*3600))."</td>
</tr>
";
}
}
}
if ($replycount>1){
echo "<tr><td class='tbl1' colspan='4'><br><center>There are ".$replycount." new posts
since your last visit</td></tr></center>";}
else {
echo "<tr><td class='tbl1' colspan='4'><br><center>There are ".$replycount." new posts
since your last visit</td></tr></center>";}
echo "</table>
</td>
</tr>
</table>
";
} else {
echo "<center><br>No new posts since your last visit<br><br></center>
";
}
}
closetable();
echo "</td>
";
include BASEDIR."side_right.php";
include BASEDIR."footer.php";
?>
Quote
Run4itUK wrote:
We use this on our site too - it really does help ;)
add RSS feeds and you should never miss a message B)
Category Forum
General DiscussionLabels
None yet
Statistics
16 participants
Notifications
You are not receiving notifications from this thread.
Related Questions