Go Back   vb.org Archive > Community Discussions > Modification Requests/Questions (Unpaid)
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 11-29-2010, 02:03 AM
basketmen's Avatar
basketmen basketmen is offline
 
Join Date: Nov 2006
Posts: 446
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default 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
Reply With Quote
  #2  
Old 11-29-2010, 11:03 AM
vbenhancer's Avatar
vbenhancer vbenhancer is offline
 
Join Date: Dec 2009
Location: Qu?bec city, Canada
Posts: 740
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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"...
Reply With Quote
  #3  
Old 11-29-2010, 02:16 PM
basketmen's Avatar
basketmen basketmen is offline
 
Join Date: Nov 2006
Posts: 446
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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?
Reply With Quote
  #4  
Old 12-01-2010, 07:46 PM
basketmen's Avatar
basketmen basketmen is offline
 
Join Date: Nov 2006
Posts: 446
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

up, how is it guys from example i give above
Reply With Quote
  #5  
Old 12-21-2010, 08:35 PM
basketmen's Avatar
basketmen basketmen is offline
 
Join Date: Nov 2006
Posts: 446
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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
Reply With Quote
  #6  
Old 12-22-2010, 03:10 PM
kh99 kh99 is offline
 
Join Date: Aug 2009
Location: Maine
Posts: 13,185
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #7  
Old 12-22-2010, 04:16 PM
basketmen's Avatar
basketmen basketmen is offline
 
Join Date: Nov 2006
Posts: 446
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by kh99 View Post
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
Reply With Quote
  #8  
Old 12-22-2010, 04:17 PM
kh99 kh99 is offline
 
Join Date: Aug 2009
Location: Maine
Posts: 13,185
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by basketmen View Post
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).
Reply With Quote
  #9  
Old 12-28-2010, 09:42 PM
BirdOPrey5's Avatar
BirdOPrey5 BirdOPrey5 is offline
Senior Member
 
Join Date: Jun 2008
Location: New York
Posts: 10,610
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

FYI with kh99's permission I made this into an installable product with options:
https://vborg.vbsupport.ru/showthread.php?t=256077
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 07:45 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.06946 seconds
  • Memory Usage 2,257KB
  • Queries Executed 11 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (2)bbcode_php
  • (6)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (9)post_thanks_box
  • (9)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (9)post_thanks_postbit_info
  • (9)postbit
  • (9)postbit_onlinestatus
  • (9)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.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
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete