- Modificatie & Versie: Sortables CAPTCHA Plugin 1.0.4
Directe link naar de modificatie: https://www.phpbb.com/customise/db/mod/ ... ha_plugin/
Adres van je forum: Test Locatie
phpBB versie: 3.0.11
Wat is het probleem?
Code: Selecteer alles
Versleep de opties naar de juiste kolom, om automatische registraties te voorkomen.
Code: Selecteer alles
'CONFIRM_QUESTION_EXPLAIN_CONTACT' => 'Versleep de opties naar de juiste kolom, om misbruik van het contactformulier te voorkomen.',
'CONFIRM_QUESTION_EXPLAIN_CONTACT_NOJS' => 'Selecteer de opties hieronder bij de juiste kolom, om misbruik van het contactformulier te voorkomen.', // With JavaScript disabled
styles/prosilver/template/captcha_sortables.html
Code: Selecteer alles
<script type="text/javascript" src="{T_SUPER_TEMPLATE_PATH}/js/jquery-{SORTABLES_JQUERY_VERSION}.min.js"></script>
<script type="text/javascript" src="{T_SUPER_TEMPLATE_PATH}/js/jquery-ui-{SORTABLES_JQUERYUI_VERSION}.custom.min.js"></script>
<script type="text/javascript" src="{T_SUPER_TEMPLATE_PATH}/js/jquery-ui-touch-punch.min.js"></script>
<!-- DEFINE $INCLUDEDED_JQUERY_SORTABLES_CAPTCHA = true -->
<script type="text/javascript">
// <![CDATA[
function createdata(listnameobject, column, resultid)
{
// Let's delete all the current input type="hidden" fields, this is easier to find out which were changed
var data = document.getElementById(column);
if ( data.hasChildNodes() ) {
while ( data.childNodes.length >= 1 ) {
data.removeChild( data.firstChild );
}
}
// Run through all childs
jQuery.each( listnameobject, function(){
// We only want the ID of the answer
var answer = $( this ).attr("id");
answer = answer.replace(/answer_/g, '');
// And add a hidden input field
inputbox = document.createElement("input");
inputbox.type = 'hidden';
inputbox.name = column + '[]';
inputbox.value = answer;
data.appendChild(inputbox);
});
}
$(function() {
// Javascript nubs
document.getElementById('enable_js').style.display = 'block';
$("#sortable1, #sortable2").sortable({
connectWith: '.connectedSortable',
items: 'li',
forcePlaceholderSize: true,
placeholder: 'bg3'
}).disableSelection();
$("#sortable1, #sortable2").bind('sortreceive', function(event, ui) {
// If the left or right column receive an item, put the child nodes in an array
var arrSortableListItemsLeft = $( "#sortable1" ).children();
var arrSortableListItemsRight = $( "#sortable2" ).children();
// And create hidden input fields
createdata(arrSortableListItemsLeft, 'sortables_options_left', '#sortables_options_left');
createdata(arrSortableListItemsRight, 'sortables_options_right', '#sortables_options_right');
});
});
// ]]>
</script>
<!-- IF S_TYPE == 1 -->
<div class="panel">
<div class="inner"><span class="corners-top"><span></span></span>
<h3>{L_CONFIRMATION}</h3>
<fieldset class="fields2">
<!-- ENDIF -->
<!-- Very simple version for javascript off with no dragging support -->
<noscript>
<dl>
<dt><label>{SORTABLES_CONFIRM_QUESTION}</label><br /><span>{L_CONFIRM_QUESTION_EXPLAIN_NOJS}</span></dt>
<dd>
<div style="width:300px; float:left;">
<div style="width:150px; float:left;"><strong><!-- IF SORTABLES_NAME_LEFT -->{SORTABLES_NAME_LEFT}<!-- ELSE -->{L_COLUMN_LEFT}<!-- ENDIF --></strong></div>
<div style="width:150px; float:right; text-align:right;"><strong><!-- IF SORTABLES_NAME_RIGHT -->{SORTABLES_NAME_RIGHT}<!-- ELSE -->{L_COLUMN_RIGHT}<!-- ENDIF --></strong></div>
<!-- BEGIN options -->
<div style="width:10px; float:left; clear:left; height:2em;"><input type="checkbox" name="sortables_options_left[]" value="{options.ID}"/></div>
<div style="width:280px; float:left; text-align:center; height:2em;">{options.TEXT}</div>
<div style="width:10px; float:right; text-align:right; height:2em;"><input type="checkbox" name="sortables_options_right[]" value="{options.ID}" /></div>
<!-- END options -->
</div>
</dd>
</dl>
</noscript>
<!-- The normal version -->
<dl id="enable_js" style="display:none;">
<dt><label>{SORTABLES_CONFIRM_QUESTION}</label><br /><span>{L_CONFIRM_QUESTION_EXPLAIN}</span></dt>
<dd>
<div class="attachbox" style="clear:none; *width:20em;"><!-- *width:20em; is for nub IE-only -->
<strong><!-- IF SORTABLES_NAME_LEFT -->{SORTABLES_NAME_LEFT}<!-- ELSE -->{L_COLUMN_LEFT}<!-- ENDIF --></strong><hr />
<ul id="sortable1" class="connectedSortable" style="min-height: 100px; min-width:100px; list-style-type: none; padding: 0 5px 5px 5px;">
<!-- IF SORTABLES_DEFAULT_SORT == 'LEFT' -->
<!-- BEGIN options -->
<li class="bg2" style="cursor:move; margin: 5px 0 5px 0; padding: 5px;" id="answer_{options.ID}">{options.TEXT}</li>
<!-- END options -->
<!-- ENDIF -->
</ul>
</div>
<div class="attachbox" style="clear:none; *width:20em;"><!-- *width:20em; is for nub IE-only -->
<strong><!-- IF SORTABLES_NAME_RIGHT -->{SORTABLES_NAME_RIGHT}<!-- ELSE -->{L_COLUMN_RIGHT}<!-- ENDIF --></strong><hr />
<ul id="sortable2" class="connectedSortable" style="min-height: 100px; min-width:100px; list-style-type: none; padding: 0 5px 5px 5px;">
<!-- IF SORTABLES_DEFAULT_SORT == 'RIGHT' -->
<!-- BEGIN options -->
<li class="bg2" style="cursor:move; margin: 5px 0 5px 0; padding: 5px;" id="answer_{options.ID}">{options.TEXT}</li>
<!-- END options -->
<!-- ENDIF -->
</ul>
</div>
<input type="hidden" name="sortables_confirm_id" id="confirm_id" value="{SORTABLES_CONFIRM_ID}" />
<div id="sortables_options_left"></div>
<div id="sortables_options_right"></div>
</dd>
</dl>
<!-- IF S_TYPE == 1 -->
</fieldset>
<span class="corners-bottom"><span></span></span></div>
</div>
<!-- ENDIF -->
