Vanilla 1 is no longer supported or maintained. If you need a copy, you can get it here.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.
less than 10 discussions per page
Hi,
is there a way to display less than ten discussions per page? I want to display just five instead of the ten which are the minimum value in the settings.
thanks in advance
trash
0
This discussion has been closed.
Comments
$Configuration['DISCUSSIONS_PER_PAGE'] = '30';
to$Configuration['DISCUSSIONS_PER_PAGE'] = '5';
But remember, every time you save the Application Settings page it will change it back to a multiple of 10, so you will have to change it again. But it shouldn't be a problem because that page isn't a frequently used one.$Configuration['DISCUSSIONS_PER_PAGE'] = '5';
To the conf/setting.phpbecause when you upgrade the setting will be lost
But you could also change the while loop (doing double-shifts as a for loop it seems in this case XD) on lines 47 to 51 of themes/settings_globals_form.php to this:
$i = 5; while ($i < 101) { $Selector->AddOption($i, $i); $i += 5; }
That should just give you the option in the settings page to select from multiples of 5 instead of multiples of 10.Open library/Vanilla/Vanilla.Control.DiscussionGrid.php and change line 56 to:
$this->DiscussionData = $DiscussionManager->GetDiscussionList(10, $this->CurrentPage, $CategoryID);
and line 84 to:
$pl->RecordsPerPage = 10;
That should bypass the settings.
upgrading your installations must be tricky...
// Start of custom code if (blabla... // End of custom code
so then when I upgrade I just do a full upgrade and then search for "// Start of custom code" in my latest backup (automatic backups every night) in every file at once using Dreamweaver, so every time it finds that string I just copy it over to the new installation. It's very easy to maintain code changes when you have that system, especially when the code is only updated once a year if that
To Abacus: Awesome
I mean, don't get me wrong, if you have such a very organized method, it's ok, 'cause you seem to be skilled enough,
but for other users not-so-skilled in programming, maybe they need a vanilla-ish solution, don't edit the core, lots of things can be done without the need of doing it...it's less straightforward, I know, but will work almost sure when they upgrade their system