Joined: May 02, 2003 Posts: 1396 Location: Puerto Rico
Posted:
Fri Aug 27, 2004 11:29 am
The module does not include code to view all available stories in each topic and is limited to the number of stories displayed in the homepage so if as in your case you have stories in home set to 5 you will only see 5 stories when you click on the more link. Problem with this is that it is controlled by the News module so editing how many stories will get displayed when clicking more in Topics will also affect how many stories are shown in home.
Was hoping to use Nuke for a customer's organization interested in having different topics for different departments. Unfortunately if topic submissions effectively dissapear with no way to access them once you go beyond the front page watermark, I won't be able to. To bad the front page uses the same code as it probably wouldn't be a big job to make all topic stories show?
I think I've got it. Here's a modified section from the "theindex" function in modules/News/index.php. Basically moved the select statement to each side of the if that determined if it was the front page or not. If it was front page the select is limited, as it was originally, otherwise it is a topic specific page so the select is unlimited and collects all topic entries.
Code:
if ($new_topic == 0) {
$qdb = "WHERE (ihome='0' OR catid='0')";
$home_msg = "";
// Front Page so do limited query
$sql = "SELECT sid, catid, aid, title, time, hometext, bodytext, comments, counter, topic, informant, notes, acomm, score, ratings FROM ".$prefix."_stories $qdb $querylang ORDER BY sid DESC limit $storynum";
} else {
$qdb = "WHERE topic='$new_topic'";
$sql_a = "SELECT topictext FROM ".$prefix."_topics WHERE topicid='$new_topic'";
$result_a = $db->sql_query($sql_a);
$row_a = $db->sql_fetchrow($result_a);
$numrows_a = $db->sql_numrows($result_a);
$topic_title = $row_a[topictext];
OpenTable();
if ($numrows == 0) {
echo "<center><font class=\"title\">$sitename</font><br><br>"._NOINFO4TOPIC."<br><br>[ <a href=\"modules.php?name=News\">"._GOTONEWSINDEX."</a> | <a href=\"topics.html\">"._SELECTNEWTOPIC."</a> ]</center>";
} else {
echo "<center><font class=\"title\">$sitename: $topic_title</font><br><br>"
."<form action=\"modules.php?name=Search\" method=\"post\">"
."<input type=\"hidden\" name=\"topic\" value=\"$new_topic\">"
.""._SEARCHONTOPIC.": <input type=\"name\" name=\"query\" size=\"30\"> "
."<input type=\"submit\" value=\""._SEARCH."\">"
."</form>"
."[ <a href=\"index.php\">"._GOTOHOME."</a> | <a href=\"topics.html\">"._SELECTNEWTOPIC."</a> ]</center>";
}
CloseTable();
echo "<br>";
// Specific topic page so do unlimited query
$sql = "SELECT sid, catid, aid, title, time, hometext, bodytext, comments, counter, topic, informant, notes, acomm, score, ratings FROM ".$prefix."_stories $qdb $querylang ORDER BY sid";
}
Then made these changes in modules/Topics/index.php:
$result2 = $db->sql_query($sql);
$num = $db->sql_numrows($result2);
if ($num != 0) {
echo "$num entries in this topic<BR><BR>";
while ($row2 = $db->sql_fetchrow($result2)) {
$sql = "SELECT title FROM ".$prefix."_stories_cat WHERE catid='$row2[catid]'";
$result3 = $db->sql_query($sql);
$row3 = $db->sql_fetchrow($result3);
if ($row2[catid] == 0) {
$cat_link = "";
} else {
$cat_link = "<a href='modules.php?name=News&file=categories&op=newindex&catid=$row2[catid]'><b>$row3[title]</b></a>: ";
}
echo "<img src='modules/$module_name/images/arrow.gif' border='0' alt='' title=''> $cat_link<a href='article.html$row2[sid]$r_options'>$row2[title]</a><br>";
}
echo "<div align='right'><big><strong>·</strong></big> <a href='article-topic-.html$topicid'><b>"._MORE." --></b></a> </div>";
} else {
echo "<i>"._NONEWSYET."</i>";
}
echo "</td></tr></table><br><br>";
}
}
These changes let me see all of the entries in a specific topic unless I'm on the front page in which case it only displays the configurable number or topic entries. I imagine this could become an issue when there are thousands of entries in a topic? So it may be a trade off. Works for me though . NOTE: These changes were made to nuke6.5 files that contain all the published secfixes.
View next topic View previous topic
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum