NorrCompetition | NorrNext Documentation
DocumentationNorrCompetition
  • 🚀Getting started
    • Technical Requirements
    • Installation and Updates
  • 🛠️Configuration
    • Component Options
    • General
    • Contests
    • Contest
    • Entries
    • Entry
    • Categories
    • Category
    • Images
    • Comments
    • Contest Form
    • Permissions
  • 🖼️Contests
    • Managing Contests
    • Creating Contest
    • Contest Layout Options
    • Closing Contest
  • 🏆Entries
    • Managing Entries
    • Adding Entry
    • Approving Entry
    • Entry Data Comparison
    • Entry Layout Options
    • Submitting Entry Form
    • Contestant's Profile
    • Votes Log
  • 📂Categories
    • General Information
    • Managing Categories
    • Creating Category
    • Category Layout Options
  • 🧩Fields
    • General Information
    • Managing Fields
    • Field Types
    • Creating Field
  • 🔋Modules
    • NorrCompetition Entries
    • NorrCompetition Contests
    • NorrCompetition Grid
  • 🔌Plugins
    • NorrCompetition Notifications
    • NorrCompetition Smart Search
    • NorrCompetition Search
    • NorrCompetition Sitemap
    • NorrCompetition Profile Link
    • Application for EasySocial
    • NorrCompetition Application for JomSocial
    • AUP plugin for NorrCompetition
    • NorrCompetition Image Moderation
      • Sightengine Setup
      • Plugin Configuration
  • 💬Comments
    • Integration with Facebook
    • Integration with JComments
    • Integration with Komento
    • Integration with Disqus
    • Integration with VK.com
  • ☁️Remote Storage
    • General Information
    • AWS S3
  • 🖥️Customisation
    • Template Overriding
    • Using content plugins on entry page
    • Link to contestant
    • Events
      • Content
      • Contest
      • Entry
      • Entry Form
      • Field
      • Vote
      • Other
  • ✍️Localisation
    • Language pack installation
    • How to take a part in NorrCompetition localisation
  • 📜Best Practices
    • Recommendations on image sizes
    • Use on multilingual sites
    • Tutorial: How to Create Photo/Video Voting Contest on Joomla
    • Tutorial: Monetize Voting Contests via Membership
    • Tutorial: Monetize Voting Contests via Points
    • Embedding HTML snippets on example of music contest
  • 💡FAQ
    • How the protection from unfair voting is implemented?
    • What notifications does the component send?
    • Create and edit contests on front-end
    • Submitting Entries by Unregistered Users
    • How to install sample data
    • How to change the order of tabs with comments
    • Using navigation module (breadcrumbs)
    • NorrCompetition and YOOtheme Pro
  • 🔍Troubleshooting
    • I do not get notifications from NorrCompetition
    • I get an error or white screen on photo upload
    • No images appear after submitting entries
    • Submit button is not working
  • User is not able to vote. Errors in the console
Powered by GitBook
On this page
  • Theory
  • Step 1. Create field
  • Step 2. Create contest
  • Step 3. Get HTML code from music provider
  • Step 4. Add new entries
  • The result
  1. Best Practices

Embedding HTML snippets on example of music contest

PreviousTutorial: Monetize Voting Contests via PointsNextHow the protection from unfair voting is implemented?

Last updated 2 years ago

**Note:** after 20 seconds since beginning, the video comes in HD quality.

NorrCompetition works with various media content and allows to upload photos and embed videos as well as create simple content without media. The simple type together with fields can make a little magic: you can embed HTML snippets of any 3rd party service. We will consider creating a contest with music content.

You can embed audio tracks from any online music service that provides a way to embed audio via HTML code:

  • Soundcloud

  • Spotify

  • Deezer

  • Bandcamp

  • and other

Theory

We need to create a contest called Weekend music and add entries that consist of tracks from Soundcloud and Spotify. Before creating the contest, a special field should be created. This field will be used to allow a user to paste the HTML code.

Warning! Allowing users to paste the code that contains Iframe tags endanger your site and cause the potential risk of being hacked. Iframe allows to run external scripts, so the attacker can execute any malicious code and do everything with your site. We highly recommend not to allow any user groups except site administrators to create content based on the Text Filters filter. Give such privilege to site administrators and to trusted persons only!

Step 1. Create field

Go to NorrCompetition > Fields and .

Give the field a name Song. Set Text Filters in the Filter param and make the field visible.

Text Filters option use text filter settings from the system's global configuration. You can set restrictions there, but by the default the use of Iframe tag is allowed for Super Administrator.

Create a new field with Text Filters option

Step 2. Create contest

Select Simple type.

The next step is to assign fields to the contest. Check the **Song** field which will be used to embed audio. Now the audio player will be displayed on the entry page.

However, we should embed players on the list of entries too. To do this, just go to NorrCompetition > Contests > Edit contest and click on the Layout Settings tab. Then find Entry Field param and select Song field. Now all entries will get embedded players in the list of entries.

Step 3. Get HTML code from music provider

Well, it is time to get HTML code. Let's open any sound service and copy HTML snippets of your lovely song.

Step 4. Add new entries

The result

The example of how the embedded code looks like in NorrCompetition is represented on the screenshots below:

Go to NorrCompetition > Contests and .

Create Simple Contest
Assign Song field to contest
Display Song field in the list of entries
Soundcloud: click on Share button below the song
Soundcloud: click on Embed button
Soundcloud: Copy HTML code

Now go to NorrCompetition > Entries and .

Edit Entry: paste HTML code to Song field
List of entries with embedded audio
Entry page with Soundcloud player

If you do not need embedded players to be displayed in the list of entries and want to put logo/photos, just create a photo contest and customize the theme via the by removing a photo from entry page. Finally, you will get the photo in the list of entries and no image in the entry page, but just embedded code.

📜
Create contest
Add new entry
template override
Create field
Create a new field with Text Filters option
Create Simple Contest
Click on Share button below the song in Soundcloud
Create entry: paste HTML code to Song field
Entry page with Soundcloud player
Display Song field in the list of entries
Click on Embed button
Copy HTML code
Assign Song field to contest
List of entries with embedded audio