11
frankblack
Re: True WYSIWYG?
  • 2010/8/25 6:27

  • frankblack

  • Just can't stay away

  • Posts: 830

  • Since: 2005/6/13


valid elements

*[*]
should do the trick in valid elements.



12
frankblack
Bugs in system_imagemanager.html and system_imagemanager2.html in 2.4.5
  • 2010/8/13 6:32

  • frankblack

  • Just can't stay away

  • Posts: 830

  • Since: 2005/6/13


Both files use <{php}> to insert some dynamic values, but when the files will be outputted with smarty they contain a bug.

Orginal code for both files is:
echo "<link rel="stylesheet" type="text/css" media="all" href="language/$language/style.css" />";


Unfortunately the backslashes before the quotes will be removed by the textsanitizer for above code.

This will be outputted as:
echo "<link rel="stylesheet" type="text/css" media="all" href="language/$language/style.css" />";


Correct code should go like this:
echo '<link rel="stylesheet" type="text/css" media="all" href="language/'.$language.'/style.css" />';



13
frankblack
Re: New javascript-based captcha for XOOPS
  • 2010/7/30 6:29

  • frankblack

  • Just can't stay away

  • Posts: 830

  • Since: 2005/6/13


Here is a nice gimmick for the captcha: if the captcha is solved correctly ONLY THEN the submit button will appear.

Example code for a module:
$form_output->addElement(new XoopsFormButton('''submitme'$form->getVar('form_submit_text'), 'submit'));


Example code for the style.css:
#submitme { display: none; }


New code for jquery.sexy-captcha-0.1.js (hope the textsanitizer is not breaking everything):
/*
 * 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'snapTolerance35revert'invalid'opacity0.75});
                $(
'.target').droppable({ accept'.draggable'tolerance'intersect' });
    
                
//On drop of draggable object
                
$('.target').bind('drop', function(eventui) {
                    $(
'#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(eventui) {
                    $(
'#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);


I mean, this captcha relies on javascript, so we can use another peace of javascript to hide the submit button. Enjoy.

Edit: in this case all submit buttons that have to be hidden, must have an id called submitme. To use the example you have to modify the modules a bit.



14
frankblack
Re: New javascript-based captcha for XOOPS
  • 2010/7/14 8:56

  • frankblack

  • Just can't stay away

  • Posts: 830

  • Since: 2005/6/13


Thx culex, will check and publish it soon.

Done: you can get it HERE



15
frankblack
Re: Loading And Blocking JavaScript
  • 2010/4/15 6:37

  • frankblack

  • Just can't stay away

  • Posts: 830

  • Since: 2005/6/13


Noone seeing the benefits here? Well I do, so I make my own tests with this software and will report her - perhaps.

Everyone working with jquery will know that at some points jquery is nitpicking when it comes to ordering the scripts.



16
frankblack
Loading And Blocking JavaScript
  • 2010/4/14 11:16

  • frankblack

  • Just can't stay away

  • Posts: 830

  • Since: 2005/6/13


Sounds interesting to me, perhaps for XOOPS too?

Quote:
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 "<script> tag soup" -- that is all the <script> tags that commonly appear in the <head> or end of the <body> of your HTML page. It uses an expressive, chaining API to specify which scripts to load, and when to wait ("block"), if necessary, for execution before proceeding with further execution. The API also easily allows inline code execution coupling (think: inline <script> tags).


The whole story



17
frankblack
Re: New banner management - ideas?
  • 2010/3/31 12:09

  • frankblack

  • Just can't stay away

  • Posts: 830

  • Since: 2005/6/13


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
frankblack
Re: New banner management - ideas?
  • 2010/3/31 11:38

  • frankblack

  • Just can't stay away

  • Posts: 830

  • Since: 2005/6/13


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
frankblack
New banner management - ideas?
  • 2010/3/31 11:09

  • frankblack

  • Just can't stay away

  • Posts: 830

  • Since: 2005/6/13


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?



20
frankblack
Re: Anyone interested in a tetris-module for XOOPS 2.4x?
  • 2010/3/27 13:33

  • frankblack

  • Just can't stay away

  • Posts: 830

  • Since: 2005/6/13


Sent to repository ...




TopTop
« 1 (2) 3 4 5 ... 53 »



Login

Who's Online

207 user(s) are online (126 user(s) are browsing Support Forums)


Members: 0


Guests: 207


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Apr 30
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits