[title sub="Written by Chris Graham"]Composr Tutorial: Featuring content[/title]

[media width="150" description="The Admin Zone provides a list of tasks, including rotation of featured content" float="right"]data_custom/images/docs/tut_featured/featured_checklist.png[/media]
Regular Composr content modules will typically display all content, perhaps with categorisation, perhaps by date.
There are a number of Composr systems that allow featuring individual items of content. This is a short tutorial briefly covering these systems, and featured content in general.

Benefits of featuring content include:
 - Giving your site a 'fresh' feeling, and a feeling that it is an active site
 - Giving variety to your site, without much effort
 - Drawing users in, such that they regularly revisit to see what new content is featured
 - Putting content in a prime position to draw attention to it, perhaps as a reward for the content creator, perhaps for its relevancy, or perhaps to recommend it

For example, a boating club might have a catalogue filled with different types of yacht, and want to be able to have them shown on the home page.

Many of these systems work via blocks. The block construction assistant will help you add a block, accessible from the 'Add block' button on the Comcode page editing screen. This is covered in much more detail in the [page="_SEARCH:tut_adv_comcode_pages"]Using blocks[/page] tutorial.

[contents]decimal,lower-alpha[/contents]

[title="2"]Content types[/title]

Every type of content in Composr is classified as a particular content type. Then individual items of a content type are classified by an ID. In other words, any item of content in Composr can be referenced by the combination of content type and content ID.

This is a list of the content types in Composr:
 - Authors ([tt]author[/tt])
 - Banner types ([tt]banner_type[/tt])
 - Banners ([tt]banner[/tt])
 - Calendar events ([tt]event[/tt])
 - Catalogues ([tt]catalogue[/tt])
 - Catalogue categories ([tt]catalogue_category[/tt])
 - Catalogue entries ([tt]catalogue_entry[/tt])
 - Chatrooms ([tt]chat[/tt])
 - Comcode pages ([tt]comcode_page[/tt])
 - Downloads ([tt]download[/tt])
 - Download categories ([tt]download_category[/tt])
 - Event types ([tt]calendar_type[/tt])
 - Forum posts ([tt]post[/tt]) [Conversr-only]
 - Forum topics ([tt]topic[/tt]) [Conversr-only]
 - Forums ([tt]forum[/tt]) [Conversr-only]
 - Galleries ([tt]gallery[/tt])
 - Images ([tt]image[/tt])
 - Members ([tt]member[/tt])
 - News articles ([tt]news[/tt])
 - News Categories ([tt]news_category[/tt])
 - Polls ([tt]poll[/tt])
 - Quizzes ([tt]quiz[/tt])
 - Usergroups ([tt]group[/tt]) [Conversr-only]
 - Videos ([tt]video[/tt])
 - Wiki+ pages ([tt]wiki_page[/tt])
 - Wiki+ posts ([tt]wiki_post[/tt])

[title="3"]Display via blocks[/title]

The [tt]main_content[/tt] block can display individual content items, by the content type and ID combination, or by randomisation.

Randomised display is easy to set up: it's just a block parameter when you add that block. You get the choice of which categories you want to randomly display from by way of a [tt]select[/tt] block parameter (written in [page="_SEARCH:tut_selectcode"][concept]Selectcode support[/concept][/page] syntax).

If you want to display a specific item of content as you require then you may use the [tt]main_content[/tt] block with parameters to specify exactly what item you wish to display. You will need to know how to work out your content IDs. Usually these can easily be found within the edit URLs for the content.

The [tt]main_multi_content[/tt] block can display multiple content items, by content type and with various filtering capabilities.

[title="2"]Awards[/title]

You can configure any number of award types in Composr. Each award type is associated with one particular content type.

Awards are given to content items. It's up to you how you want to think of an award, as it can be interpreted in many ways:
1) Marking a content item as to be featured (e.g. on the home page)
2) Celebrating a content item as special (i.e. the classical understanding of the term 'award')
3) Rewarding a member for a particular content submission in a structured way (either in terms of prestige, or by setting up award types to carry a reward in Composr points)
What it means really depends on how you are using the awards.

Any content item that has been given an award is:
a) displayed in the archive for that award type (under the [tt]awards[/tt] page)
b) indicated as holding the award when accessing the content item's view screen (next to the title)
The most recent item to receive the award has a special status. Whether this distinction of 'current award holder' means anything is really all about how you use awards. If you are showing the current award holder on your home page (demonstrated later in this tutorial), it is meaningful, but if awards are only accessed from the archive then it is fairly meaningless.

[title="3"]Using awards[/title]

[title="4"]Adding an award type[/title]

[surround]
[media width="150" description="Making an award type" float="right"]data_custom/images/docs/tut_featured/featured_award.png[/media]
You can manage award types from:
Admin Zone > Setup > Awards (top content)

If, for example, you wanted to choose a different yacht to display every week (from a catalogue of yachts), then create a catalogue award via Admin Zone > Setup > Awards (top content) > Add award type.
[/surround]

[box="Assigning points"]
Optionally awards are tied in with the point system. You can configure the awards (when you add or edit the award itself) to carry a number of points. If you do this, the submitter of content given that award will be given some points, and that'll show up on their points profile.
[/box]

Composr has one award that is precreated for you as an example: Download Of The Week (assuming you have the bundled [tt]downloads[/tt] addon installed).

[box="Tip"]
[surround]
[media float="right" thumb="0" framed="0"]data_custom/images/docs/tip.png[/media]
If you want to delete an award type, this is done by editing the award type and choosing the delete option on the form.
[/surround]
[/box]

[title="4"]Awarding some content[/title]

[surround]
[media width="150" description="Making a download as holder of the default 'Download of the week' award" float="right"]data_custom/images/docs/tut_featured/featured_dotw.png[/media]
Now we have added a new award type linked with a particular content type, adding or editing an item of that content type will have an option to assign award to it as current holder.
[/surround]

[title="4"]Display[/title]

[surround]
[media_set]
[media width="150" description="A [tt]main_awards[/tt] block being viewed" float="left"]data_custom/images/docs/tut_featured/featured_award_block.png[/media]
[media width="150" description="Adding a [tt]main_awards[/tt] block using the block construction assistant" float="left"]data_custom/images/docs/tut_featured/assistant.png[/media]
[media width="150" description="A content which received awards" float="left"]data_custom/images/docs/tut_featured/featured_tooltip.png[/media]
[/media_set]
The [tt]main_awards[/tt] block can display the current award holder of any particular award. The block construction assistant makes it very easy to add the block to a page, providing a drop-down of award types for you to select from.

Each award type has its own archive, in the [tt]awards[/tt] module ([tt]site:awards[/tt] page-link, About > Awards (top content) of the default menus).
The archive is linked from the [tt]main_awards[/tt] block also.

When viewing content which received one or more awards, the title of the content will contain a trophy icon. If you hover over the trophy, you will see a tooltip listing the awards given to the content and when.
[/surround]

[title="2"]Awards vs direct content selection - which to use?[/title]

The [tt]main_awards[/tt] block is a lot like the [tt]main_content[/tt] block, but the selection of content happens via the award setting UI rather than either by explicitly setting/changing the parameters to the block or randomisation.

Having the awards UI definitely makes management efficient, and you also benefit from all the other features around awards (such as the archive and automatic rewarding of points to submitters). The downside is you have to explicitly make the effort to regularly award content (unnecessary if you just use the [tt]main_content[/tt] block with randomisation).

The Admin Zone dashboard's checklist does remind you to regularly update awards, based on the regularity you configure in the award's settings.

[title="2"]Using module screens as blocks (advanced)[/title]

[surround]
[media width="150" description="Viewing our embedded module inside the news post" float="right"]data_custom/images/docs/tut_featured/featured_main_include_module_2.png[/media]
[media width="150" description="Embedding a recommend module (you cannot see, but in this case I am adding it inside the body of a news post)" float="right"]data_custom/images/docs/tut_featured/featured_main_include_module.png[/media]
While the [tt]main_content[/tt] block (see above) can show content within blocks, it is conceivable that you might want to display full module screens as if they were blocks. This is possible with the [tt]main_include_module[/tt] block.

For example:
[code="Comcode"]
[block="_SEARCH:topicview:browse:1" strip_title="1" only_if_permissions="0"]main_include_module[/block]
[/code]
would show Conversr topic #1 in a block, without running permission checks, and with the title removed.

The first parameter is the page-link to what we are embedding, which in the above example was the [tt]topicview[/tt] module, in whatever zone it is in, the [tt]browse[/tt] screen of it, and ID [tt]1[/tt]. You can usually work out page-links from the URL once you understand them (and when logged in as a staff member, the page-link of any given page is displayed in the footer). Page-links are described in the [page="_SEARCH:tut_menus"]Customising what's on the menus[/page] tutorial.

In the screenshots on the right I have shown a quirky example where I am embedding the recommend page directly into a news post.
[/surround]

[title="2"]Random quotes[/title]

{!quotes:DOC_QUOTES} To access quote administration, go to: Admin Zone > Style > Edit quotes.

You will find that by default a selection of deep quotes are provided.

If block caching is on, quotes will be rotated on a daily basis.

[title="2"]Pulling out forum content[/title]

[media width="150" description="The [tt]main_forum_topics[/tt] block" float="right"]data_custom/images/docs/tut_featured/featured_forum_topics_block.png[/media]
There are 4 blocks for pulling out forum content:
1) [tt]side_forum_news[/tt] -- show forum topics, in news-style, as a side block
2) [tt]main_forum_news[/tt] -- show forum topics, in news-style, as a main block
3) [tt]bottom_forum_news[/tt] -- show forum topics, in news-style, as a ticker
4) [tt]main_forum_topics[/tt] -- show forum topics, as either a side block or a main block

The first three of these show in a news-style, and are most useful for those who prefer to use their forum to post news, rather than the dedicated Composr news system. Most users will want to use the [tt]main_forum_topics[/tt] block.

The blocks are configurable, but generally you will typically use them to show the most recent topics from a particular set of forums.

[title="2"]Count-downs[/title]

Count-downs are provided via the [tt]main_countdown[/tt] block which you can add easily like with any other block in Composr. There are block parameters to specify the date/time the count-down is running to, and Composr will automatically maintain the count-down for you. Once it passes the date/time, it displays negative time.

You may place as many independent count-downs as you like.

[title="2"]Hit counters[/title]

[media float="right" thumb="0" framed="0"]data_custom/images/docs/dont.png[/media]
Hit counters may be placed via the [tt]main_count[/tt] block which you can add easily like with any other block in Composr.

Hit counters are considered very antiquated generally, but may be useful to you in some cases. Note that hits from bots, or repeat hits, are not filtered out.

You may place as many independent hit counters as you like.

[title="2"]Community billboard[/title]

Community billboard messages are covered in the [page="_SEARCH:tut_ecommerce"]eCommerce[/page] tutorial. This is a non-bundled addon.

[concepts
 1_key="DOTW"           1_value="[Download of the week]"
 2_key="Award system"   2_value="A system for picking out content for prominent display"
 3_key="Award"          3_value="Awards are created for a specific content type with specific details and then content of that content type may be given the award; past holders of the award are displayed in an archive"
]Concepts[/concepts]

[title="2"]See also[/title]

 - [page="_SEARCH:tut_feedback"]Feedback and user interaction[/page]
 - [page="_SEARCH:tut_downloads"]Providing downloads[/page]
 - [page="_SEARCH:tut_adv_galleries"]Advanced galleries[/page]
 - [page="_SEARCH:tut_adv_comcode_pages"]Using blocks[/page]
 - [page="_SEARCH:tut_selectcode"]Filtering using Selectcode syntax[/page]

{$SET,tutorial_tags,random_quotes,forum_blocks,counting_blocks,awards,Structure and navigation,novice}{$SET,tutorial_add_date,Aug 2008}{$SET,tutorial_summary,How to pull out content from your website, and put it in a featured spot. There are a number of methods available.}[block]main_tutorial_rating[/block]
