I don't think that will work - it's for the entirety of the forum, and we're just needing it to affect the "lastpost" on the forum index. :c Basically I need it to shorten the number of max characters to a certain number, rather than make it a minimum amount.
Hmm can you post an example? I'm kind of lost.
Do you mean like:
The quick Lazy brown fox was slow?
Into: The Quick Lazy... ?
if (($script == 'editpost.php' && $lastpost) || $script == 'newreply.php' && $lastpost) {
if ($msgcount => 200) {
$post->set_error('Your message must not contain more than "200" characters');
}
}
(2014-05-26, 04:34 PM)Ace700 Wrote: [ -> ]Hmm can you post an example? I'm kind of lost.
Do you mean like:
The quick Lazy brown fox was slow?
Into: The Quick Lazy... ?
Exactly! I don't want to limit the actual thread title characters at all, just how they show up on the index ONLY.
You want to show less characters in this column????
(2014-05-26, 06:16 PM)marcus123 Wrote: [ -> ]You want to show less characters in this column????
Yes! I'm wanting to just cut off the number of characters in that particular area, like from "this is a testing thread" to something like "this is a tes..." or something like that. Basically I'm wanting to shorten it up without actually limiting the number of characters you can enter in the title field.
Well I need to know stuff like is that last user post message? If so then use this code:
if(strlen($posts['message']) > "120")
{
$postmessage = htmlspecialchars_uni(my_substr($posts['message'],0,120)."...");
}
else
{
$postmessage = htmlspecialchars_uni($posts['message']);
}
Add this to your query:
p.message AS postmessage
Find in your code similar code:
while($posts = $db->fetch_array($query)) and then replace
$posts in the code above with yours
Marcus code will work
just fine then.
It checks the string if its longer then: 120 it will add ...
if(strlen($posts['message']) > "Your size here in number")
{
$postmessage = htmlspecialchars_uni(my_substr($posts['message'],0,Same thing as Your size here in number same value.)."...");
}