From: oes Date: Mon, 1 Apr 2002 19:13:47 +0000 (+0000) Subject: Extended, fixed bugs, beefed up design, made IE-safe X-Git-Tag: v_2_9_14~281 X-Git-Url: http://www.privoxy.org/gitweb/?a=commitdiff_plain;h=273aaf5afed7e955586373e2e70fd23e29ce1514;p=privoxy.git Extended, fixed bugs, beefed up design, made IE-safe --- diff --git a/doc/webserver/actions/index.php b/doc/webserver/actions/index.php index 04f0c222..e01935f2 100755 --- a/doc/webserver/actions/index.php +++ b/doc/webserver/actions/index.php @@ -1,163 +1,191 @@ - + + + + + + +Invalid Privoxy Action List Feedback - -

Invalid Feedback Submission

-

You are either not using Privoxy at all, or using an - actions file which is not based on the recent - distribution actions file (version $current_actions_file_version).

-

As much as we welcome your feedback, we are unable to process - input for the actions file if not based on our distribution. Sorry.

-

You can download the latest version of - Privoxy here.

- - "); + echo ("Invalid Privoxy Action List Feedback +
Invalid Feedback Submission
+
+

As much as we welcome your feedback, please note that + we can only accept problem reports based on: +

    +
  • Privoxy version $required_privoxy_version or later
  • +
  • Actionsfile version version $required_actions_file_version or later
  • +
+

We hope you will understand that we feel unable to maintain concurrent versions of the file.

+
+
+ + "); exit; } ?> - - - Privoxy Action List Feedback - Step 1 of 2 - - - -

Privoxy Action List Feedback - Step 1 of 2

- -

-Thank you for reporting a missing or invalid action! -

-

-Please fill the below form and click to -proceed to Step 2. -

- -
- - - - - - - - - - - - - - - - - - - -
URL: - -
Nature of the problem: - -
- -
-
-

- -

-This special page helps the Privoxy team to improve the filters. Once -you have bookmarked the page, surf to a troubled page and click on the -bookmark, which will take you here and pre-fill the URL field.

- -

Use the following link as a bookmark: -Privoxy-Submit. - -Right-click the link and choose "Add to Favorites" (IE) or "Add Bookmark" (Netscape). You will get a warning that the bookmark "may not be safe" - just click OK. For even faster access, you can put them on the "Links" bar (IE) or the "Personal Toolbar" (Netscape), and submit feedback with a single click. -

- - + Privoxy Action List Feedback - Step 1 of 2 + + + +
Privoxy Action List Feedback - Step 1 of 2
+ +
+

+ Thank you for reporting a missing or invalid action! +
The Privoxy team relies on your feedback to maintain an efficient actions file! +

+ +

+ Please fill the below form and click to proceed to step 2. +

+
+ +
+
+ + + + + + + + + + + + + + + + + + +
URL: + +
Nature of the problem: + +
  + +
+
+
+ +
+
+

+ + Using Bookmarklets for Feedback + +

+

+ To make it even easier for you, we provide a bookmarklet which will not only take you here from + any troubled page you might be surfing, but also pre-fill the form! +

+

+ Please right-click the following link and choose "Add to Favorites" (IE) or "Add Bookmark for Link" (Netscape): + Privoxy-Submit +

+ +

+ You might get a warning that the bookmark "may not be safe" (IE) - just click OK. + For even faster access, you can put it on the "Links" bar (IE) or the "Personal Toolbar" (Netscape), + and submit feedback with a single click! +

+
+
+ + diff --git a/doc/webserver/actions/step2.php b/doc/webserver/actions/step2.php index 3caa0445..635f1d11 100644 --- a/doc/webserver/actions/step2.php +++ b/doc/webserver/actions/step2.php @@ -1,99 +1,165 @@ - + + + + + + + + + +Invalid Feedback Submission - - -

Invalid Feedback Submission

-

When submitting your feedback please start with - step 1.

- - "); + echo (" Invalid Feedback Submission + + +
Invalid Feedback Submission
+
+
When submitting your feedback please start with + step 1. +
+
+ + \n"); exit; } + /* * Cannot work on unknown problem: */ if (!isset($problem) || $problem == "INVALID") { - echo ("Invalid Feedback Submission - - -

Invalid Feedback Submission

-

You need to select the nature of the problem in - step 1.

- - "); + echo (" Invalid Feedback Submission + + +
Invalid Feedback Submission
+
+
You need to select the nature of the problem in + step 1. +
+
+ + \n"); exit; } /* * Check if URL really exists and buffer its contents: + * + * FIXME: Curl is not installed on SF; Filed as Alexandria + * Feature Request #537014. + * PHP's fopen() supports URLs, but it seems that + * curls options for Timeouts and HTTP error handling + * are not supported by fopen(). */ - $ch = curl_init ($referrer_url); + curl_setopt ($ch, CURLOPT_HEADER, 0); curl_setopt ($ch, CURLOPT_FAILONERROR, 1); +curl_setopt ($ch, CURLOPT_TIMEOUT, 15); ob_start(); $success = curl_exec ($ch); @@ -104,20 +170,25 @@ curl_close ($ch); if (!$success) { - echo ("Invalid Feedback Submission - - -

Invalid Feedback Submission

-

The URL that you entered ($referrer_url) -
could not be retrieved.

-

Make sure the URL is correct and publicly accessible.

-

Back to step 1

- - - "); + echo (" Invalid Feedback Submission + + +
Invalid Feedback Submission
+
+
+

The URL that you entered ($referrer_url) +
could not be retrieved. +

+

Make sure the URL is correct and publicly accessible.

+

Back to step 1

+
+
+ + \n"); exit; } + /* * Create description from problem code: */ @@ -133,47 +204,86 @@ switch($problem) ?> - - - Privoxy Action List Feedback - Step 2 of 2 - - - -

Privoxy Action List Feedback - Step 2 of 2

-

-You are about to report that -
on . -

+ Privoxy Action List Feedback - Step 2 of 2 + + +
Privoxy Action List Feedback - Step 2 of 2
-

-

+
+ You are about to report that on + . +
- - +
+ +

+ + +

-
+
]*?src=[\'"]?(.*?)[\'" >]|i', $page, $matches); $count = count($matches[0]); if ($count > 0) { - $referrer_base = substr($referrer_url, 0, -strpos(strrev($referrer_url), '/')); + /* + * Base URL ends in slash: don't touch. + */ + if (strpos(strrev($referrer_url), '/') == 0) + { + $referrer_base = $referrer_url; + } + /* + * Else grab URL up to last slash as base. + */ + else + { + $referrer_base = substr($referrer_url, 0, -strpos(strrev($referrer_url), '/')); + } + + /* + * Get the protocol + host info for relative links + * that start with slash. FIXME: Cut trailing slash off! + */ $referrer_host = "http://".strrev(strrchr(strrev(substr($referrer_url, 7)), "/")); - echo ("
Choose the images to be blocked from the following list:

\n"); - echo ("\n"); - echo ("\n"); - for ($i=0; $i< $count; $i++) { + /* + * Open section in
; Open table: + */ + echo ("
Choose the images you want blocked from the following list:
+
+

+ +

\n"); + /* + * Print one table row for each image found: + */ + for ($i=0; $i< $count; $i++) + { $image_url = $matches[1][$i]; + + /* + * Make image URLs absolute: + */ if (strncmp("http://", $image_url, 7)) { if ($image_url{0} == "/") @@ -185,66 +295,105 @@ else $image_url = $referrer_base.$image_url; } } - echo ("\n"); - echo ("\n"); - echo ("\n"); - echo ("\n"); + + /* + * Print the row(s): + */ + echo (" + + + + + + + \n"); } - echo ("
$image_url:
+ + + $image_url: + + +
+ \"banner +

If the banner that you saw is not listed above, enter the URL here\n"); + echo (" + + +
+ If the banner that you saw is not listed above, enter the URL here\n"); } else { - echo ("
URL of the advertisment image:\n"); + echo ("
+ URL of the advertisment image:\n"); } } ?> -
Hint: right-click the image, select "Copy image location" and paste the URL here.
-
-

-
+
Hint: right-click the image, select "Copy image location" and paste the URL here. + +
+

+ +

+
+ ") ?> -
URL of the innocent image: -
Hint: right-click the image, select "Copy image location" and paste the URL here. -
This may not work if the image was blocked by size or if +image-blocker is set to redirect.
-
-

-
-") ?> +
+

URL of the innocent image: +
Hint: right-click the image, select "Copy image location" and paste the URL here. +
This may not work if the image was blocked by size or if +image-blocker is set to redirect.
+

+
+
+

+ +

+
+ +") ?> -
Severity:
-
-

- -

-
- -
Remarks: (optional)
-
-

-
- -
Your Name: (optional)
-
-

-
- -
 
-
- -
- -
- -

- - +
Severity:
+
+

+ +

+
+ +
+ Remarks: (optional) +
+
+

+ +

+
+ +
+ Your Name: (optional) +
+
+

+ +

+
+ +
 
+
+ +
+ +
+ +
+ + diff --git a/doc/webserver/actions/step3.php b/doc/webserver/actions/step3.php index 0a1003d0..906845b4 100644 --- a/doc/webserver/actions/step3.php +++ b/doc/webserver/actions/step3.php @@ -1,114 +1,145 @@ + + + + + + + Invalid Feedback Submission - - -

Invalid Feedback Submission

-

When submitting your feedback, please start with - step 1.

- + echo (" Invalid Feedback Submission + + +
Invalid Feedback Submission
+
+
+ When submitting your feedback please start with step 1. +
+
+ "); exit; } + /* * Cannot work on unknown problem: */ if (!isset($problem)) { - echo ("Invalid Feedback Submission - - -

Invalid Feedback Submission

-

You need to select the nature of the problem in - step 1.

- + echo (" Invalid Feedback Submission + + +
Invalid Feedback Submission
+
+
+ You need to select the nature of the problem in step 1. +
+
+ "); exit; } + /* * Handle optional text fields: */ -if (!isset($name)) +if (!isset($name) || ($name == "")) { $name = "anonymous"; } + /* - * Open the logfile: + * Open the logfile or fail: */ $logfile = "feedback-data.txt"; $fp = fopen($logfile, "a"); if(!$fp) { - echo ("Internal Script Error - - -

Internal Script Error

-

This script was unable to open its logfile.

-

Please mail its owner!

- + echo (" Internal Script Error + + +
Internal Script Error
+
+
+

+ This script was unable to open its logfile. +

+

+ Please mail its owner! +

+
+
+ "); exit; } + /* - * Write Head and remarks field: + * Write Head (type, severity, user, client-ip) + * and remarks field: */ -fwrite($fp, "#FEEDBACK TYPE $problem SEVERITY $severity FROM $name ON $REMOTE_ADDR\n"); +fwrite($fp, "\n#FEEDBACK TYPE $problem SEVERITY $severity FROM $name ON $REMOTE_ADDR\n"); if (isset($remarks)) { $lines = explode("\n", $remarks); @@ -118,12 +149,16 @@ if (isset($remarks)) } } + /* * Depending on the type of problem reported, * we need to write additional data: */ switch ($problem) { + /* + * Banner not blocked: + */ case "P1": fwrite($fp, "#BLOCK-REFERRER: $referrer_url\n"); if (isset($num_images)) @@ -142,35 +177,51 @@ switch ($problem) } break; + /* + * Innocent image blocked: + */ case "P2": fwrite($fp, "#UNBLOCK-REFERRER: $referrer_url\n"); - if (isset($manual_image_url) && ($manual_image_url != "")) + if (isset($image_url) && ($image_url != "")) { - fwrite($fp, "#UNBLOCK-URL: image_url\n"); + fwrite($fp, "#UNBLOCK-URL: $image_url\n"); } break; - + /* + * All other problems: + */ + default: + fwrite($fp, "#PROBLEM-URL: $referrer_url\n"); + break; } fclose($fp); ?> - - - Privoxy Action List Feedback - Result - - - -

Privoxy Action List Feedback - Result

- -

Thank you very much for taking the time to submit your feedback!

- -

It will be reviewed by the developers and used to improve the -distribution actions file.

- - - - + Privoxy Action List Feedback - Result + + + +
+ Privoxy Action List Feedback - Result +
+ +
+

+ Thank you very much for taking the time to submit your feedback! +

+ +

+ It will be reviewed by the developers and used to improve the + distribution actions file. +

+ +

+ +

+ +
+