vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.7 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=228)
-   -   Mini Mods - ZH - Restrict A Browser (https://vborg.vbsupport.ru/showthread.php?t=165624)

Ziki 12-18-2007 10:00 PM

ZH - Restrict A Browser
 
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

Quote:

Originally Posted by cosy (Post 1405503)
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
Code:

window.close()
I would try javascripts window location like
Code:

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 10: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:
Quote:

<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:
Quote:

<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:
Quote:

<option value=\"1\" " . iif($setting['value']==1,'selected="selected"') . ">Internet Explorer</option>
To:
Quote:

<option value=\"1\" " . iif($setting['value']==1,'selected="selected"') . ">Internet Explorer and Safari</option>
Hope it helps :)


All times are GMT. The time now is 09:14 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01590 seconds
  • Memory Usage 1,737KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (2)bbcode_code_printable
  • (5)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete