Read more - cmBB - Simple Content Management for phpBB
Read more
Where can I set how many characters are shown before the "read more" ?
Is the setting in ACP "Minumum content length " , for this purpose?
If it is, It doesn't change anything. No matter what I put there, only ~60 characters are shown and then comes the "read more"
Where can I change this?
-
- Registered User
- Posts: 78
- Joined: Fri Oct 05, 2012 5:19 pm
- Contact:
Re: Read more
./ext/ger/cmbb/cmbb/presentation.php
, function character_limiter
, parameter $n
It's limited to 300 as you can see there, but that does include resulting HTML (formatting, links, images, etc), and -probably more important in your case- it uses PHP's
strlen()
.You seem to have Greek texts, and
strlen()
appears to count bytes rather than characters. For most latin texts that's close to the same amount, but as it has UTF-8 text as input, it can easily result in double or more for the return value.Since I only write (and am able to read) English and Dutch I haven't encountered this before. You might want to search and replace in this function:
Look for all appearances of
strlen()
and replace it with mb_strlen()
. That might just do the trick.Simple CMS, Feed post bot, Avatar Resize, Modbreak, Magic OGP, Live topic update, Modern Quote, Quoted Where (GDPR) and Autoresponder.
Newest: FAQ manager for 3.2
Like my work? Buy me a coffee to keep it coming.
-Don't PM me for support-
- Ger
- Registered User
- Posts: 2108
- Joined: Wed Jan 02, 2008 7:35 pm
- Location: 192.168.1.100
- Contact:
Re: Read more
strlen()
in this file ./ext/ger/cmbb/cmbb/presentation.php
I found something similar but I don't nothing for theese codes so I left it as it is
Code: Select all
if (strlen($str) < $n)
{
return $str;
}
Thanx for help
-
- Registered User
- Posts: 78
- Joined: Fri Oct 05, 2012 5:19 pm
- Contact:
Re: Read more
Simple CMS, Feed post bot, Avatar Resize, Modbreak, Magic OGP, Live topic update, Modern Quote, Quoted Where (GDPR) and Autoresponder.
Newest: FAQ manager for 3.2
Like my work? Buy me a coffee to keep it coming.
-Don't PM me for support-
- Ger
- Registered User
- Posts: 2108
- Joined: Wed Jan 02, 2008 7:35 pm
- Location: 192.168.1.100
- Contact: