You are missing our premiere tool bar navigation system! Register and use it for FREE!

NukeCops  
•  Home •  Downloads •  Gallery •  Your Account •  Forums • 
Readme First
- Readme First! -

Read and follow the rules, otherwise your posts will be closed
Modules
· Home
· FAQ
· Buy a Theme
· Advertising
· AvantGo
· Bookmarks
· Columbia
· Community
· Donations
· Downloads
· Feedback
· Forums
· PHP-Nuke HOWTO
· Private Messages
· Search
· Statistics
· Stories Archive
· Submit News
· Surveys
· Theme Gallery
· Top
· Topics
· Your Account
Who's Online
There are currently, 85 guest(s) and 0 member(s) that are online.

You are Anonymous user. You can register for free by clicking here
Nuke Cops :: View topic - Results from topic module [ ]
 Forum FAQ  •  Search  •   •  Memberlist  •  Usergroups   •  Register  •  Profile •    •  Log in to check your private messages  •  Log in

 
This forum is locked: you cannot post, reply to, or edit topics.  This topic is locked: you cannot edit posts or make replies.printer-friendly view
View previous topic Log in to check your private messages View next topic
Author Message
Guest







PostPosted: Fri May 23, 2003 10:05 pm Reply with quoteBack to top

Clicking on an icon in the topics module only returns 10 results even if there are more than that. Why does it stop at 10? I can't find anything in the code to specify 10 results. Is there anyway to change this? I'd like to have a "next matches" option to keep browsing a topic through all its results.
Find all posts by Anonymous
Raven
General
General


Joined: Mar 22, 2003
Posts: 5233

Location: USA

PostPosted: Sat May 24, 2003 1:19 am Reply with quoteBack to top

In the modules/Topics/index.php, this MySQL statement limits it to 10. Change the 10 to whatever you like
Code:
$sql = "SELECT sid, catid, title FROM ".$prefix."_stories WHERE topic='$topicid' ORDER BY sid DESC LIMIT 0,10";

_________________
Those who hear not the music think the dancers mad.
Raven Web Hosting|My Scripts & Stuff
Find all posts by RavenView user's profileSend private messageVisit poster's website
Guest







PostPosted: Sat May 24, 2003 5:42 am Reply with quoteBack to top

I don't have that line in my topics index. I'm on 5.6 Sad

Mine looks like this:

Code:
if (!eregi("modules.php", $PHP_SELF)) {
    die ("You can't access this file directly...");
}

require_once("mainfile.php");
$module_name = basename(dirname(__FILE__));
get_lang($module_name);
$pagetitle = "- "._ACTIVETOPICS."";
include("header.php");

$result = sql_query("select topicid, topicname, topicimage, topictext from ".$prefix."_topics order by topicname", $dbi);
if (sql_num_rows($result, $dbi)==0) {
    include("header.php");
    include("footer.php");
}
if (sql_num_rows($result, $dbi)>0) {
    OpenTable();
    echo "<center><font class=\"title\"><b>"._ACTIVETOPICS."</b></font><br>\n"
   ."<font class=\"content\">"._CLICK2LIST."</font><br><br>\n"
   ."<form action=\"modules.php?name=Search\" method=\"post\">"
   ."<input type=\"name\" name=\"query\" size=\"30\">&&"
   ."<input type=\"submit\" value=\""._SEARCH."\">"
   ."</form></center><br><br>"
   ."<table border=\"0\" width=\"100%\" align=\"center\" cellpadding=\"2\"><tr>\n";
    while(list($topicid, $topicname, $topicimage, $topictext) = sql_fetch_row($result, $dbi)) {
       if ($count == 5) {
       echo "<tr>\n";
       $count = 0;
   }
   echo "<td align=\"center\">\n"
       ."<a href=\"article-topic-.html$topicid\"><img src=\"images/topics/$topicimage\" border=\"0\" alt=\"$topictext\"></a><br>\n"
       ."<font class=\"content\"><b>$topictext</b></font>\n"
       ."</td>\n";
   /* Thanks to John Hoffmann from softlinux.org for the next 5 lines ;) */
   $count++;
   if ($count == 5) {
       echo "</tr>\n";
   }
    }
    if ($count == 5) {
   echo "</table>\n";
    } else {
   echo "</tr></table>\n";
    }
}
CloseTable();
include("footer.php");

?>






Am I being blind?
Find all posts by Anonymous
Raven
General
General


Joined: Mar 22, 2003
Posts: 5233

Location: USA

PostPosted: Sat May 24, 2003 8:20 am Reply with quoteBack to top

If I remember right, there should be a Topics per Page setting in the config file. Have you looked in your Preferences file?

_________________
Those who hear not the music think the dancers mad.
Raven Web Hosting|My Scripts & Stuff
Find all posts by RavenView user's profileSend private messageVisit poster's website
Guest







PostPosted: Sat May 24, 2003 9:46 am Reply with quoteBack to top

Thanks for checking back.
I don't have a Topics per page setting.

In Preferences the only similar settings are:

Number of Items in Top Page
Stories Number in Home
Stories in Old Articles Box

These are all set to 30.


I have been attempting to splice some of the search module code into the topics module but when I have what I think should work, I get an unexpected $ error.
Thanks,
Tracy
www.thekidconnection.com
Find all posts by Anonymous
Raven
General
General


Joined: Mar 22, 2003
Posts: 5233

Location: USA

PostPosted: Sat May 24, 2003 11:52 am Reply with quoteBack to top

Find this code
Code:
    while(list($topicid, $topicname, $topicimage, $topictext) = sql_fetch_row($result, $dbi)) {
       if ($count == 5) {
       echo "<tr>\n";
       $count = 0;
   }
and change the $count==5 to $count==10
Code:
    while(list($topicid, $topicname, $topicimage, $topictext) = sql_fetch_row($result, $dbi)) {
       if ($count == 10) {
       echo "<tr>\n";
       $count = 0;
   }
or whatever number you want.

_________________
Those who hear not the music think the dancers mad.
Raven Web Hosting|My Scripts & Stuff
Find all posts by RavenView user's profileSend private messageVisit poster's website
Guest







PostPosted: Sat May 24, 2003 12:55 pm Reply with quoteBack to top

Ok, I tried that but what it does is change the number of topic icons in a row. Sad
Find all posts by Anonymous
Raven
General
General


Joined: Mar 22, 2003
Posts: 5233

Location: USA

PostPosted: Sat May 24, 2003 12:59 pm Reply with quoteBack to top

I took a quick shot - sorry. Rather than play tag, please PM me your ftp URL, userid, password and I will use your site to [hopefully] resolve this in a much more timely/efficient manner.

_________________
Those who hear not the music think the dancers mad.
Raven Web Hosting|My Scripts & Stuff
Find all posts by RavenView user's profileSend private messageVisit poster's website
Raven
General
General


Joined: Mar 22, 2003
Posts: 5233

Location: USA

PostPosted: Sat May 24, 2003 3:24 pm Reply with quoteBack to top

Got your information and I will get back to you tonight Smile

_________________
Those who hear not the music think the dancers mad.
Raven Web Hosting|My Scripts & Stuff
Find all posts by RavenView user's profileSend private messageVisit poster's website
Display posts from previous:      
This forum is locked: you cannot post, reply to, or edit topics.  This topic is locked: you cannot edit posts or make replies.printer-friendly view
View previous topic Log in to check your private messages View next topic
You can post new topics in this forum
You can 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



Powered by phpBB © 2001, 2005 phpBB Group

Ported by Nuke Cops © 2003 www.nukecops.com
:: FI Theme :: PHP-Nuke theme by coldblooded (www.nukemods.com) ::
Powered by · TOGETHER TEAM srl ITALY http://www.togetherteam.it · DONDELEO E-COMMERCE http://www.DonDeLeo.com
Web site engine's code is Copyright © 2002 by PHP-Nuke. All Rights Reserved. PHP-Nuke is Free Software released under the GNU/GPL license.
Page Generation: 0.278 Seconds - 298 pages served in past 5 minutes. Nuke Cops Founded by Paul Laudanski (Zhen-Xjell)
:: FI Theme :: PHP-Nuke theme by coldblooded (www.nukemods.com) ::