PDA

View Full Version : Mini Mods - ZH - Restrict A Browser


Ziki
12-18-2007, 10:00 PM
This modification was brought to you by
KXDesign
http://www.kxdesign.com/


~Modification name
Restrict A Browser

~Modification description
This plugin restricts a certain browser from accessing your site.When that browser tries to access your site an alert will say that the browser is not supported and will close the window.

~Modification options

On/Off
Choose Browser type


~Modification info
File uploads: 0
Template edits: 0
Templates: 1
File edits: 0
Plugins: 1
SQL Queries: 0
Phrases: 5
Settings: 2

Install time: 3 sec
Install level: Easy]

~Modification installation

Step 1: Import Product



~Modification screenshots
None


~Modification copyright
This may not be distributed,released or claimed as your work without author's permission.

Ziki
12-19-2007, 06:58 PM
~Reserved~

SEOvB
12-19-2007, 07:08 PM
Instead of closing down the broswer, is it possible it redirects it to a page where you can download the browser at?

Ba$im
12-20-2007, 08:58 AM
thanx.

cosy
12-20-2007, 03:11 PM
can we get a option for custom message and a redirect url ?

TCooper
12-20-2007, 05:27 PM
can we get a option for custom message and a redirect url ?
it should be pretty easy to redirect to a particular page if needed. You would have to edit his javascript to redirect to url instead of using

window.close()

I would try javascripts window location like

window.location = "http://www.siteyouwanthere.com"

unless he decides to make it a feature in his hack.
I personally havent tried using this yet or even his hack at that. I will as soon as I get around to upgrading my board but trying to hold of til gold... not wanting to deal with beta version at the moment.

360junkie
12-20-2007, 07:20 PM
umm all they have to to to get by this is click

ok

no

then there on the site

Snake
12-21-2007, 02:28 PM
Excellent!

ninjamaster
12-21-2007, 09:17 PM
thank this will come in handy :)

Kzyl-orda
06-25-2008, 11:29 AM
Nice, and i installed it, but i can choose just 1 browser, i want to kick both IE and Safari. Can you change it to multiple choise?
I was just able to make safari and IE blocked in the same script, so i'm ok, this is just a suggestion to improve your addon :)

This is how i modified the code to ban both the browser:
from:
<if condition="$vboptions[zh_restrict_type]==1">
<if condition="is_browser(ie)">
<script type="text/javascript">
alert("Internet Explorer is not welcome here, than your browser type has been blocked from our site. Please a supported one. We suggest you Firefox or Opera")
window.location = "http://www.url.com"
</script>
</if> </if>
To:
<if condition="$vboptions[zh_restrict_type]==1">
<if condition="is_browser(ie)">
<script type="text/javascript">
alert("Your browser type has been blocked from our site.Please a supported one.")
window.location = "http://www.url.com"
</script>
</if>
<if condition="is_browser(safari)">
<script type="text/javascript">
alert("Your browser type has been blocked from our site.Please a supported one.")
window.location = "http://www.url.com"
</script>
</if>
</if>
And
From:
<option value=\"1\" " . iif($setting['value']==1,'selected="selected"') . ">Internet Explorer</option>
To:
<option value=\"1\" " . iif($setting['value']==1,'selected="selected"') . ">Internet Explorer and Safari</option>

Hope it helps :)

djrapid.com
10-06-2008, 12:24 AM
Hi, this is a great mod, but i had to change a few things to suit my website needs.
This is what i changed within the xml file (highlighted in red):

<if condition="$vboptions[zh_restrict_type]==1">
<if condition="is_browser(ie)">
<script type="text/javascript">
alert("This website require's Mozilla Firefox! Reason: Internet Explorer does not show the true layout of this website so we ask you to download Mozilla Firefox from here: http://www.mozilla.com/en-US/firefox. Thanks for you patience, now please press 'OK' to contiune to www.yoursite here.com")
window.location = "http://www.yoursite here.com"()
</script>
</if> </if>

What do you think?