Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Last Post Max Displayed Characters in Title
#1
A simple setting is my second suggestion.

This option is from a rival sw, but is so needed as an option in settings.

I remember once editing some file to achieve it, but upgrading from 1.6.7 to 1.6.8 replaced the file I had edited.



Wow, I found out the question was posed 4 years ago: Big Grin

Last post - increase/decrease subject length (default: 25 char)
#2
Hah, back in my days of being a support team member!

I'm not sure what the best method is of going about this. I'd rather leave new settings to be able to manipulate multiple areas and not just a one area of the forum. I wonder if we can use the config file for more than it is? For example, if you wanted to manually set this option longer (or shorter), you would add the following to ./inc/config.php:

$config['settings']['lastpost_cutoff'] = 50;

The forumlist generator would then check for this setting and use it if it exists. This would of course stay the same during an upgrade as the config file doesn't change.

The alternative is of course using the same system without settings; you just need to manually add the setting itself instead of coming with the software.

Hmm. Ideas.
#3
(2012-06-22, 08:01 AM)Tomm M Wrote: Hah, back in my days of being a support team member!

I'm not sure what the best method is of going about this. I'd rather leave new settings to be able to manipulate multiple areas and not just a one area of the forum. I wonder if we can use the config file for more than it is? For example, if you wanted to manually set this option longer (or shorter), you would add the following to ./inc/config.php:

$config['settings']['lastpost_cutoff'] = 50;

You mean, if we add this line as of now, it will do the trick? It will save some hassle!

BTW, what's the method they use in vb, in other words how do they make it a setting in the Admin CP panel? does it make the software heavier to load?
#4
I have absolutely no idea how vB works. It doesn't work now but we can make it so that if people want it they just need to make a setting (with the correct name). This would prevent clogging up the ACP settings (which I already think need splitting up a bit more) with something that does so little.
#5
I see. Is it easy for a "commoner" to add his own customized ACP settings? Or does it involve too many modifications?
#6
ACP - Configuration - Add Setting.

Easy. I'm sure if we have a list if instructions or settings users can add it will be simple to follow. We could do this for other areas too.
#7
Magnificent! This has potential.

As an example, how can we link these:

if(my_strlen($lastpost_subject) > 25)

$lastpost_subject = my_substr($lastpost_subject, 0, 25)."...";

from the said ./inc/functions_forumlist.php file directly into a new setting?
#8
$cutoff = 25;
if(isset($mybb->settings['lastpostcutoff']))
{
     $cutoff = intval($mybb->settings['lastpostcutoff']);
}

if(my_strlen($lastpost_subject) > $cutoff)
{
     $lastpost_subject = my_substr($lastpost_subject, 0, $cutoff).'...';
}

Or something to that effect. As there wouldn't be a lastpostcutoff setting forums would use the already used 25 characters. If a user were to add their own setting with this name, it would use that. I guess we would need a list of these somewhere if we were to use this system.
#9
I'm trying to make head and tail of that.

What would exactly be needed for that code to work?

And where is it inserted?
#10
All you need to do (which is what Tom's done) is replace 25 with '$cutoff' and then then define the cutoff by using this anywhere before the other code: '$cutoff = 25;'


Forum Jump:


Users browsing this thread: 1 Guest(s)