Display polls in Joomla! articles

From CjWiki
Jump to: navigation, search

Community Polls comes with multiple modules and plugins which can be used to embed a poll on your site anywhere. Here is the brief list.

Random Poll module

You can display chosen poll or randomly selected poll in any module position of your site. You can display this module inside a Joomla article using loadmodule syntax. Please read the this documentation to know more about it.

Content Polls plugin

This plugin is designed specifically to add a poll inside any Joomla article. Joomla content component (Articles) triggers all content plugins automatically. So when you publish this plugin from plugin manager, Joomla will trigger this module.

How does it work?

The plugin search for a specific syntax as mentioned below and loads the poll as per syntax given:

{CONTENTPOLL ["id": POLLID]}

Where POLLID is the ID of the poll you would like to embed. You can customize the poll display with multiple options which are similar to Polls Anywhere function. You can read them here.

Polls Anywhere

If you have enabled Polls Anywhere in your component options, the JavaScript code to embed a poll is displayed on poll details page. You can simply copy and paste the code inside your article HTML code. Please note that your editor may strip JavaScript code if you are editing article from front-end. In back-end, you can toggle editor and add the script code and save. Or use Joomla editor like Code Mirror which can accept scripts if your user permissions allow.

You can read more about Polls Anywhere script code customization here.
Polls Anywhere - Advanced Concepts