Hacks: Bug Squish: The "Length of the title" options of "Recent Downloads" block

Posted by: kanakaOn 2003/4/18 12:23:00 4507 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
le="color: #000000"><?php if ( !XOOPS_USE_MULTIBYTES ) { if (strlen($myrow['title']) >= $options[2]) { $title = $myts->makeTboxData4Show(substr($myrow['title'],0,($options[2] -1)))."..."; } }

to
le="color: #000000"><?php 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.