vBulletin 5 uses AJAX pagination on topic pages. It has its advantages and disadvantages.
Advantages:
For self-hosted vB5, there's an easier way to do the above by simply downloading the attached zip file below, extracting it and then uploading the product XML file to Product & Hooks > Manage Products > [Add/Import Product].
Enjoy!
Advantages:
- It does not reload the page to fetch previous or next page of a topic. The post content is fetched using AJAX request to the server and dynamically rendered by the client-side using Javascript and jQuery. This means post content will generally load faster because it will not reload the page header and footer and other non-topic related content on the page.
- Less bandwidth used on the server because common images, CSS and Javascript and other resources will not be reloaded every time you navigate through the topic pages.
- Unposted reply you have typed in the editor will not be lost if you navigate to previous or next page or any page of the topic you're replying on.
- You can quote multiple posts located in different pages in a topic without losing existing quotes or content in the editor.
- If you have Javascript-based Ads (e.g. Adsense code) or custom HTML containing <script> tags inside a post, the Javascript will be stripped out by jQuery and will not be executed when user navigates to previous or next page of a topic. Less ad impressions means less earnings.
- If you have sidebar Ads, the ads will only render once on first load of a topic. Navigating to different pages in a topic will not re-render the ads. This means that the ads will be static and will have less impressions and less chance of clicks.
- Less page views recorded for a topic if you are using tracking page views using Google Analytics or similar. You wouldn't know which pages in a topic/thread has more page views.
- Log in to AdminCP.
- Create the product hook template.
- Go to Styles > Style Manager.
- Choose "Add New Template" from the dropdown of the target style.
- Enter "hook_disable_ajax_pagination" for the Title field.
- Paste the following code in the Template field.
Code:<script>(function(){window.addEventListener('load', function(){$('.pagenav-controls .arrow').off('click');$('.forum-conversation-content-widget').off('click', '.js-pagenav .js-pagenav-button');});})();</script>
- Click Save button.
- Repeat Steps 2.1 to 2.5 for each active style/theme your forum is using.
- Create the product hook.
- Go to Products & Hooks > Manage Template Hooks.
- Click [Add New Hook] link.
- Choose "conversation_below_entry" for the Hook Location dropdown.
- Enter "Disable AJAX Pagination by vBMods.rocks" for Title field.
- Enter "hook_disable_ajax_pagination" for Template Name. This is the template name you specified in Step 2.3.
- Click Save button.
For self-hosted vB5, there's an easier way to do the above by simply downloading the attached zip file below, extracting it and then uploading the product XML file to Product & Hooks > Manage Products > [Add/Import Product].
Enjoy!