Resource icon

Threads, Posts and Conversations Per Page 2.0.1

No permission to download
I've got users requesting this too.

Can this be set to specific usergroups? (ie premium content) or is it just on for everyone as an option?
 
Great plugin! I would need to remove the copyright message to use it on my site though. Do you offer som kind of premium license for this?
 
Updated template so the select's default to the current discussions per page default and messages per page default (if you've added them, that is)

Code:
<dl class="ctrlUnit">
    <dt><label for="ctrl_threads">{xen:phrase threads_per_page}:</label></dt>
    <dd>
        <select name="threads" class="textCtrl" id="ctrl_threads">
            <xen:foreach loop="$choices" value="$choice">
                    <option value="{$choice}" {xen:selected '{$choice} == {$selected.threads} || (!{$selected.threads} && {$choice} == {$xenOptions.discussionsPerPage})'}>{$choice}</option>
            </xen:foreach>
        </select>
    </dd>
</dl>

<dl class="ctrlUnit">
    <dt><label for="ctrl_posts">{xen:phrase posts_per_page}:</label></dt>
    <dd>
        <select name="posts" class="textCtrl" id="ctrl_posts">
            <xen:foreach loop="$choices" value="$choice">
                    <option value="{$choice}" {xen:selected '{$choice} == {$selected.posts} || (!{$selected.posts} && {$choice} == {$xenOptions.messagesPerPage})'}>{$choice}</option>
            </xen:foreach>
        </select>
    </dd>
</dl>

<dl class="ctrlUnit">
    <dt><label for="ctrl_conversations">{xen:phrase conversations_per_page}:</label></dt>
    <dd>
        <select name="conversations" class="textCtrl" id="ctrl_conversations">
            <xen:foreach loop="$choices" value="$choice">
                    <option value="{$choice}" {xen:selected '{$choice} == {$selected.conversations} || (!{$selected.conversations} && {$choice} == {$xenOptions.messagesPerPage})'}>{$choice}</option>
            </xen:foreach>
        </select>
    </dd>
</dl>
 
Updated template so the select's default to the current discussions per page default and messages per page default (if you've added them, that is)

Code:
<dl class="ctrlUnit">
    <dt><label for="ctrl_threads">{xen:phrase threads_per_page}:</label></dt>
    <dd>
        <select name="threads" class="textCtrl" id="ctrl_threads">
            <xen:foreach loop="$choices" value="$choice">
                    <option value="{$choice}" {xen:selected '{$choice} == {$selected.threads} || (!{$selected.threads} && {$choice} == {$xenOptions.discussionsPerPage})'}>{$choice}</option>
            </xen:foreach>
        </select>
    </dd>
</dl>

<dl class="ctrlUnit">
    <dt><label for="ctrl_posts">{xen:phrase posts_per_page}:</label></dt>
    <dd>
        <select name="posts" class="textCtrl" id="ctrl_posts">
            <xen:foreach loop="$choices" value="$choice">
                    <option value="{$choice}" {xen:selected '{$choice} == {$selected.posts} || (!{$selected.posts} && {$choice} == {$xenOptions.messagesPerPage})'}>{$choice}</option>
            </xen:foreach>
        </select>
    </dd>
</dl>

<dl class="ctrlUnit">
    <dt><label for="ctrl_conversations">{xen:phrase conversations_per_page}:</label></dt>
    <dd>
        <select name="conversations" class="textCtrl" id="ctrl_conversations">
            <xen:foreach loop="$choices" value="$choice">
                    <option value="{$choice}" {xen:selected '{$choice} == {$selected.conversations} || (!{$selected.conversations} && {$choice} == {$xenOptions.messagesPerPage})'}>{$choice}</option>
            </xen:foreach>
        </select>
    </dd>
</dl>
what are you trying?
 
what are you trying?

hi, I got this error when I was about to post the 10th post in a page :)
PS: the post is still posted successfully

The following error occurred:

Warning: Division by zero inC:\xampp\htdocs\community\library\Nobita\DiscussionsPerPage\Route\Prefix\Threads.php on line 37

Warning: Division by zero inC:\xampp\htdocs\community\library\Nobita\DiscussionsPerPage\Route\Prefix\Threads.php on line 37
{"error":"Division by zero","traceHtml":"\t
  • XenForo_Application::handlePhpError()<\/b> in<\/span>XenForo\/ControllerPublic\/Thread.php<\/b> at line<\/span> 588<\/b><\/li>\n\t
  • XenForo_ControllerPublic_Thread->actionAddReply()<\/b> in<\/span>sonnbPreventDoublePost\/ControllerPublic\/Thread.php<\/b> at line<\/span> 35<\/b><\/li>\n\t
  • sonnbPreventDoublePost_ControllerPublic_Thread->actionAddReply()<\/b> in<\/span>XenPlaza\/XPlimitLink\/ControllerPublic\/Thread.php<\/b> at line<\/span> 24<\/b><\/li>\n\t
  • XenPlaza_XPlimitLink_ControllerPublic_Thread->actionAddReply()<\/b> in<\/span>XenForo\/FrontController.php<\/b> at line<\/span> 347<\/b><\/li>\n\t
  • XenForo_FrontController->dispatch()<\/b> in<\/span> XenForo\/FrontController.php<\/b> at line<\/span> 134<\/b><\/li>\n\t
  • XenForo_FrontController->run()<\/b> in<\/span> C:\/xampp\/htdocs\/community\/index.php<\/b>at line<\/span> 13<\/b><\/li>\n","_visitor_conversationsUnread":"0","_visitor_alertsUnread":"3","_autoDeferred":true}
 
Last edited:
what are you trying?

and this error appeared when I was about to post the 11th post in a page


The following error occurred:
Division by zero
  1. XenForo_Application::handlePhpError() in XenForo/ControllerPublic/Thread.php at line 588
  2. XenForo_ControllerPublic_Thread->actionAddReply() in sonnbPreventDoublePost/ControllerPublic/Thread.php at line 35
  3. sonnbPreventDoublePost_ControllerPublic_Thread->actionAddReply() in XenPlaza/XPlimitLink/ControllerPublic/Thread.php at line 24
  4. XenPlaza_XPlimitLink_ControllerPublic_Thread->actionAddReply() in XenForo/FrontController.php at line 347
  5. XenForo_FrontController->dispatch() in XenForo/FrontController.php at line 134
  6. XenForo_FrontController->run() in C:/xampp/htdocs/community/index.php at line 13
 
Last edited:
@Nobita.Kun
This error appears:

Code:
The callback class 'Nobita_DiscussionsPerPage_Option_AddChoice' for option 'DiscussionsPerPage_AddChoices' is not valid.
 
Nobita, your plugin is a huge help, thank you! Let me know about your address for donations.
For SEO reasons, we had to keep our default Posts Per Page at 10 when we transferred from vBulletin to Xenforo. However, I'd like to be able to have a different setting that Defaults to 20 posts per page for logged-in users if they haven't already changed their settings... any idea how we could accomplish this?
 
Nobita, your plugin is a huge help, thank you! Let me know about your address for donations.
For SEO reasons, we had to keep our default Posts Per Page at 10 when we transferred from vBulletin to Xenforo. However, I'd like to be able to have a different setting that Defaults to 20 posts per page for logged-in users if they haven't already changed their settings... any idea how we could accomplish this?
Running this query:
Code:
UPDATE xf_user_option SET custom_messages  = 'a:3:{s:5:"posts";i:10;s:7:"threads";i:10;s:13:"conversations";i:20;}' WHERE custom_messages IS NULL

P/s: My paypal email: Truonglv[at]outlook.com if you want to contributor this mod :)
 
Top Bottom