TinyPortal

Development => Support => Topic started by: Homer_J_S on March 28, 2005, 02:05:11 AM

Title: Is there any way to show just one poll in a block?
Post by: Homer_J_S on March 28, 2005, 02:05:11 AM
I would love to have a poll on the left side in a block but I don't know enough to get one to show. Is this possible yet with TP?

Thanks in advance.
Title: Re: Is there any way to show just one poll in a block?
Post by: IchBin on March 28, 2005, 02:15:12 AM
I would imagine it wouldn't be to hard to code a block for that. I'll see if I can't come up with one. I'm no expert, but I love trying. :) Bloc will have a little better perspective on this though.
Title: Re: Is there any way to show just one poll in a block?
Post by: Bjørn on March 28, 2005, 10:56:42 AM
Do you mean a poll that also is in the forum - or a stand-alone poll just for the blokc/TP?

The first option is pretty straightforward, since SSI.php already has this function built-in. The latter is more involved since it requires a new poll function to be made just for TP. But still not impossible.. ;)
Title: Re: Is there any way to show just one poll in a block?
Post by: Homer_J_S on March 28, 2005, 02:31:11 PM
Actually either one would do.
On the first option, Just so that it would it would only give the poll I wanted and not the most recent poll. For example if I created a forum strictly for polls. The poll that would show up in the block would be the one I could control and not something like the most recent poll created in the forum. I hope that made sense. I guess just so long as I had control over the poll that my users could view and if they had already voted it would automatically show them the results. 

Of course the second option would really be wonderful. Just to have a stand alone poll that would show you the results if you had already voted and I wouldn't have to create a seperate forum just for polls.

But as I said, any of these could help me out.       
Title: Re: Is there any way to show just one poll in a block?
Post by: Bjørn on March 28, 2005, 05:35:28 PM
I am going to release a new beta soon for the beta-testers, I can include "poll-in-block" type for this, since it probably is very handy there on the frontpage. The SSI.php variant will fetch the latest, but with some rewriting/copying of the function it can fetch one specific poll.
Title: Re: Is there any way to show just one poll in a block?
Post by: Homer_J_S on March 28, 2005, 05:38:32 PM
If you can make it fetch one specific poll that would be wonderful. Thanks so much and I eargerly await the next stable beta.  ;D