vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Member Archives (https://vborg.vbsupport.ru/forumdisplay.php?f=202)
-   -   [preview] Poll hack (https://vborg.vbsupport.ru/showthread.php?t=1604)

07-12-2000 08:58 AM

yes toggle it as an option on/off if you can :D

07-12-2000 07:57 PM

Ok, the polltest board is now running version 0.8 of the poll hack, which is nearly complete.

Features:

- Let registered users post a new thread that has a poll integrated in it
- Let registered users vote on the poll
- Multiple votes impossible as userid is stored on vote
- Define # of poll options in CP
- Limit who can post a poll by usergroups (from the control panel)
- Designed to be easily translated. Only some text is hard coded (text on form buttons)
- Fully templateable - you can customise the look of the poll
- Vote History - shows who voted when
- Users who can not post can not vote as well
- Make sure person did not vote, press back, and vote again
- Uses user defined timeoffsets
- Admin/Moderator edit of Polls at all times
- Edit Poll while no votes (for user who started the poll thread)
- vB code parse for options
- closing a thread == close a poll
- Admin delete
- View results without voting

ToDo:
- Close poll from Edit page
- email notification when there was a vote

OK, now to the questions:
1. Vote History - you think it is usefull or not? I need to template it and was wondering if it was worth the ffort

2. Update last post when there has been a reply - should I update the "last post" field only of the thread and keep the name of the person who last replied, or change the lastposter to the person who voted? this could cause some confusion...

07-12-2000 08:07 PM

Quote:

Originally posted by doron

2. Update last post when there has been a reply - should I update the "last post" field only of the thread and keep the name of the person who last replied, or change the lastposter to the person who voted? this could cause some confusion...

I vote for the last reply.

07-12-2000 08:08 PM

Quote:

Originally posted by doron
1. Vote History - you think it is usefull or not? I need to template it and was wondering if it was worth the effort
What would the vote history represent - all closed polls? If so, I think it would be very beneficial.

Quote:

2. Update last post when there has been a reply - should I update the "last post" field only of the thread and keep the name of the person who last replied, or change the lastposter to the person who voted? this could cause some confusion...
Last Reply - it might confuse the visitors since everything else is last reply

My two cents! ;)
(Can't wait to play with this feature!)

07-12-2000 08:17 PM

Also I think a link (from fivelinks, or elsewhere) that lists all threads that are polls would be very nice!

07-12-2000 08:41 PM

Hey Doron

Great script. BTW I don't mean to be a bother but I wanted to tell you that there is a script division by zero error when you select view on a poll that has no votes. I'm sure it's an easy fix :) If anything it's not that important nor would many people be idiotic enough to click on results with no votes (except bug testers) so don't worry about it!

[Edited by SonnetCelestial on 07-12-2000 at 05:43 PM]

07-13-2000 07:35 AM

vote history shows who voted when for each poll.

division by error - damn, I was sure I was catching that, lemme fix that. (thanks!)

rangersfan - should be easy, I thought of adding a |x posts with y polls to the main template

07-13-2000 07:45 AM

Quote:

OK, now to the questions:
1. Vote History - you think it is usefull or not? I need to template it and was wondering if it was worth the ffort
I woudldn't want the users to be able to access it. But just maybe put it and I get take it out in the templates, so only I (and a knowledgeable few) know the address.

Quote:

2. Update last post when there has been a reply - should I update the "last post" field only of the thread and keep the name of the person who last replied, or change the lastposter to the person who voted? this could cause some confusion...
Yes it is confusing but causes me to worry that if you have a poll which is attracting a lot of people to vote but nobody is actually posting any replies on a busy forum the poll will dissapear off the thread list very very quickly. You have to have some way to "top" the poll thread.

07-13-2000 09:31 AM

Is it just the way your forums have been set up but I would need non-logged in / unregistered users to be able to view the poll (if not vote in it)

07-13-2000 10:15 AM

Quote:

Yes it is confusing but causes me to worry that if you have a poll which is attracting a lot of people to vote but nobody is actually posting any replies on a busy forum the poll will dissapear off the thread list very very quickly. You have to have some way to "top" the poll thread.
same here, maybe something like the announcement thread which stays at the top ?

07-13-2000 12:36 PM

Quote:

Originally posted by Mark Hewitt
Is it just the way your forums have been set up but I would need non-logged in / unregistered users to be able to view the poll (if not vote in it)
mark, good catch! I had a verifyusername() where I should not have had one. Should be working now, I added it to the voting process and not the showing of a poll one.

the votehistory will not be in the initial version.

07-13-2000 01:10 PM

btw, do note that the script is in development, and the test board will often have sql errors as I can't test the code offline

07-14-2000 08:06 AM

I thought I would post what I want to see a poll hack do on my site, basically the closer the release version is to this the less I will have to hack it myself to make it work :).

Polls should be posted seperately from normal threads i.e. there should be a 'New Poll' button which is seperate from the new thread button.

When someone posts a poll they should not be allowed to select any message icons, instead the poll will be posted with a special icon which is only used for polls - this will help to differentiate it from normal threads and eliminate the need for a POLL: prefix.

Would probably want to use this icon https://vborg.vbsupport.ru/.
Also message icons are meant to convey emotion, the original posting of a poll *should be* impartial.

Once the poll is posted then the last post time of the thread should be updated to the last time someone voted, however the last post by field should be left to the original poster or to the last reply, (may be confusing but hey it's my board I can cause as much confusion as I want :)).

Posting rights, to avoid every newbie coming in and posting the same poll over and over I need to restrict the ability to poll. In my case I would want it restricted to Senior Members only (100 posts or more), Admin and Moderators would have no such restrictions.

Thats all for now ;)

07-14-2000 08:50 AM

Quote:

Polls should be posted seperately from normal threads i.e. there should be a 'New Poll' button which is seperate from the new thread button.
100%!! I just have it different on my test board cause I was lazy to create a image. A new poll is generated by poll.php and not newthread.php

Quote:

When someone posts a poll they should not be allowed to select any message icons, instead the poll will be posted with a special icon which is only used for polls - this will help to differentiate it from normal threads and eliminate the need for a POLL: prefix.
Good idea, I'll do that, I'll try to create a poll icon (or perhaps meanno?)


Quote:

Once the poll is posted then the last post time of the thread should be updated to the last time someone voted, however the last post by field should be left to the original poster or to the last reply, (may be confusing but hey it's my board I can cause as much confusion as I want :)).
this will be in the hack, and will be togable in the cp

Quote:

Posting rights, to avoid every newbie coming in and posting the same poll over and over I need to restrict the ability to poll. In my case I would want it restricted to Senior Members only (100 posts or more), Admin and Moderators would have no such restrictions.
every usergroup gets a "canpostpoll" field, which you can set as you heart contents. ;) Try logging in to the test forum with UserNoPoll and password "password". that user can not post polls.

07-14-2000 10:17 AM

Quote:

Good idea, I'll do that, I'll try to create a poll icon (or perhaps meanno?)
Wonderful. Whats wrong with http://www.worldmotorsport.com/vote.gif?

Quote:

every usergroup gets a "canpostpoll" field, which you can set as you heart contents. ;)
Ah but what about on the number of posts a user with 99 posts and a user with 100 posts are in the same usergroup but I would not want the first one to be able to post a poll.

07-14-2000 02:08 PM

Doron : Perhaps a "Minimum # of posts before one is allowed to Post a Poll" option is in order?

(I hate bringing more changes up cause we want this now!)

07-14-2000 02:24 PM

mark - ok, your icon will be the defualt. need royalty pay? ;)

the minimum number of posts could be a extra, no problem there, just another if and another variable out of the db.

today, I'll get that and the icon and the update of last reply done, the email notif. will be pushed to a later release.

hopefully this sunday I will have it packaged for releas,e need to get a installer script written too...

07-14-2000 02:41 PM

Quote:

mark - ok, your icon will be the defualt. need royalty pay? ;)
Great. No need for royalty pay as I stole it from Craig Antill's site in the first place :D

07-14-2000 02:55 PM

heh

btw, should the last post in the index.php refelct the last date time or jsut the last reply time

i added the code for the date change on vote, but it does not update the forum last reply.

07-14-2000 02:58 PM

My personal opinion is that a vote should not update the index.php list.

07-14-2000 05:48 PM

ok, the last 2 features are implemented - special icon for polls and vote causes last post date to increase. Also fixed the usergroup limitation. Also implemented is the "minimum posts for pollpost" feature.

i'll write the installer next and test it on 1.1.2 and 1.1.3 over the weekend and hopefully release on sunday/monday

[Edited by doron on 07-14-2000 at 02:51 PM]

07-14-2000 06:44 PM

yay ...can't wait :D

07-14-2000 07:38 PM

I can't wait to try this out!!!!!!!!!!!


All times are GMT. The time now is 12:47 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01456 seconds
  • Memory Usage 1,790KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (14)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (23)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete