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 
Messages posted by: Fritz
Forum Index » Profile for Fritz » Messages posted by Fritz
Author Message
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

NOTE: ONLY EDIT TEMPLATES VIA THE ADMINISTRATION INTERFACE. Do not edit the template files.

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!
I just wanted to leave a message here to congratulate the authors of Advanced Poll. I considered and evaluated numerous PHP polling scripts and found Advanced Poll to be the best, most flexible and most comprehensive one I came across. Thanks for this great work!!

That said, the numerous posts in these forums – combined with my own experience with installation and configuration of Advanced Poll – are indicative of the dire need for a comprehensive set of documentation describing all steps of installation, access to the site admin, how to include polls on pages, and a description of each of the poll options.

While most of this information IS available, it is scattered about here and there. Some of it on the Demo pages, some on the Read Me file, some in various posts in these forums. But, even in the posts that deal specifically with installation, it is haphazardly arranged and incomplete. Unfortunately, too, some information contradicts information found in other places, such as this example that I've posted elsewhere:
http://proxy2.de/forum/viewtopic.php?t=5280&start=0&postdays=0&postorder=asc&highlight=

The thing is, this is actually a really easy script to install, configure and use, but it still took me about 3 hours to figure it out because I spent so much time searching for information about the various installation and configuration options.

With a really good – and comprehensive – set of documentation, it should have taken less than 15 minutes.

And I'm a professional web developer with PHP experience. I can see why beginners have so much trouble.

Sorry I wrote so much. Please understand that I am truly a fan of this script. It is awesome. It would be even better with thorough documentation.

Thanks for your time!
Fritz :o
This little bit was confusing at first, so I thought I would clarify it for others without a lot of PHP knowledge:

There is some discrepancy in the available documentation as to how to include a poll on your web page. In some places, such as on the current Demo pages, we are told to paste the following code just above the code that actually displays the poll:



In other places, like the Help section of the poll administration, we are told to use only:



The correct choice as of version 2.03 (possibly earlier) is the second option, where the booth.php file incorporates all of the code in the first option.

Hope this is helpful. :o :o
I can confirm that using require_once instead of include fixed the same problem for me.

Thanks,
Fritz
 
Forum Index » Profile for Fritz » Messages posted by Fritz
Go to:   
Based on the open source JForum