themesberry logo
themesberry logo

Rhuk Solarflare, Jooorange and MadeYourWeb for Joomla 2.5

Last time I migrated some really antique Joomla1.0 websites to Joomla2.5. By this way I updated the Joomla1.0 templates of this installations, because customers won't change it. I will give this updates to the Joomla community. Please realize that I didn't improved the templates and they should not be used to build new websites. But I think it will be helpful if you have to upgrade an old Joomla1.0 installation without new template. You can download the template package here.

It includes 3 templates:

  • Jooorange by John Grabenmeier
  • MadeYourWeb by Marc Hinse
  • Solarflare by Rhuk

Please understand that I don't support this templates.

Hiding spam with drag and drop using jQuery

To use capchtas are horrible. If you make a mistake you can start again. I hate it. So the idea is to use the drag and drop functionality of jQuery on which the user can proof he is a human and no script.

We’ll need the following jQuery plugins:

  • jQuery core
  • jQuery widget
  • jQuery mouse
  • jQuery draggable
  • jQuery droppable

We create a simple form with two input fields:

<form name="mailform" method="post" action="" />
   <input type="text" name="input_1" />
   <input type="text" name="input_2" />
</form>

And we need a box which contains the drag an drop items and a paragraph as info box:

<div class="sender">  
   <p class="droppable"></p>   
   <p class="draggable"></p>
   <p class="mail_note">Vielen Dank für Ihre Nachricht!</p>
</div>

The styling:

.sender {
    position: relative;
    height: 90px;
    width: 300px;
    margin: 20px;
}
.sender p.draggable {
    background: url(../images/mail.png) no-repeat;
    width: 57px;
    height: 42px;
    padding: 0;
    margin: 0;
    float: left;
    cursor: all-scroll;
    position: relative;
}
.sender p.droppable {
    background: url(../images/postbox.png) no-repeat;
    width: 70px;
    height: 90px;
    padding: 0;
    margin: 0;
    right: 10px;
    position: absolute;
}
.sender .mail_note {
    position: fixed;
    width: 360px;
    top: 200px;
    left: 50%;
    margin-left: -180px;
    padding: 25px 15px;
    background-color: #ffe691;
    border: 1px solid #f6db7b;
    color: #7d5912;
    font-size: 20px;
    text-shadow: 1px 1px 1px #fff;
    text-align: center;
    border-radius: 5px;
    box-shadow:
        0 1px 1px rgba(0,0,0,0.1),
        inset 0 1px 0 rgba(255,255,255,0.6);  
    cursor: default;
    display: none;
}

The javascript:


//+++ drag event +++ restrict the movement +++//

$( ".draggable" ).draggable({                        
    containment: ".sender"                           
});

//+++ drop event +++ fade in notice +++ fade out drag item +++//

$( ".droppable" ).droppable({                        
    drop: function( event, ui ) {
        $( ".mail_note" ).fadeIn();                  
        $( ".draggable" ).fadeOut();                 

//+++ paused animation 3sec +++ animate notice +++ submit form +++//

                                        
        setTimeout(function(){                       
            $( ".mail_note" ).animate({             
               top:'170px',                          
               opacity:'0'                          
            },500);
            document.forms["mailform"].submit();
        },3000);
     }
});