CTA Featured Threads & Portal

CTA Featured Threads & Portal 2.17.0

No permission to buy (£40.00)
Let us upload custom icons, they said.
It should be simple enough, they said.
Oh and while you’re at it, add options for updating and deleting the icons.

So, by popular demand, 2.2 now allows for just that.

There have been many changes and improvements so I would recommend reverting any changed Style Properties.

Now, when a thread is featured, there is a new [Upload icon] checkbox.

10-feature-overlay.png


Checking that will allow an icon to be uploaded after the thread has been featured. Custom icons will be displayed instead of the thread author avatars.

14-upload-icon.png


When updating an existing featured thread, there is also the option to upload an icon, if it doesn't already have one.

11-update-overlay-no-icon.png


If it does, it can be updated or deleted.

12-update-overlay-icon.png


15-update-delete-icon.png


Unfeaturing a thread will automatically delete a custom icon.

By default, the icon size has been set to twice the avatar size, so featured threads will appear like this on the dedicated page.

03-featured-threads.png


However, to avoid the content moving up and down with each page load, they are scaled down to the same size on the other pages.

01-forum-list.png 02-forum-view.png

As you would expect, there are new Options and Style Properties allowing for complete customisation.

50-options.png 61-style-properties-settings.png 62-style-properties-blocks.png 63-style-properties-page.png


New Features, Functionality & Changes
  • Custom icons can now be used in place of the thread author avatar
  • All admin templates related to options have been phrased
  • Multiple Option and Style Property changes
Bugs Fixed
  • Fixed a bug related to dynamic redirects when opening the Feature/Update/Unfeature overlay in a new page
New Options
  • Featured Thread Icon
    • Enable Icon
    • Width x Height
    • Quality
Changed Options
  • Featured Threads Per Page – default value changed to 5
New Style Properties
  • Blocks
    • Icon
    • Thread Content (Icon)
    • Thread Text (Icon)
  • Page
    • Icon
    • Thread Content (Icon)
    • Thread Text (Icon)
Changed Style Properties
  • Blocks
    • Enable Avatar – renamed to Enable Avatar / Icon
    • Avatar
    • Thread Content – renamed to Thread Content (Avatar)
    • Thread Text – renamed to Thread Text (Avatar)
  • Page
    • Enable Avatar – renamed to Enable Avatar / Icon
    • Avatar
    • Thread Content – renamed to Thread Content (Avatar)
    • Thread Text – renamed to Thread Text (Avatar)
New Templates
  • cta_featuredthreads_icon
  • cta_featuredthreads_icon_link
  • cta_featuredthreads_icon_link_thread
Changed Templates
  • cta_featuredthreads.css
  • cta_featuredthreads_feature
  • cta_featuredthreads_update
  • cta_featuredthreads_list_item
  • cta_featuredthreads_featured_list_item
New Phrases
  • cta_ft_option_featured_thread_icon
  • cta_ft_option_icon_values_changed_explain
  • cta_ft_option_featured_threads_blocks
  • cta_ft_option_display_own_forum
  • cta_ft_option_display_own_parent_forums
  • cta_ft_option_display_all_forums
  • cta_ft_option_enable_page
  • cta_ft_option_featured_threads_per_page
  • cta_ft_option_per_page_explain
  • cta_ft_option_enable_sidebar_online_users
  • cta_ft_ option_sidebar_online_users_explain
  • cta_ft_option_enable_sidebar_statistics
  • cta_ft_option_sidebar_statistics_explain
  • cta_ft_upload_icon
  • cta_ft_check_upload_icon
  • cta_ft_upload_icon
  • cta_ft_edit_icon_title
  • cta_ft_supported_formats_jpeg_png_gif
  • cta_ft_the_icon_should_be_x_by_y_pixels
  • cta_ft_close
  • cta_ft_quality
  • cta_ft_option_icon_quality_explain
  • cta_ft_delete_icon
  • cta_ft_update_icon
  • cta_ft_check_update_delete_icon
  • cta_ft_deleting_icon_restore_avatar
New Template Modifications
  • cta_featuredthreads_icon_link_thread_view
  • cta_featuredthreads_icon_link_forum_view
  • cta_featuredthreads_icon_link_find_new_posts
New CSS
  • ctaFtIcon
  • ctaFtIconPage
  • ctaFtIconEditor
  • ctaFtIconAction
  • ctaFtIconUpload
  • ctaFtThreadTextAvatarPage a
  • ctaFtThreadTextIconPage a
Changed CSS
  • ctaFtThreadContent – ctaFtThreadContentAvatar
  • ctaFtThreadText – ctaFtThreadTextAvatar
  • ctaFtThreadText a – ctaFtThreadTextAvatar a
  • ctaFtThreadContentPage – ctaFtThreadContentAvatarPage
  • ctaFtThreadTextPage – ctaFtThreadTextAvatarPage
  • ctaFtThreadTextPage a – ctaFtThreadTextAvatarPage a
As always, my thanks to Chris D.
Some new stuff.

The option to show Featured Threads in their own forum, own + parent forum, or globally, was previously requested by several people and has now been implemented.

50-options.png


I have found being able to see which threads have been previously featured extremely useful, to avoid featuring them again by mistake.
So I decided to add the [Expired] badge after all.

02-forum-view.png


Fear not though, it can be disabled and as you would expect, there are separate Style Properties and CSS classes.

61-style-properties-settings.png


If the viewing user can feature that specific thread then they will see the expired badge.
Which makes more sense than arbitrarily applying it to all administrators and moderators, who may not have that permission.

After upgrading, you will need to check and reset some options as there have been some changes in these areas; specifically:
  • Forum View Featured Threads
  • Forum List Featured Threads
  • New / Recent Posts Featured Threads
  • Featured Threads Page
In all likelihood, you will just need to re-enable the page and associated options, if you already had it enabled.


New Features, Functionality & Changes
  • Added option to show forum view featured threads in own, Own + parent or all forums
  • Added option to show [Expired] badge for previously featured threads, with accompanying Style Properties
  • Added li id to featured threads blocks to aid with styling
  • Added a disabler class to dependent options; now, if the page is unchecked in the options, the child options are disabled automatically
  • Added an index to the cta_ft_featured_threads table to aid with query performance
Bugs Fixed
  • Fixed a censoring bug (didn't find that one, did you Martok :D)
New Options
  • Forum View Featured Threads
    • Display in own forum
    • Display in parent forums
    • Display in all forums
Changed Options
  • Forum View Featured Threads – now has three new dependent options
  • Featured Threads Page – dependent options are now disabled automatically if the page option is unchecked
New Style Properties
  • CTA Featured Threads Settings
    • Enable Expired Badge
    • Thread List Expired Text
    • Thread View Expired Text
Changed Style Properties
  • Overlay Content Rows – superfluous checkbox removed
Changed Templates
  • cta_featuredthreads_featured
  • cta_featuredthreads_navigation
  • cta_featuredthreads_list_item
  • cta_featuredthreads_thread_list_item
  • cta_featuredthreads_thread_view
  • cta_featuredthreads.css
New CSS
  • .ctaFtExpiredThreadList
  • .ctaFtExpiredThreadView
You have been awarded a trophy!
Yes, version 2.0.0 is here.

READ THIS FIRST
This is a major update which includes some breaking changes, hence the version increase from 1.x to 2.x.
The following actions must be taken when upgrading.
Failure to do so will render certain functionality inoperable and cause errors.
  1. To prevent errors during the upgrade, disable the add-on, perform the upgrade, carry out the steps below, then re-enable it.
  2. It is extremely important that all outdated templates are reverted and re-edited or merged. In the case of the removed/renamed templates (see below), the only option will be to revert and reapply your customisations to the new templates.
  3. Any outdated phrases will also have to be reverted and re-edited. See below for a full list of removed/renamed and updated phrases.
  4. Permissions will need to be set again for Update featured thread by self and Update featured thread by anyone. These two permissions have replaced the original Edit featured thread by self and Edit featured thread by anyone.
Once the above steps have been carried out, re-enable the add-on then rebuild the individual user featured thread counts. Go to Tools -> Rebuild Caches and click on Rebuild CTA Featured Threads.

90-rebuild.png


Now that you've all read that, on with the good stuff.
There are a significant number of updates in this release so please read these release notes carefully.

As already mentioned, featured thread counts are now recorded for each member, allowing the count to be used in the various criteria for notices, user group promotions, and trophies.

80-criteria.png


25-trophy-alert.png


The count is displayed on the member card and on the profile page.

30-member-card.png


31-profile-page.png


The controls have been added to the thread list items. Threads can now be Featured, Updated, and Unfeatured directly from the forum view and find new/recent posts pages.

02-forum-view.png


The expiry date can now be displayed on the blocks on all views and on the page.
As you would expect, there are separate style properties controlling each one.

03-featured-threads.png


There is a new link in the Quick Navigation Menu (I know, I know, no-one uses it).

40-quick-navigation-menu.png


The code has been refactored in a lot of places, improving and refining it.


New Features, Functionality & Changes
  • The featured thread count can now be used in the various criteria for trophies, user group promotions, and notices
  • The featured thread count is displayed on the member card and profile page
  • The controls have been added to the thread list items
  • The expiry date can now be displayed on the blocks
  • Added a link to the Quick Navigation Menu
  • Added a new phrase for the title on the Featured Threads page - cta_ft_featured_threads_page_title
  • There is a rebuild counts function in Tools -> Rebuild Caches: Rebuild CTA Featured Threads
  • Edit featured thread by self and Edit featured thread by anyone permissions have been renamed to Update featured thread by self and Update featured thread by anyone
  • The code has been significantly refactored and rewritten
Bugs Fixed
  • Fixed a bug related to the Scheduled Post add-on
  • Fixed a styling bug for the author name overflow in older versions of IE
  • Fixed a bug whereby merged threads were marked as previously featured if any one of the threads being merged was currently featured
  • Fixed a bug related to alerts and featuring threads by guests
New Style Properties
  • CTA Featured Threads Blocks
    • Enable Expiry – disabled by default
    • Expiry
  • CTA Featured Threads Page
    • Enable Expiry – disabled by default
    • Expiry
Changed Style Properties
  • CTA Featured Threads Blocks
    • Author
    • Date
  • CTA Featured Threads Page
    • Author
    • Date
New Templates
  • cta_featuredthreads_thread_list_item_controls
  • cta_featuredthreads_thread_view_controls
  • cta_featuredthreads_update
  • cta_featuredthreads_member_card
  • cta_featuredthreads_member_view
  • cta_featuredthreads_quick_navigation_menu
  • cta_featuredthreads_featured_custom
Changed Templates
  • cta_featuredthreads.css
  • cta_featuredthreads_featured
  • cta_featuredthreads_list_item
  • cta_featuredthreads_featured_list_item
  • cta_featuredthreads_thread_view
  • cta_featuredthreads_thread_list_item
  • cta_featuredthreads_navigation
Removed Templates
  • cta_featuredthreads_controls – replaced with cta_featuredthreads_thread_view_controls
  • cta_featuredthreads_edit – replaced with cta_featuredthreads_update
  • cta_featured_threads_featured_custom – replaced with cta_featuredthreads_featured_custom
New Phrases
  • cta_ft_featured_threads_page_title
  • cta_ft_feature
  • cta_ft_update
  • cta_ft_unfeature
  • cta_ft_expired
  • cta_ft_expires_date_x
  • cta_ft_featured_threads_stats
  • cta_ft_update_featured_thread
  • cta_ft_update_featured_thread_control
Removed Phrases
  • cta_ft_edit_featured_thread – replaced with cta_ft_update_featured_thread
  • cta_ft_edit_featured_thread_control – replaced with cta_ft_update_featured_thread_control
New Template Modifications
  • cta_featured_threads_thread_list_item_controls
  • cta_featured_threads_thread_view_controls
  • cta_featured_threads_member_card
  • cta_featured_threads_member_view
  • cta_featured_threads_quick_navigation_menu
Changed Template Modifications
  • cta_featuredthreads_thread_view_controls
  • cta_featured_threads_navigation
Removed Template Modifications
  • cta_featured_threads_thread_view_tools – replaced with cta_featured_threads_thread_view_controls
New CSS
  • .ctaThreadListItemControls
  • .ctaFtExpiry
  • .ctaFtExpiryPage
Changed CSS
  • .ctaFtAuthor .username
  • .ctaFtAuthorPage .username
Once again, thanks are due to Chris Deeming for his help and support.
This guide will explain how to change the expiry text, which is optionally displayed in the block footer, from Expires: <date> to Featured until: <date>.

It applies to version 2.0.0 and later.

Implementing this edit will change it from this:
01-expiry-text.png

To this:
02-expiry-text.png


To change it on the individual blocks, edit this template: cta_featuredthreads_list_item
Find:
Code:
<xen:if is="@ctaFtEnableExpiry AND {$featuredThread.featured_expiry}">
	<span class="ctaFtExpiry" title="{xen:datetime $featuredThread.featured_expiry, absolute}">
		<xen:if is="{$serverTime} <= {$featuredThread.featured_expiry}">
			{xen:phrase cta_ft_expires_date_x, 'date={xen:datetime $featuredThread.featured_expiry}'}
		<xen:else />
			{xen:phrase cta_ft_expired}
		</xen:if>
	</span>
</xen:if>
Replace:
Code:
<xen:if is="@ctaFtEnableExpiry AND {$featuredThread.featured_expiry}">
    <span class="ctaFtExpiry" title="{xen:datetime $featuredThread.featured_expiry, absolute}">{xen:phrase cta_ft_featured_until_date_x, 'date={xen:datetime $featuredThread.featured_expiry}'}</span>
<xen:else />
    <span class="ctaFtExpiry">{xen:phrase cta_ft_featured_indefinitely}</span>
</xen:if>

To change it on the page blocks, edit this template: cta_featuredthreads_featured_list_item
Find:
Code:
<xen:if is="@ctaFtEnableExpiryPage AND {$featuredThread.featured_expiry}">
	<span class="ctaFtExpiryPage" title="{xen:datetime $featuredThread.featured_expiry, absolute}">
		<xen:if is="{$serverTime} <= {$featuredThread.featured_expiry}">
			{xen:phrase cta_ft_expires_date_x, 'date={xen:datetime $featuredThread.featured_expiry}'}
		<xen:else />
			{xen:phrase cta_ft_expired}
		</xen:if>
	</span>
</xen:if>
Replace:
Code:
<xen:if is="@ctaFtEnableExpiryPage AND {$featuredThread.featured_expiry}">
    <span class="ctaFtExpiryPage" title="{xen:datetime $featuredThread.featured_expiry, absolute}">{xen:phrase cta_ft_featured_until_date_x, 'date={xen:datetime $featuredThread.featured_expiry}'}</span>
<xen:else />
    <span class="ctaFtExpiryPage">{xen:phrase cta_ft_featured_indefinitely}</span>
</xen:if>
This has been superseded by version 2.1 which includes this functionality by default.

This guide will explain how to add [Expired] badges to the thread list items and thread view, for threads which have been featured previously but are no longer currently featured.

Applies to version 2.0.0 and later.

The end result is as follows:
01-expired-badge-thread-list-item.png 02-expired-badge-thread-view.png

To show the badges on the thread list items, edit this template: cta_featuredthreads_thread_list_item
Add the code in orange.
Rich (BB code):
<xen:if is="{$canViewFeaturedThreads}">
    <xen:require css="cta_featuredthreads.css" />

    <xen:if hascontent="true">
        <xen:contentcheck>
            <xen:if is="{$thread.cta_ft_featured} == 1">
                <xen:if is="{$xenOptions.ctaFtFeaturedThreadsPage}">
                    <a href="{xen:link threads/featured}"><span class="ctaFtFeaturedThreadList" title="{xen:phrase cta_ft_featured}">{xen:phrase cta_ft_featured}</span></a>
                <xen:else />
                    <span class="ctaFtFeaturedThreadList" title="{xen:phrase cta_ft_featured}">{xen:phrase cta_ft_featured}</span>
                </xen:if>
            <xen:else />
                <xen:if is="{$visitor.is_moderator} AND {$thread.cta_ft_featured} == 2">
                    <span class="ctaFtFeaturedThreadList" title="Expired" style="color: @primaryDarker; border-color: @secondaryLighter; background-color: @secondaryLightest; text-decoration: none">Expired</span>
                </xen:if>
            </xen:if>
        </xen:contentcheck>
    </xen:if>
</xen:if>
To show the badges in the thread view, edit this template: cta_featuredthreads_thread_view
Add the code in orange.
Rich (BB code):
<xen:if is="{$canViewFeaturedThreads}">
    <xen:require css="cta_featuredthreads.css" />

    <xen:if is="{$thread.cta_ft_featured} == 1">
        <span class="ctaFtFeaturedThreadView" title="{xen:phrase cta_ft_featured}">{xen:phrase cta_ft_featured}</span>
    <xen:else />
        <xen:if is="{$visitor.is_moderator} AND {$thread.cta_ft_featured} == 2">
            <span class="ctaFtFeaturedThreadView" title="Expired" style="color: @primaryDarker; border-color: @secondaryLighter; background-color: @secondaryLightest">Expired</span>
        </xen:if>
    </xen:if>
</xen:if>
The text and styling can be edited to suit.
Although this release is very minor, you may want to install it as it changes how threads are flagged when they are unfeatured.
While this status isn’t currently being used, it will be in 1.6 ;)

It also fixes a very minor bug related to receiving alerts when there is no permission to view featured threads; wouldn't want to upset the grumpies, would we Shaun? :D

New Features, Functionality & Changes
  • Expired featured threads now have a different status to threads which have never been featured.
Bugs Fixed
  • Prevent alerts for thread authors with no View featured threads permission
Changed Templates
  • cta_featuredthreads_thread_list_item
  • cta_featuredthreads_thread_view
Another minor update which addresses a few things.


New Features, Functionality & Changes
  • Ability to disable the title tooltip via new Style Properties
14-style-properties-blocks.png 15-style-properties-page.png


Bugs Fixed
  • Prevent auto embedding of media
  • Censor applied to thread title tooltip
  • Censor applied to URL displayed in browser status bar on Featured Threads page (on hover)
New Style Properties
  • CTA Featured Threads Blocks
    • Enable Title Tooltip – enabled by default
  • CTA Featured Threads Page
    • Enable Title Tooltip – enabled by default
Changed Templates
  • cta_featuredthreads_list_item
  • cta_featuredthreads_featured_list_item
A very minor release which fixes a couple of bugs no-one even noticed ;)


New Features, Functionality & Changes
  • Tooltip added to the thread title – useful for longer titles which overflow
Bugs Fixed
  • Conditional statement for the footer in the templates updated to include the new thread data elements (author, date, likes, views, and replies)
  • Thread title missing from URL on Featured Threads page
Changed Templates
  • cta_featuredthreads_featured_list_item
  • cta_featuredthreads_list_item
Reactions: CTXMedia
This update is a guide to removing various elements based on the browser width.

If you have all of the elements checked in Style Properties, this may produce undesirable results on narrow screens (i.e. mobile devices).

To counter that you can specifically hide individual elements based on the narrow, medium and wide settings you have specified in Style Properties -> Responsive Design -> Settings.

There are three responsive width settings which can be defined there:
  • Max Responsive Width (Wide)
  • Max Responsive Width (Medium)
  • Max Responsive Width (Narrow)
They translate to the following Style Properties:
  • @maxResponsiveWideWidth
  • @maxResponsiveMediumWidth
  • @maxResponsiveNarrowWidth
We can use those Style Properties in media queries to hide any of the following elements:
  • Author
  • Date
  • Likes
  • View
  • Replies
There are separate CSS classes for each element, both for individual blocks and the page, like so:
Blocks
  • ctaFtAuthor
  • ctaFtDate
  • ctaFtLikes
  • ctaFtViews
  • ctaFtReplies
Page
  • ctaFtAuthorPage
  • ctaFtDatePage
  • ctaFtLikesPage
  • ctaFtViewsPage
  • ctaFtRepliesPage
So we now have the components to build our media queries.
Let's look at some examples.

To hide the author name on the individual blocks at the medium width, add this to EXTRA.css:
Rich (BB code):
<xen:if is="@enableResponsive">
@media (max-width:@maxResponsiveMediumWidth)
{
    .ctaFtAuthor
    {
        display: none;
    }
}
</xen:if>

To hide the replies on the page at the narrrow width, add this to EXTRA.css:
Rich (BB code):
<xen:if is="@enableResponsive">
@media (max-width:@maxResponsiveNarrowWidth)
{
    .ctaFtRepliesPage
    {
        display: none;
    }
}
</xen:if>

To hide the date, likes and views on the blocks and page at the medium width, add this to EXTRA.css:
Rich (BB code):
<xen:if is="@enableResponsive">
@media (max-width:@maxResponsiveMediumWidth)
{
    .ctaFtDate,
    .ctaFtDatePage,
    .ctaFtLikes,
    .ctaFtLikesPage,
    .ctaFtViews,
    .ctaFtViewsPage
    {
        display: none;
    }
}
</xen:if>

So as you can see, it is very easy to create custom media queries to suit your own site and needs.

You can of course apply the above to any CSS class, such as the "Featured Thread" text or the "Read More..." link.
This release adds a few more goodies as well as improving functionality.

It’s another fairly big update so please read these release notes carefully.


Alerts!
one-new-alert.png


Thread authors will now be alerted when their thread has been featured.
22-alert.png


There is a new option to remove the featured thread expiry date from the alert.
11-options.png


If the option is checked, alerts will show as follows:
20-alert-expiry.png


If it is unchecked, like this:
21-alert-no-expiry.png


Note that if the thread is featured indefinitely, the expiry date will not show in the alert, regardless of that setting.

Members can individually set their preference for Featured Threads alerts via the Alert Preferences page in their account.
19-alert-preference.png



In addition to Alerts, all of the thread data can now be displayed on the blocks, like so:
04-featured-threads.png


Controlled by a plethora of new Style Properties:

14-style-properties-blocks.png 15-style-properties-page.png

Massive thanks to Chris again for his help.


New Features, Functionality & Changes
  • Thread authors are able to be alerted when their threads are featured
  • Members can enable or disable alerts via the Featured Threads alert preference setting in their account
  • Alerts can be shown with or without the expiry date
  • Thread data (author, data, like count, view count, reply count) can now be displayed on the blocks, completely customisable via Style Properties, with separate controls and classes for the individual pages and the dedicated page
  • The node ID is now included in the main div for the individual blocks on the forum list, forum view, and the new and recent posts pages, and the dedicated page, allowing styling to be applied individually to each block based on the forum the thread is from, with separate CSS classes for the individual pages and the dedicated page
  • Threads can now only be featured, edited and unfeatured if the view featured threads permission has also been granted
If you have customised templates or translated phrases, you may find that a lot of them are marked as outdated. This was due to incorrect version strings which I have corrected and updated in this release.


Bugs Fixed
  • Erroneous character removed from the cta_featuredthreads_feature template
New Options
  • Show Featured Thread Expiry In Alerts – enabled by default
Changed Options
  • Featured Threads Per Page – maximum increased from 20 to 50
New Style Properties
  • CTA Featured Threads Blocks
    • Enable Author – enabled by default
    • Enable Author User Group Styling – enabled by default
    • Enable Date – enabled by default
    • Enable Likes – disabled by default
    • Enable Views – disabled by default
    • Enable Replies – enabled by default
    • Author
    • Date
    • Likes
    • Views
    • Replies
  • CTA Featured Threads Page
    • Enable Author – enabled by default
    • Enable Author User Group Styling – enabled by default
    • Enable Date – enabled by default
    • Enable Likes – disabled by default
    • Enable Views – disabled by default
    • Enable Replies – enabled by default
    • Author
    • Date
    • Likes
    • Views
    • Replies
Changed Style Properties
  • CTA Featured Threads Blocks
    • Featured Thread Text
    • Read More Link
  • CTA Featured Threads Page
    • Featured Thread Text
    • Read More Link
New Templates
  • cta_featuredthreads_account_alert_preferences
  • alert_cta_ft_featured_thread_insert
Changed Templates
  • cta_featuredthreads_feature
  • cta_featuredthreads_list_item
  • cta_featuredthreads_featured_list_item
  • cta_featuredthreads.css
New Phrases
  • cta_ft_features_your_thread
  • cta_ft_someone_features_your_thread
  • cta_ft_x_featured_your_thread_y_until_z
  • cta_ft_x_featured_your_thread_y
  • cta_ft_likes
  • cta_ft_views
  • cta_ft_replies
New Template Modifications
  • cta_featured_threads_account_alert_preferences
New CSS
  • .ctaFtAuthor .username
  • .ctaFtDate
  • .ctaFtLikes
  • .ctaFtViews
  • .ctaFtReplies
  • .ctaFtAuthorPage .username
  • .ctaFtDatePage
  • .ctaFtLikesPage
  • .ctaFtViewsPage
  • .ctaFtRepliesPage
Top