Hacks

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

kanaka  17-Apr-2003 04:04 3715 Reads   No comments 
-= From XOOPS Simplified Chinese Support Site, 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.
Rating 0/5
Rating: 0/5 (0 votes)
Voting is disabled!


Login

Who's Online

147 user(s) are online (5 user(s) are browsing Publisher)


Members: 0


Guests: 147


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Apr 30
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits

Categories