Commit:    f2a8c4af49081e3efd492dabdbb7b4180920c4e4
Author:    Hannes Magnusson <[email protected]>         Wed, 22 Jan 2014 
16:37:58 -0800
Parents:   839419e765efc49561b2b7c493f16744e00d1840
Branches:  master

Link:       
http://git.php.net/?p=web/php.git;a=commitdiff;h=f2a8c4af49081e3efd492dabdbb7b4180920c4e4

Log:
Add enable/disable myphpnet setting for the UG beta listing

Changed paths:
  M  include/prepend.inc
  M  my.php


Diff:
diff --git a/include/prepend.inc b/include/prepend.inc
index 9abd550..23cbf10 100644
--- a/include/prepend.inc
+++ b/include/prepend.inc
@@ -160,6 +160,19 @@ function myphpnet_mirror($murl = FALSE)
     } else { return "NONE"; }
 }
 
+function myphpnet_showug($enable = null) {
+    global $MYPHPNET;
+
+    if (isset($_GET["showug"])) {
+        $enable = true;
+    }
+
+    if ($enable !== null) {
+        $MYPHPNET[3] = $enable;
+    }
+    return $MYPHPNET[3];
+}
+
 // Save user settings in cookie
 function myphpnet_save()
 {
diff --git a/my.php b/my.php
index d50db72..a58fda1 100644
--- a/my.php
+++ b/my.php
@@ -55,6 +55,10 @@ if (isset($_POST['urlsearch'])) {
     myphpnet_urlsearch($_POST['urlsearch']);
 }
 
+if (isset($_POST["showug"])) {
+    myphpnet_showug($_POST["showug"] == "enable");
+}
+
 // Set preferred mirror site, prepare mirror array
 if (isset($_POST['mirror'])) {
     myphpnet_mirror($_POST['mirror']);
@@ -242,6 +246,15 @@ foreach ($mirror_sites as $murl => $mdata) {
 ?>
  </select>
 </div>
+<br>
+<h2>User Group tips</h2>
+
+<p>
+We are experimenting with listing near by User Groups. This feature is highly 
experimental
+and will very likely change a lot and be broken at times.
+</p>
+<label for="showugenable">Enable UG tips</label> <input type="radio" 
name="showug" id="showugenable" value="enable" <?php    echo myphpnet_showug() 
? "checked=checked" : "" ?>><br>
+<label for="showugdisable">Disable UG tips</label> <input type="radio" 
name="showug" id="showugdisable" value="disable" <?php echo myphpnet_showug() ? 
"" : "checked=checked" ?>>
 
 <p class="center">
  <input type="submit" value="Set All Preferences" />


--
PHP Webmaster List Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to