CTA Featured Threads & Portal

CTA Featured Threads & Portal 2.17.0

No permission to buy (£40.00)
I said I would never do a slider.

So, this isn't a slider, it's just something which looks like a slider, acts like a slider and happens to be called a slider... :whistle:

Important Information
I have managed to implement the new slider functionality without introducing any additional queries.
In doing so though, there will be an error generated once the new files are uploaded and until the installer is run: Mysqli prepare error: Unknown column 'slider_date' in 'order clause'

Ideally you should disable the add-on before uploading the files, and re-enable it once you have upgraded.
Regardless of how you upgrade, the error can be ignored as it will only be generated between uploading the files and upgrading the add-on.

The old data\featuredthreadicons directory will be copied to data\featuredthreads\icons during the upgrade.
Once it has copied successfully, you can safely delete the data\featuredthreadicons directory.
If for some reason it does not copy, you can manually rename and move it.
The final structure should be data\featuredthreads\icons\ with all of the numbered directories within.

There are two new images for the slider: cta-featured-threads-slider-controls.png and cta-featured-threads-slider-loader.gif
You will need to copy them from styles\default\images to any custom style directories you have.

Now that everyone has read those important notes ( :rolleyes: ), on with the good stuff.


Slider
As already mentioned above (which everyone read, right?), the biggest feature in 2.10 is the slider.
Featured threads can be promoted to the slider either when being featured or updated.
The feature and update overlays contain a new checkbox to achieve that.

feature-overlay-bb-code.png


update-overlay.png


Note that slider entries will not show until a slider background image has been uploaded.
This is by design as the slider is primarily visual.
The image upload overlay will automatically appear when you promote a thread.

edit-image-03.png


Note that the edit image overlay is now tabbed as it deals with uploading custom icons, background images and slider background images.

There are new options for the slider.

options-01.png


And Style Properties.

style-properties-slider.png


As you can see, the slider can be displayed independently on any of the pages where featured threads can be displayed.

slider-page.png


slider-forum.png



Custom Backgrounds
The other big feature is the ability to add a custom background for each featured thread.

background-page.png


background-forum.png


The ability to upload backgrounds is controlled in the options (see screenshot above).
The add and update image checkboxes on the feature and update overlays trigger the uploading.
There are new checkboxes in the Style Properties to show them on the page and blocks.


Display Globally
A new Display Globally option allows featured threads to only be shown on the page.
That can be set as the default state for manually and automatically featured threads.

options-02.png


options-04.png



Automatic Featuring
The automatic feature function has been expanded quite significantly.
It is now possible to make the existing criteria exclusive, rather than inclusive, so you can, for example, pull well liked threads, or those with lots of replies, which may not necessarily meet both criteria together.

It is also possible to ignore the likes, replies, and views by entering -1.
This is particularly important if you use the Exclusive option because if you set it to 10 likes, 100 replies and leave views at 0, it will naturally feature all threads, as all of them will match the views criteria.

The thread post date and last reply date can also now be defined.

options-03.png



New Features, Functionality & Changes
  • Featured threads can be promoted to a slider which can be optionally displayed on various pages
  • Custom background uploading for each featured thread, with the option to show them on the page and blocks
  • Prevent featured threads from being displayed on the forum list, forum view and new posts pages – the default status can be configured for both manually and automatically featured threads
  • Additional automatic featuring criteria related to thread and reply dates
  • Ability to make the automatic criteria exclusive, rather than inclusive

New Options
  • Featured Thread Background
  • Featured Thread Slider
  • Manual Featuring
    • Display Globally
  • Automatic Featuring
    • Criteria
      • Exclusive
      • Were Posted In The Last
      • Have Been Replied To In The Last
    • Display Globally

New Style Properties
  • CTA Featured Threads Blocks
    • Enable Background
    • Background
  • CTA Featured Threads Page
    • Enable Background
    • Background
  • CTA Featured Threads Slider
    • Auto Play
    • Interval
    • Speed
    • Horizontal Transition
    • Adaptive Height
    • Adaptive Height Speed
    • Random
    • Hover Pause
    • Title
    • Snippet
    • Snippet Length
    • Enable Page Slider
    • Enable Forum List Slider
    • Enable Forum View Slider
    • Enable New / Recent Posts Page Slider
    • Slider
    • Container
    • Image
    • Footer
    • Thread Title
    • Thread Snippet

New Templates
  • cta_featuredthreads_option_template_global
  • cta_featuredthreads_option_template_background
  • cta_featuredthreads_option_template_slider
  • cta_featuredthreads_slider
  • cta_featuredthreads_slider.css

Changed Templates
  • cta_featuredthreads_feature
  • cta_featuredthreads_update
  • cta_featuredthreads_option_template_auto_feature
  • cta_featuredthreads_icon – renamed to cta_featuredthreads_images
  • cta_featuredthreads_icon_link – renamed to cta_featuredthreads_images_link
  • cta_featuredthreads_icon_link_thread – renamed to cta_featuredthreads_images_link_thread
  • cta_featuredthreads_featured
  • cta_featuredthreads_option_template_icon
  • cta_featuredthreads_list_item
  • cta_featuredthreads_featured_list_item
  • cta_featuredthreads_forum_list
  • cta_featuredthreads_forum_view
  • cta_featuredthreads_find_new_wrapper
  • cta_featuredthreads.css

New Phrases
  • cta_ft_add_image
  • cta_ft_add_image_background_explain
  • cta_ft_add_image_explain
  • cta_ft_add_image_icon_explain
  • cta_ft_background
  • cta_ft_cannot_save_file
  • cta_ft_check_display_globally
  • cta_ft_delete_background
  • cta_ft_delete_background_explain
  • cta_ft_delete_slider_background
  • cta_ft_delete_slider_background_explain
  • cta_ft_demote_from_slider_explain
  • cta_ft_display_globally
  • cta_ft_icon
  • cta_ft_image_cannot_be_found_try_another_image
  • cta_ft_option_display_globally
  • cta_ft_option_display_globally_explain
  • cta_ft_option_exclusive
  • cta_ft_option_exclusive_explain
  • cta_ft_option_featured_thread_background
  • cta_ft_option_featured_thread_background_explain
  • cta_ft_option_featured_thread_slider
  • cta_ft_option_featured_thread_slider_explain
  • cta_ft_option_have_been_replied_to_in_the_last
  • cta_ft_option_have_been_replied_to_in_the_last_explain
  • cta_ft_option_image_values_explain
  • cta_ft_option_maximum_entries
  • cta_ft_option_maximum_entries_explain
  • cta_ft_option_use_negative_one_to_ignore
  • cta_ft_option_were_posted_in_the_last
  • cta_ft_promote_to_slider
  • cta_ft_promote_to_slider_explain
  • cta_ft_slider
  • cta_ft_the_image_should_be_x_by_y_pixels
  • cta_ft_uncheck_display_globally
  • cta_ft_update_icon_explain
  • cta_ft_update_image
  • cta_ft_update_image_background_explain
  • cta_ft_update_image_background_slider_explain
  • cta_ft_update_image_explain
  • cta_ft_update_image_icon_background_explain
  • cta_ft_update_image_icon_explain
  • cta_ft_update_image_icon_slider_explain
  • cta_ft_update_image_slider_explain
  • cta_ft_upload_background
  • cta_ft_upload_icon_explain
  • cta_ft_upload_slider_background
  • option_ctaFtBackground
  • option_ctaFtBackground_explain
  • option_ctaFtDisplayGlobally
  • option_ctaFtDisplayGlobally_explain
  • option_ctaFtSlider
  • option_ctaFtSlider_explain
  • style_property_ctaFtBackground_description_master
  • style_property_ctaFtBackground_master
  • style_property_ctaFtBackgroundPage_description_master
  • style_property_ctaFtBackgroundPage_master
  • style_property_ctaFtEnableBackground_description_master
  • style_property_ctaFtEnableBackground_master
  • style_property_ctaFtEnableBackgroundPage_description_master
  • style_property_ctaFtEnableBackgroundPage_master
  • style_property_ctaFtEnableSliderForumList_description_master
  • style_property_ctaFtEnableSliderForumList_master
  • style_property_ctaFtEnableSliderForumView_description_master
  • style_property_ctaFtEnableSliderForumView_master
  • style_property_ctaFtEnableSliderNewPosts_description_master
  • style_property_ctaFtEnableSliderNewPosts_master
  • style_property_ctaFtEnableSliderPage_description_master
  • style_property_ctaFtEnableSliderPage_master
  • style_property_ctaFtSlider_description_master
  • style_property_ctaFtSlider_master
  • style_property_ctaFtSliderContainer_description_master
  • style_property_ctaFtSliderContainer_master
  • style_property_ctaFtSliderFooter_description_master
  • style_property_ctaFtSliderFooter_master
  • style_property_ctaFtSliderImage_description_master
  • style_property_ctaFtSliderImage_master
  • style_property_ctaFtSliderOptionAdaptive_description_master
  • style_property_ctaFtSliderOptionAdaptive_master
  • style_property_ctaFtSliderOptionAdaptiveSpeed_description_master
  • style_property_ctaFtSliderOptionAdaptiveSpeed_master
  • style_property_ctaFtSliderOptionAuto_description_master
  • style_property_ctaFtSliderOptionAuto_master
  • style_property_ctaFtSliderOptionInterval_description_master
  • style_property_ctaFtSliderOptionInterval_master
  • style_property_ctaFtSliderOptionPause_description_master
  • style_property_ctaFtSliderOptionPause_master
  • style_property_ctaFtSliderOptionRandom_description_master
  • style_property_ctaFtSliderOptionRandom_master
  • style_property_ctaFtSliderOptionSnippet_description_master
  • style_property_ctaFtSliderOptionSnippet_master
  • style_property_ctaFtSliderOptionSnippetLength_description_master
  • style_property_ctaFtSliderOptionSnippetLength_master
  • style_property_ctaFtSliderOptionSpeed_description_master
  • style_property_ctaFtSliderOptionSpeed_master
  • style_property_ctaFtSliderOptionTitle_description_master
  • style_property_ctaFtSliderOptionTitle_master
  • style_property_ctaFtSliderOptionTransition_description_master
  • style_property_ctaFtSliderOptionTransition_master
  • style_property_ctaFtSliderThreadSnippet_description_master
  • style_property_ctaFtSliderThreadSnippet_master
  • style_property_ctaFtSliderThreadTitle_description_master
  • style_property_ctaFtSliderThreadTitle_master
  • style_property_group_ctaFtSlider_master
  • style_property_group_ctaFtSlider_master_desc

Changed Phrases
  • cta_ft_edit_icon_title – renamed to cta_ft_edit_images
  • cta_ft_icons_are_not_enabled – renamed to cta_ft_image_uploading_is_not_enabled
  • cta_ft_option_criteria_explain
  • cta_ft_option_icon_quality_explain – renamed to cta_ft_option_image_quality_explain
  • cta_ft_option_likes – renamed to cta_ft_option_have_at_least_x_likes
  • cta_ft_option_replies – renamed to cta_ft_option_have_at_least_x_replies
  • cta_ft_option_threads_with_at_least_x – renamed to cta_ft_option_threads_which
  • cta_ft_option_views – renamed to cta_ft_option_have_at_least_x_views

Removed Phrases
  • cta_ft_update_icon
  • cta_ft_check_update_delete_icon
  • cta_ft_check_upload_icon

Changed Template Modifications
  • cta_featuredthreads_icon_link_find_new_posts – renamed to cta_featuredthreads_images_link_find_new_posts
  • cta_featuredthreads_icon_link_forum_list – renamed to cta_featuredthreads_images_ link_forum_list
  • cta_featuredthreads_icon_link_forum_view – renamed to cta_featuredthreads_images_ link_forum_view
  • cta_featuredthreads_icon_link_thread_view – renamed to cta_featuredthreads_images_ link_thread_view

New CSS
  • cta_featuredthreads_slider.css – new template
  • .ctaFtBackgroundEditor
  • .ctaFtIconEditor
  • .ctaFtImageEditor
  • .ctaFtImageEditor .ctaFtBackground
  • .ctaFtImageEditor .ctaFtSlider
  • .ctaFtImageEditor # CtaFtImagePanes
  • .ctaFtSliderEditor
  • .sectionMain.ctaFtBackground
  • .sectionMain.ctaFtBackgroundPage

Changed CSS
  • .ctaFtIconEditor .* - renamed to .ctaFtImageEditor .*


As always, many thanks to Chris for the help and support.
Shortly after 2.9 was released, the issue of previously featured threads being automatically featured again was raised.
The question was asked whether expired threads would be featured again if the criteria was unchanged and of course the answer is yes.

This very minor update addresses that.

I wouldn't normally add a new function to a third point release, but I appreciate that the automatic featuring function may be of far more use to some if previously featured threads can be prevented from being featured automatically.

So there is now a new option - Include Expired.

options-03.png


Note that this only applies to the Likes/Replies/Views option.
If All Threads is selected and an expired thread is moved into a selected forum, it will still be automatically featured.

Other than that, there are no other new features, but there are some minor bug fixes.


New Features, Functionality & Changes
  • Added an option to prevent expired featured threads from being automatically featured again

Bugs Fixed
  • Added a check to stop the deferred process if automatic featuring is disabled while it is still running
  • Fixed a bug related to phrase length compatibility with XenForo versions lower than 1.3
  • Fixed title tooltip style property bug on the Featured Threads page

New Options
  • Automatic Featuring
    • Criteria
      • Include Expired

Changed Templates
  • cta_featuredthreads_featured_list_item
  • cta_featuredthreads_option_template_auto_feature

New Phrases
  • cta_ft_option_include_expired
  • cta_ft_option_include_expired_explained
By popular demand!


OK, only one guy asked for it, but it was Chris so I could hardly say no, could I?

It is now possible for threads to be automatically featured.
I could have just done it based on selected forums, but no, I went further. Much further!

Not only can you select multiple forums, you can also choose from various criteria such as all threads, number of likes, replies and views.

options-03.png


In addition, there are settings relating to BB Code, maximum characters, duration, and the ability to dismiss, which can all have default values set.

Two features unique to automatically featured threads are the ability to set a default icon, with the path set in Style Properties so it can be different for each style, and the option to make the threads featured by the thread author or a named member account.
An image will need to be uploaded for each style directory if using the default icon option.

The criteria for automatically featuring threads works in two different ways.
If the All Threads option is chosen, any newly posted threads from that point on will be featured automatically.
Threads which require approval (moderated) will not be featured until they are approved.
Any existing threads which are undeleted or moved into the forum will also be featured automatically.

If the option related to X likes/replies/views is chosen, that applies to all threads, including existing ones.
A routine cron task runs once per hour and checks the values set in the options.
Any threads which meet the criteria when the cron runs will be featured automatically.

Once a thread is featured, it will not be unfeatured it if no longer meets the criteria.
It will have to be unfeatured manually.

If the default icon has been set, it will be displayed instead of the thread author's avatar.
The default icon or avatar can be overridden on a per featured thread basis in the normal manner - by updating the featured thread and uploading an icon.

You won't be able to set the automatic feature function if you don't select at least one forum and a valid member name (if you don't use thread author).
After setting the member name and saving the page, if you subsequently delete the member, the code handles that and will show the threads as being featured by 'Guest'.

The code is able to handle the simultaneous automatic featuring of thousands of threads with no issues.
It uses the deferred function so in theory should be able to handle any sized forum.

This is ideal for someone who wants to replace an existing portal.
If they currently have every thread in a 'news' forum on the portal page, setting all criteria to 0 for that forum will replicate that in less than a minute.
Then the setting can be switched to All Threads which will automatically feature any new threads from that point on.

Two new options for manually featured threads are the ability to set the default duration and to allow threads to be dismissible, as well as set the default dismiss status.

options-02.png


As previously mentioned, the default icon for automatically featured threads is set in Style Properties.
One other new addition is the ability to disable the Featured Threads link under the Forums tab.
This is primarily for when it is used as a portal.

style-properties-settings.png


Due to the addition of all the new options, the page has been completely overhauled to make it more intuitive and easier to understand.

options-01.png options-02.png options-03.png options-04.png options-05.png


New Features, Functionality & Changes
  • Automatic featuring based on selected forums and other criteria
  • Option to set the default duration when manually featuring
  • Option to allow threads to be dismissible and to set the default status when manually featuring
  • New Style Property to control the default icon for automatically featured threads
  • New Style Property to control whether the Featured Threads link is shown under the Forums tab
  • Complete overhaul of the Options page
  • Remove hard coded 10,000 character limit from featured message content

Bugs Fixed
  • Removed erroneous spaces from some templates
  • Corrected array values in options
  • Corrected default value for per page setting in options
  • Corrected default values for icon settings in option
  • Removed default settings for latest featured thread
  • Remove spoiler when bb code is disabled

New Options
  • Automatic Featuring
  • Manual Featuring
    • Duration
    • Allow Dismissal

New Style Properties
  • Automatic Feature Icon Path
  • Enable Forums Tab Link

New Templates
  • cta_featuredthreads_option_template_auto_feature
  • cta_featuredthreads_option_template_dismiss
  • cta_featuredthreads_option_template_duration

Changed Templates
  • cta_featuredthreads_feature
  • cta_featuredthreads_featured_list_item
  • cta_featuredthreads_list_item
  • cta_featuredthreads_update
  • cta_featuredthreads_icon
  • cta_featuredthreads_navigation_link
  • cta_featuredthreads_option_template_bb_code
  • cta_featuredthreads_option_template_forum_list
  • cta_featuredthreads_option_template_forum_view
  • cta_featuredthreads_option_template_icon
  • cta_featuredthreads_option_template_new_posts
  • cta_featuredthreads_option_template_page

New Phrases
  • cron_entry_ctaFtAutomaticFeature
  • cta_ft_expire_in
  • cta_ft_guest
  • cta_ft_indefinite
  • cta_ft_option_all_threads
  • cta_ft_option_allow_dismissal
  • cta_ft_option_allow_dismissal_explain
  • cta_ft_option_criteria
  • cta_ft_option_criteria_explain
  • cta_ft_option_dismissible
  • cta_ft_option_dismissible_explain
  • cta_ft_option_display_in
  • cta_ft_option_duration
  • cta_ft_option_duration_explain
  • cta_ft_option_enable_automatic_featuring
  • cta_ft_option_enable_automatic_featuring_explain
  • cta_ft_option_enter_valid_member_name_for_default_featuring_member
  • cta_ft_option_featured_by
  • cta_ft_option_featured_by_explain
  • cta_ft_option_featured_thread_icon_explain
  • cta_ft_option_featured_threads_blocks_forum_list_explain
  • cta_ft_option_featured_threads_blocks_forum_view_explain
  • cta_ft_option_featured_threads_blocks_new_posts_explain
  • cta_ft_option_featured_threads_page_explain
  • cta_ft_option_forums
  • cta_ft_option_forums_explain
  • cta_ft_option_icon
  • cta_ft_option_icon_explain
  • cta_ft_option_likes
  • cta_ft_option_member
  • cta_ft_option_member_name
  • cta_ft_option_replies
  • cta_ft_option_select_at_least_one_forum_enter_valid_member_name
  • cta_ft_option_select_at_least_one_forum_to_automatically_feature_threads_from
  • cta_ft_option_thread_author
  • cta_ft_option_threads_with_at_least_x
  • cta_ft_option_views
  • option_ctaFtAutomaticFeature
  • option_ctaFtAutomaticFeature_explain
  • option_ctaFtDismiss
  • option_ctaFtDismiss_explain
  • option_ctaFtDuration
  • option_ctaFtDuration_explain
  • style_property_ctaFtAutomaticFeatureIconPath_description_master
  • style_property_ctaFtAutomaticFeatureIconPath_master
  • style_property_ctaFtEnableForumsNavigationLink_description_master
  • style_property_ctaFtEnableForumsNavigationLink_master

Changed Phrases
  • cta_ft_check_update_delete_icon
  • cta_ft_check_upload_icon
  • cta_ft_option_display_all_forums – renamed to cta_ft_option_all_forums
  • cta_ft_option_display_own_forum – renamed to cta_ft_option_own_forum
  • cta_ft_option_display_own_parent_forums – renamed to cta_ft_option_own_parent_forums
  • cta_ft_option_enable_bb_code – renamed to cta_ft_option_bb_code
  • cta_ft_option_enable_bb_code_explain – renamed to cta_ft_option_bb_code_explain
  • cta_ft_option_enable_home_tab – renamed to cta_ft_option_home_tab
  • cta_ft_option_enable_home_tab_explain – renamed to cta_ft_option_home_tab_explain
  • cta_ft_option_enable_home_tab_links – renamed to cta_ft_option_home_tab_links
  • cta_ft_option_enable_home_tab_links_explain – renamed to cta_ft_option_home_tab_links_explain
  • cta_ft_option_enable_sidebar_online_users – renamed to cta_ft_option_sidebar_online_users
  • cta_ft_option_enable_sidebar_online_users_explain – renamed to cta_ft_option_sidebar_online_users_explain
  • cta_ft_option_enable_sidebar_statistics – renamed to cta_ft_option_sidebar_statistics
  • cta_ft_option_icon_values_changed_explain
  • cta_ft_option_latest_featured_thread – renamed to cta_ft_option_latest
  • cta_ft_option_latest_featured_thread_explain – renamed to cta_ft_option_latest_explained
  • cta_ft_option_maximum_characters_explain
  • cta_ft_option_per_page_explain – renamed to cta_ft_option_featured_threads_per_page_explain
  • cta_ft_option_sidebar_statistics_explain – renamed to cta_ft_option_enable_sidebar_statistics_explain
  • cta_ft_please_enter_message_between_x_y_characters
  • cta_ft_restore_avatar – renamed to cta_ft_delete_icon_explain
  • option_ctaFtAlertShowExpiry
  • option_ctaFtAlertShowExpiry_explain
  • option_ctaFtContentBbCode
  • option_ctaFtContentMaxCharacters
  • option_ctaFtFeaturedThreadsForumList
  • option_ctaFtFeaturedThreadsForumList_explain
  • option_ctaFtFeaturedThreadsForumView
  • option_ctaFtFeaturedThreadsForumView_explain
  • option_ctaFtFeaturedThreadsNewPosts
  • option_ctaFtFeaturedThreadsNewPosts_explain
  • option_ctaFtFeaturedThreadsPage_explain
  • option_ctaFtIcon_explain
  • option_ctaFtMaxFeaturedThreads_explain
  • style_property_ctaFtEnableExpired_description_master
  • style_property_ctaFtEnableReadMoreLinkPage_description_master
  • style_property_ctaFtEnableReadMoreLink_description_master
  • style_property_ctaFtEnableTitleForumList_description_master
  • style_property_ctaFtEnableTitleForumView_description_master

As always, many thanks to Chris for the help and support.
This release adds some useful additional functionality and features, designed to get your members sharing your best content on the various social networks, thereby promoting and maximising traffic to your site.

Once again, this update has the potential to break stuff so follow these instructions carefully.

Due to the page options changing to introduce the new sort orders, the cache needs to be updated.
Until it is, errors may be generated and pages could fail to load.

Ideally disable the add-on while upgrading.
Once the upgrade is complete, enable the add-on, go to Options -> CTA Featured Threads and just click the [Save Changes] button.

Any errors related to "Undefined index: sortOrder", "Undefined variable: featuredThreads", "Invalid argument supplied for foreach()" can be ignored and deleted from the log.


Now on with the show!

A new permission for dismissing featured threads has been added.

70-permissions.png


Ensure you set it for those user groups you wish to be able to dismiss as it is not set by default for all user groups.

A new option now allows the Featured Threads page to be sorted on featured date or thread date.

50-options-2.png


Those with the permission to update and unfeature threads can now do so directly from the blocks on all pages.

08-update-unfeature.png


09-update-unfeature-page.png


When updating, there is the option to update the featured date.

12-update-overlay-no-icon-non-dismissible.png


Doing so will make that featured thread the latest thread to be featured and push it to the top of the page, if the sort order is set to the featured date.
What that does is allow you to quickly and easily arrange the order of the featured threads on the page.
It will also make it the current thread if the latest featured thread options have been checked for the other pages.

The node title URL has been added as an additional footer element, controlled via separate Style Properties for the blocks and page.

Sharing services have also been added, again controlled by separate Style Properties.

01-forum-list.png


03-featured-threads-1.png


The Style Properties have been completely reorganised, primarily due to the introduction of the additional footer and sharing elements.

61-style-properties-settings.png 62-style-properties-blocks.png 63-style-properties-blocks-footer-sharing.png 64-style-properties-page.png 65-style-properties-page-footer-sharing.png


New Features, Functionality & Changes
  • Added a new permission - Dismiss featured threads
  • New option to display featured threads on the page in thread date or featured date order
  • Update and Unfeature links added to blocks
  • New checkbox to update the featured date when updating a featured thread
  • The node title URL has been added as a footer element
  • Social media sharing services have been added to the blocks
  • New Style Properties for the footer and sharing elements
  • Style Properties have been completely reorganised
  • The checkboxes on the feature and update overlays have been condensed
  • The Featured Threads page meta data, when it is not set as the home page, has been updated

New Options
  • Featured Threads Page
    • Sort Order

New Style Properties
  • CTA Featured Threads Blocks Footer & Sharing – new group
    • Enable Sharing
    • Enable Twitter
    • Enable Google
    • Enable Facebook
    • Enable AddThis
    • Enable Custom Share Services
    • Share Container
    • Share Controls
    • Twitter
    • Google
    • Facebook
    • Addthis
    • Custom
  • CTA Featured Threads Page Footer & Sharing – new group
    • Enable Sharing
    • Enable Twitter
    • Enable Google
    • Enable Facebook
    • Enable AddThis
    • Enable Custom Share Services
    • Share Container
    • Share Controls
    • Twitter
    • Google
    • Facebook
    • AddThis
    • Custom

Changed Style Properties
  • All blocks footer elements moved to the new group - CTA Featured Threads Blocks Footer & Sharing
  • All page footer elements moved to the new group - CTA Featured Threads Page Footer & Sharing

New Templates
  • cta_featuredthreads_list_item_share
  • cta_featuredthreads_list_item_sharecustom
  • cta_featuredthreads_featured_list_item_share
  • cta_featuredthreads_featured_list_item_sharecustom

Changed Templates
  • cta_featuredthreads_list_item
  • cta_featuredthreads_featured_list_item
  • cta_featuredthreads_feature
  • cta_featuredthreads_update
  • cta_featuredthreads_featured
  • cta_featuredthreads.css

New Phrases
  • cta_ft_update_featured_date
  • cta_ft_check_update_featured_date
  • cta_ft_option_sort_order
  • cta_ft_option_sort_order_explain
  • cta_ft_option_sort_order_featured_date
  • cta_ft_option_sort_order_thread_date

New Template Modifications
  • cta_featuredthreads_icon_link_forum_list

New CSS
  • .ctaFtForum a
  • .ctaFtForumPage a
  • .ctaFtShare
  • .ctaFtShareControls
  • .ctaFtTwitter
  • .ctaFtGoogle
  • .ctaFtFacebook
  • .ctaFtAddThis
  • .ctaFtCustomShare
  • .ctaFtSharePage
  • .ctaFtShareControlsPage
  • .ctaFtTwitterPage
  • .ctaFtGooglePage
  • .ctaFtFacebookPage
  • .ctaFtAddThisPage
  • .ctaFtCustomSharePage
  • .sectionMain.ctaFtContainerPage .Popup .arrowWidget
It is now possible for members to dismiss featured threads from the forum list, forum view and new / recent posts pages.
Any dismissed threads will still show on the main Featured Threads page.

This is achieved by clicking the [Dismiss Featured Thread] link on the block.
16-dismiss.png


Which will in turn result in a confirmation overlay.
17-dismiss-confirm.png


This is only possible if the featured thread is dismissible.
When featuring or updating there is the option to make it so.
10-feature-overlay-bb-code.png


11-update-overlay-bb-code.png


If a thread has already been featured and allowed to be dismissed, when updating, the existing status will be preserved.
12-update-overlay-icon-dismissible.png

Unchecking the 'Allow dismissal' checkbox will restore it to view for all members who have dismissed it.

Members can also restore all of their own dismissed threads via the Account Preferences page.
33-account-preferences.png


The update icon overlay now respects the icon ratio.
15-update-delete-icon.png


The Style Properties relating to the feature overlay message area have changed.
61-style-properties-settings.png


New Features, Functionality & Changes
  • The ability to dismiss featured threads from the forum list, forum view and new / recent posts pages
  • Changed the style properties for the feature and update overlay message areas
  • The feature and update overlays now scroll with the page
  • Maximum and auto height applied to the icon on the edit overlay, to ensure the correct ratio for non-square icons
  • Condensed the update overlay text for ‘featured by’ and ‘until’ into one line

Bugs Fixed
  • Fixed bug related to Latest Featured Thread on forum list and new posts pages
  • Fixed bug related to thread URL on blocks
  • Fixed bug related to when a view isn’t being returned

New Style Properties
  • ctaFtFeatureMessageAreaMaxHeight
  • ctaFtUpdateMessageAreaMaxHeight

Removed Style Properties
  • ctaFtFeatureOverlayMaxHeight
  • ctaFtUpdateOverlayMaxHeight

New Templates
  • cta_featuredthreads_dismiss
  • cta_featuredthreads_account_preferences

Changed Templates
  • cta_featuredthreads_feature
  • cta_featuredthreads_update
  • cta_featuredthreads_unfeature
  • cta_featuredthreads_list_item
  • cta_featuredthreads_featured_list_item
  • cta_featuredthreads_icon

New Phrases
  • cta_ft_allow_dismissal
  • cta_ft_check_allow_dismissal
  • cta_ft_uncheck_allow_dismissal
  • cta_ft_featured_date_x_by_y_until_date_z
  • cta_ft_featured_date_x_by_y_indefinitely
  • cta_ft_restore_dismissed_featured_threads
  • cta_ft_restore_dismissed_featured_threads_hint
  • cta_ft_dismiss_featured_thread
  • cta_ft_are_you_sure_you_want_to_dismiss_this_featured_thread
  • cta_ft_the_featured_thread_is_not_dismissible
  • cta_ft_the_featured_thread_has_been_dismissed

Removed Phrases
  • cta_ft_featured_date_x_by_y
  • cta_ft_featured_indefinitely
  • cta_ft_featured_until_date_x

New Template Modifications
  • cta_featured_threads_account_preferences

New CSS
  • .ctaFtIconEditor .ctaFtCurrentIcon img
  • .sectionMain.ctaFtContainer .Popup .arrowWidget
A bug related to cached post content was identified in 2.6.0.

When Options -> Performance -> Cache BB Code output is enabled, and the featured thread content is viewed, that caches the output and overwrites the existing parse cache.
Essentially, the thread first post content matches the featured thread content when the thread is viewed, rather than the original thread first post content.

This is just a caching issue - the original post content is untouched, so no need to panic.


If you have already installed 2.6.0 and you have that option enabled, the following step must be taken.
If the first post content of a thread which is currently featured is not displaying all of the content, edit the first post and just make a minor change to update the cache.
It can be a single character such as a period (.) - the content just needs to change so the cache updates.
That needs to be done for every currently featured thread for which the first post content is not displaying correctly.


If you do not use the cache BB Code output option or you haven't upgraded to 2.6.0, you don't need to do anything.


Bugs Fixed
  • Fixed a bug related to cached post content
  • Fixed a bug related to list elements breaking out of the right hand side of blocks

Changed Templates
  • cta_featuredthreads.css
Attachments are now displayed in the blocks on all pages.
If the viewing member has permission to view attachments, they will see full sized attachments if they have been embedded using ATTACH=full. Attachments which are not embedded using ATTACH=full will show as thumbnails.
attachments-1.png

When clicking on a thumbnail, the attachments will show in the lightbox, as normal.
attachments-2.png

If the viewing member does not have permission to view attachments, they will all show as thumbnails.
attachments-3.png

Clicking a thumbnail will result in the standard error page.
attachments-4.png

Additional CSS classes have been added to the block li elements, to allow for even more customisation.
css-1.png
css-2.png
css-3.png

Note that there are no additional Style Properties for these, they are designed to be used in EXTRA.css.

For example, if your icons are wider than avatars and you want the thread author's username to align with the content on the individual blocks, you would add this:
Code:
.ctaFtBlockAvatar .ctaFtFeaturedThreadText
{
    width: 102px;
}

.ctaFtBlockIcon .ctaFtFeaturedThreadText
{
    width: 134px;
}
See it in use here: http://cliptheapex.com/forums/
Refresh the page a few times until you see an avatar and icon and note how the user name position changes.

There is also now full integration with the Widget Framework add-on, with custom templates and hooks at the top and bottom of the Featured Threads page, as well as in the sidebar.


Note: The custom template in the sidebar is now cta_featuredthreads_featured_custom_sidebar.
The original cta_featuredthreads_featured_custom template has been deleted.
Copy any content from cta_featuredthreads_featured_custom to cta_featuredthreads_featured_custom_sidebar, below the hook, and then revert the cta_featuredthreads_featured_custom template.


There have been various other improvements and bug fixes. See below for the full change log.


New Features, Functionality & Changes
  • Attachments are now shown in the blocks, rather than just 'View attachment 123'
  • Added two new custom templates to the top and bottom of the featured threads page to help with Widget Framework support - cta_featuredthreads_featured_custom_top and cta_featuredthreads_featured_custom_bottom
  • Replaced the custom template in the featured threads page sidebar with cta_featuredthreads_featured_custom_sidebar
  • Added hooks to the custom templates to support the Widget Framework add-on
  • Added a new phrase for the forum list meta description - cta_ft_forums_meta_description
  • Added avatar and icon classes to the main div for the blocks, allowing for even more customisation
  • Added alt text for icons
  • Cached the cta_ft_home phrase to reduce the query count

Bugs Fixed
  • Max width applied to embedded BB Code objects to stop them breaking out of the container
  • Fixed bugs related to deleting icons when threads were automatically unfeatured
  • Fixed a bug related to icon cropping and resizing

New Templates
  • cta_featuredthreads_featured_custom_top
  • cta_featuredthreads_featured_custom_bottom
  • cta_featuredthreads_featured_custom_sidebar – replaces the original cta_featuredthreads_featured_custom template

Changed Templates
  • cta_featuredthreads.css
  • cta_featuredthreads_featured
  • cta_featuredthreads_forum_list_title_meta
  • cta_featuredthreads_list_item
  • cta_featuredthreads_featured_list_item

Removed Templates
  • cta_featuredthreads_featured_custom

New Phrases
  • cta_ft_forums_meta_description

Changed Phrases
  • cta_ft_option_enable_home_tab_links_explain
  • cta_ft_read_more

New CSS
  • ctaFtBlockAvatar
  • ctaFtBlockIcon
  • ctaFtBlockAvatarPage
  • ctaFtBlockIconPage
CTA Featured Portal has arrived!
Err, I mean CTA Featured Threads 2.5 is now available.

I might as well rename it to that because that’s what it is now.
How the hell did that happen?

Once again, this update has the potential to break stuff so follow these instructions carefully.


Due to the page options changing to introduce the Home tab, the cache needs to be updated.
Until it is, errors may be generated and pages could fail to load.
Ideally disable the add-on while upgrading.
Once the upgrade is complete, go to Options -> CTA Featured Threads and just click the [Save Changes] button.
Any errors related to "Undefined index: homeTab" can be ignored and deleted from the log.

A new index has been added to the xf_user table to improve query performance.
If you have a large site with more than several hundred thousand users, you may want to run this query directly, before upgrading:
Code:
ALTER TABLE `xf_user`
ADD INDEX `cta_ft_featured_count` (`cta_ft_featured_count` ASC)
This should only be required for the very largest of sites.


A [Home] tab can now be enabled so when the index page route is set to threads/featured, it will highlight.
There is also an additional option to enable the home tab links.

options-home-tab.png


With the home tab option checked, the default landing page for the site will be the Featured Threads page, with a focussed home tab.

home.png


When the home page is set in this way, the forum index appears like so.

forum.png


The page titles, descriptions, share URLs and meta data are all updated accordingly for both pages when the home tab function is enabled.

Note: Ensure the index route is set to threads/featured without a trailing slash.

There is also a new Style Property to display a description below the page title.

style-properties-page.png


My work is done.

Should have crowdfunded it…


New Features, Functionality & Changes
  • Option to enable [Home] tab and create a portal / home / landing page
  • Added new session data for 'Viewing home'
  • Page titles, descriptions, share URLs and meta data are all updated accordingly for both pages when the home tab function is enabled.
  • Added an index to the xf_user table to improve query performance
  • New Style Property to show page description

New Options
  • Featured Threads Page
    • Enable Home Tab - disabled by default
    • Enable Home Tab Links - disabled by default

New Style Properties
  • Page
    • Enable Page Description – disabled by default

New Templates
  • cta_featuredthreads_navigation_tab_links
  • cta_featuredthreads_forum_list_title_meta

Changed Templates
  • cta_featuredthreads_featured

New Phrases
  • cta_ft_option_enable_home_tab
  • cta_ft_option_enable_home_tab_explain
  • cta_ft_option_enable_home_tab_links
  • cta_ft_option_enable_home_tab_links_explain
  • cta_ft_home
  • cta_ft_featured_threads_page_description
  • cta_ft_featured_viewing_home

Changed Phrases
  • cta_ft_featured_viewing_featured_threads

New Template Modifications
  • cta_featured_threads_forum_list_title_meta
Only one new feature in this update, but it's a good one :)

I would rather release it now so people can start using it, as the next two features are potentially time consuming and would delay it unnecessarily.

There is now the option to enable BB Code in the content.

options-content.png


If that is enabled, when featuring the thread, the BB Code is preserved.

10-feature-overlay-bb-code.png


Resulting in the following output.

03-featured-threads.png
03-featured-threads-1.png

03-featured-threads-2.png

03-featured-threads-3.png


When updating the featured thread, any existing BB Code is preserved.

11-update-overlay-bb-code.png

Note that this does not apply to existing featured threads prior to 2.4, as the BB Code has already been stripped from them.
You can however either update them and manually paste in the content including the BB Code tags, or you can unfeature and feature them again.

To ensure everything works as expected, check and update:
Options -> CTA Featured Threads -> Featured Thread Content -> Maximum Characters

Also, to ensure block elements work with floated avatars and icons, make sure the following Style Property is set:
Style Properties -> BB Code Elements -> BB Code Block -> Miscellaneous: overflow: auto;



New Features, Functionality & Changes
  • Option to allow BB Code in the featured thread content

New Options
  • Enable BB Code – enabled by default

Changed Options
  • Maximum Content Length (ctaFtMaxContentLength) – changed to Maximum Characters (ctaFtContentMaxCharacters)

Changed Templates
  • cta_featuredthreads.css
  • cta_featuredthreads_list_item
  • cta_featuredthreads_featured_list_item
  • cta_featuredthreads_navigation – renamed to cta_featuredthreads_navigation_link

New Phrases
  • cta_ft_option_enable_bb_code
  • cta_ft_option_enable_bb_code_explain
  • cta_ft_option_maximum_characters
  • cta_ft_option_maximum_characters_explain

Changed Template Modifications
  • cta_featured_threads_navigation – renamed to cta_featured_threads_navigation_link

New CSS
  • New CSS to override the default XenForo list classes, due to the li items being list-style: outside, causing an issue with floated avatars and icons on the Featured Threads page
Q: If you have three queries and remove two queries, what do you have?
A: CTA Featured Threads 2.3

Yes, that’s right, CTA Featured Threads 2.3 is here and query counts have been reduced significantly. Well, 66.6% recurring, to be precise.

Before we continue though, first a couple of messages from our sponsors.



Due to fundamental code changes, before uploading the files and upgrading, disable the add-on to prevent errors.

After upgrading the following MUST be carried out, or there will be errors and pages will fail to load.
In the Options, check and save Forum List Featured Threads and New / Recent Posts Featured Threads.

options-check.PNG
If you normally have them unchecked, uncheck them and save again.

Any errors during the upgrade can be ignored and deleted.
They are only generated while the code is updated and the templates are rebuilt and the cache is updated.

Right, on with the show.

This version brings a number of new features, enhancements and improvements.

As requested, the latest featured thread can now be set on the forum list, forum view, and new/recent posts pages, independently.
50-options.png


There is also a new option to show a [Most Featured Threads] tab on the Notable Members page.
40-notable-members-tab.png


When uploading or updating an icon, the current avatar or icon is now shown in the overlay.
14-upload-icon.png


15-update-delete-icon.png


The [Featured] badge on the thread view now links to the Featured Threads page, if it is enabled.
04-thread-view.png


With its accompanying Style Property.
61-style-properties-settings.png

There are new Style Properties to display the featured thread count on the message user info block, member card, and profile page.
30-message-user-info.png


31-member-card.png


32-profile-page.png


The thing I'm most pleased about with version 2.3 though is the reduction in queries.
There has been a significant reduction of 2 queries for every page, with most pages now only generating 1 additional query.
  • Forum List - 1
  • Forum View - 2*
  • New Posts - 1
  • Recent Posts - 1
*If the 'Display In All Forums' option is selected it reduces to 1, if 'Display In Own And Parent Forums' is selected it increases to 3.


New Features, Functionality & Changes
  • Latest featured thread can be set per page independently
  • Added a new tab to the Notable Members page for [Most Featured Threads] – enabled by default
  • When uploading or updating an icon, the current avatar or icon is now shown in the overlay
  • The [Featured] badge on the thread view now links to the Featured Threads page, if it is enabled
  • The icon editing template now returns an appropriate error message when uploading an icon is not enabled in the options
  • Reduced query count for all pages

Bugs Fixed
  • Fixed the canonical URL for the Featured Threads page when on the first page
  • Fixed bug related to the [Featured] badge on the thread list items linking to the Featured Threads page when the page is disabled
  • Fixed bug related to the Featured Threads link being present in the quick navigation menu when the page is disabled
  • Fixed bug related to icon cropping and the width and height settings in the options

New Options
  • Forum View Latest Featured Thread
  • Forum List Latest Featured Thread
  • New / Recent Posts Latest Featured Thread
  • Notable Members Tab

New Style Properties
  • CTA Featured Threads Settings
    • Enable Message User Info - disabled by default
    • Enable Member Card - enabled by default
    • Enable Profile Page - enabled by default
    • Thread View Featured Text Hover

New Templates
  • cta_featuredthreads_message_user_info
  • cta_featuredthreads_member_notable

Changed Templates
  • cta_featuredthreads.css
  • cta_featuredthreads_thread_list_item
  • cta_featuredthreads_thread_view
  • cta_featuredthreads_quick_navigation_menu
  • cta_featuredthreads_member_card
  • cta_featuredthreads_member_view
  • cta_featuredthreads_option_template_forum_view

New Phrases
  • cta_ft_current_icon
  • cta_ft_icons_are_not_enabled
  • cta_ft_most_featured_threads
  • cta_ft_option_latest_featured_thread
  • cta_ft_option_latest_featured_thread_explain

Changed Phrases
  • cta_ft_deleting_icon_restore_avatar – renamed to cta_ft_restore_avatar

New Template Modifications
  • cta_featured_threads_ message_user_info
  • cta_featured_threads_member_notable

New CSS
  • .ctaFtFeaturedThreadView:hover
  • .ctaFtFeaturedThreadView a:hover

Once again, my thanks go to Chris for all of his help and support.
Top