Page 6 of 6

Re: Sortables CAPTCHA Plugin

Posted: Fri Mar 12, 2010 3:47 am
by GravityDK
Thanks for this, I'm using it happily.

Re: Sortables CAPTCHA Plugin

Posted: Sat Mar 20, 2010 5:32 pm
by mojitoo
Hello,

I have done all what the instruccions say (they look really easy to follow) but nothing happened, I still have the same captcha option as allways...

Image

I have read all the posts and the only solution I can see is that I havent got the javascript activated but I dont think thats the problem... does anyone know what I' m doing wrong ?

Re: Sortables CAPTCHA Plugin

Posted: Sat Mar 20, 2010 5:43 pm
by Derky
Update your phpBB installation to the latest version. ;)

Re: Sortables CAPTCHA Plugin

Posted: Sat Mar 20, 2010 8:11 pm
by mojitoo
Derky wrote:Update your phpBB installation to the latest version. ;)
its already updated to 3.0.7-PL1!!

Re: Sortables CAPTCHA Plugin

Posted: Sun Mar 21, 2010 12:10 am
by Derky
Well apparently you did something wrong, because since phpBB 3.0.6 there only should be captcha plug-ins on that page. Please refer to the 3.x Support Forum to find out what you've missed during an update. ;)


By the way, the default "captcha page" since 3.0.6 should look like this:
captcha_3.0.6.png
captcha_3.0.6.png (61.41 KiB) Viewed 7594 times

Re: Sortables CAPTCHA Plugin

Posted: Wed Mar 24, 2010 12:54 pm
by carloclaessen
fix to make it conflictless when also using mootools subsilver

Code: Select all

	<script type="text/javascript" src="{T_TEMPLATE_PATH}/js/jquery-1.3.2.js"></script>
	<script type="text/javascript" src="{T_TEMPLATE_PATH}/js/ui.core.js"></script>
	<script type="text/javascript" src="{T_TEMPLATE_PATH}/js/ui.sortable.js"></script>

	<script type="text/javascript">
		//no conflict jquery
		jQuery.noConflict();
		(function($) {
	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 = '';

		$("#sortable1, #sortable2").sortable({
			connectWith: '.connectedSortable',
			items: 'li',
			forcePlaceholderSize: true,
			placeholder: 'row3'
			
		}).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');
		});
	});
		})(jQuery);
	</script>

	<tr>
		<th colspan="2" valign="middle">{SORTABLES_CONFIRM_QUESTION}</th>
	</tr>
	
	
	<!-- Very simple version for javascript off with no dragging support -->
	<noscript>
		<tr>
			<td class="row1"><b class="genmed">{SORTABLES_CONFIRM_QUESTION}</b><br />{L_CONFIRM_QUESTION_EXPLAIN_NOJS}</td>
			<td class="row2">
			
			<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>
			
			</td>
		</tr>
	</noscript>

	<!-- The normal version -->
	<tr id="enable_js" style="display:none;">
		<td class="row1" valign="top"><b class="genmed">{SORTABLES_CONFIRM_QUESTION}</b><br />{L_CONFIRM_QUESTION_EXPLAIN}</td>
		<td class="row2">
		
			<table class="tablebg" cellspacing="1">
			<tr>
				<td class="row3"><b class="genmed"><!-- IF SORTABLES_NAME_LEFT -->{SORTABLES_NAME_LEFT}<!-- ELSE -->{L_COLUMN_LEFT}<!-- ENDIF --></b></td>
				<td class="row3"><b class="genmed"><!-- IF SORTABLES_NAME_RIGHT -->{SORTABLES_NAME_RIGHT}<!-- ELSE -->{L_COLUMN_RIGHT}<!-- ENDIF --></b></td>
			</tr>

			<tr>
				<td class="row1">
					<ul id="sortable1" class="connectedSortable" style="margin: 0; min-height: 100px; min-width:100px; list-style-type: none; padding: 0 5px 5px 5px;">
					<!-- IF SORTABLES_DEFAULT_SORT == 'LEFT' -->
						<!-- BEGIN options -->
						<li class="row2" style="cursor:move; margin: 5px 0 5px 0; padding: 5px;" id="answer_{options.ID}">{options.TEXT}</li>
						<!-- END options -->
					<!-- ENDIF -->
					</ul>
				</td>
				<td class="row1">
					<ul id="sortable2" class="connectedSortable" style="margin: 0; min-height: 100px; min-width:100px; list-style-type: none; padding: 0 5px 5px 5px;">
					<!-- IF SORTABLES_DEFAULT_SORT == 'RIGHT' -->
						<!-- BEGIN options -->
						<li class="row2" style="cursor:move; margin: 5px 0 5px 0; padding: 5px;" id="answer_{options.ID}">{options.TEXT}</li>
						<!-- END options -->
					<!-- ENDIF -->
					</ul>
				</td>
			</tr>
			</table>
			
			<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>
			
		</td>
	</tr>
fix to make it conflictless when also using mootools prosilver

Code: Select all

<script type="text/javascript" src="{T_TEMPLATE_PATH}/js/jquery-1.3.2.js"></script>
<script type="text/javascript" src="{T_TEMPLATE_PATH}/js/ui.core.js"></script>
<script type="text/javascript" src="{T_TEMPLATE_PATH}/js/ui.sortable.js"></script>

<script type="text/javascript">
		//no conflict jquery
		jQuery.noConflict();
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');
	});
});
		})(jQuery);
</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 -->
Just copy the code and overwrite your code in captcha_sortables.html

Re: Sortables CAPTCHA Plugin

Posted: Sun Feb 27, 2011 5:57 pm
by Paul
MOD Updated to version 1.0.2
See first post for Download Link

Re: Sortables CAPTCHA Plugin

Posted: Sat Jul 23, 2011 10:21 am
by Paul
MOD Updated to version 1.0.3
See first post for Download Link

Re: Sortables CAPTCHA Plugin

Posted: Fri Jan 25, 2013 3:09 pm
by Marc
MOD Updated to version 1.0.4
See first post for Download Link

Re: Sortables CAPTCHA Plugin

Posted: Wed Oct 15, 2014 6:25 am
by Paul
MOD Updated to version 1.0.5
See first post for Download Link