1
chnwalkman
publisher item's title in the block can't truncated
  • 2012/3/28 11:15

  • chnwalkman

  • Just popping in

  • Posts: 35

  • Since: 2004/8/25


I have installed publisher 1.0 and tested it on XOOPS v.2.5.4. When I set "length of the title" option in the "Recent items List" block, met a problem.

When XOOPS language is "English", the title shows OK in the recent items blocks at my homepage, it is truncated according to my setting (it's by "..." ending).

But when I set language to "schinese" by "Preferences Main / General Settings", set the length of the title is invalid in that block. Whether I set how many characters, the item title always complete display in the "recent items list" block at my homepage. How can I fix it?

I set my language/gobal.php:
define('_CHARSET', 'UTF-8');
define('_LANGCODE', 'zh-CN');
define('XOOPS_USE_MULTIBYTES', '1');

Please help. Thank you.

2
chnwalkman
Re: publisher item's title in the block can't truncated
  • 2012/4/2 13:53

  • chnwalkman

  • Just popping in

  • Posts: 35

  • Since: 2004/8/25


When I edited publisher/class/item.php like this:
function title($maxLength 0$format "S") {
        
$ret $this->getVar("title"$format);

        if (
$maxLength != 0) {
//            if (!XOOPS_USE_MULTIBYTES) {
                
if (strlen($ret) >= $maxLength) {
                    
$ret publisher_substr($ret0$maxLength);
                }
//            }
        
}

        return 
$ret;
    }

The "Recent items List" block at homepage shows right. The item's title can be truncated according with my setting (it's by "..." ending).

Is it right?

Login

Who's Online

77 user(s) are online (63 user(s) are browsing Support Forums)


Members: 0


Guests: 77


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