Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Not Solved [How To?] Max characters in last post thread title/last post info?
#1
Not Solved
Hello! A friend and I are attempting to use the code listed here to lower the character amount in the last post information - only, it isn't working, and we can't figure it out. We're both running the latest version of mybb. Is there any way possible to do a core edit (or anything, really!) to lower the amount of characters in the last post information? The forum I'm trying to do this on is http://ashen-rpg.com. I imagine that's all the information I need to give, but if anyone needs anymore, let me know.
#2
Not Solved
Check Minimum characters Message and Title MYBB
#3
Not Solved
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.
#4
Not Solved
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... ?
Hey Everyone I am back! I will slowly be in progression of helping you all with your questions!


#5
Not Solved
if (($script == 'editpost.php' && $lastpost) || $script == 'newreply.php' && $lastpost) {
if ($msgcount => 200) {
            $post->set_error('Your message must not contain more than "200" characters');
        }
}
#6
Not Solved
(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.
#7
Not Solved
You want to show less characters in this column????


Attached Files Thumbnail(s)
   
#8
Not Solved
(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.


Attached Files Thumbnail(s)
   
#9
Not Solved
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 Smile
#10
Not Solved
Marcus code will work Smile 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.)."...");
        }
Hey Everyone I am back! I will slowly be in progression of helping you all with your questions!




Forum Jump:


Users browsing this thread: 1 Guest(s)