PDA

View Full Version : Must choose poll first to post (should be high demand for this)


basketmen
11-29-2010, 02:03 AM
This demand should be popular enough, cant believe still cant found hack/mod like this until now or simillar like this

if you can please create this mod, its should be many install for this

this is very good for debates/poll forum for example, it is funny if many users not choosing poll in poll forum

vbenhancer
11-29-2010, 11:03 AM
1- if it does not already exists after that long, maybe the reason is that it is not a potential like you think it could be.
2- if you check in the releases, there are some hacks like this already... "vote before posting"...

basketmen
11-29-2010, 02:16 PM
1- if it does not already exists after that long, maybe the reason is that it is not a potential like you think it could be.

yes the demand for this are very high, here is examples

Vote In Poll Before Posting.... (https://vborg.vbsupport.ru/showthread.php?t=190206&highlight=vote+before+posting)

Originally Posted by yoyoyoyo

how about a "no reply until vote" hack?

That was what I was thinking too. Props on this tho.
from https://vborg.vbsupport.ru/showpost.php?p=859482&postcount=8







2- if you check in the releases, there are some hacks like this already... "vote before posting"...

i already search still cant found it, can you give the links please?

basketmen
12-01-2010, 07:46 PM
up, how is it guys from example i give above

basketmen
12-21-2010, 08:35 PM
up up, share your experience please,

if the hack already exist please share the links, maybe i just cant found it

if not existed yet please create simple hack for this, see example above, many users need this

kh99
12-22-2010, 03:10 PM
Create two new plugins using hook locations newreply_form_start and newreply_post_start, both using this same code:

if ($threadinfo['pollid'])
{
$pollvotes = $vbulletin->db->query_read_slave("
SELECT voteoption
FROM " . TABLE_PREFIX . "pollvote
WHERE userid = " . $vbulletin->userinfo['userid'] . " AND pollid = $threadinfo[pollid]
");
if ($vbulletin->db->num_rows($pollvotes) == 0)
{
$vbulletin->url = 'showthread.php?' . $vbulletin->session->vars['sessionurl'] . "t=$threadid";
eval(standard_error("You must vote before posting in this thread."));
}
}


(which I mostly took out of showthread where it checks if a user has voted). You need two plugins because a user can post from quick reply or go to the reply form.

I haven't tried this extensively so there may be some other wy to reply that I didn't think of.

basketmen
12-22-2010, 04:16 PM
Create two new plugins using hook locations newreply_form_start and newreply_post_start, both using this same code:

if ($threadinfo['pollid'])
{
$pollvotes = $vbulletin->db->query_read_slave("
SELECT voteoption
FROM " . TABLE_PREFIX . "pollvote
WHERE userid = " . $vbulletin->userinfo['userid'] . " AND pollid = $threadinfo[pollid]
");
if ($vbulletin->db->num_rows($pollvotes) == 0)
{
$vbulletin->url = 'showthread.php?' . $vbulletin->session->vars['sessionurl'] . "t=$threadid";
eval(standard_error("You must vote before posting in this thread."));
}
}


(which I mostly took out of showthread where it checks if a user has voted). You need two plugins because a user can post from quick reply or go to the reply form.

I haven't tried this extensively so there may be some other wy to reply that I didn't think of.
many thanks its works, member cannot reply before choosed poll

is there a code for must using poll to create a thread too?

its simple and ready mod, i suggest you create a thread for this in Mods forum :)

kh99
12-22-2010, 04:17 PM
is there a code for must using poll to create a thread too?


Oh, sorry, maybe I misunderstood what you wanted. I'll look at that....although that might be harder because IIRC the thread has to be created before adding a poll.

ETA: ..or maybe you mean, in a certain forum force the "post a poll" option to be selected? That makes more sense (and should be easier).

BirdOPrey5
12-28-2010, 09:42 PM
FYI with kh99's permission I made this into an installable product with options:
https://vborg.vbsupport.ru/showthread.php?t=256077