truonglv
Well-known member
Please PM with me if you want to devThis is a GREAT add on, thank you! Any chance it can be used for users to increase the amount of threads show when a user uses the "New Posts" feature?
Please PM with me if you want to devThis is a GREAT add on, thank you! Any chance it can be used for users to increase the amount of threads show when a user uses the "New Posts" feature?
For everyoneI'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?
<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?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?
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}
what are you trying?
The following error occurred:
Division by zero
- XenForo_Application::handlePhpError() in XenForo/ControllerPublic/Thread.php at line 588
- XenForo_ControllerPublic_Thread->actionAddReply() in sonnbPreventDoublePost/ControllerPublic/Thread.php at line 35
- sonnbPreventDoublePost_ControllerPublic_Thread->actionAddReply() in XenPlaza/XPlimitLink/ControllerPublic/Thread.php at line 24
- XenPlaza_XPlimitLink_ControllerPublic_Thread->actionAddReply() in XenForo/FrontController.php at line 347
- XenForo_FrontController->dispatch() in XenForo/FrontController.php at line 134
- XenForo_FrontController->run() in C:/xampp/htdocs/community/index.php at line 13
What version you are using?and this error appeared when I was about to post the 11th post in a page
What version you are using?
- Fast performance addon
- Small bugs fixed
You should try with new versionand this error appeared when I was about to post the 11th post in a page
Version 2.0.0 did not include copyrightGreat 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?
You should try with new version
The callback class 'Nobita_DiscussionsPerPage_Option_AddChoice' for option 'DiscussionsPerPage_AddChoices' is not valid.
- Fixed missing class
Perfect. That's what I was waiting forUpdated 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)
Running this query: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?
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
We use essential cookies to make this site work, and optional cookies to enhance your experience.