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 
Changing Poll Templates  XML
Forum Index » Support Forum
Author Message
Anonymous



I am very new to the Advanced Poll and am not very familiar with php at all. However I have been learning this advanced poll very quickly. After looking thru the demos that come with the adv. poll I tried a snippet that I hoped would work and it did. So here is how to change wich template you would like to use. It is very easy.

Normally this code is what you would have in your html:

include_once "/var/www/htdocs/chris/yourdomain/poll/booth.php";
echo $php_poll->poll_process(4); // x = Poll ID

Now add this:

$php_poll->set_template_set("simple"); // simple = template name

And this is how it should look in the end:

include_once "/var/www/htdocs/chris/yourdomain/poll/booth.php";
$php_poll->set_template_set("simple"); // simple = template name
echo $php_poll->poll_process(4); // x = Poll ID

Hope this helps.
Anonymous



Where it says:

echo $php_poll->poll_process(4); // x = Poll ID

the 4 should actually be x. The 4 is a variable that works with my polls but will not with yours unless you have a poll with the poll ID of 4.
Auron
Expert
[Avatar]

Joined: 23/06/2003 22:02:17
Messages: 1053
Offline

Ignore the last post saying that it should be x !!!! It shouldn't it can be newest, random or any poll id so long as you have a poll with that id, so that that particular poll will have that template.

In your case if you have a poll with a poll id of '4' on that page it will use the template set 'simple'. If you have another poll on the same page with say a poll id of 3 it will not have use the simple template set unless you specify it for that poll.

Auron

Visit my site @ www.ragnaru.com
Adv. Poll Install Guide NOW BACK ONLINE! (And also rather out of date I would of thought)
[Email] [WWW]
Anonymous



hey thanks to whoever wrote this, this is what i needed. the templates would be useless without this so i dont know why they dont include in this in their manual
Anonymous



I figured it was something like this but just couldn't find it anywhere.
This should at least be included under the help button in admin section.
No diregard for the quality of the script, just made me feel like an idiot As simple and intuitive as everything else was, I was certain I was overlooking something.

Would have made life that much easier, and saved me a few hours.

Precise answer, very helpful!
Auron
Expert
[Avatar]

Joined: 23/06/2003 22:02:17
Messages: 1053
Offline

I'm working on a new version of the script that does this.

Auron

Visit my site @ www.ragnaru.com
Adv. Poll Install Guide NOW BACK ONLINE! (And also rather out of date I would of thought)
[Email] [WWW]
Anonymous



Excellent!
Anonymous



Thank you!!!
trekker9876
Beginner

Joined: 05/06/2004 04:20:41
Messages: 23
Offline

Anonymous wrote:hey thanks to whoever wrote this, this is what i needed. the templates would be useless without this so i dont know why they dont include in this in their manual


I concur, I think this is exactly what I was looking for... now to test it
thanks!
[WWW] [Yahoo!] [MSN]
trekker9876
Beginner

Joined: 05/06/2004 04:20:41
Messages: 23
Offline

thanks people! that one line makes it work and cancels out 3 weeks of trying different codes without success! thanks!!

Jeff
[WWW] [Yahoo!] [MSN]
Auron
Expert
[Avatar]

Joined: 23/06/2003 22:02:17
Messages: 1053
Offline

Sorry to point this out but...
(line# refers to line/s of interest, count only ones with text on)

http://proxy2.de/poll/index.php lines# 17 and 21
http://proxy2.de/poll/demo_2.php lines# 16 and 21
http://proxy2.de/poll/demo_3.php lines# 17 and 26
http://proxy2.de/poll/demo_4.php lines# 18, 23 and 31
http://proxy2.de/poll/demo_5.shtml (SSI version include) line# 4
http://proxy2.de/poll/demo_6.php lines# 13 and 16

It may not of seemed obvious to some of you (i don't know why) but this seems very easy to solve.

- Auron

Visit my site @ www.ragnaru.com
Adv. Poll Install Guide NOW BACK ONLINE! (And also rather out of date I would of thought)
[Email] [WWW]
Jacob9283
Beginner

Joined: 14/05/2024 19:05:02
Messages: 15
Offline

The volatility of cryptocurrencies remains a significant challenge, making them less suitable for day-to-day transactions at present. However, the development of stablecoins, which are pegged to traditional currencies, aims to address this issue. Reliable offshore sportsbooks
 
Forum Index » Support Forum
Go to:   
Based on the open source JForum