Does anyone have a fix for the missing topic id in pnNewsX 1.6?
When viewing news by topic it doesn't have the id for the next or previous pages... the links on the index page works fine for browsing through all topics.
example URL:
modules.php?op=modload&name=News&file=index&catid=&topic=&startrow=10
module available here:
http://mods.postnuke.com/modules.php?op=modload&name=News&file=article&sid=1232
Watch
GitHub Core
Show your support for Zikula! Sign up at Github account and watch the Core project!
GitHub Modules
- mazdev responded to »Zikula 1.3.3 - Selecting a category in Pages not working« 05:25 PM
- nestormateo responded to »Fillters in Clip« 06:33 AM
- damon responded to »Can the Updated Version Check be Turned Off (Z 1.3)« 03:19 AM
- frw responded to »Bug in the SMTP mail transfer protocol - Port 25 - Zikula 1.2.9« 22. May
- mdee responded to »Short URL questions« 22. May
- mesteele101 responded to »Problem in Database Connection« 21. May
- Herr.Vorragend responded to »Clip Documentation and Doubt« 19. May
Zikula Blog
- Anatomy of Open Source Projects on Mar 07
- Continuous Review on Mar 01
- Not Invented Here on Feb 24
- How to Contribute Your Code at Github on Jan 13
- 10 Steps to Coding-Nirvana: Tips for Successful Module Writing on Nov 12
- Submitting Bug Report Tickets That Get Results on Aug 17
- Cozi Tricks #1: Syntax Highlighting on Aug 07
Login
pnNewsX 1.6 topic id prob
-
**unknown user**
- Rank: Helper
- Registered: Mar 16, 2002
- Last visit: Oct 21, 2009
- Posts: 631
This one is simple. Open up the code and find that link. It will be in index.php or whatever. Post it here and I will tell you what to insert. Simple case of adding in a variable. -
**unknown user**
- Rank: Registered User
- Registered: Mar 16, 2002
- Last visit: Mar 24, 2004
- Posts: 3
From modules/News/funcs.php (will post full code if needed - thanx by the way for taking a look!):
Code
function printlinks($pagelinks=5, $storynum=5, $num_record )
{
global $startrow;
// Calculate the total number of pages
$pages = intval($num_record / $storynum);
// $pages now contains number of pages needed unless there are left over from division
if ($num_record % $storynum)
{
// has left over from division, so add one page
$pages++;
}
$last = ($pages * $storynum) - $storynum;
if( $pages == 1 )
{
echo(""._PAGETOTAL." "._PAGETEXT.": <b>$pages</b><br><br>");
}
else
{
echo(""._PAGETOTAL." "._PAGETEXTS.": <b>$pages</b><br><br>");
}
$cur_page = ceil( $startrow / $storynum ) + 1;
$check = intval(($cur_page-1) / $pagelinks)*$pagelinks + 1;
// Calculate the previous results, only print 'Previous' if startrow is not equal to zero
if ($startrow != 0 && ($startrow >= ($storynum * $pagelinks)))
{
//$prevrow = $startrow - ($storynum * $links);
$prevrow = ($check-$pagelinks-1) * $storynum;
if ($prevrow < 0)
{
$prevrow = 0;
}
echo("[ <a class=\"pn-normal\" href=\"modules.php?op=modload&name=News&file=index&catid=$catid&topic=$topic&startrow=0\" title=\""._PAGEBEGIN." "._PAGETEXT."\">"._PAGEBEGIN."</a> ] ");
echo("[ <a class=\"pn-normal\" href=\"modules.php?op=modload&name=News&file=index&catid=$catid&topic=$topic&startrow=$prevrow\" title=\""._PAGEPREVTEXT." $links "._PAGETEXTS."\">"._PAGEPREV."</a> ] ");
}
// Print the next pages, first check if there are more pages then 1
if ($pages >= 1)
{
$loop = 0;
$end_page_links = $check + $pagelinks - 1;
if ($end_page_links > $pages)
{
$loop = $pages;
$o = $check;
}
else
{
$loop = $end_page_links;
$o = $check;
}
for ($i=$o; $i <= $loop; $i++)
{ // Begin loop
$nextrow = $storynum * ($i - 1);
//Check for current page - if it is: do not put a link
if($cur_page == $i)
{
echo(" <b>$i</b> ");
}
else
{
$title = ucfirst(_PAGETEXT)." $i";
echo(" <a class=\"pn-normal\" href=\"modules.php?op=modload&name=News&file=index&catid=$catid&topic=$topic&startrow=$nextrow\" title=\"$title\">$i</a> ");
}
}
}
//End loop
// Check if we are at the last page, if so, dont print 'Next'
if ( ($pages > ($check + $pagelinks - 1)) && $pages != 1 && ($num_record > 1))
{
// not the last page so print Next $links pages
$nextrow = $storynum * ($check + $pagelinks - 1);
echo("[ <a class=\"pn-normal\" href=\"modules.php?op=modload&name=News&file=index&catid=$catid&topic=$topic&startrow=$nextrow\" title=\""._PAGENEXTTEXT." $links "._PAGETEXTS."\">"._PAGENEXT."</a> ] ");
echo("[ <a class=\"pn-normal\" href=\"modules.php?op=modload&name=News&file=index&catid=$catid&topic=$topic&startrow=$last\" title=\""._PAGEEND." "._PAGETEXT."\">"._PAGEEND."</a> ]");
}
echo("<br><br>");
}
- Moderated by:
- Support
