vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Modification Requests/Questions (Unpaid) (https://vborg.vbsupport.ru/forumdisplay.php?f=112)
-   -   Must choose poll first to post (should be high demand for this) (https://vborg.vbsupport.ru/showthread.php?t=254390)

basketmen 11-29-2010 02:03 AM

Must choose poll first to post (should be high demand for this)
 
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

Quote:

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....

Quote:

Quote:

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....82&postcount=8







Quote:

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:

PHP 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

Quote:

Originally Posted by kh99 (Post 2137668)
Create two new plugins using hook locations newreply_form_start and newreply_post_start, both using this same code:

PHP 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

Quote:

Originally Posted by basketmen (Post 2137704)
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


All times are GMT. The time now is 09:02 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.01472 seconds
  • Memory Usage 1,749KB
  • 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
  • (2)bbcode_php_printable
  • (6)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (9)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
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete