[FREE] <?php ssi_recentPoll(); ?> Question

Started by BKerr, June 15, 2004, 09:56:43 PM

Previous topic - Next topic

BKerr

Im using the <?php ssi_recentPoll(); ?> SSI Function in my website:

www.buckboardbunch.com

When you submit a vote, it sorta just makes the page flash, but the vote does enter.

What do i have to edit in SSI.php to make it go to that topic so you can see results or make the votes display where the poll should have been on the website if already voted?

I thought the SMF guys where smart enought to do this...

[Unknown]

Quote from: BKerr on June 15, 2004, 09:56:43 PM
I thought the SMF guys where smart enought to do this...

I will not answer your question, then.  I'm too stupid.  Nice comment.

-[Unknown]

BKerr

Its just a general statement...why would you just have the poll there but just have it sit there looking like it doesnt work?

I got that comment from 4 people already saying it doesnt work, but it does, it just doesnt show any type of results...


Douglas

Doug Hazard
* Full Stack (Web) Developer for The Catholic Diocese of Richmond
(20+ Diocesan sites, 130+ Church sites & 24 School sites)
* HBCUAC.org Web Developer, the NAIA's only HBCU Athletic Conference
* Former Sports Photographer and Media Personality and Former CFB Historian
* Tech Admin for one 2.9M+ post and one 11.6M+ post sites. Used to own a 1M+ post site.
* WordPress Developer (Junkie / Guru / Maven / whatever)

Grudge

IIRC recentPoll shows the most recent poll that you haven't voted in? (Although I may be wrong). If you want to show the results afterwards look at showPoll(). That takes a SPECIFIC topic ID as its parameter so is very useful for using on a homepage etc and also displays results after voting.
I'm only a half geek really...

Bartrainer

Quote from: BKerr on June 15, 2004, 09:56:43 PM
I thought the SMF guys where smart enought to do this...please help?

Kerr, with that attutude I don't think you will get very far around here...Try the humble approach, it will get you farther...

YUK
Everyone that says "it can't be done" is followed by someone that just did it.  The possibilities are as Powerful as your imagination...

"There are No bad cocktails, just bad drinkers."

BKerr


Grudge

OK. Cheers for clearing that up... ::)

Considering I personally wrote it and added it some time back I think I know whether it does or doesn't exist ;) It's not in ssi_examples because it takes a topic ID and as such it's not possible to give an example of it on every board. Not all SSI functions will appear in the examples - it's a case of looking in SSI.

If you open up SSI and search for showpoll you'd see the function DOES exist and takes a topic ID as a parameter. So you just pass an id for a topic with a poll attached to it and it will ALWAYS display that poll.
I'm only a half geek really...

BKerr

I replaced the Recent Poll SSI with the one you said and all it did was print that text...it didnt work.

andrea

I can confirm that it works, precisely the way as Grudge described it. Use the function
ssi_showPoll(xxxx)
(where xxxx is id of the poll topic).
This will output the vote screen or (if the member has already voted) the poll voting result.

Andrea Hubacher
Ex Lead Support Specialist
www.simplemachines.org

Personal Signature:
Most recent work:
10 Aqua Themes for SMF



Tomer

Quote from: andrea on June 17, 2004, 09:57:36 AM
I can confirm that it works, precisely the way as Grudge described it. Use the function
ssi_showPoll(xxxx)
(where xxxx is id of the poll topic).
This will output the vote screen or (if the member has already voted) the poll voting result.

But what if you want a recent poll and not a static poll that you submit?

andrea

As Grudge wrote showPoll is to be used in order to show poll results.

Andrea Hubacher
Ex Lead Support Specialist
www.simplemachines.org

Personal Signature:
Most recent work:
10 Aqua Themes for SMF



BKerr


Elijah Bliss

Quote from: andrea on June 17, 2004, 01:13:35 PM
As Grudge wrote showPoll is to be used in order to show poll results.

Has anyone got this to work yet? I'm stuck on how to use the ssi_showPoll to show the results of the most recent poll.

andrea

Quote from: Elijah Bliss on July 22, 2004, 12:19:49 AM
Has anyone got this to work yet? I'm stuck on how to use the ssi_showPoll to show the results of the most recent poll.

Sure. It works fine. Just use the above description.

Andrea Hubacher
Ex Lead Support Specialist
www.simplemachines.org

Personal Signature:
Most recent work:
10 Aqua Themes for SMF



Elijah Bliss

Quote from: andrea on July 22, 2004, 01:30:31 PM
Quote from: Elijah Bliss on July 22, 2004, 12:19:49 AM
Has anyone got this to work yet? I'm stuck on how to use the ssi_showPoll to show the results of the most recent poll.

Sure. It works fine. Just use the above description.

I did, and all it does is flash the screen and when I refresh it goes to the next poll.

How can I get to to show the results of the recent poll I voted in? Or at least go to the page where the poll resides.

Would the code look something like this?

ssi_showPoll(ssi_recentPoll());

Grudge

Quote from: Elijah Bliss on July 22, 2004, 12:19:49 AM
Quote from: andrea on June 17, 2004, 01:13:35 PM
As Grudge wrote showPoll is to be used in order to show poll results.

Has anyone got this to work yet? I'm stuck on how to use the ssi_showPoll to show the results of the most recent poll.
showPoll is specifically intended to show a PARTICULAR poll. You must pass it a topic ID for it to work - it's not intended to do anything with recent polls.
I'm only a half geek really...

Advertisement: