Jump to content

My First Drupal Module: Stop Ie ;)


borfast
 Share

Recommended Posts

Those of you who knew my old website probably remember that if you visited it using Internet Explorer, you'd be redirected to a page explaining why you shouldn't use Internet Explorer and that my site isn't tested with it, so if anything was broken you'd know why and if you still wanted to see my website, you should switch browsers. Some people even got scared, because at first I had a message on that page saying "you have been hijacked", or something like that :oops:

 

Well, since I installed Drupal, that "feature" has not been present. I decided it was time for me to correct that glitch and try my hand at writing a Drupal module.

 

The result is "Stop IE 0.5", a very simple module that uses Gary White's PHP browser detection class to check if you're using IE and if so, it redirects you to that nice page I mentioned above, just like my old site used to do.

 

For now, the page it redirects you to (/msie) is hard-coded into the stop_ie.module code but I'm planning to make a settings page for it where that page can be specified.

 

I decided to put the module available here for download, in case someone wants to put it in a Drupal site. It has only been tested with Drupal 4.6.x but it should also work with 4.5.x and 4.4.x, I think.

 

If you have any comments or suggestions, feel free to post them here as a comment!

Link to comment
Share on other sites

  • 1 month later...

That's the page about the Drupal module.

You should have seen the other one, if visiting with IE... I guess I'll have to do some more testing.

Thanks, Thomas!

 

Edit: By the way, could you tell me which version of IE you were using? Are you using anything (plugins, activeX controls, IE bars, etc) that could be changing the user agent string (the way IE identifies itself to the website)? Thanks again! :)

Edited by borfast
Link to comment
Share on other sites

I just visited http://borfast.com/ with both IE6.x and FF1.07 - the same page came up - here's the first 20 or so lines of text from the page I viewed in both browsers:

 

borfast.com is my home on the web.

 

This is where I'll keep my projects, my blog, my photos of UFOs and alien life forms, the usual top secret US government experiments and, occasionally, some useful stuff.

 

This site is also a constant experiment, since I use it to increase my knowledge about web programming - meaning that if sometimes you see broken links and stuff that doesn't work, it's probably because I'm playing around :)

 

Enjoy your stay.

Tue, 27/12/2005 - 18:03

Mr. Jones

Submitted by borfast on Tue, 27/12/2005 - 18:03.

Posted in | read more | 49 reads »

 

Mr. Jones will be a role-playing game which intends to recreate the spirit and feel of Sierra's classic "Jones In The Fast Lane", with some possible new features, such as a multiplayer mode and a cartoon-like style.

 

John

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...