PnBooks Help

Hi Guys,

I urgently need this module to be indexed by the search engine spiders before I delete it and add the content manually.

The simulator at http://www.searchengineworld.com/cgi-bin/sim_spider.cgi does not list any of the content in books, nor in my forums.. how can I get this to work? If I type www.postnuke.com into the simulator I get all the forum contents - but not on my site.

Can anyone PLEASE help.

My website is http://www.freebetguide.com
Anyone? Also The icons on the books home
are not showing - see http://www/freebetguide.com to see what I mean.
Ok, weird this... it works here: http://www.freebetguide.com/books.html but not on home page.

I'm sue this is simple but i cant do it!!!
Did you setup the books module as the default module?
Yes, I think that has something to do with the problem
And you're also using a Xanthia theme right? Well, maybe you should compare the master.htm and home.htm?

HTH
Looked all over, but will try again...
Ok:

Master:

Code

<!DOCTYPE HTML public "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html lang="<!--[lang]-->">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=<!--[charset]-->">
<meta name="DESCRIPTION" content="Free Bet Guide, Online Bookmakers Free Bets, Gaming Cash, Casino Bonuses & Online Poker Rooms. Free Forums, Bookmaker Reviews and Lots More. Register FREE Today!">
<meta name="resource-type" content="document">
<meta http-equiv="expires" content="0">
<meta name="author" content="<!--[sitename]-->">
<meta name="copyright" content="Copyright (c) 2004 by FreeBetGuide.com">
<meta name="revisit-after" content="1 days">
<meta name="distribution" content="Global">
<meta name="generator" content="PostNuke <!--[pnml name="_PN_VERSION_NUM"]--> - http://www.dev-postnuke.com">
<meta name="rating" content="General">
<meta name="KEYWORDS" content="<!--[keywords]-->">
<title><!--[title]--></title>
<link rel="StyleSheet" href="<!--[$themepath]-->/style/styleNN.css" type="text/css">
<link rel="icon" href="<!--[$imagepath]-->/icon.png" type="image/png">
<link rel="shortcut icon" href="<!--[$imagepath]-->/favicon.ico">
<style type="text/css">
@import url("<!--[$themepath]-->/style/style.css");
</style>
<!--[additional_header]-->
<!--[modulestylesheet]-->
</head>

<body bgcolor="<!--[$bgcolor]-->" topmargin="0" leftmargin="0" marginheight="0" marginwidth="0">

<!-- CABECERA -->
<!-- LOGO -->
<table cellpadding="0" cellspacing="0" width="<!--[$pagewidth]-->" border="0" bgcolor="<!--[$bgcolor]-->">
<tr>
    <td bgcolor="<!--[$background]-->" align="center"><a href="index.php"><!--[pnimg src="logo.gif" alt="Freebetguide.com"]--></a></td>
    <td style="width:474px;background-image:url('<!--[$imagepath]-->/BannerContentBG.png');" valign="top"><!--[pnbannerdisplay id="5"]-->
</td>

</tr>
</table>

<table cellpadding="0" cellspacing="0" width="<!--[$pagewidth]-->" border="0" align="center" bgcolor="<!--[$bgcolor]-->">
<tr valign="middle" bgcolor="<!--[$bgcolor]-->">
    <td width="150" height="30" align="left" background="<!--[$imagepath]-->/Buttonleiste/leilinks_2.jpg" nowrap>
        <font class="content" color="#F5F5F5"><!--[bienvenido]--></font>
    </td>
    <td valign="top" width="19" height="30" background="<!--[$imagepath]-->/Buttonleiste/leilinks_3.jpg" nowrap></td>
    <td valign="top" width="13" height="30" background="<!--[$imagepath]-->/Buttonleiste/leiteiler_4.jpg" nowrap></td>
    <td valign="top" width="23" height="30" background="<!--[$imagepath]-->/Buttonleiste/lei.jpg" nowrap></td>
    <td valign="middle" align="center" height="30" background="<!--[$imagepath]-->/Buttonleiste/lei.jpg">        
        <A href="<!--[pnml name="_LINK1"]-->"><!--[pnimg src="home.png"]--></a>
        <A href="<!--[pnml name="_LINK2"]-->"><!--[pnimg src="download.gif"]--></a>
        <A href="<!--[pnml name="_LINK3"]-->"><!--[pnimg src="forum.gif"]--></a>
        <A href="<!--[pnml name="_LINK4"]-->"><!--[pnimg src="chat.gif"]--></a>
        <A href="<!--[pnml name="_LINK5"]-->"><!--[pnimg src="links.gif"]--></a>
    </td>
    <td align="left" valign="top" width="23" height="30" background="<!--[$imagepath]-->/Buttonleiste/lei.jpg"></td>
    <td align="left" valign="top" width="10" height="30" background="<!--[$imagepath]-->/Buttonleiste/lei.jpg"></td>
    <td align="left" valign="top" width="23" height="30"><img src="<!--[$imagepath]-->/Buttonleiste/taskright_1.jpg"></td>
    <td align="middle" width="140" height="30" background="<!--[$imagepath]-->/Buttonleiste/taskright_2.jpg">
        <font class="content"><!--[datetime]--></font>
    </td>
    <td bgcolor="#F5F5F5" background="<!--[$imagepath]-->/Buttonleiste/taskright_2.jpg" width="1" height="30"></td>
</tr>
</table>

<table cellpadding="0" cellspacing="0" width="<!--[$pagewidth]-->" border="0" bgcolor="#E9E8EE">
<tr>
    <td align="left" valign="top" width="185" height="14" bgcolor="#858DA5"><img src="<!--[$imagepath]-->/pixel.gif"></td>
    <td align="left" valign="top" width="17" height="14" background="<!--[$imagepath]-->/leiste/leiste_1.gif"><img src="<!--[$imagepath]-->/pixel.gif"></td>
    <td align="left" valign="top" height="15" bgcolor="<!--[$bgcolor]-->"><img src="<!--[$imagepath]-->/pixel.gif"></td>
    <td align="left" valign="top" width="14" height="14" bgcolor="<!--[$bgcolor]-->" <img src="<!--[$imagepath]-->/pixel.gif"></td>
    <td align="left" valign="top" width="185" height="14" bgcolor="<!--[$bgcolor]-->"><img src="<!--[$imagepath]-->/pixel.gif"></td>
</tr>
</table>
<!-- BLOQUES DERECHO - CENTRAL - IZQUIERDO -->
<table width="<!--[$pagewidth]-->" cellpadding="0" cellspacing="0" border="0" bgcolor="<!--[$bgcolor]-->" align="center">
<tr valign="top">
    <td bgcolor="#858DA5"><img src="<!--[$imagepath]-->/pixel.gif" width="5" height="1" border="0" alt=""></td>
    <td valign="top" bgcolor="#858DA5" width="<!--[$lcolwidth]-->" background="<!--[$imagepath]-->/block_left/back.jpg">
        <!-- Left Block Start -->
        <!--[$leftblocks]-->
        <!--[theme]-->
        <!-- Left Block end -->
    </td>
    <td bgcolor="#858DA5"><img src="<!--[$imagepath]-->/pixel.gif" width="5" height="1" border="0" alt=""></td>
    <td bgcolor="#E9E8EE" background="<!--[$imagepath]-->/leiste/leiste_2.gif"><img src="<!--[$imagepath]-->/pixel.gif" width="17" height="1" border="0" alt=""></td>
    <td bgcolor="<!--[$bgcolor]-->"><img src="<!--[$imagepath]-->/pixel.gif" width="5" height="1" border="0" alt=""></td>      
    <td valign="top" align="middle" width="100%">
        <!-- Content Start -->         
        <!--[$maincontent]-->
        <!-- Content end -->
    </td>
    <td background="<!--[$imagepath]-->/block-right/side.gif"><img src="<!--[$imagepath]-->/pixel.gif" width="15" height="1" border="0" alt=""></td>
</tr>
</table>
<!-- FIN DE BLOQUES -->

<!-- PIE DE PAGINA -->
<table cellpadding="0" cellspacing="0" width="<!--[$pagewidth]-->" border="0" bgcolor="<!--[$bgcolor]-->">
<tr>
    <td align="left" valign="top" width="185" height="14" bgcolor="#858DA5" background="<!--[$imagepath]-->/leiste/leiste_8.gif"><img src="<!--[$imagepath]-->/pixel.gif"></td>
    <td align="left" valign="top" width="17\" height="14" background="<!--[$imagepath]-->/leiste/leiste_7.gif"><img src="<!--[$imagepath]-->/pixel.gif"></td>
    <td align="
left" valign="top" height="15\" bgcolor="<!--[$bgcolor]-->" background="<!--[$imagepath]-->/leiste/leiste_8.gif"><img src="<!--[$imagepath]-->/pixel.gif"></td>
    <td align="
left" valign="top" width="14\" height="14" bgcolor="<!--[$bgcolor]-->" background="<!--[$imagepath]-->/leiste/leiste_8.gif"><img src="<!--[$imagepath]-->/pixel.gif"></td>
    <td align="
left" valign="top" width="185\" height="14" bgcolor="<!--[$bgcolor]-->" background="<!--[$imagepath]-->/leiste/leiste_8.gif"><img src="<!--[$imagepath]-->/pixel.gif"></td>
</tr>
</table>
       
<div style="
text-align:center;" class="pn-sub">
<!--[footmsg]-->
<br /><br />
<!--[nocache]--><!--[pagerendertime]--><!--[/nocache]--><!--[typetoolv80]-->
</div>

</body>
</html>


Home:

Code

<!DOCTYPE HTML public "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html lang="<!--[lang]-->">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=<!--[charset]-->">
<meta name="DESCRIPTION" content="Free Bet Guide, Online Bookmakers Free Bets, Gaming Cash, Casino Bonuses & Online Poker Rooms. Free Forums, Bookmaker Reviews and Lots More. Register FREE Today!">
<meta name="ROBOTS" content="INDEX,FOLLOW">
<meta name="resource-type" content="document">
<meta http-equiv="expires" content="0">
<meta name="author" content="FreeBetGuide.com">
<meta name="copyright" content="Copyright (c) 2006 by FreeBetGuide.com">
<meta name="revisit-after" content="1 days">
<meta name="distribution" content="Global">
<meta name="generator" content="PostNuke <!--[pnml name="_PN_VERSION_NUM"]--> - http://www.dev-postnuke.com">
<meta name="rating" content="General">
<meta name="KEYWORDS" content="<!--[keywords]-->">
<title><!--[title]--></title>
<link rel="StyleSheet" href="<!--[$themepath]-->/style/styleNN.css" type="text/css">
<link rel="icon" href="<!--[$imagepath]-->/icon.png" type="image/png">
<link rel="shortcut icon" href="<!--[$imagepath]-->/favicon.ico">
<style type="text/css">
@import url("<!--[$themepath]-->/style/style.css");
</style>
<!--[additional_header]-->
<!--[modulestylesheet]-->
</head>

<body bgcolor="<!--[$bgcolor]-->" topmargin="0" leftmargin="0" marginheight="0" marginwidth="0">

<!-- CABECERA -->
<!-- LOGO -->
<table cellpadding="0" cellspacing="0" width="<!--[$pagewidth]-->" border="0" bgcolor="<!--[$bgcolor]-->">
<tr>
    <td bgcolor="<!--[$background]-->" align="center"><a href="index.php"><!--[pnimg src="logo.gif" alt="FreeBetGuide.com"]--></a></td>
    <td style="width:474px;background-image:url('<!--[$imagepath]-->/BannerContentBG.png');" valign="top"><!--[pnbannerdisplay id="5"]-->
</td>


</tr>
</table>

<table cellpadding="0" cellspacing="0" width="<!--[$pagewidth]-->" border="0" align="center" bgcolor="<!--[$bgcolor]-->">
<tr valign="middle" bgcolor="<!--[$bgcolor]-->">
    <td width="150" height="30" align="left" background="<!--[$imagepath]-->/Buttonleiste/leilinks_2.jpg" nowrap><!--[bienvenido]--></td>
    <td valign="top" width="19" height="30" background="<!--[$imagepath]-->/Buttonleiste/leilinks_3.jpg" nowrap></td>
    <td valign="top" width="13" height="30" background="<!--[$imagepath]-->/Buttonleiste/leiteiler_4.jpg" nowrap></td>
    <td valign="top" width="23" height="30" background="<!--[$imagepath]-->/Buttonleiste/lei.jpg" nowrap></td>
    <td valign="middle" align="center" height="30" background="<!--[$imagepath]-->/Buttonleiste/lei.jpg">        
        <A href="<!--[pnml name="_LINK1"]-->"><!--[pnimg src="home.png"]--></a>
        <A href="<!--[pnml name="_LINK2"]-->"><!--[pnimg src="download.gif"]--></a>
        <A href="<!--[pnml name="_LINK3"]-->"><!--[pnimg src="forum.gif"]--></a>
        <A href="<!--[pnml name="_LINK4"]-->"><!--[pnimg src="chat.gif"]--></a>
        <A href="<!--[pnml name="_LINK5"]-->"><!--[pnimg src="links.gif"]--></a>
    </td>
    <td align="left" valign="top" width="23" height="30" background="<!--[$imagepath]-->/Buttonleiste/lei.jpg"></td>
    <td align="left" valign="top" width="10" height="30" background="<!--[$imagepath]-->/Buttonleiste/lei.jpg"></td>
    <td align="left" valign="top" width="23" height="30"><img src="<!--[$imagepath]-->/Buttonleiste/taskright_1.jpg"></td>
    <td align="middle" width="140" height="30" background="<!--[$imagepath]-->/Buttonleiste/taskright_2.jpg" class="pn-normal"><!--[datetime]--></td>
    <td bgcolor="#F5F5F5" background="<!--[$imagepath]-->/Buttonleiste/taskright_2.jpg" width="1" height="30"></td>
</tr>
</table>

<table cellpadding="0" cellspacing="0" width="<!--[$pagewidth]-->" border="0" bgcolor="#E9E8EE">
<tr>
    <td align="left" valign="top" width="185" height="14" bgcolor="#858DA5"><img src="<!--[$imagepath]-->/pixel.gif"></td>
    <td align="left" valign="top" width="17" height="14" background="<!--[$imagepath]-->/leiste/leiste_1.gif"><img src="<!--[$imagepath]-->/pixel.gif"></td>
    <td align="left" valign="top" height="15" bgcolor="<!--[$bgcolor]-->"><img src="<!--[$imagepath]-->/pixel.gif"></td>
    <td align="left" valign="top" width="14" height="14" bgcolor="<!--[$bgcolor]-->" <img src="<!--[$imagepath]-->/pixel.gif"></td>
    <td align="left" valign="top" width="185" height="14" bgcolor="<!--[$bgcolor]-->"><img src="<!--[$imagepath]-->/pixel.gif"></td>
</tr>
</table>
<!-- BLOQUES DERECHO - CENTRAL - IZQUIERDO -->
<table width="<!--[$pagewidth]-->" cellpadding="0" cellspacing="0" border="0" bgcolor="<!--[$bgcolor]-->" align="center">
<tr valign="top">
    <td bgcolor="#858DA5"><img src="<!--[$imagepath]-->/pixel.gif" width="5" height="1" border="0" alt=""></td>
    <td valign="top" bgcolor="#858DA5" width="<!--[$lcolwidth]-->" background="<!--[$imagepath]-->/block_left/back.jpg">
        <!-- Left Block Start -->
        <!--[$leftblocks]-->
        <!--[theme]-->
        <!-- Left Block end -->
    </td>
    <td bgcolor="#858DA5"><img src="<!--[$imagepath]-->/pixel.gif" width="5" height="1" border="0" alt=""></td>
    <td bgcolor="#E9E8EE" background="<!--[$imagepath]-->/leiste/leiste_2.gif"><img src="<!--[$imagepath]-->/pixel.gif" width="17" height="1" border="0" alt=""></td>
    <td bgcolor="<!--[$bgcolor]-->"><img src="<!--[$imagepath]-->/pixel.gif" width="5" height="1" border="0" alt=""></td>      
    <td valign="top" align="middle" width="100%">
        <!-- Content Start -->         
        <!--[$centerblocks]-->         
        <!--[$maincontent]-->
        <!-- Content end -->
    </td>
    <td background="<!--[$imagepath]-->/block-right/side.gif"><img src="<!--[$imagepath]-->/pixel.gif" width="15" height="1" border="0" alt=""></td>
    <td valign="top" width="<!--[$rcolwidth]-->">
        <!-- Right Block Start -->
        <!--[$rightblocks]-->
        <!-- Right Block end -->
    </td>
</tr>
</table>
<!-- FIN DE BLOQUES -->

<!-- PIE DE PAGINA -->
<table cellpadding="0" cellspacing="0" width="<!--[$pagewidth]-->" border="0" bgcolor="<!--[$bgcolor]-->">
<tr>
    <td align="left" valign="top" width="185" height="14" bgcolor="#858DA5" background="<!--[$imagepath]-->/leiste/leiste_8.gif"><img src="<!--[$imagepath]-->/pixel.gif"></td>
    <td align="left" valign="top" width="17\" height="14" background="<!--[$imagepath]-->/leiste/leiste_7.gif"><img src="<!--[$imagepath]-->/pixel.gif"></td>
    <td align="
left" valign="top" height="15\" bgcolor="<!--[$bgcolor]-->" background="<!--[$imagepath]-->/leiste/leiste_8.gif"><img src="<!--[$imagepath]-->/pixel.gif"></td>
    <td align="
left" valign="top" width="14\" height="14" bgcolor="<!--[$bgcolor]-->" background="<!--[$imagepath]-->/leiste/leiste_8.gif"><img src="<!--[$imagepath]-->/pixel.gif"></td>
    <td align="
left" valign="top" width="185\" height="14" bgcolor="<!--[$bgcolor]-->" background="<!--[$imagepath]-->/leiste/leiste_8.gif"><img src="<!--[$imagepath]-->/pixel.gif"></td>
</tr>
</table>
       
<div style="
text-align:center;" class="pn-sub">
<!--[footmsg]-->
<br /><br />
<!--[nocache]--><!--[pagerendertime]--><!--[/nocache]--><!--[typetoolv80]-->
</div>

</body>
</html>
I'm not sure these are involved... I think it must have something to do with an incorrect image path somewhere.. maybe from within books module the code is "module/" and "images/" but from within the home page its "module" and "/images" so when I load books as home page, the two meet and I get module//images ??

Shot in the dark - but sounds possible.

books help forum is dead too :(
Yeah the extra slash is preventing the images from showing. Don't know what's causing it though :?
Spotted this in theme.php

Code

$thename = basename(dirname(__file__));
$themepath = 'themes/'.$thename;
$imagepath = $themepath.'/images';


This would suggest the //

tried:

Code

$thename = basename(dirname(__file__));
$themepath = 'themes'.$thename;
$imagepath = $themepath.'/images';


and:

Code

$thename = basename(dirname(__file__));
$themepath = 'themes/'.$thename;
$imagepath = $themepath.'images';


But neither work.

Feel like i'm getting closer though!!!!
Right... in bk navigation.php

Code

/**
 * index
 * Display the main books categories
 */

function index($bkid, $highlight)
{
    $dbconn =& pnDBGetConn(true);
    pnModDBInfoLoad('books');
    $pntable =& pnDBGetTables();
    $bookstable = $pntable['books_books'];
    $categoriestable = $pntable['books_categories'];
    $subcategoriestable = $pntable['books_subcategories'];

    $urlinsfunc=pnModGetVar('books','urlinsfunc');  
    $imagesdir=pnModGetVar('books','imagesdir');  
    $booksdir=pnModGetVar('books','booksdir');  
    $emptyimage=pnModGetVar('books','emptyimage');  
    $tablecolor=pnModGetVar('books','tablecolor');  
    $barcolor=pnModGetVar('books','barcolor');  
    $showsubcat=pnModGetVar('books','showsubcat');  
    $books_showed=pnModGetVar('books','books_showed');  
    $showlastbooks=pnModGetVar('books','showlastbooks');  

    include("header.php");
      //This routine may be called with a bkid from
  //admin.php to show a user's book view
    if (isset($bkid)) {
        menu(1);
        OpenTable();
        showbook($bkid, $highlight);
        if ($highlight=='') {
          $urlret = "modules.php?op=modload&amp;name=books&amp;file=index&amp;bkid=$bkid";
        } else {
          $urlret = "modules.php?op=modload&amp;name=books&amp;file=index&amp;bkid=$bkid&amp;highlight=$highlight";
        }
        echo pnModCallHooks('item', 'display', $bkid, $urlret);
        CloseTable();
        include 'footer.php';

    } else {
    $mainlink = 0;

    if (!pnSecAuthAction(0, 'books::', '::', ACCESS_READ)) {
        echo _BOOKSNOAUTH;
        include 'footer.php';
        exit;
    }

    $catcolumn = &$pntable['books_categories_column'];
    $result =& $dbconn->Execute("select $catcolumn[cid], $catcolumn[title], $catcolumn[cdescription]
                              from $categoriestable
                              ORDER BY $catcolumn[title]"
);
    $numcats = $result->PO_RecordCount();
    if ($numcats == 0) {
        echo _NOCATEGORIES;
        include 'footer.php';
    } else {

        menu($mainlink);
        OpenTable();

        echo "<div style=\"text-align:center\"><span class=\"pn-title\">"._BOOKSMAINCAT."</span></div><br />";
        echo "<table width=\"100%\" border=\"0\" cellspacing=\"30\" cellpadding=\"0\" align=\"center\">
        <tr>
           <td valign=\"top\" width=\"50%\">"
;
        echo "<table border=\"0\" cellspacing=\"2\" cellpadding=\"0\" width=\"98%\" summary=\""._BOOKSMAINCAT."\">";

        $count = 0;
        while(list($cid, $title, $cdescription) = $result->fields)
        {
            $result->MoveNext();
            /* Hide this books category if have no access to it */
            if (!pnSecAuthAction(0, 'books::Category', "$title::$cid", ACCESS_READ)) {
                continue;
            }
            if ($count == 0) {
                // we need to start a row
                echo "<tr>";
            }
            $count++;
            $cnumrows = countsubbooks($cid);

            echo "<td valign=\"top\" style=\"width:50%\">"
                ."<span class=\"pn-normal\">"
                ."<img src=\"modules/".pnVarPrepForOS($GLOBALS['name'])."/images/cat.gif\" height=\"13\" width=\"15\" alt=\"" . pnVarPrepForDisplay($title) . "\" />&nbsp;&nbsp;"
                ."<a class=\"pn-title\" href=\"".$GLOBALS['modurl']."&amp;req=view_cat&amp;cid=$cid\">".pnVarPrepForDisplay($title)."</a>"
                ." ($cnumrows)";
            categorynewbookgraphic($cid);
            echo "</span>";
            echo "<br />";

            if ($cdescription) {
                echo "<span class=\"pn-normal\">".pnVarPrepHTMLDisplay($cdescription)."</span><br />";
            }
            if (pnModGetVar('books','showsubcat')) {
                $subcatcolumn = &$pntable['books_subcategories_column'];
                $result2 =& $dbconn->Execute("SELECT $subcatcolumn[sid], $subcatcolumn[title] FROM $subcategoriestable WHERE $subcatcolumn[cid]='".pnVarPrepForStore($cid)."' ORDER BY $subcatcolumn[title]");

                while(list($sid, $stitle) = $result2->fields) {

                    $result2->MoveNext();
                if (!pnSecAuthAction(0, 'books::SubCategory', "$stitle::$sid", ACCESS_READ)) {
                    continue;
                }
                    $bookcolumn = &$pntable['books_books_column'];
                    $sql = "SELECT $bookcolumn[bkid] from $bookstable where $bookcolumn[sid]=" . (int)pnVarPrepForStore($sid);
                    $result3 =& $dbconn->Execute($sql);
                    $snumrows = $result3->PO_RecordCount();
                    $result3->Close();

                    echo "<span class=\"pn-normal\">&nbsp;&nbsp;---&nbsp;"
                    ."<img src=\"modules/".pnVarPrepForOS($GLOBALS['name'])."/images/pixel.gif\" height=\"13\" width=\"15\" alt=\"".pnVarPrepForDisplay($stitle)."\" />&nbsp;&nbsp;"
                    ."<a class=\"pn-normal\" href=\"".$GLOBALS['modurl']."&amp;req=view_subcat&amp;sid=$sid\">".pnVarPrepForDisplay($stitle)."</a> ($snumrows)"
                    ."</span>";
                    subcategorynewbookgraphic($sid);
                    echo "<br />";
                }
                $result2->Close();
            }

            if ($count==1) {
                // next table cell
                echo "</td>";
            }

            if ($count==2) {
                // two entries, start the next table row
                echo "</td></tr>";
                $count = 0;
            }
        } //While
   
        $result->Close();   
        if ($count == 1) {
            // we need
            echo "<td>&nbsp;</td></tr>";
        }
       
        echo "</table>";
    if ($showlastbooks == 1) {

               echo "<td>";
               echo "<table width=\"140\" border=\"0\" cellspacing=\"5\" cellpadding=\"1\" align=\"center\">
                 <tr>
             <td valign=\"top\" align=\"left\" height=\"15\" colspan=\"2\">
                 <table cellspacing=\"0\" cellpadding=\"1\" width=\"140\" border=\"0\">
                     <tr>"
;

                     if ($books_showed == 1) {
                       echo "<td align=\"left\"><img src=\"modules/".pnVarPrepForOS($GLOBALS['name'])."/images/cat.gif\" align=\"middle\" border=\"0\" alt=\"\"> <span class=\"pn-title\">"._MOSTRECENTBOOK."</span></td>";
                     } else {
                       echo "<td align=\"left\"><img src=\"modules/".pnVarPrepForOS($GLOBALS['name'])."/images/cat.gif\" align=\"middle\" border=\"0\" alt=\"\"><span class=\"pn-title\"> $books_showed "._LASTBOOKS."</span></td>";
                     }

               echo "</tr>
                   </table>
                   </td>
                 </tr>
                 <tr>
                   <td align=\"center\" bgcolor=\"$barcolor\" colspan=\"2\"><img src=\"modules/"
.pnVarPrepForOS($GLOBALS['name'])."/images/pixel.gif\" align=\"middle\" border=\"0\" width=\"1\" height=\"1\" alt=\"\"></td>
                 </tr>"
;
            $a = 1;
            $result =& $dbconn->Execute("select bkid, title, cover from $bookstable $catselect $subcatselect order by date DESC limit 0,$books_showed");
            while(list($id, $title, $cover) = $result->fields) {
            $title2 = ereg_replace("_", " ", $title);
            if(strlen($title2) > 50) { // Limit title length to avoid wrap
               $title2= strip_tags($title2, '<a><i><b><ul><li>');
               $title2 = substr($title2,0,50);
               $title2 .= "...";
        }

        if ($cover == "") {
            $coverimg = $imagesdir.'/'.$emptyimage;
            } else {
            if (stristr($cover, "http")) {
                  $coverimg = $cover;
            } else {
                  $coverimg = $booksdir.'/'.$cover;
            }
            }

            $content .= "<tr valign=\"top\"><td width=\"5\"></td>
                         <td bgcolor=\"$tablecolor\" align=\"center\" valign=\"top\" width=\"130\"><a href=\""
.$GLOBALS['modurl']."&amp;bkid=$id\"><img src=\"$coverimg\" border=\"0\" align=\"middle\" alt=\"book cover\"></a></td></tr>
                         <tr><td bgcolor=\"$tablecolor\" width=\"5\"><img src=\"modules/"
.pnVarPrepForOS($GLOBALS['name'])."/images/middot.gif\" align=\"middle\" border=\"0\" alt=\"\"></td>
                         <td bgcolor=\"$tablecolor\" align=\"center\" valign=\"top\" width=\"130\"><a class=\"pn-title\" href=\""
.$GLOBALS['modurl']."&amp;bkid=$id\">$title2</a></td></tr><tr><td></td></tr>";
            $a++;
            $result->MoveNext();
            }
           $result->Close();
           echo "$content";
           echo "</table></td>";

    } //end if showlastbooks
      echo "</tr></table>";

        $result =& $dbconn->Execute("SELECT COUNT(*) FROM $bookstable");
        list($numrows) = $result->fields;
        $result->Close();

        $result =& $dbconn->Execute("SELECT COUNT(*) FROM $categoriestable");
        list($catnum1) = $result->fields;
        $result->Close();

        $result =& $dbconn->Execute("SELECT COUNT(*) FROM $subcategoriestable");
        list($catnum2) = $result->fields;
        $result->Close();

        $catnum = $catnum1 + $catnum2;

    if ($numrows == 1) {
    echo "<br /><br /><div style=\"text-align:center\"><span class=\"pn-sub\">"._THEREIS." <strong>$numrows</strong> "._BOOK." ";
    } else {
    echo "<br /><br /><div style=\"text-align:center\"><span class=\"pn-sub\">"._THEREARE." <strong>$numrows</strong> "._BOOKS." ";
    }

    if ($catnum == 1) {
     echo    ""._AND." <strong>$catnum</strong> "._CATEGORY." "._INDB."</span></div>";
    } else {
      echo ""._AND." <strong>$catnum</strong> "._CATEGORIES." "._INDB."</span></div>";
    }
        CloseTable();
        include("footer.php");
    }
    }
}

/**
 * menu
 * builds the standard navigation menu
 * @param mainlink  integer switch. 1 means show _BOOKSMAIN, 0 not.
 */

function menu($mainlink) {
    $query = pnVarCleanFromInput('query');

    OpenTable();
    //patch [ #471 ] Web Module Fix Wil Schultz (xwil)
    echo "<div style=\"text-align:center\"><a class=\"pn-title\"  href=\"".$GLOBALS['modurl']."\">".pnConfigGetVar('sitename').' -- '._BOOKPAGETITLE."</a><br /><br />";
    //echo "<div style=\"text-align:center\"><a class=\"pn-normal\"  href=\"".$GLOBALS['modurl']."\">"._LINKPAGETITLE."</a><br />";
    echo "<form action=\"".$GLOBALS['modurl']."&amp;req=search\" method=\"post\"><div>"
        ."<span class=\"pn-normal\"><label for=\"query\">"._BOOKS."</label>"
        ." <input type=\"text\" size=\"25\" name=\"query\" id=\"query\" tabindex=\"0\"/>"
        ." <input type=\"submit\" value=\""._SEARCH."\" />"
        ."</span>"
        ."</div>"
        ."</form>";
    echo "<span class=\"pn-normal\">[ ";
    if ($mainlink>0) {
        echo "<a class=\"pn-normal\"  href=\"".$GLOBALS['modurl']."\">"._BOOKSMAIN."</a> | ";
    }
    if (pnSecAuthAction(0, 'books::Category', '::', ACCESS_COMMENT) || pnConfigGetVar('books_anonaddbooklock')) {
        echo "<a class=\"pn-normal\" href=\"".$GLOBALS['modurl']."&amp;req=add_book_form\">"._ADDBOOK."</a> | ";
    }
    echo " <a class=\"pn-normal\" href=\"".$GLOBALS['modurl']."&amp;req=new_books\">"._NEWBOOKS."</a>"
        ." | <a class=\"pn-normal\" href=\"".$GLOBALS['modurl']."&amp;req=most_popular\">"._POPULAR."</a>"
        ." | <a class=\"pn-normal\" href=\"".$GLOBALS['modurl']."&amp;req=top_rated\">"._TOPRATED."</a>"
        ." | <a class=\"pn-normal\" href=\"".$GLOBALS['modurl']."&amp;req=random_book\">"._RANDOM."</a> ]"
        ."</span></div>";
    CloseTable();
    echo "<br />";
}

?>


I have replaced

Code

."<img src=\"modules/".pnVarPrepForOS($GLOBALS['name'])."/images


With

Code

."<img src=\"modules/books/images


This has made the arrow icons reappear (cat.gif). It has NOT however, helped with the "NEW" icons.

I assume it is something to do with

Code

categorynewbookgraphic($cid);


But dont know which bit to hard code.

I have searched all the other book files for any reference to newgreen.gif but no luck!!

HELPPPPPPP!
YESSSSSS!!!!!!!!

Found categorynewbookgraphic($cid); within bk-util.php and now its showing.

Just need to tweek the layout a bit and find out how to get Google to recognise it.
Hello,
Assuming you are running the last version of the books module (as available from the sourceforge books home page http://sourceforge.n…ojects/pn-mod-books, but in fact the version you can download in the CVS from the same page is even newer with some cool features as the fact that list and detail view use a pnrender template easily customizable) I don't see [b]at all/b] why you have such problems because books is compatible with PN .750, Xanthia themes and short urls (Xanthia ones, I didn't test AutoTheme's short urls)
I understand you need to have this module up and running but in my opinion, starting to modify file hadcoding urls without first understanding the problem is not the way to go. I still intend to release new versions of the books module, and you will need to redo your changes again. Did you try an official Xanthia theme (one of those included in PostNuke) ? I am nearly sure your problem are in fact not caused by the module but by your theme.
See the books module working unmodified with PN .761, Xanthia theme, and short urls here on my website : http://www.vedrine.net all the pages have been indexed by Google !!
Anyway, re-thinking to it, you can try to replace each occurence of:

Code

modules/".pnVarPrepForOS($GLOBALS['name'])

with:

Code

modules/".$GLOBALS['ModName']

because maybe it will work better for you (but I fail to see why, and the way I originally coded it should work for everybody !).

--
Visit my live reef aquarium.

My Amazon wish list.
I apologize, because I had'nt understood that you were using books as a start module. In fact there is a problem with using $GLOBALS['name'] in that particular case, and you need to use $GLOBALS['ModName'].
I will change the code in books CVS and it will be corrected in the next release.
Thanks for reporting the problem. Sorry for answering too fast without reading carefully your message icon_redface

--
Visit my live reef aquarium.

My Amazon wish list.
Thanks for the reply, it is an excellent module and is almost exactly what I needed.

Sorry for the confusion, but will replacing the above correct the problem with google or just the homepage issue?

I will have a look at updating tomorrow night and let you know how I get on.

Thanks again.

Mark
My change was to solve the problem with some urls including images URL.
In my opinion you have nothing to do for Google to index your pages. I know a lot of websites using books that were indexed by Google. Maybe just wait a few days.

--
Visit my live reef aquarium.

My Amazon wish list.
Thanks very much for the help.. recoded today and it all went fine.

I dont want to push my luck, but you may be able to help me with my other pnbooks request - its not a fault - more like a request.

http://forums.postnuke.com/index.php?name=PNphpBB2&file=viewtopic&p=194038#194038

Also, whilst i'm here - I cant get any of the blocks beginning "i-" to work, I get the message "the block does not appear to exist" - I have searched on here and the support site for pnbooks but cant find it :(

Is there a quick fix? I was hoping to have a module on the left of my home page which lists all books by category along with the author.. e.g.

Category 1
Book 1 - Author 1
Book 2 - Author 2

Category 2
Book 3 - Author 3

etc.. can these blocks do this?

Mark
For your request about pnTitle and PNphpBB, I am sorry but I can't help you because I switched to pnForum some months ago and I can't remember how I had pnTitle working with PNphpBB icon_redface
But for your request about the books blocks;, I can help you :D
The blocks released for the books module are very old blocks made by MagicX a long time ago and they are "not pnAPI compliant" wich mean they are not coded according to today standards for PostNuke blocks.
Unfortunately PostNuke .761 was released with a Blocks module that don't allow non API comliant blocks to be in the modules/module_name/pnblocks/ subdirectory (in fact developpers should never have used that directory for non complaint blocks but as it worked a lot of them including myself made this mistake)
So you have several ways to solve your problem
- move your blocks from modules/books/pnblocks to include/blocks
(you need to move them not copy because if a block with the same name exist in both places you will get an error message
- download an updated PostNuke file from PostNuke CVS http://cvs.postnuke.…/vnd.viewcvs-markup. Just follow this link and right click on the "download" link at the end of the first line. save the file as "pnBlocks.php" and replace the inludes/pnBlocks.php file on your server with this one
- wait for Postnuke .762 because it will include this fix icon_lol
Hopefully in a near future I will find the time to recode the blocks of the books module to be pnAPI compliant (I have already done it for Anniversaire and PN_ZClassifieds)

--
Visit my live reef aquarium.

My Amazon wish list.
Once again jmvedrine you help me sort a problem!! Thanks.

Did you look at my idea for the title to include "Author" as well as book title? I assume it is an easy change to pntitle.php for a PHP expert - but it has me puzzled!
Just replace

Code

if ($bkid) {
        $sql = "SELECT title FROM {$bookprefix}_books_books WHERE bkid = '" . pnVarPrepForStore($bkid) . "'";
        $result = $dbconn->Execute($sql);
        if ($dbconn->ErrorNo() != 0) {
            return false;
        }
        list($title) = $result->fields;
        $result->Close();
        $title = str_replace('&amp;', '&', pnVarPrepForDisplay($title));
        return pnConfigGetVar('sitename') . ' :: '. $title;
    }

with:

Code

if ($bkid) {
        $sql = "SELECT title, author FROM {$bookprefix}_books_books WHERE bkid = '" . pnVarPrepForStore($bkid) . "'";
        $result = $dbconn->Execute($sql);
        if ($dbconn->ErrorNo() != 0) {
            return false;
        }
        list($title, $author) = $result->fields;
        $result->Close();
        $title = str_replace('&amp;', '&', pnVarPrepForDisplay($title));
        $author = str_replace('&amp;', '&', pnVarPrepForDisplay($author));
        return pnConfigGetVar('sitename') . ' :: '. $title . ' ' . $author;
    }


--
Visit my live reef aquarium.

My Amazon wish list.
Thanks again - looks great!!

http://www.freebetguide.com/books-index-bkid-6.html

Would be good to include this in next release ;)
For people like me having a lot of books with very long titles and 2 or 3 authors this would not be very convenient ...
Imagine "Basslets, Dottybacks and Hawkfishes: Plus Seven More Aqarium Fish Families with Expert Captive Care - Scott W. Michael, Fred Bavendam, Paul Humann, Rudie Kuiter, John Randall, Roger Steene, Takamosa Tonozuka" in the titlebar !!!

--
Visit my live reef aquarium.

My Amazon wish list.

jmvedrine

I apologize, because I had'nt understood that you were using books as a start module. In fact there is a problem with using $GLOBALS['name'] in that particular case, and you need to use $GLOBALS['ModName'].
I will change the code in books CVS and it will be corrected in the next release.
Thanks for reporting the problem. Sorry for answering too fast without reading carefully your message icon_redface


I can't seem to access the CVS and I was wondering when the next release will be for this great module? I looked on your own site as well, but it doesn't seem to be listed there anymore, nor can I log in - it just hangs on the login screen.

Thanks!

--
WIRE SERVICE

Free Press Releases
Same for me I had a lot of problems with Sourceforge CVS these last weeks.
But my website http://www.vedrine.net is online and I have no problem accessing it (it is hosted in USA not in France).
For the books module I decided I will make some change before releasing a new version
- convert the database to a full tree of categories (no more separate categories and subcategories tables)
- use Ratings and EZComments for ratings and comments, provide people with migration scripts, and delete all the code dealing with ratings and comments in the module.
But somewhre along the road I also decided to make the module pnAPI compliant and templated !!!
It is approximatively half done but this was a huge work, needing to rewrite entirely the module (hundreds and hundreds of lines) so there will be a long debugging phase but I think this module will be quite up to date after this (big) step and ready to wait for PostNuke .8 were I will migrate categories to global categories tree (wich will be easier with the new structure icon_smile )

--
Visit my live reef aquarium.

My Amazon wish list.

jmvedrine

Same for me I had a lot of problems with Sourceforge CVS these last weeks.
But my website http://www.vedrine.net is online and I have no problem accessing it (it is hosted in USA not in France).
For the books module I decided I will make some change before releasing a new version
- convert the database to a full tree of categories (no more separate categories and subcategories tables)
- use Ratings and EZComments for ratings and comments, provide people with migration scripts, and delete all the code dealing with ratings and comments in the module.
But somewhre along the road I also decided to make the module pnAPI compliant and templated !!!
It is approximatively half done but this was a huge work, needing to rewrite entirely the module (hundreds and hundreds of lines) so there will be a long debugging phase but I think this module will be quite up to date after this (big) step and ready to wait for PostNuke .8 were I will migrate categories to global categories tree (wich will be easier with the new structure icon_smile )


Oh man that sounds great. I really appreciate your work on this module over the years. haha last time I couldn't log in to your site, and now it won't come up at all! If you have a donation link please post it! :)

--
WIRE SERVICE

Free Press Releases
I am happy to report important progress in the upcoming version of the books module due to the fact that I don't spend a lot of time with my students during the last weeks (those of you following french news will understand)
It is near finished:
- fully pnRender templated including the search plugin
- pnAPI compliant
- hierachical categories
- use Ratings and EZComments modules for ratings and comments
- tableless design (except for the list view on admin side but hey this is what tables are for, isn't it !!)
- new fields for books publication date and code (this one may be used for whatever you wants)
- pnRender plugins to show Ratings and EZComments count on list view (can be used with other templated modules)
What is left to do:
-upgrade from previous version
- recode the blocks
- finish the admin function to validate or delete submitted books
- enhance list view to support reordering the books
- add breadcrumbs to list view
I will convert my own website to the new version in the upcoming days to test the module (in fact as soon as the update function is working)
One problem left is that I coded a modified Ratings module to support migrating the books internal ratings (and other modules' ratings as well for Web_Links or Downloads for instance), so how will I do when I release books .76 ? (EZComments is not a problem because it already support migrating)
- release a patched Ratings module (I hate patching code files)
- I asked my core developpers fellows if they wanted my Ratings module in the .8 CVS but until now no response and that will not solve my problem until .8 is out (I don't think delaying books .76 is an option icon_smile )

--
Visit my live reef aquarium.

My Amazon wish list.
I am happy to report that my website http://www.vedrine.net is now running a beta version of books .76
Direct access to english version here:
http://www.vedrine.n…in-newlang-eng.html
This is a TOTAL rewrite of the books module (yes it was a huge works, only permitted by the fact my students are now blocking my University for 2 weeks so I had a lot of spare time !!)
New features
- full hierachic tree of categories (any level of subcategories allowed). A migration script is provided to migrate your subcategories to categories with the correct parent id.
- use the Ratings module for book evaluation and EZComments module for comments( a migration script for EZComments and an improved Ratings module with migration menu are provided)
- totally pnAPI compliant (a great step for the books module but current users must be warned that this will change all their urls to books, unfortunately this was impossible to avoid so better do it now than latter)
- use pnRender templates for all displays
- use a lot of specifically designed pnRender plugins (navbar, display ratings, count EZComments, newbookgraphic, popgraphic) some of them can even be used with other templated modules. I love pnRender plugins !!
- tableless design of all templates (you have asked for it, it is here ...)
- use CSS stylesheet
- redesigned blocks (also templated)
- much cleaner admin panel (the old one was really awfull and confusing)

It is still a beta version and I already noticed some bugs and missing lang defines.

I want also verify that all pages outputs are HTML compliant.
Also the new documentation must be written.
I am very proud of this version because the books module code was derivated from an old version of the Web_Links module and now the son is ready for .8 even before it's ancestor :D
But I must also admit that I borrowed some code for the NOC project that is now rewritting the Downloads and Web_Links modules !! This was very helpfull so I must thanks the developpers of these projects lindberg and petzi-juist.

Jean-Michel Védrine

Migration of the categories to global categories using the core Categories module will be done when .8 is out.

--
Visit my live reef aquarium.

My Amazon wish list.
What a pity! This is one of the very few modules I use for which I didn't the translation in italian!
Your new release (must we say thank you to the french government for this law on new contracts?) will be the occasion to fill the gap!
With the French government now backing down in the face of people power (clue in north americans, see how it's done!), did you finish up or have a test package for us to try out? I can't wait to try this new books module out!

--
WIRE SERVICE

Free Press Releases