echo "stylesheet" type="text/css" media="all" href="language/$language/style.css" />";
echo "stylesheet" type="text/css" media="all" href="language/$language/style.css" />";
echo '.$language.'/style.css" />';
$form_output->addElement(new XoopsFormButton('', 'submitme', $form->getVar('form_submit_text'), 'submit'));
#submitme { display: none; }
/*
* Sexy Captcha v.0.2
* Designed and developed by: BWM Media (bwmmedia.com)
*/
(function($) {
$.fn.sexyCaptcha = function(url) {
this.each(function() {
$(this).load(url, { action: 'refresh' }, function() {
$('.draggable').draggable({ containment: 'parent', snap: '.target', snapMode: 'inner', snapTolerance: 35, revert: 'invalid', opacity: 0.75});
$('.target').droppable({ accept: '.draggable', tolerance: 'intersect' });
//On drop of draggable object
$('.target').bind('drop', function(event, ui) {
$('#captchaWrapper').find('.captchaAnswer').val($(ui.draggable).attr('id'));
$('#captchaWrapper').find('.draggable').draggable('disable');
$('#captchaWrapper').find('.draggable').unbind('click');
$('#captchaWrapper').find('.targetWrapper').children('.target').hide();
//Check captcha answer
$.post(url, { action: 'verify', captcha: $(ui.draggable).attr('id') }, function(data) {
if (data.status == "success") {
$('#captchaWrapper').find('.targetWrapper').addClass('captchaSuccess').hide().fadeIn('slow');
document.getElementById('submitme').style.display = 'block';
} else {
$('#captchaWrapper').find('.targetWrapper').addClass('captchaFail').hide().fadeIn('slow');
document.getElementById('submitme').style.display = 'none';
}
}, 'json');
});
//On double-click of object
$('.draggable').bind('click', function(event, ui) {
$('#captchaWrapper').find('.captchaAnswer').val($(this).attr('id'));
$('#captchaWrapper').find('.draggable').draggable('disable');
$('#captchaWrapper').find('.draggable').unbind('click');
$('#captchaWrapper').find('.targetWrapper').children('.target').hide();
$(this).removeClass('draggable');
$(this).addClass('target');
$('#captchaWrapper').find('.targetWrapper').html($(this));
//$(this).hide();
//Check captcha answer
$.post(url, { action: 'verify', captcha: $(this).attr('id') }, function(data) {
if (data.status == "success") {
$('#captchaWrapper').find('.targetWrapper').addClass('captchaSuccess').hide().fadeIn('slow');
document.getElementById('submitme').style.display = 'block';
} else {
$('#captchaWrapper').find('.targetWrapper').addClass('captchaFail').hide().fadeIn('slow');
document.getElementById('submitme').style.display = 'none';
}
}, 'json');
});
//Redraw captcha
$('.captchaRefresh').click(function() {
$('#captchaWrapper').sexyCaptcha(url);
return false;
});
});
});
return this;
};
})(jQuery);
LABjs (Loading And Blocking JavaScript) is an open-source (MIT license) project supported by Getify Solutions. The core purpose of LABjs is to be an all-purpose, on-demand JavaScript loader, capable of loading any JavaScript resource, from any location, into any page, at any time. LABjs by default will load (and execute) all scripts in parallel as fast as the browser will allow. However, you can easily specify which scripts have execution order dependencies and LABjs will ensure proper execution order. This makes LABjs safe to use for virtually any JavaScript resource, whether you control/host it or not, and whether it is standalone or part of a larger dependency tree of resources. LABjs is intended to be a replacement for "17
![]()
You are right, limiting to clicks will be definitely in.
You are right 2, XOOPS is miscounting the impressions. Impressions are even counted in the backend. It is even getting worse, if you place flash banners on a site.
BTW webmasters should not be counted in any way.
18
![]()
I know the hack, which is in fact older than the article. slyss published this hack on his homepage, where I accidently found it (if I remember correctly).
About your changing the banner in the header (or somewhere else): right now banners are randomly picked and I think it would be great if I can define that a certain banner will be displayed on a specified URL. This would be a good idea if you want to sell banners for articles.
There will be a bunch of functions to which some parameters like mode, range and extras will be passed.
19
![]()
I am about to make over the banner management of XOOPS, because the "old" banner management is (friendly said) a mess.
I made a new input form for adding banners (see here). You can set the height and width of the banner, you can set start and expiration of the banner (if needed) and I am going to introduce a zone model for banners. With several banner zones you can pinpoint specified banners to specified zones.
Additionally I am thinking about building in the banners with smarty. Any thoughts or suggestions?
XOOPS 2.5 has already some changes in the banner management, which is only a modernized version of the banner management of 2.4x. Should I focus on 2.5?