Jump to content

Community

Aiwa

Site Poll Block

Recommended Posts

Well, it worked on my site originally for some reason, but I added logic in the query to force the DB pull to only pull one row. That one row being the latest created poll in the specified forum.

I was still unable to duplicate the issue, but that was the only place it could have been, so I just made it a bit more robust.

Share this post


Link to post
Share on other sites

Fair enough it seems to have resolved if for now at least, fingers crossed it stays that way!



It will. As long as the topic you are adding the poll too is newer than the previous poll. i.e. if you add a poll to an older topic, it won't work... It is based off of topic ID. So it will always pull the latest poll from the highest numbered topic id from the forum specified in the configuration..

Share this post


Link to post
Share on other sites

Hi Aiwa!

This looks like a great download! Is it possible to have this displayed inside Gallery > Social View template? It's not an IP.Content page but was just wondering what I would need to do this, if possible.

Share this post


Link to post
Share on other sites

If you have IP.Content... Yes, you can just parse the block on any Look and Feel template...

If you don't have IP.Content, this would need to be converted into a hook and can then be hooked in anywhere.

Share this post


Link to post
Share on other sites

Can i change anything so it displays more then one poll?

It can handle multiple questions in the same topic, but is not designed to handle multiple questions across multiple topics.

You can, however, install the block twice and make sure each block has its own unique key and add both to your page. They would have to pull from separate forums, though... You couldn't pull the 2 latest polls from a single forum.

If there is enough interest, I can rewrite this to handle that scenario...

Share this post


Link to post
Share on other sites

I'm totally new to this, so please excuse the the simplicity of this question.

I'm up to the point where it says:

"The block has been saved and is ready to use. To use, simply insert the following tag into any of your pages or templates where you want the block to show up.

{parse block="site_poll"}

You can return at any time to edit this block."

So where exactly would I insert "{parse block="site_poll"}"?? With me, the more details you can provide, i would be really grateful.

Thank you :)

Share this post


Link to post
Share on other sites

Copy that {parse} tag. Go to your content Page Manager and select the page you want the block on. Paste the parse tag on the page where you want the block to display.

Share this post


Link to post
Share on other sites

Got the blocks to install .... where is the block template stored at?

EDIT - found it!

Thanks for the mod!


I removed both these and I still see

(1 member(s) have cast votes)

		  <a href='#' class='votes' id='l_voters_{$questionID}_{$choiceID}' title='{$this->lang->words['poll_view_voters']}'>({$choiceData['votes']} {$this->lang->words['poll_votes']} [{$choiceData['percent']}%] - <strong>{$this->lang->words['poll_view']}</strong>)</a>
		 <else />
		  <span class='votes'> ({$choiceData['votes']} {$this->lang->words['poll_votes']} [{$choiceData['percent']}%])</span>

Edited by eoebrian

Share this post


Link to post
Share on other sites

What you removed was the % votes... Not the has cast votes...

<h3><if test="showPollResults:|:$showResults"><center><span class='desc'>({$poll['_totalVotes']} {$this->lang->words['poll_vote_casted']})</span></center></if></h3>

This is the (# members have cast votes)

Share this post


Link to post
Share on other sites

Ok reverted and removed that ... thanks!

Is there supposed to be text displayed in the block at the bottom via {$this->lang->words['poll_you_voted']} or am I reading the code wrong again?

Share this post


Link to post
Share on other sites

Only if you don't allow users to delete their own vote.

And is that confirmed to be working? Thought for sure I had disabled that and I see no text saying I voted. Off to verify that I disabled deletion ....

Share this post


Link to post
Share on other sites

Ahhh ok - I guess I've got something else messed up - logged in as a regular member and it says I dont have permission to vote hmmmmmmmmm it seems that I can NOT hide the poll category forum from view on the main page and have a forum in that category used as a default home page poll forum.

Im a long time multi license VB user ... used to being able to hide a category but have the forum with permissions set be accessible .... oh well!

Share this post


Link to post
Share on other sites

I don't understand what you're trying to do...

You specify in the block config what groups SEE the block... If they can vote in that forum, they see a vote button.. If they can't, they see "can't vote"

Share this post


Link to post
Share on other sites

The issues are mine .... just so used to VB ... decided to try ipb last week and have had a hoot with all the differences .... Problem here is that I had permission on a category so that no one could see it in the forum listings, yet I had forums in that category set so that you could see it if you knew the url - thats how I stored all my home page polls in VB.... IMO doesnt make any sense to not be able to control permissions for cat and forum independently, but hey what do I know - HAH!

Either way - the poll script is working just fine - thank you for creating it! Much better than having to go in and manually set it up every month.

Share this post


Link to post
Share on other sites

All seemed well - no one let me know otherwise and then tonight I had a user tell me that they were seeing "Sorry, you don't have permission for that! " I can not see any reason why they should get that error ... what might I be missing? These users can see the poll and they see the vote button - when they click the vote button they go to the error page...

Share this post


Link to post
Share on other sites

Can they reply to topics in the particular forum the poll is in?

What happens when they go to the topic itself and vote from the topic?

Edited by Aiwa

Share this post


Link to post
Share on other sites

WOW seems you two guys have done alot of work to this Module. I just have one question, i know we can download this at anytime and make the changes to it as we wish. seeming though there has been alot of discussion about this (4 pages exactly) would it be best for us to wait for the Final product and will you be implementing what you've discussed into the Module so none of us have to come back and start more discussions on this.

Thanks.

Share this post


Link to post
Share on other sites

Tekguru,

I updated the description for compatible versions. It has been tested on 3.4.x. That's all.

Paul,

It's fully customizable as is. You have access to the entire block template code as a skin template bit. The issue that was not allowing users to change the header was fixed long long ago. It was a bug with IP.Content that I had to find a workaround for...

Was there something you had a specific concern with?

Share this post


Link to post
Share on other sites

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...