View Larger Map

Archive for the ‘How To’ Category

Simple jQuery Page Dimmer with Pop-Up

Tuesday, May 1st, 2012

One thing I’ve found very useful recently is the “dimmer box” or “faded pop-up”.  This web tool allows you to quickly focus the attention of the visitor onto your message, and demands a response from them.

If you’re looking for something stylish and effective, you’ve come to the right place. Every once in a while I have to take a break from what I’m doing to try something simple that I’ve never done before. This pop-up page dimmer was the perfect quick little project. I will show you how to build it.

This dimming effect is done VERY easily by using JQUERY.  If you’ve ever built an HTML page, it will take you less than 20 seconds to get this working for you. Plus, this pop-up box cannot be blocked with pop-up blockers and is easily customizable through CSS.

The page you are viewing right now is set to trigger a pop-up on a 10 second delay. Plus you can also trigger the effect by clicking the button below. Click on the red “close” button or anywhere outside the popup box to hide the pop-up.

All the code I used for this project is listed below. Please give it a try and let me know what you think.

Close

This is a sample POP-UP Page Dimmer.
Anything can go here!

This is the Javascript to use in the <head> section of your page.

<script src=”http://code.jquery.com/jquery-latest.js”></script>

<script type=”text/javascript”>

//This is the function that closes the pop-up
function endBlackout(){
$(“.blackout”).css(“display”, “none”);
$(“.msgbox”).css(“display”, “none”);
}

//This is the function that closes the pop-up
function strtBlackout(){
$(“.msgbox”).css(“display”, “block”);
$(“.blackout”).css(“display”, “block”);
}

//Sets the buttons to trigger the blackout on clicks
$(document).ready(function(){
$(“#btn1″).click(strtBlackout); // open if btn is pressed
$(“.blackout”).click(endBlackout); // close if click outside of popup
$(“.closeBox”).click(endBlackout); // close if close btn clicked

// Automatically trigger the pop-up after 10 seconds
setTimeout( strtBlackout, 10000);
});
/**
* @author Rob Goodwin / About Web Design
* http://www.aboutwd.com
*
* Version 1
* Copyright (c) 2012 About Web Design
**/
</script>

 

This is the CSS to make it work. (Also goes in the <head> section

<style type=”text/css”>

.blackout {
background-color:#000;
opacity:.7;
filter:alpha(opacity=70);
height:100%;
width:100%;
position:fixed;
top:0;
left:0;
z-index:100;
display:none;
cursor:pointer;
}
.msgbox {
background-color:#ccc;
border:1px solid #ccc;
color:#000;
width:70%;
height:60%;
position:fixed;
top:20%;
left:15%;
border-radius:20px;
padding:10px;
z-index:101;
display:none;
}
.closeBox {
background-color:#CC0000;
color:#FFFFFF;
padding:8px;
float:right;
border-radius:3px;
cursor:pointer;
text-transform:uppercase;

}
</style>

 

This is the Content for the dimmer: This goes in the <body> section

<div class=”blackout”></div>
<div class=”msgbox”><div class=”closeBox”>Close</div>
Your Message Goes Here! </div>
<input type=”button” id=”btn1″ value=”Click Here” />

Combine several VOB files into one

Sunday, January 3rd, 2010

Star Trek

First of all… What is a VOB file and why should you care? Right?

VOB is the default file type for standard movie DVDs. More detailed information here at Wikipedia. If you want to back-up a DVD onto your computer, you will immediately come in contact with VOB files.

So my son gets a PSP (Play Station Portable) for Christmas and right away wants to put movies on it to watch by himself. So I say “Fine, we have  a bunch of movies here that I can transfer to the PSP.”  I grab a DVD off the shelf and stick it in the computer. Then I grab one of my handy dandy conversion tools and get to work.

  • DVDDecrypter (Download Here)
    • I first tried DVDDecrypter because this program simply transfers the raw DVD files (VOBs) onto the computer without compressing them or changing them in any way.  But that didn’t work for this particular DVD. 
  • DVD Shrink (Download Here)
    • Then I try DVDShrink because it does a good job transferring DVDs also. It worked. The whole DVD, all the VOB files, were transferred successfully to the hard drive.  But OOPS, I forgot to check the little box that says “Make one big huge VOB file from the DVD”. So instead the movie was chopped into 5 pieces, each one with it’s own VOB file.
      • DVDShrink is usually used to compress a full movie from a double layer disc (up to 8gb) so it will fit  onto a regular DVD (4.7 gb). And it does this very well. But in my case I didn’t need compression, just file transfer.
  • AVS File Converters (Download here)
    • I almost always use AVS File Converter to convert the VOBs into other formats, like AVI, MP4, MPG, MOV, FLV, etc.  It does a great job and has a very easy to use interface.  Problem is, if I try to convert the DVD files as they are, I’ll have 5 little movies. That won’t do. I need to combine them into one big VOB.

Come to find out… WIndows has a built-in VOB combiner. And it’s easy to use.   Just follow these instructions.

  1. Go to: Start > Run, Then type Cmd (this opens a DOS window)
  2. Type: cd \Videofiles(“Videofiles” being the folder where decrypter saved your VOB files. you’ll need to navigate to the location YOUR files are located.)
  3. Then type: copy /b vts_01_1.vob + vts_01_2.vob + vts_01_3.vob + vts_01_4.vob new.vob
    1. Be sure to include each VOB file you’re wanting to combine and in the order you want them to play.
    2. The very last file in the sequence (in this case “new.vob”) is the name of the combined file you want to create.
  4. new.vob is now 1 VOB file of the movie.

I then used AVS to easily convert to a PSP compliant format and copied it to the memory stick that my son uses. 

This whole process ended up taking about 2 hours. But I think I could knock a bunch of time off that now that I know what I’m doing.  For example, in the process I found out that AVS will convert the entire movie directly from the DVD. So, assuming there wasn’t any DVD encryption to deal with, that right there could have saved a bunch of steps.  In my case the DVD WAS encrypted, so I would have needed DVDShrink anyway.

Hope this helps SOMEBODY out there.  If you have any other solutions for this problem, please comment below.

Inspiration for this post found here: http://forums.snapstream.com/vb/beyond-media-user-user-troubleshooting-support-forum/38077-multiple-vobs-combining-into-one-file.html