Hacks: Bug Squish: The "Length of the title" options of "Recent Downloads" block
Posted by: kanakaOn 2003/4/18 12:23:00 4201 reads-= From XOOPS Simplified Chinese Support Site, http://www.hiweed.com, by Hiweed =-
The bug is, If you set the XOOPS_USE_MULTIBYTES to 1 in the /language/yourlanguage/global.php, then, the "Length of the title" of "Recent Downloads" block, quit work.
Hint: The "Length of the title" of "Recent Downloads" block, can be modified in the [Blocks Administration] »» [Edit a block].
How to fix it:
Open the /modules/mydownloads/blocks/mydownloads_top.php file, go to line 46, and change these lines
if ( !XOOPS_USE_MULTIBYTES ) {
if (strlen($myrow['title']) >= $options[2]) {
$title = $myts->makeTboxData4Show(substr($myrow['title'],0,($options[2] -1)))."...";
}
}
to
if ( !XOOPS_USE_MULTIBYTES ) {
if (strlen($myrow['title']) >= $options[2]) {
$title = $myts->makeTboxData4Show(substr($myrow['title'],0,($options[2] -1)))."...";
}
}else{
if (strlen($myrow['title']) >= $options[2]) {
$title = $myts->makeTboxData4Show(substr($myrow['title'],0,($options[2])))."...";
}
}
Okay, now it works well for multibyte language users.