[pLog-svn] r7025 - in plugins/branches/lifetype-1.2/hostblock: . locale templates

jondaley at devel.lifetype.net jondaley at devel.lifetype.net
Wed Sep 8 10:49:35 EDT 2010


Author: jondaley
Date: 2010-09-08 10:49:35 -0400 (Wed, 08 Sep 2010)
New Revision: 7025

Modified:
   plugins/branches/lifetype-1.2/hostblock/locale/locale_en_UK.php
   plugins/branches/lifetype-1.2/hostblock/pluginhostblock.class.php
   plugins/branches/lifetype-1.2/hostblock/templates/addblockedhost.template
   plugins/branches/lifetype-1.2/hostblock/templates/addblogblockedhost.template
   plugins/branches/lifetype-1.2/hostblock/templates/editblockedhost.template
   plugins/branches/lifetype-1.2/hostblock/templates/editblogblockedhost.template
Log:
allow finer grained blocking, much easier to block whole networks this way

Modified: plugins/branches/lifetype-1.2/hostblock/locale/locale_en_UK.php
===================================================================
--- plugins/branches/lifetype-1.2/hostblock/locale/locale_en_UK.php	2010-08-25 17:21:28 UTC (rev 7024)
+++ plugins/branches/lifetype-1.2/hostblock/locale/locale_en_UK.php	2010-09-08 14:49:35 UTC (rev 7025)
@@ -13,10 +13,10 @@
 $messages["newBlogBlockedHost"] = "Add Blocked Hosts";
 
 $messages["ip_address"] = "IP Address";
-$messages["host_to_block_help"] = "This section will allow you to block a specific address or entire subnet from your Blog. You can select if you want them to be able to see it, but unable to post or simply unable to access it at all. Copy the offending address into the spaces provided and choose the proper subnet address space if necessary. Example: To block just the address of 192.168.1.123 you would choose the '32 bits' option to match the entire address. This blocks just this one address and works well for banning someone with a Static IP address. If you're seeing multiple IP Addresses for a particular individual (say 192.168.1.123, 192.168.1.225, 192.168.1.21 and 192.168.1.67) then you will want to ban a particular subnet range. Enter one of the IP Addresses that you see and choose '24 bits', '16 bits' or '8 bits'  to match the first 3 sections, first 2 sections or the first section respectively.";
+$messages["host_to_block_help"] = "This section will allow you to block a specific address or entire subnet from your Blog. You can select if you want them to be able to see it, but unable to post or simply unable to access it at all. Copy the offending address into the spaces provided and choose the proper subnet address space if necessary. Example: To block just the address of 192.168.1.123 you would choose the '32 bits' option to match the entire address. This blocks just this one address and works well for banning someone with a Static IP address. If you're seeing multiple IP Addresses for a particular individual (say 192.168.1.123, 192.168.1.225, 192.168.1.21 and 192.168.1.67) then you will want to ban a particular subnet range. Enter one of the IP Addresses that you see and choose the number of relevant bits to block (ex. '24 bits', '16 bits' or '8 bits' matches the first 3 sections, first 2 sections or the first section respectively.";
 $messages["bits"] = "Bits";
 $messages["block_type"] = "Block Type";
-$messages["block_type_help"] = "The 'Block type' drop-down list will allow you to choose whether to block this host from completely accessign the site (an error page will be sent to the client's browser whenever trying to access) or simply block it from posting new comments. If the latter is chosen, the host will still be allowed to read articles and other people's comments.";
+$messages["block_type_help"] = "The 'Block type' drop-down list will allow you to choose whether to block this host from completely accessing the site (an error page will be sent to the client's browser whenever trying to access) or simply block it from posting new comments. If the latter is chosen, the host will still be allowed to read articles and other people's comments.";
 $messages["reason"] = "Reason";
 $messages["reason_help"] = "You can also attach a reason/description to this host blocking rule, so that you can remember in the future why it was set up.";
 $messages["access_blocked"] = "Access Blocked";

Modified: plugins/branches/lifetype-1.2/hostblock/pluginhostblock.class.php
===================================================================
--- plugins/branches/lifetype-1.2/hostblock/pluginhostblock.class.php	2010-08-25 17:21:28 UTC (rev 7024)
+++ plugins/branches/lifetype-1.2/hostblock/pluginhostblock.class.php	2010-09-08 14:49:35 UTC (rev 7025)
@@ -26,9 +26,9 @@
 			$this->PluginBase();
 			
 			$this->id = "hostblock";
-			$this->desc = "Allows to block hosts";
+			$this->desc = "Blocks hosts by IP address (for commenting and/or access)";
 			$this->author = "The LifeType Project";
-            $this->version = "20090513";
+            $this->version = "20100908";
             
 			$this->init( $source );
 		}

Modified: plugins/branches/lifetype-1.2/hostblock/templates/addblockedhost.template
===================================================================
--- plugins/branches/lifetype-1.2/hostblock/templates/addblockedhost.template	2010-08-25 17:21:28 UTC (rev 7024)
+++ plugins/branches/lifetype-1.2/hostblock/templates/addblockedhost.template	2010-09-08 14:49:35 UTC (rev 7025)
@@ -16,13 +16,37 @@
     <input style="width:40px;" type="text" size="3" maxlength="3" name="ip3" id="ip3" />.
     <input style="width:40px;" type="text" size="3" maxlength="3" name="ip4" id="ip4" />
 	/ <select name="mask" id="mask" >
+     <option value="1">1 {$locale->tr("bits")}</option>
+     <option value="2">2 {$locale->tr("bits")}</option>
+     <option value="3">3 {$locale->tr("bits")}</option>
      <option value="4">4 {$locale->tr("bits")}</option>
+     <option value="5">5 {$locale->tr("bits")}</option>
+     <option value="6">6 {$locale->tr("bits")}</option>
+     <option value="7">7 {$locale->tr("bits")}</option>
      <option value="8">8 {$locale->tr("bits")}</option>
+     <option value="9">9 {$locale->tr("bits")}</option>
+     <option value="10">10 {$locale->tr("bits")}</option>
+     <option value="11">11 {$locale->tr("bits")}</option>
      <option value="12">12 {$locale->tr("bits")}</option>
+     <option value="13">13 {$locale->tr("bits")}</option>
+     <option value="14">14 {$locale->tr("bits")}</option>
+     <option value="15">15 {$locale->tr("bits")}</option>
      <option value="16">16 {$locale->tr("bits")}</option>
+     <option value="17">17 {$locale->tr("bits")}</option>
+     <option value="18">18 {$locale->tr("bits")}</option>
+     <option value="19">19 {$locale->tr("bits")}</option>
      <option value="20">20 {$locale->tr("bits")}</option>
+     <option value="21">21 {$locale->tr("bits")}</option>
+     <option value="22">22 {$locale->tr("bits")}</option>
+     <option value="23">23 {$locale->tr("bits")}</option>
      <option value="24">24 {$locale->tr("bits")}</option>
+     <option value="25">25 {$locale->tr("bits")}</option>
+     <option value="26">26 {$locale->tr("bits")}</option>
+     <option value="27">27 {$locale->tr("bits")}</option>
      <option value="28">28 {$locale->tr("bits")}</option>
+     <option value="29">29 {$locale->tr("bits")}</option>
+     <option value="30">30 {$locale->tr("bits")}</option>
+     <option value="31">31 {$locale->tr("bits")}</option>
      <option value="32" selected="selected">32 {$locale->tr("bits")}</option>
     </select> 
   </div>

Modified: plugins/branches/lifetype-1.2/hostblock/templates/addblogblockedhost.template
===================================================================
--- plugins/branches/lifetype-1.2/hostblock/templates/addblogblockedhost.template	2010-08-25 17:21:28 UTC (rev 7024)
+++ plugins/branches/lifetype-1.2/hostblock/templates/addblogblockedhost.template	2010-09-08 14:49:35 UTC (rev 7025)
@@ -16,13 +16,37 @@
     <input style="width:40px;" type="text" size="3" maxlength="3" name="ip3" id="ip3" />.
     <input style="width:40px;" type="text" size="3" maxlength="3" name="ip4" id="ip4" />
 	/ <select name="mask" id="mask" >
+     <option value="1">1 {$locale->tr("bits")}</option>
+     <option value="2">2 {$locale->tr("bits")}</option>
+     <option value="3">3 {$locale->tr("bits")}</option>
      <option value="4">4 {$locale->tr("bits")}</option>
+     <option value="5">5 {$locale->tr("bits")}</option>
+     <option value="6">6 {$locale->tr("bits")}</option>
+     <option value="7">7 {$locale->tr("bits")}</option>
      <option value="8">8 {$locale->tr("bits")}</option>
+     <option value="9">9 {$locale->tr("bits")}</option>
+     <option value="10">10 {$locale->tr("bits")}</option>
+     <option value="11">11 {$locale->tr("bits")}</option>
      <option value="12">12 {$locale->tr("bits")}</option>
+     <option value="13">13 {$locale->tr("bits")}</option>
+     <option value="14">14 {$locale->tr("bits")}</option>
+     <option value="15">15 {$locale->tr("bits")}</option>
      <option value="16">16 {$locale->tr("bits")}</option>
+     <option value="17">17 {$locale->tr("bits")}</option>
+     <option value="18">18 {$locale->tr("bits")}</option>
+     <option value="19">19 {$locale->tr("bits")}</option>
      <option value="20">20 {$locale->tr("bits")}</option>
+     <option value="21">21 {$locale->tr("bits")}</option>
+     <option value="22">22 {$locale->tr("bits")}</option>
+     <option value="23">23 {$locale->tr("bits")}</option>
      <option value="24">24 {$locale->tr("bits")}</option>
+     <option value="25">25 {$locale->tr("bits")}</option>
+     <option value="26">26 {$locale->tr("bits")}</option>
+     <option value="27">27 {$locale->tr("bits")}</option>
      <option value="28">28 {$locale->tr("bits")}</option>
+     <option value="29">29 {$locale->tr("bits")}</option>
+     <option value="30">30 {$locale->tr("bits")}</option>
+     <option value="31">31 {$locale->tr("bits")}</option>
      <option value="32" selected="selected">32 {$locale->tr("bits")}</option>
     </select> 
   </div>

Modified: plugins/branches/lifetype-1.2/hostblock/templates/editblockedhost.template
===================================================================
--- plugins/branches/lifetype-1.2/hostblock/templates/editblockedhost.template	2010-08-25 17:21:28 UTC (rev 7024)
+++ plugins/branches/lifetype-1.2/hostblock/templates/editblockedhost.template	2010-09-08 14:49:35 UTC (rev 7025)
@@ -15,16 +15,40 @@
     <input style="width:40px;" type="text" size="3" maxlength="3" name="ip2" id="ip2" value="{$ip2}" />.
     <input style="width:40px;" type="text" size="3" maxlength="3" name="ip3" id="ip3" value="{$ip3}" />.
     <input style="width:40px;" type="text" size="3" maxlength="3" name="ip4" id="ip4" value="{$ip4}" />
-    / <select name="mask" id="mask">
+    / <select name="mask" id="mask"> 
+     <option value="1" {if $blockedhost->getMask() == 1} selected="selected"{/if}>1 {$locale->tr("bits")}</option>
+     <option value="2" {if $blockedhost->getMask() == 2} selected="selected"{/if}>2 {$locale->tr("bits")}</option>
+     <option value="3" {if $blockedhost->getMask() == 3} selected="selected"{/if}>3 {$locale->tr("bits")}</option>
      <option value="4" {if $blockedhost->getMask() == 4} selected="selected"{/if}>4 {$locale->tr("bits")}</option>
+     <option value="5" {if $blockedhost->getMask() == 5} selected="selected"{/if}>5 {$locale->tr("bits")}</option>
+     <option value="6" {if $blockedhost->getMask() == 6} selected="selected"{/if}>6 {$locale->tr("bits")}</option>
+     <option value="7" {if $blockedhost->getMask() == 7} selected="selected"{/if}>7 {$locale->tr("bits")}</option>
      <option value="8" {if $blockedhost->getMask() == 8} selected="selected"{/if}>8 {$locale->tr("bits")}</option>
+     <option value="9" {if $blockedhost->getMask() == 9} selected="selected"{/if}>9 {$locale->tr("bits")}</option>
+     <option value="10" {if $blockedhost->getMask() == 10} selected="selected"{/if}>10 {$locale->tr("bits")}</option>
+     <option value="11" {if $blockedhost->getMask() == 11} selected="selected"{/if}>11 {$locale->tr("bits")}</option>
      <option value="12" {if $blockedhost->getMask() == 12} selected="selected"{/if}>12 {$locale->tr("bits")}</option>
+     <option value="13" {if $blockedhost->getMask() == 13} selected="selected"{/if}>13 {$locale->tr("bits")}</option>
+     <option value="14" {if $blockedhost->getMask() == 14} selected="selected"{/if}>14 {$locale->tr("bits")}</option>
+     <option value="15" {if $blockedhost->getMask() == 15} selected="selected"{/if}>15 {$locale->tr("bits")}</option>
      <option value="16" {if $blockedhost->getMask() == 16} selected="selected"{/if}>16 {$locale->tr("bits")}</option>
+     <option value="17" {if $blockedhost->getMask() == 17} selected="selected"{/if}>17 {$locale->tr("bits")}</option>
+     <option value="18" {if $blockedhost->getMask() == 18} selected="selected"{/if}>18 {$locale->tr("bits")}</option>
+     <option value="19" {if $blockedhost->getMask() == 19} selected="selected"{/if}>19 {$locale->tr("bits")}</option>
      <option value="20" {if $blockedhost->getMask() == 20} selected="selected"{/if}>20 {$locale->tr("bits")}</option>
+     <option value="21" {if $blockedhost->getMask() == 21} selected="selected"{/if}>21 {$locale->tr("bits")}</option>
+     <option value="22" {if $blockedhost->getMask() == 22} selected="selected"{/if}>22 {$locale->tr("bits")}</option>
+     <option value="23" {if $blockedhost->getMask() == 23} selected="selected"{/if}>23 {$locale->tr("bits")}</option>
      <option value="24" {if $blockedhost->getMask() == 24} selected="selected"{/if}>24 {$locale->tr("bits")}</option>
+     <option value="25" {if $blockedhost->getMask() == 25} selected="selected"{/if}>25 {$locale->tr("bits")}</option>
+     <option value="26" {if $blockedhost->getMask() == 26} selected="selected"{/if}>26 {$locale->tr("bits")}</option>
+     <option value="27" {if $blockedhost->getMask() == 27} selected="selected"{/if}>27 {$locale->tr("bits")}</option>
      <option value="28" {if $blockedhost->getMask() == 28} selected="selected"{/if}>28 {$locale->tr("bits")}</option>
+     <option value="29" {if $blockedhost->getMask() == 29} selected="selected"{/if}>29 {$locale->tr("bits")}</option>
+     <option value="30" {if $blockedhost->getMask() == 30} selected="selected"{/if}>30 {$locale->tr("bits")}</option>
+     <option value="31" {if $blockedhost->getMask() == 31} selected="selected"{/if}>31 {$locale->tr("bits")}</option>
      <option value="32" {if $blockedhost->getMask() == 32} selected="selected"{/if}>32 {$locale->tr("bits")}</option>
-    </select>
+   </select>
   </div>
 
   <div class="field">

Modified: plugins/branches/lifetype-1.2/hostblock/templates/editblogblockedhost.template
===================================================================
--- plugins/branches/lifetype-1.2/hostblock/templates/editblogblockedhost.template	2010-08-25 17:21:28 UTC (rev 7024)
+++ plugins/branches/lifetype-1.2/hostblock/templates/editblogblockedhost.template	2010-09-08 14:49:35 UTC (rev 7025)
@@ -16,13 +16,37 @@
     <input style="width:40px;" type="text" size="3" maxlength="3" name="ip3" id="ip3" value="{$ip3}" />.
     <input style="width:40px;" type="text" size="3" maxlength="3" name="ip4" id="ip4" value="{$ip4}" />
     / <select name="mask" id="mask">
+     <option value="1" {if $blockedhost->getMask() == 1} selected="selected"{/if}>1 {$locale->tr("bits")}</option>
+     <option value="2" {if $blockedhost->getMask() == 2} selected="selected"{/if}>2 {$locale->tr("bits")}</option>
+     <option value="3" {if $blockedhost->getMask() == 3} selected="selected"{/if}>3 {$locale->tr("bits")}</option>
      <option value="4" {if $blockedhost->getMask() == 4} selected="selected"{/if}>4 {$locale->tr("bits")}</option>
+     <option value="5" {if $blockedhost->getMask() == 5} selected="selected"{/if}>5 {$locale->tr("bits")}</option>
+     <option value="6" {if $blockedhost->getMask() == 6} selected="selected"{/if}>6 {$locale->tr("bits")}</option>
+     <option value="7" {if $blockedhost->getMask() == 7} selected="selected"{/if}>7 {$locale->tr("bits")}</option>
      <option value="8" {if $blockedhost->getMask() == 8} selected="selected"{/if}>8 {$locale->tr("bits")}</option>
+     <option value="9" {if $blockedhost->getMask() == 9} selected="selected"{/if}>9 {$locale->tr("bits")}</option>
+     <option value="10" {if $blockedhost->getMask() == 10} selected="selected"{/if}>10 {$locale->tr("bits")}</option>
+     <option value="11" {if $blockedhost->getMask() == 11} selected="selected"{/if}>11 {$locale->tr("bits")}</option>
      <option value="12" {if $blockedhost->getMask() == 12} selected="selected"{/if}>12 {$locale->tr("bits")}</option>
+     <option value="13" {if $blockedhost->getMask() == 13} selected="selected"{/if}>13 {$locale->tr("bits")}</option>
+     <option value="14" {if $blockedhost->getMask() == 14} selected="selected"{/if}>14 {$locale->tr("bits")}</option>
+     <option value="15" {if $blockedhost->getMask() == 15} selected="selected"{/if}>15 {$locale->tr("bits")}</option>
      <option value="16" {if $blockedhost->getMask() == 16} selected="selected"{/if}>16 {$locale->tr("bits")}</option>
+     <option value="17" {if $blockedhost->getMask() == 17} selected="selected"{/if}>17 {$locale->tr("bits")}</option>
+     <option value="18" {if $blockedhost->getMask() == 18} selected="selected"{/if}>18 {$locale->tr("bits")}</option>
+     <option value="19" {if $blockedhost->getMask() == 19} selected="selected"{/if}>19 {$locale->tr("bits")}</option>
      <option value="20" {if $blockedhost->getMask() == 20} selected="selected"{/if}>20 {$locale->tr("bits")}</option>
+     <option value="21" {if $blockedhost->getMask() == 21} selected="selected"{/if}>21 {$locale->tr("bits")}</option>
+     <option value="22" {if $blockedhost->getMask() == 22} selected="selected"{/if}>22 {$locale->tr("bits")}</option>
+     <option value="23" {if $blockedhost->getMask() == 23} selected="selected"{/if}>23 {$locale->tr("bits")}</option>
      <option value="24" {if $blockedhost->getMask() == 24} selected="selected"{/if}>24 {$locale->tr("bits")}</option>
+     <option value="25" {if $blockedhost->getMask() == 25} selected="selected"{/if}>25 {$locale->tr("bits")}</option>
+     <option value="26" {if $blockedhost->getMask() == 26} selected="selected"{/if}>26 {$locale->tr("bits")}</option>
+     <option value="27" {if $blockedhost->getMask() == 27} selected="selected"{/if}>27 {$locale->tr("bits")}</option>
      <option value="28" {if $blockedhost->getMask() == 28} selected="selected"{/if}>28 {$locale->tr("bits")}</option>
+     <option value="29" {if $blockedhost->getMask() == 29} selected="selected"{/if}>29 {$locale->tr("bits")}</option>
+     <option value="30" {if $blockedhost->getMask() == 30} selected="selected"{/if}>30 {$locale->tr("bits")}</option>
+     <option value="31" {if $blockedhost->getMask() == 31} selected="selected"{/if}>31 {$locale->tr("bits")}</option>
      <option value="32" {if $blockedhost->getMask() == 32} selected="selected"{/if}>32 {$locale->tr("bits")}</option>
     </select>
   </div>



More information about the pLog-svn mailing list