If you are not registered or logged in, you may still use these forums but with limited features. Show recent topics
  [Search] Search   [Hottest Topics] Hottest Topics   [Members]  Member Listing   [FAQ]  FAQ 
[Register] Register / 
[Login] Login 
Advance Poll Graphic  XML
Forum Index » General Discussion
Author Message

Joined: 27/11/2005 06:46:02
Messages: 1

How do I add a Graphic or Image to the top of the Poll? I have text in there now but would like to change the appearence of the text box on the Header of the Poll.

Joined: 06/01/2006 22:59:01
Messages: 5
Location: Oklahoma, USA

The easiest way that comes to mind to do this is to create a new poll template, then modify the HTML of that template to include the graphic. By modifying templates, you can have a tremendous amount of control over the way the poll looks.

Changing Poll Display by Editing Templates


To do this (as of version 2.03), you would log into the poll administration, go to "Templates" and click "New Template Set". You will be asked to name the template set.

Next, a good way to proceed is to switch to one of the other templates that displays closest to the way you want your new template to display and copy the code from that template to your new one – effectively duplicating the original. To switch between the templates you are editing, use the "Templates" dropdown menu in the upper right corner. Be careful to keep track of which template you are currently editing!

In order to copy all of the code from an existing template to a new one, you will need to go back a forth between them copying and pasting each section – "display_head", "display_loop" and "display_foot" – appropriately.

Once you have "duplicated" an existing template, you can then edit the HTML code to force the template to display how you want, assuming you know how to edit HTML code. All you have to worry about is leaving the PHP variables, which start with a dollar sign ($), intact, unless you also want to pick and choose which variables will be displayed and you think you know what you are doing. The good news is that you can't really screw anything up too bad because you are not editing a default template.

In order to apply a specific template to a poll on a web page, you include an extra line in the code you insert into the page to cause the poll to display:

If the poll does not display with the new template, you may have a problem with your HTML code, or you may need to change "include_once" to "require_once" in the first line in the code above.

Hope This Helps Someone!
Forum Index » General Discussion
Go to:   
Based on the open source JForum