News:

Wondering if this will always be free?  See why free is better.

Main Menu

Post Limit Options

Started by codenaught, July 06, 2006, 01:08:41 PM

Previous topic - Next topic

codenaught

Link to Mod

This mod adds a theme setting that every user can change so they can view their own desired number of topics per page and posts per page as oppose to using the default limits set by the administrator.

Users can find these two settings (Topics per page and Posts per page) in their Profile / Look and Layout Settings  where they will see a dropdown  where they can pick the following options:

  • Default (Uses forum default limit)
  • 10
  • 25
  • 50
  • 75
  • 100
Dev Consultant
Former SMF Doc Coordinator

kezayah

 :'(
Can you put your archive in .zip please ???  :D

PrizeLive.com

great, thanks!!

what's it matter if its not in .zip or not?
Get Paid Instantly via PayPal (or other options) at PrizeLive.com!

kezayah

I try but it doesn't work for me ...  :'(

PrizeLive.com

Quote from: kezayah on July 06, 2006, 03:16:31 PM
I try but it doesn't work for me ...  :'(

hmmm i wonder why.. it installed fine for me..
Get Paid Instantly via PayPal (or other options) at PrizeLive.com!

kezayah

#5
It's because Winrar doesn't open the file *tar.gz ... i don't know why ...  ::)
You can put a link with this archive *.zip ...
Sorry for my english, I'm french ...

MartinB

max. Topics per Page do not work.
The error is however fast repaired.
Replace in install.xml
This:
<file name="$sourcedir/MessageIndex.php">>
<operation>
<search position="after"><![CDATA[
// View all the topics, or just a few?
$maxindex = isset($_REQUEST['all']) && !empty($modSettings['enableAllMessages']) ? $board_info['num_topics'] : $modSettings['defaultMaxTopics'];
]]></search>
<add><![CDATA[
// If the user has inputted 0, it is the default and should be ignored.
if(!empty($options['num_topics_page']))
$modSettings['defaultMaxTopics'] = $options['num_topics_page'];
]]></add>
</operation>

with this:
<file name="$sourcedir/MessageIndex.php">>
<operation>
<search position="before"><![CDATA[
// View all the topics, or just a few?
$maxindex = isset($_REQUEST['all']) && !empty($modSettings['enableAllMessages']) ? $board_info['num_topics'] : $modSettings['defaultMaxTopics'];
]]></search>
<add><![CDATA[
// If the user has inputted 0, it is the default and should be ignored.
if(!empty($options['num_topics_page']))
$modSettings['defaultMaxTopics'] = $options['num_topics_page'];
]]></add>
</operation>


If the installations point is not after but before it, it goes also with the maximum announcement of the topics
Sorry my English not Perfekt, but I hope it am understandably which I mean.

littleone

I havent noticed any problems with it.  Its a great mod.  Thanks ;)

PrizeLive.com

How can I add "15" as a choice for "The number of topics to show per page in a board:"
Get Paid Instantly via PayPal (or other options) at PrizeLive.com!

codenaught

MartinB, I don't see how that would make it work as oppose to how it currently is. The search after means that it searches for that text after the text has been added. So then if the $modSettings['defaultMaxTopics'] gets updated after the $maxindex variable it would have no effect, as the constructPageIndex function passes the value of $maxindex and not $modSettings['defaultMaxTopics'].

SurfExcelerator.com, you can add 15 by doing the following:

Edit Themes/default/Profile.template.php:

Find:

<option value="10"', !empty
($context['member']['options']['num_topics_page']) && $context['member']['options']['num_topics_page'] == 10 ? ' selected="selected"' : '', '>10</option>


After add:

<option value="15"', !empty
($context['member']['options']['num_topics_page']) && $context['member']['options']['num_topics_page'] == 15 ? ' selected="selected"' : '', '>15</option>


And then:

Edit: Themes/default/Settings.template.php

and find:

array(
'id' => 'num_topics_page',
'label' => $txt['admin_num_topics'],
'options' => array(
'default' => '0',
10 => '10',
25 => '25',
50 => '50',
75 => '75',
100 => '100',
),
'default' => true,
),


And change it to this:

array(
'id' => 'num_topics_page',
'label' => $txt['admin_num_topics'],
'options' => array(
'default' => '0',
10 => '10',
                                15 => '15',
25 => '25',
50 => '50',
75 => '75',
100 => '100',
),
'default' => true,
),
Dev Consultant
Former SMF Doc Coordinator

PrizeLive.com

Thanks.... changes were made and it works.....  :D
Get Paid Instantly via PayPal (or other options) at PrizeLive.com!

ltdeta

any plans for SMf Version 1.0.7 ?

codenaught

This mod is now compatable with the SMF 1.0 branch. I realized VERY few changes were needed to get this mod to work for 1.0. :) To use the mod for SMF 1.0x, download and install the "Post_Limit_SMF1.0.zip" package.

Quote from: ltdeta on July 14, 2006, 07:42:37 AM
any plans for SMf Version 1.0.7 ?
While this mod was tested on 1.0.8, I am almost sure it will work fine on 1.0.7. :) Though this post was made well before 1.0.8 was released, so you quite possibly may have upgraded to 1.0.8 already. ;)
Dev Consultant
Former SMF Doc Coordinator

scottws

SMF 1.1 RC3:

"The package you are trying to download or install is either corrupt or not compatible with this version of SMF."

Tried both the .tar.gz and .zip with the same results.

scottws

I just tried to open the .tar.gz file with WinRAR... it is corrupt.  I also can't install it on the forum, as my previous post mentioned.

codenaught

I just downloaded it, and it worked fine. Can you try downloading it again? Also are other mods on the mod site corrupt for you as well?
Dev Consultant
Former SMF Doc Coordinator

scottws

Odd. Based on your suggestion, I tried it again from another computer and it worked fine.  Strange.  I'm not sure why it was getting corrupted on my main computer.

BigGunn

how would I go about applying this to other themes than the default one? I have several themes installed on my boards.

inthe80s

I just started using this mod before I upgraded to 1.1.1

any plans on an update?
Running SMF since May '04.  Started with YaBB on Oct 2001.

codenaught

The mod works fine for me in 1.1.1. Are you having problems? If so what are they?
Dev Consultant
Former SMF Doc Coordinator

Advertisement: