MyBB Community Forums

Full Version: Thread title full lenght on newest threads
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
[Image: newest-threads.png]

I want the thread title to be full length
This cut-down is hard-coded in PHP file ./inc/functions_forumlist.php.
The value is fixed to 25 characters.

Search the file for "25" and you'll find the location.
(in current version around line 312)

You may change the code to a variable length by setting:
https://community.mybb.com/thread-223416.html

[ExiTuS]
(2019-10-29, 09:12 AM)[ExiTuS] Wrote: [ -> ]This cut-down is hard-coded in PHP file ./inc/functions_forumlist.php.
The value is fixed to 25 characters.

Search the file for "25" and you'll find the location.
(in current version around line 312)

You may change the code to a variable length by setting:
https://community.mybb.com/thread-223416.html

[ExiTuS]

Hey, thanks a lot for answering. Although this changes last post settings in forum section. I am using this plugin for newest threads panel:
https://community.mybb.com/mods.php?action=view&pid=269

I have found this line in topstats.settings.php

 $setting = array(
            'sid' => 'NULL',
            'name' => 'topStats_Limit_LastThreads',
            'title' => $db->escape_string($lang->topStats_Limit_LastThreads),
            'description' =>  $db->escape_string($lang->topStats_Limit_LastThreadsDesc),
            'optionscode' => 'text',
            'value' => '5',
            'disporder' => $disporder++,
            'gid' => $gid

And i've tried changing value to a higher one but nothing changed..
Well, you're using Top Stats plugin.
Then check file "topStats.php" and search for "30"... You'll get the following lines in a couple of widget functions:
$tpl['subject'] = (my_strlen($subject) > 30) ? my_substr($subject, 0, 30) . "..." : $subject;

For a full length subject, change this line to the following:
$tpl['subject'] = $subject;

A tip to keep the lines of the file - better do:
$tpl['subject'] = $subject; # (my_strlen($subject) > 30) ? my_substr($subject, 0, 30) . "..." : $subject;
The hash sign deactivates all the rest of the line and avoids unnessecary line breaks while keeping the original code for investigation purpose.

[ExiTuS]
(2019-10-30, 12:51 AM)[ExiTuS] Wrote: [ -> ]Well, you're using Top Stats plugin.
Then check file "topStats.php" and search for "30"... You'll get the following lines in a couple of widget functions:
$tpl['subject'] = (my_strlen($subject) > 30) ? my_substr($subject, 0, 30) . "..." : $subject;

For a full length subject, change this line to the following:
$tpl['subject'] = $subject;

A tip to keep the lines of the file - better do:
$tpl['subject'] = $subject; # (my_strlen($subject) > 30) ? my_substr($subject, 0, 30) . "..." : $subject;
The hash sign deactivates all the rest of the line and avoids unnessecary line breaks while keeping the original code for investigation purpose.

[ExiTuS]

Everything worked. Thanks a lot for helping! <3