• Webmaster forum we offer you the best experience with our webmaster site and freelancer forum categories where you can share information on topics such as web development and digital marketing!
    Participation and use are completely free!
[XB] What's New Tweak

XF 2.1 / 2.2 / 2.3 [XB] What's New Tweak 2.2.2

XF 2.1 comes with a redesigned What's new page. After upgrading to 2.1, our regular forum members had some trouble using the new system with filters.

This addon will change some of the What's new features in such a way that it is more consistent and easier to understand. Most important feature is probably auto refreshing the What's new page!
  • Auto refresh / update the What's new page [option]
    This will automatically refresh the first page of What's new section every x seconds. Active users will like this feature if they have a window opened to watch your forum. Users have the option to enable or disable auto refreshing with one click.
  • User select refresh frequency [option]
    The admin can define a set of refresh frequency options in the admin panel. This lets your users select a desired refresh interval.
  • Add a refresh button to the What's new section
    Extra button to make refreshing the What's new page easier.
  • Add a "All posts" menu item
    This will call a page which contains all the new posts (read and unread)..
  • Always highlight the What's new menu
    If you select "New Post", Xenforo would normally highlight the menu "Forums". To be more consistent I choose to always highlight "What's new" for all items related to new stuff. Same goes for "All new profile posts".
  • Remove the extra (redundant?) menu bar [option]
    The What's new section contains an extra menu bar with basically the same items as the normal navigation menu. This is confusing so you can turn it off for desktop view. For mobile view this menu bar could be handy, so you can leave it on for mobile view if you like.
  • Hide search id from New Posts page [option]
    Hide the search id that is normally visible in the browser's address bar. This makes it easier for your visitors to refresh or bookmark the New Posts page.
    Example: www.domain.com will be replaced by www.domain.com in the browser's address bar.
Installation
  1. Copy the contents of the folder "upload" to your forum
  2. Go to your xenForo admin control panel > Addons
  3. Install the new addon
Post Installation

After installation it is recommended (but not needed!) to modify some navigation items to make things more intuitive / consistent. This will really help your users understand what is going on:
  1. Go to your xenForo admin control panel > Setup > Public navigation
  2. Disable "New posts" under the "Forums" section (this will force your users to use one place for new items).
  3. Disable "New profile posts" under the "Members" section (this will force your users to use one place for new items).
  4. Modify the "What's new" section, change the link to: {{ link('whats-new/posts/') }}
    The "whats-new" link is basically the same as "whats-new/posts/" but with different layout. To make things more consistent, I choose to always use "whats-new/posts/" as this is the best way of presenting new posts.
XB Whats New Tweak-1.webp


5. Last thing you could change to make things more clear is:
Rename 'New posts' to 'Unread posts' (phrase nav.whatsNewPosts and new_posts)
Rename 'All posts' to 'Latest posts' (phrase (phrase nav.MrJinx_WhatsNewTweak_AllPosts)

XB Whats New Tweak-2.webp


Screenshots

Users can turn on/off auto refreshing with one click :

XB Whats New Tweak-3.webp


XB Whats New Tweak-4.webp


Refresh frequency selectable :

XB Whats New Tweak-5.webp


Refresh in action :

jjgg.webp


If you select "New posts" from the sub-menu, the What's new tab stays selected (instead of the Forums tab) :

XB Whats New Tweak-6.webp


If you select another page, the auto refresh will be disabled but you can still manually refresh the page (auto refresh only makes sense for the first page) :

XB Whats New Tweak-7.webp


Show all new posts, including read and unread, this shortcut removes the "unread filter":

XB Whats New Tweak-8.webp


All posts in the extra navigation bar :

XB Whats New Tweak-9.webp


Option to hide the extra navigation bar :

XB Whats New Tweak-10.webp


If you select the "New profile posts" sub-menu, the "What's new" tab will stay selected :

XB Whats New Tweak-11.webp


Replace the URL with number in it. This is the search id which makes the page sort of static :

XB Whats New Tweak-12.webp
XB Whats New Tweak-13.webp


Admin control panel :

XB Whats New Tweak-14.webp


Are you using Ads (Google Adsense)?

Make sure you don't display ads on pages that have auto refresh enabled.
Go to your ACP > Advertsising and add these templates to the "Prevent ads showing in these templates" section:
whats_new
whats_new_posts


Does this addon use AJAX?

No, this is currently out of scope for this small little and free addon. Using AJAX to refresh the whats new page would require a lot more work. There is also another commercial addon that can do AJAX, with a lot more functionality.

Disclaimer

This add-on has been tested on a standard XF 2.1 (2.1.2) installation with default theme and no add-ons. Although I will try to help you with any problems, it comes 'as is' without any warranties. Always test add-ons before installing them on your production site. I will consider updates and future improvements if needed. Do let me know in this topic.


Version 2.1.1 :
Added support for XFMG (finally)
What's new tab is selected when showing 'New media', 'New media comments' and 'New profile posts
If you choose to hide the extra nav bar, it will be hidden for all What's new items.

Version 2.1.2 : Compatibility updated

The "What's new" option that keeps the tab highlighted will now work with any add-on that uses new content, like XFRM, XFMG and third-party add-ons.

Version 2.1.3 Feature update + maintenance :
Refresh function also added to the 'Latest activity' page (requested by @JOE Link).
Code cleanup: Now using native XF cookie handling instead of using a third party library. This will create a new cookie and reset existing user refresh settings to default.
Upgrade notice: After the upgrade you can safely remove the directory jscookie located in js/MrJinx/vendor/ as it is not needed anymore !

Version 2.1.4 change : Added support for: new profile posts, news feed and XF Media Gallery

Version 2.1.5 Added new options :
Added option "Enable refresh time by default". This controls the default behavior of the auto refresh function for first-time users (eg. no cookie is set).
Added option "Hide the What's new item from navigation bar":

XB Whats New Tweak-15.webp


Added option "Change Mobile view lightning bolt so it points to whats-new/posts":

XB Whats New Tweak-16.webp


Version 2.2.0 :
- Changed name to [OzzModz] What's New Tweak
- Added new developer URL
- Added minimum requirement of XF 2.1

Version 2.2.1 : Added missing js files.

Version 2.2.2 :
- XF 2.3 support
- General code refactor
 
XF 2.1 / 2.2 / 2.3  [Liam W.] Custom Editor Colors  2.2.0
XF 2.1 / 2.2  AMPXF - AMP for Xenforo 2  1.4.7 Beta 3

Attachments

Similar threads Most view View more
Back
Top Bottom