The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
Must Vote in Poll to Post in Thread VB4 Details »» | ||||||||||||||||||||||||||||||||
Must Vote in Poll to Post in Thread VB4
Developer Last Online: Aug 2023
Brought to you by BirdOPrey5 and kh99
Version 2.1 This mod will require users who want to post in a poll thread to actually vote in the poll before they are allowed to post. The main code of this mod was developed by kh99 and I made it into an installable mod with options at his request. Options include:
Live Demo: http://www.qapla.com/mods/showthread...Vote-Poll-Test Testing and working on VB 3.8.7 and 4.1.12 and am sure it will work on all 3.8.x - 4.0/4.x.x. It will probably work on 3.7 and maybe earlier as well. If a user hasn't voted they will be given a message to vote before posting, see the screen shots. The message displayed in hidden posts is the Postbit phrase: bop5_mustvote_hidden_message The message a user gets if they try to post before voting is the GLOBAL phrase: mustvote2post Full instructions in .txt file in zip file. If you used the VB4 version you must uninstall the old 1.x mod before upgrading to 2.0 Please Mark as Installed if you use this. Donations Always Apprecicated but please include kh99 in any donation. :up: Russian Translations thanks to xorex. Download Now
Screenshots
Supporters / CoAuthors Show Your Support
|
Comments |
#32
|
|||
|
|||
|
#33
|
||||
|
||||
That is actually removed by n automatic template edit. Are you using a custom style?
If so please post the contents of your polloptions_table template- it shouldn't be that big. |
#34
|
|||
|
|||
Custom and default style its same Condition.
|
#35
|
||||
|
||||
Please post the polloptions_table template contents, I don't have a copy of 4.1.10 installed at the moment to see if there is a change.
|
#36
|
|||
|
|||
"polloptions_table" template contents on 4.1.10
Code:
<div id="pollinfo" class="polloptionsblock"> <form class="block" action="{vb:raw $vboptions.vbforum_url}{vb:if "$vboptions['vbforum_url']", '/', ''}poll.php?do=pollvote&pollid={vb:raw pollinfo.pollid}" method="post"> <div class="blockhead"> <h2>{vb:rawphrase poll}: <span class="polltitle">{vb:raw pollinfo.question}</span></h2> <vb:if condition="$show['editpoll']"> <a class="textcontrol blockhead_info" href="{vb:link poll, {vb:raw pollinfo}, 'do=polledit'}"><img class="inlineimg" src="{vb:stylevar imgdir_cms}/edit_small.png" alt="{vb:rawphrase edit_poll}" title="{vb:rawphrase edit_poll}"/></a> </vb:if> </div> <div class="blockbody"> <vb:if condition="$show['pollenddate'] OR $show['publicwarning']"> <h3 class="pollsubhead"> <vb:if condition="$show['pollenddate']">{vb:rawphrase this_poll_will_close_on_x_at_y, {vb:raw pollenddate}, {vb:raw pollendtime}}</vb:if> <vb:if condition="$show['publicwarning']">{vb:rawphrase public_poll_users_see_choices}</vb:if> </h3> </vb:if> <div id="polloptions" class="blockrow"> <ul class="checkradio group"> {vb:raw pollbits} </ul> </div> </div> <div class="blockfoot"> <div class="group"> <input type="submit" class="button" value="{vb:rawphrase vote_now}" tabindex="1" /> <a class="textcontrol" href="{vb:link poll, {vb:raw pollinfo}, 'do=showresults'}">{vb:rawphrase view_poll_results}</a> <input type="hidden" name="s" value="{vb:raw session.sessionhash}" /> <input type="hidden" name="securitytoken" value="{vb:raw bbuserinfo.securitytoken}" /> <input type="hidden" name="do" value="pollvote" /> <input type="hidden" name="pollid" value="{vb:raw pollinfo.pollid}" /> </div> </div> </form> </div> |
#37
|
||||
|
||||
That's what it should be...
Weird. Please go to the Admin CP -> Plugin Manger -> Edit the plugin "Remove Results Button VB4 Only" Find this line: Code:
if ($mv_hide_link AND version_compare($vbulletin->versionnumber, '4.0.0' , 'ge')) Code:
if ($mv_hide_link) |
#38
|
|||
|
|||
Same Condition , Not working
Admin CP -> Plugin Manger -> Edit the plugin "Remove Results Button VB4 Only" Code:
global $mv_hide_link, $vbulletin; if ($mv_hide_link) { $vbulletin->templatecache['polloptions_table'] = str_replace('<a class="textcontrol"', '<a style="display: none;"', $vbulletin->templatecache['polloptions_table']); } |
#39
|
||||
|
||||
Just temporarily change it to this:
Code:
global $mv_hide_link, $vbulletin; //if ($mv_hide_link) { $vbulletin->templatecache['polloptions_table'] = str_replace('<a class="textcontrol"', '<a style="display: none;"', $vbulletin->templatecache['polloptions_table']); } Let me know if it "works" like that... This will let me know for sure if it's the logic that is failing or the template edit that is failing. |
Благодарность от: | ||
Nirjonadda |
#40
|
|||
|
|||
Now Working Perfect ! Thanks.
|
#41
|
||||
|
||||
No, you need to put it back to
Code:
global $mv_hide_link, $vbulletin; if ($mv_hide_link) { $vbulletin->templatecache['polloptions_table'] = str_replace('<a class="textcontrol"', '<a style="display: none;"', $vbulletin->templatecache['polloptions_table']); } |
Thread Tools | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|