TinyPortal

Development => Resources => Topic started by: Juham on August 29, 2008, 08:34:29 PM

Title: Poll
Post by: Juham on August 29, 2008, 08:34:29 PM
SMF has very good poll capabilities.

But how do I add poll in left or right panel in TinyPortal? I searched forum for some time but didn't quite get the answer.

Is there built in functionality for these or must i do it manually?

Thanks for answers. P.S. is there more modules out there to download? shoutbox advance shoutbox and test one are presets.
Title: Re: Poll
Post by: IchBin on August 29, 2008, 08:39:43 PM
Don't forget to search the Doc site we have linked at the top here. All the functionality that TP has is there for the most part.
http://docs.tinyportal.co.uk/index.php?topic=83
Title: Re: Poll
Post by: Ken. on August 29, 2008, 08:40:28 PM
Block Code Snippets Board (http://www.tinyportal.net/index.php?board=46.0)

Take a look at the link above Juham, you'll find code snippets there for displaying your polls.
Title: Re: Poll
Post by: Juham on August 29, 2008, 09:56:51 PM
Thanks for your answers.

So if i understand correct then i must use PHP block on left or right panel and put in it some Block Code Snippets.

These code then is a "bridge" betwen the Poll made in topic  and the front page.

Another option is to use "ssi function" inside a block.. It has 2 options:

Most recent poll
Top poll

But that is not usable if admin wants to put its own poll on board index.

Another option is to use third party code in php block that uses its own admin area and own database.

But i would like to use SMF Poll system and i would like to control which poll is on front page.

So if i understand correctly i must use Block Code Snippets. What would be the most robust Poll Code Snippet that won't made bugs and will allow voting from front page to not yust vieving the poll?

ssi_showPoll(0.0);
echo '<br /><hr />';


Something like that would work in a PHP block? I found these code offten in discussions.But there were always some ssi hacks and stuff mentioned beside it. Where can i see the number of the poll to change the 0.0 value?
Title: Re: Poll
Post by: G6Cad on August 29, 2008, 09:59:50 PM
ssi_showPoll(0.0);

That is all you need, and offcourse change the 0.0 to the poll post number you get when you post the poll

You can see 2 polls with just this code on my forum, right hand panel in the forum

http://www.familjegodis.se
Title: Re: Poll
Post by: Juham on August 29, 2008, 10:15:31 PM
Yes like u have on the site. These is what i would like.

I understand now what i have to do but the poll post number? I just can't find it? Where must i look?


Edit:

OK i found it now. In browser address area.

Thank you all for answers the problem is solved!


Title: Re: Poll
Post by: Ken. on August 29, 2008, 10:24:12 PM
Use the topic number where your poll is posted.
Title: Re: Poll
Post by: G6Cad on August 29, 2008, 10:35:03 PM
Like the topic here

http://www.tinyportal.net/index.php?topic=25728.0

See the number ?   the poll gets a number just like a post, and that is the number you set instead of the 0.0 si it will be like

ssi_showPoll(25728.0);
Title: Re: Poll
Post by: Juham on August 29, 2008, 10:45:52 PM
Yes now it works fine. Only problem i have is style issue.

The progress bar is to long and it sticks out of the block area and if i use long words it does the same.

But i will change progress bar in time and use short words and everything will be like it should.

Thank you all for replies.
Title: Re: Poll
Post by: Juham on August 29, 2008, 10:56:14 PM
I was thinking would it be possible to add some CSS before

ssi_showPoll(0.0);

So the text would brake and would not stick out of block if it's to long?

But it souldn't interfere with te rest of the forum.
Title: Re: Poll
Post by: Juham on August 30, 2008, 09:21:03 PM
I found all the solutions in these post. SSI hack solves the "too long progress bar" issue. Works like it should now.

http://www.tinyportal.net/index.php?topic=9869.0