Drupal 7 jReject Module

By adam
Fri, 2014-09-26 08:12
Daily Dose of Drupal Episode #170

Share with Others

In this DDoD we look at the jReject module. This module allows you to display a modal popup notifying the user / visitor that their browser is outdated and wont work well with the site. In the video, you will see that jReject comes with a wide variety of customizations to fit your brand and preferences. Another important thing to note is that jReject unlike other similar modules allow you to display a popup based on other browsers besides the common Internet Explorer. Check it out and let me know what you think.

Hello everybody and welcome to Episode Number 170 of the Daily Dose of Drupal. I am Adam with Code Karate and today we’re going to take a look at the J Reject Module. What the J Reject Module does is it allows you to set different browser blocks basically. So you don’t want users to use IE 7 for example, in your website. You can pop up…Java Script pop up that says, hey this website is not optimized for it, this version of your browser recommend you upgrade.

This j Reject Module works nice about this. It allows you to provide them different options to upgrade too and you can also set with multiple different types of browsers which you don’t want to have your users using. So we’re going to get into that in a little bit but first as always, make sure to head on over to codekarate.com. There obviously you’re going to find 169 other Daily Dose of Drupal videos, as well as our 5 Secrets To Becoming A Drupal 7 Ninja EBook. Make sure to check that out. We appreciate how far we can get.

Also let us know if you want to see any other videos made, you can always touch based with us under the contact page on the website. Alright so let’s get going. So back to the J Reject Module. Pretty simple module, once you get it installed there’s one little extra feed thing you need to get running which we’ll show you how to do here. But otherwise just go ahead and download the module from drupal.org and then once you do that you’ll also want to get the turn wheel J Reject Java Script files and stuff. You can use that through Get if you’re comfortable of using Get commands. Otherwise you can simply go to Get hub on the branch and download the zip file from their and drop it into your module’s directory.

So that’s what I’ll show you right now, it’s just that version. So if you download the zip file and hop over to your FTP client or however you’re doing that. And then once you have the J Reject Module installed it will be under your module’s folder here. So that’s under Site’s All modules and J Reject, and then make sure you make a folder inside of J Reject and call it J Reject and then you drop in all of the stuff from Get Hub in there. So that’s when you download the Zip folder, you’ll get all these files within and as you see they’re all laying within this J Reject sub-folder. So that’s all you have to do to get the module installed and the library set up correctly.

So come on over to your configuration page. I’ve already turned the module on but under Configuration System there’s a J Reject Configurations area. Go into there. By default this is going to be not enabled so make sure you check the J Reject enabled that’s just going to turn it on and allow all your configurations to take place. And then there’s just a bunch of different settings that really lets you customized exactly what you want the pop-up to look like including text, colors and such. So you have here headings, couple of paragraphs, you can customize how you want your message to be displayed to your user.

The closing message, what the message is going to say and then if you wanted to just redirect them, after you click Close you have different URL. Otherwise it will just close out the model box and then it’ll load the page that they’re currently on but you can redirect. Underneath the Option settings. So you can allow them to close it, you can obviously allow them not to close it which is a little risky from user experience area but if you want you can uncheck these boxes and allow them not to close the pop over. You can also set the overlay colors, how much opacity you want, fades and stuff like that. So it gives you all the options you need here.

And one thing to note is you can do an integer fade in and fade out so just make note of that. So the last two one are browsing configurations. So this is the kind of the meat of the module. This is setting all of the browsers that you want the pop up to show up on. So if the user comes into your site and is using Internet Explorer 7, the pop-up will show. If they are using Internet Explorer 8, the pop up will not show because they don’t want the box checked.

You can also segment on Firefox, Chrome and Safari and Opera. So there’s all kinds of different options and that’s really what makes this J Reject Module better than the other ones that are out there in Drupal, is you can specify other browsers besides just Internet Explorer. Even though Internet Explorer typically is the ones with the most issues from the display side.

So once you get those set just make sure you apply while saving the configuration and then the last one is the Browser Alternatives, and these are the options that are going to appear in the pop up for that to download and upgrade the browsers. Typically, I don’t include Internet Explorer because I hate Internet Explorer so would uncheck that. And I also don’t like Google Chrome frame, that just loads Google Chrome within the Internet Explorer browser, not that useful. I’d prefer them just not using Internet Explorer at all. So I always give them options for these four and then I’ll save the configuration.

So now once they go to…if they’re using a browser that I don’t like, Firefox, Safari, Opera and Chrome will be the options they can download and these basically just takes them to those respective websites and it allows them to download from there. Alright so now I’m going to hop over and show you what this display is by using probably Internet Explorer as my browser. Alright everybody, so now we’ve hop over to Internet Explorer I’m going to show you what the JReject display looks like when you’re using a browser and you’re specifying a user to use.

So as you see now there’s nothing appearing on my screen and that’s because I’m using the most updated version of IE. I believe I’m probably using IE 10 but within developer tools in IE you can switch the version so if you go to that and in the under here document mode, we’re going to switch that to 7 and once I click that to 7 it’s going to reload my page for me and once it does then my pop up and my J Reject pop up is going to appear.

If I minimize that here, now you can see I have Mozilla, Safari, Opera and Chrome and if you remember, those are the ones I specified for it to show up on. So then again all of these links do is they link off to the newest…actually the website for these browsers so the download would be on that page. I also…like I said I didn’t change the text here but again you can customized all these text within that, customized the background color, you can obviously make this close window not even show up so they have to download a new browser or go to a different website. Again I don’t recommend doing that but that is your choice.

So that is what the JReject Module does. So other than that, again make sure you download both the JReject module and the Library and install them correctly on your website. Other than that you can head over again to codekarate.com and check out our EBook and connect with us in a lot of ways. Alright, talk to you later.

Post new comment