7
Well I figured it out...
to fix html problem, open up /tutorials/index.php
find
$myts->makeTboxData4Show($myrow['cdesc']);
replace with
$cdesc = $myrow['cdesc'];
if you need html in title, then find
$myts->makeTboxData4Show($myrow['cname']);
replace with
$cname = $myrow['cname'];
Another bug in this module is [ratethis] tag not parsing in tutorial view. To fix it open /tutorials/viewtutorial.php and find
$content = str_replace("[date]","$date",$content);
add after
There is ton of bugs in this module, it took me last 6 days to fix so it works for me. The blocks are totally screwed up, you will end up re-making them.
Here is my tutorials_top.php file. It should work for you, if you change respective file paths.
/******************************************************************************
* Function: b_tutorials_top_show
* Input : $options[0] = date for the most recent links
* hits for the most popular tutorials
* $block['content'] = The optional above content
* $options[1] = How many reviews are displayes
* Output : Returns the desired most recent or most popular tutorials
******************************************************************************/
function b_tutorials_top_show($options) {
global $xoopsDB, $framebrowse;
include_once XOOPS_ROOT_PATH."/modules/anime/cache/config.php";
include XOOPS_ROOT_PATH."/xoops.ccs";
$block = array();
$block['content'] = "4" cellspacing=0>animenu" cellpadding="3">"; $myts =& MyTextSanitizer::getInstance(); $result = $xoopsDB->query("select tid, tname, tlink, codes, status, hits, date from ".$xoopsDB->prefix("tutorials")." WHERE status=1 or status=3 ORDER BY ".$options[0]." DESC",$options[1],0); while (list($tid, $tname, $tlink, $codes, $status, $hits, $date) = $xoopsDB->fetchRow($result) ) { $tname = $myts->makeTboxData4Show($tname); if ( !XOOPS_USE_MULTIBYTES ){ if (strlen($tname) >= 21) { $tname = substr($tname,0,20)." ..."; } } if ($tlink != "") { if ($framebrowse == 1 || $codes >= 10) { $link_url = "".XOOPS_URL."/modules/anime/viewexttutorial.php?tid=$tid"; $link_target = ""; } else { $link_url = $tlink; $link_target = " target="_blank""; } $block['content'] .= "menuAni" href="'.$link_url.'" ".$link_target.">·".$tname.""; } else { $block['content'] .= "/modules/anime/viewtutorial.php?tid=$tid">· $tname"; } $count = 7; //7 days $startdate = (time()-(86400 * $count)); if ($startdate < $time) { if($status==1){ $block['content'] .= " /modules/anime/images/newred.gif" />"; } elseif ($status==3){ $block['content'] .= " /modules/anime/images/update.gif" />"; } } if($options[0] == "date"){ $block['content'] .= "right" class="menuMain"> (".formatTimestamp($date,'s').") "; $block['title'] = _MB_BLOCK_TITLE1; }elseif($options[0] == "hits"){ $block['content'] .= "right"> (".$hits.") "; $block['title'] = _MB_BLOCK_TITLE2; } } $block['content'] .= " |
";
return $block;
}
function b_tutorials_top_edit($options) {
$form = ""._MB_TUTORIALS_DISP." ";
$form .= ";
if($options[0] == "date"){
$form .= "date'";
}else {
$form .= "hits'";
}
$form .= " />";
$form .= ".$options[1]."' /> "._MB_TUTORIALS_TUTS."";
return $form;
}
?>
I suggest you modyfy you short timestammp to something good looking, like "05 Apr 08", that way it will look nicer while used with above blocks ^_^
Good luck with this module, if you are going to use it, there is lots more bugs in it.. I found it easier to fix it then to write my own xP