I fixed it myself (with some code from MC Donald).
For everyone who needs the same:
Replace the content of "modules/wfbooks/blocks/wfbooks_top.php" with:
/**
* $Id: wfbooks_top.php v 1.00 21 June 2005 John N Exp $
* Module: WF-links
* Version: v1.0.3
* Release Date: 21 June 2005
* Developer: John N
* Team: WF-Projects
* Licence: GNU
*/
if (!defined('XOOPS_ROOT_PATH')) {
die('XOOPS root path not defined');
}
/**
* controleerBlockgroups()
*
* @param integer $cid
* @param string $permType
* @param boolean $redirect
* @return
**/
function controleerBlockgroups( $cid = 0, $permType = 'WFBookCatPerm', $redirect = false ) {
global $xoopsUser;
$groups = is_object( $xoopsUser ) ? $xoopsUser -> getGroups() : XOOPS_GROUP_ANONYMOUS;
$gperm_handler = &xoops_gethandler( 'groupperm' );
$module_handler = &xoops_gethandler( 'module' );
$module = &$module_handler -> getByDirname( 'wfbooks' );
if ( !$gperm_handler -> checkRight( $permType, $cid, $groups, $module -> getVar( 'mid' ) ) ) {
if ( $redirect == false ) {
return false;
} else {
redirect_header( 'index.php', 3, _NOPERM );
exit();
}
}
unset( $module );
return true;
}
/**
* Function: b_mylinks_top_show
* Input : $options[0] = date for the most recent links
* hits for the most popular links
* $block['content'] = The optional above content
* $options[1] = How many links are displayes
* Output : Returns the most recent or most popular links
*/
function b_wfbooks_top_show( $options ) {
global $xoopsDB;
$block = array();
$modhandler = &xoops_gethandler( 'module' );
$wflModule = &$modhandler -> getByDirname( "wfbooks" );
$config_handler = &xoops_gethandler( 'config' );
$wflModuleConfig = &$config_handler -> getConfigsByCat( 0, $wflModule -> getVar( 'mid' ) );
$wfmyts = &MyTextSanitizer :: getInstance();
//$result = $xoopsDB -> query( "SELECT lid, cid, title, date, hits FROM " . $xoopsDB -> prefix( 'wfbooks_links' ) . " WHERE published > 0 AND published <= " . time() . " AND (expired = 0 OR expired > " . time() . ") AND offline = 0 ORDER BY " . $options[0] . " DESC", $options[1], 0 );
$result = $xoopsDB -> query( "SELECT lid, cid, title, date, hits, uitgever, schrijver, isbn, screenshot FROM " . $xoopsDB -> prefix( 'wfbooks_links' ) . " WHERE published > 0 AND published <= " . time() . " AND (expired = 0 OR expired > " . time() . ") AND offline = 0 ORDER BY " . $options[0] . " DESC", $options[1], 0 );
while ( $myrow = $xoopsDB -> fetchArray( $result ) ) {
if ( false == controleerBlockgroups( $myrow['cid'] ) || $myrow['cid'] == 0 ) {
continue;
}
$linkload = array();
$title = $wfmyts -> htmlSpecialChars( $wfmyts ->stripSlashesGPC($myrow["title"]) );
if ( !XOOPS_USE_MULTIBYTES ) {
if ( strlen( $myrow['title'] ) >= $options[2] ) {
$title = substr( $myrow['title'], 0, ( $options[2] -1 ) ) . "...";
}
}
$linkload['id'] = intval($myrow['lid']);
$linkload['cid'] = intval($myrow['cid']);
$linkload['title'] = $title;
if ( $options[0] == "date" ) {
$linkload['date'] = formatTimestamp( $myrow['date'], $wflModuleConfig['dateformat'] );
} elseif ( $options[0] == "hits" ) {
$linkload['hits'] = $myrow['hits'];
}
$linkload['dirname'] = $wflModule -> getVar( 'dirname' );
$linkload['screenshot'] = $myrow['screenshot'];
$linkload['screenshots_dir'] = $wflModuleConfig['screenshots'];
$linkload['uitgever'] = $myrow['uitgever'];
$linkload['schrijver'] = $myrow['schrijver'];
$linkload['isbn'] = $myrow['isbn'];
$linkload['boek_url'] = XOOPS_URL."/modules/".$linkload['dirname']."/singlelink.php?cid=".$linkload['cid']."&lid=".$linkload['id'];
// Begin taalvariables
$linkload['lang_title'] = _MB_WFB_TITLE;
$linkload['lang_uitgever'] = _MB_WFB_UITGEVER;
$linkload['lang_schrijver'] = _MB_WFB_SCHRIJVER;
$linkload['lang_isbn'] = _MB_WFB_ISBN;
// Eind taalvariables
$block['links'][] = $linkload;
}
unset( $_block_check_array );
return $block;
}
/**
* b_wfbooks_top_edit()
*
* @param $options
* @return
**/
function b_wfbooks_top_edit( $options ) {
$form = "" . _MB_WFB_DISP . " ";
$form .= ";
if ( $options[0] == "date" ) {
$form .= "date'";
} else {
$form .= "hits'";
}
$form .= " />";
$form .= ". $options[1] . "' /> " . _MB_WFB_FILES . "";
$form .= "
" . _MB_WFB_CHARS . " . $options[2] . "' /> " . _MB_WFB_LENGTH . "";
return $form;
}
?>
and replace the content of "modules/wfbooks/templates/blocks/wfbooks_block_new.html" with:
<table width="auto" id="nieuwste_boeken" border="0" onclick='document.location="<{$linkload.boek_url}>"'>
<tr>
<{foreach item=linkload from=$block.links}>
<{if $linkload.screenshot != ""}>
<td id="screenshot" width="auto" style="font-weight: bold; text-align: left; vertical-align: top; padding-left: 8px;">
<a href="<{$linkload.boek_url}>">
<img src="<{$xoops_url}>/<{$linkload.screenshots_dir}>/<{$linkload.screenshot}>" width="100px" border="0" />
a>
td>
<{/if}>
<td id="boek_infol" width="auto" style="font-weight: bold; text-align: left; vertical-align: top; padding-left: 8px;">
<a href="<{$linkload.boek_url}>">
<{if $linkload.uitgever != ""}><{$linkload.lang_uitgever}><br /><{/if}>
<{if $linkload.title != ""}><{$linkload.lang_title}><br /><{/if}>
<{if $linkload.isbn != ""}><{$linkload.lang_isbn}><br /><{/if}>
<{if $linkload.schrijver != ""}><{$linkload.lang_schrijver}><{/if}>
a>
td>
<td id="boek_infoc" width="auto" style="font-weight: bold; text-align: left; vertical-align: top; padding-left: 8px;">
<a href="<{$linkload.boek_url}>">
<{if $linkload.uitgever != ""}>:<br /><{/if}>
<{if $linkload.title != ""}>:<br /><{/if}>
<{if $linkload.isbn != ""}>:<br /><{/if}>
<{if $linkload.schrijver != ""}>:<{/if}>
a>
td>
<td id="boek_infor" width="auto" style="font-weight: bold; text-align: left; vertical-align: top; padding-left: 8px; border-right: 3px dotted #000000;">
<a href="<{$linkload.boek_url}>">
<{if $linkload.uitgever != ""}><{$linkload.uitgever}><br /><{/if}>
<{if $linkload.title != ""}><{$linkload.title}><br /><{/if}>
<{if $linkload.isbn != ""}><{$linkload.isbn}><br /><{/if}>
<{if $linkload.schrijver != ""}><{$linkload.schrijver}><{/if}>
a>
td>
<{/foreach}>
tr>
table>
And as last replace the content of "modules/wfbooks/templates/blocks/wfbooks_block_top.html" with:
<table id="meest_gelezen_boeken" border="0">
<tr>
<{foreach item=linkload from=$block.links}>
<{if $linkload.screenshot != ""}>
<td id="screenshot">
<a href="<{$linkload.boek_url}>">
<img src="<{$xoops_url}>/<{$linkload.screenshots_dir}>/<{$linkload.screenshot}>" width="100px" border="0" />
a>
td>
<{/if}>
<{/foreach}>
tr>
table>
Greets Dylian.