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 
How to make a poll follow a template  XML
Forum Index » Support Forum
Author Message
miztiiik
Beginner

Joined: 26/04/2006 12:38:09
Messages: 12
Offline

i made a poll and copied the following




now i need to know how to make the poll follow a template like simple/default or a popup
[WWW]
phpuser3
Graduate
[Avatar]

Joined: 16/11/2004 12:46:44
Messages: 110
Offline

miztiiik
Beginner

Joined: 26/04/2006 12:38:09
Messages: 12
Offline

thanks very much for your timely help
[WWW]
cheeseus
Newbie

Joined: 15/11/2006 16:42:46
Messages: 4
Offline

Now comes the difficult part
Can I use my own template? I designed one using the Admin panel, it's available in the template drop-down menu, I can preview it etc. BUT when I include the code:

$php_poll->set_template_set("Modern");

the poll doesn't appear at all...
Any suggestions?
phpuser3
Graduate
[Avatar]

Joined: 16/11/2004 12:46:44
Messages: 110
Offline

do you get any error messages from php?
cheeseus
Newbie

Joined: 15/11/2006 16:42:46
Messages: 4
Offline

Nope, nothing whatsoever, no trace of poll
retokmeier
Newbie

Joined: 05/11/2006 10:17:57
Messages: 4
Offline

maybe this post will help

http://proxy2.de/forum/viewtopic.php?t=5910&highlight=

are you properly linking/saving your template in the dropdown to the correct poll?

does your template contain both the question and answer section of the code?

assuming you started with an existing template to create your new template, did you properly save the new template when you changed the code?
[WWW]
cheeseus
Newbie

Joined: 15/11/2006 16:42:46
Messages: 4
Offline

Thank you!
Reading other postings I eventually found a solution:
in order for my template to show, I had to change the "include_once" to "require_once":

require_once "/web/d2/w/cheeseus/cheeseus.org/poll/textfile/booth.php";
$php_poll->set_template_set("Modern");
echo $php_poll->poll_process(11); // x = Poll ID

Then, as it were, I had forgotten to make the templates for the Poll Result and the Comment, but now I made them, so it's all running smoothly!
Thanks once again!
 
Forum Index » Support Forum
Go to:   
Based on the open source JForum