Additional Explainations
The scrapbook uploaders in my posts above all use the form "post" method. The post method just submits the form with all the input values and controls to the form CGI program for interpretation and execution of the form's purpose and required response. The post method is best used for complex multi-part forms. The post method can handle any known form function.
The form "get" method is for short "querys" with smaller, simple forms that basically ask the form CGI program for a response. The get method simply appends a "question mark" (?) query to the form "action statement" and adds the text box input into a query string for the form CGI program.
The WebTV scrapbook uploader query string used in forms, is:
action="wtv-tricks:/add-to-scrapbook?mediaPath=http://URL_of_image_file(.gif_or_.jpg)"
and for email, is:
<a href="wtv-tricks:/add-to-scrapbook?mediaPath=http://URL_of_image_file(.gif_or_.jpg)">Link_text_here</a>.
With the form post method, you use:
action="wtv-tricks:/add-to-scrapbook?" then use an input text box named "mediaPath" with a value of "http://" to enter the image URL and complete the required action input string noted above for forms.
But, if you use the form "get" method, you must remove the question mark after scrapbook in your query string because the get method appends the question mark after the action attribute value; so, with the get method your action attribute value would be:
action="wtv-tricks:/add-to-scrapbook" then an input text box named "mediaPath" with a value of "http://" is used for the URL entry to complete the action query string noted above.
Many scrapbook uploaders that just have a text box for entering the image URL uses this "get" form method. Draac's uploader uses this method. This method works fine with WebTV because of our "Go To" keys. We can go to an image and then use the "Go To" key to "Show current" to get the image URL to C&P into the uploader text box; or go from the image to the uploader and use the "Go To" key to "Show last" to C&P the image URL into the uploader text box.
JAVASCRIPT UPLOADERS
Some uploaders automatically write the image URL value to the text box for you if you just came to the uploader from viewing the image. These uploader scripts use a javascript "document.write" method (built-in our browser's javascript interpreters) to write the text box with the javascript "history.previous" property that causes our browsers to display our last URL visit (at the image), which is the same value (URL) stored in in our "Go to" panel "Show last" option.
These uploaders use a short script like this to write the "mediaPath" text box:
This is the only time when you need to use the javascript "document.write()" method to write the text box – when you need to use the "history.previous" function to automatically enter the image URL data, actually the "Last visited" webpage whether it's an image or regular text and image webpage, into the uploader text box. And, this form only works correctly, to upload an image, if you know to visit (view) the image first and then go directly to the uploader text box area, otherwise you get some other value placed in the text box.
Note: Everytime you visit your webpage with this type of uploader, you previous visited URL will show in the upoader text box, whether it's an image page or text page. Also, if you just came from PageBuilder editing, or other pages in your user name, or WebTV NG's, etc, behind the WebTV firewall, you will see a value of "hidden" in the text field. And, don't worry if you inadvertently click the "UpLoad" button when a text webpage is shown in the uploader text box, nothing will happen, except that you will get the alert saying: "PageBuilder was unable to find an image at ... ", if you push the "Continue" button. The UpLoader program will only accept "gif" or "jpg" image files – so don't bother trying to upload "mid" or "swf" files with the uploader.
Note: You can upload ".swf" files to your WebTV scrapbook if you change the file extension to ".gif" and save it in your file manager/editor for access by a WTV scrapbook uploader. This trick was first posted in Beth Candy's PageBuilder Public Club NG on Tue, Feb 6, 2001, by SLAN, aka SPACEBEAGLE@webtv.net; and was posted most recently in the news:alt.pagebuilder.help by OptiMod@webtv.net on Thur, Jul 12, 2001. OptiMod was the first to post a "true" converted flash file, containing a sound track synchronized with the flash image, uploaded to a WebTV PageBuilder scrapbook. SLAN's flash image did not include a sound file – it was basically, and could have been replaced by, an animated .gif file. Why use a Flash image (.swf file) if you aren't going to add both background and synchronized sound to the image – that's the purpose of the Flash image editor. Good work, OptiMod, there's great possibilities here; but, as we all know Flash files are huge, and may eat up a large chunk of our PageBuilder memory! I added SLAN's and OptiMod's flash images to my scrapbook.
Here's an example of a WebTV PageBulder UpLoader which uploads an image you "last visited" using the javascript "history.previous" property to automatically "document.write()" an image URL into the UpLoader form input text box. To use this form, you first "Go To" the desired image on the web, then go directly to your uploader form. The URL of your image (last visited) will automatically appear in the uploader form input text box. Click the "UpLoad" button and follow the prompts to save the image to your scrapbook. You can also erase the text in the uploader form text box and enter any image URL to upload to your scrapbook.
Note: Also, remember: when you're at your image on the web, you can use the "Go To" key to "Copy" (Cmd-C) the "current" (click "Show current" on the "Go To" panel) URL of the image; then go to your uploader, erase the "http://" and "Paste" (Cmd-V) the image URL into the form input text box. Click the "UpLoad" button and follow the prompts to upload the image to your scrapbook. Do this when the WebTV PageBuilder UpLoader servers pop-up and alert saying: "WebTV ran into a technical problem. Please try again" and the uploader should work. There appears to be some occasionally occurring javascript bugs in the uploader program when this script is used.
WebTV Scrapbook UpLoader Instructions: Go to your image on the web, and then go directly to this uploader. Your image URL will automatically appear in in the form input text box above. Click the "UpLoad" button and follow the prompts to upload the image to your scrapbook. You can also erase the text box entry and either type or C&P (as explained above) the URL of an image you desire to upload.
Here's the code I used for the uploader above:
WebTV Scrapbook UpLoader Instructions: Go to your image on the web, and then go directly to this uploader. Your image URL will automatically appear in in the form input text box above. Click the "UpLoad" button and follow the prompts to upload the image to your scrapbook. You can also erase the text box entry and either type or C&P (as explained above) the URL of an image you desire to upload.
Note: Pay particular attention to how I nested the quotes in the "document.write()" statement. I enclosed the HTML tags in single quotes with the attributes, as standard practice, enclosed in double quotes. The "history.previous" property value appears to be enclosed in single quotes, but that's not the case – javascript properties are never enclosed in quotes in statements, and always appear with beginning and trailing "plus" signs (+). The single quotes that appear to be around the property actually terminate the single quotes on each side of the property. Always be sure your quotes are used and nested correctly – one little out-of-place quote may kill your scripts.
However, if you have trouble with quotes in the above script, you can write the statement with double quotes around the HTML, with no quotes around the attribute values. The "document.write()" statement above can be written with only double quotes, like this:
document.write("<input type=text name=mediaPath value="+history.previous+" size=65 text=000080 curser=red bgcolor=bbffbb selected autoactivate nohighlight usestyle>").
Use the code anyway you like for your own PageBuilder Scrapbook UpLoader. Customize the form layout. Change the text, curser and background colors; and position the form elements anyway you prefer.
USING YOUR PAGEBUILDER REDIRECT URL
Now here's an answer to a scrapbook uploading problem that has plagued us ever since PageBuilder was released in summer '99. When uploading images between your WebTV terminal's user accounts, other primary user accounts, or at several online transloaders, you may regularly get an alert pop-up that says: "PageBuilder could not find an image at " "; which has been a perplexing problem for most of us. When you encounter this problem, you must enter your PageBuilder user account "redirect" URL into the transloader URL text box, or use your"redirect" URL in your webpage or email uploader codes as explained here.
All PageBuilder user accounts have unique "redirect" URL's that are hidden from us when we view our webpage URL's in our PageBuilder "Change your webpage" editing page, or use our "Info" keys to check our webpage URL's. Our PageBuilder user account "redirect" URL's can be obtained from WebTV tech staff; but, this is a big hassel most of the time; or you can obtain your "redirect" URL from a very few online webpage validators.
Note: You will also get an alert pop-up that says: "The publisher refuses to give you access to the requested webpage," when you try to click on an image link that is on one of your own PageBuilder account webpages that you are viewing. No problem here, that's as it should be! Access protocol should not allow you to click a link on an image to come back to the same image you are viewing – that redundancy is, and always should be, not allowed by access protocol.
As an example of the use of your WebTV PageBuilder user account "redirect" URL, here's the correct URL code syntax for the image URL's that I use on the backgrounds image webpage noted below. As an example: "http://community-2.webtv.net/@HH!51!D1!76A4699ED2EA/jaxred/Bkgnds1/scrapbookFiles/importD5.gif" – which is the same as the URL of the image on the web; but also contains my PageBuilder user account server file "redirect" URL, which is shown as: "@HH!51!D1!76A4699ED2EA" – which I had to put in my uploader codes for each image to allow uploading between WebTV user accounts, including other primary user accounts. This is because of the required file access protocol used by WebTV for accessing our user account files behind the WebTV corporate firewall and the WWW webpage servers.
Here's an example using an image from my scrapbook. Notice that you can view the image at the addy given, but cannot upload the image to your scrapbook unless you enter my PageBuilder webpage redirect number. Try it with and without the redirect number.
The code I used for this individual uploader is:
This problem is hard to understand because WebTV's access protocol should not be so restrictive between the webtv.net domain, individual WebTV user accounts, separate WebTV primary user accounts, and our WebTV PageBuilder webpage servers as the access restrictions should be from other domains to WebTV! But, we also need to consider the fact that bandwidth cost is a major factor in webserver operational costs, which must be kept as low as possible so we won't be faced with increased subscription rates. And also, maybe, WebTV's email and webpage to scrapbook image linking procedure is also matter of maintaining a more stricter security between our scrapbooks and the web?
But, I just don't understand why WebTV makes it so difficult to access and upload between primary account and individual user names, and other WebTV primary accounts and users – these should be all behind the corporate firewall between WebTV subscribers and box users – why such problems? WebTV PageBuilders would never have had any problems uploading between users, if WebTV PageBuilder help staff would have thoroughly explained, in the PageBuilder instruction help pages, the procedure outlined here, and as explained in the webpages of the many PageBuilder experts who have showed us how to link to scrapbook images for email and webpages!
Perhaps the next upgrade to our PageBuilder program will correct the problems noted above and make it easier to upload images between individual users. All PageBuilders who have experienced these problems should request that WebTV PageBuilder staff correct these problems in the next PageBuilder program upgrade. Use the "Upgrade Suggestion Feature" at the WebTV Help Center.
GET ALL YOUR USERS WEBPAGE REDIRECT NUMBERS
You can get your "redirect" URL's from an online webpage validator. The only webpage validator I know that shows the "redirect" URL with the webpage source code, is my Jacksonville, FL hometown neighbors Addy and Assocates, Inc. validator, located at: http://watson.addy.com/. You need to use their "Dr. Watson 4.0" validator to validate one webpage from each of your WebTV user accounts so you will know the "redirect" URL's of all your user accounts.
My personal thanks to my friend Watcher V, aka Watchman5@webtv.net, who's heads-up thinking that the "redirect" URL revealed by the Watson validator may be the answer to our uploader problems posted in the PageBuilder NG's. Watcher V posted this solution outlined above as a response to my problem described in a post thread in Beth Candy's PageBuilder NG. Watcher V also put up a PageBuilder website which clearly and explicitly explains this procedure.Check out Watcher V's website, at: http://community-2.webtv.net/Watchman5/plaintextrulz/page5.html. Thanks, Watcher V, for your help; all PageBuilders owe you one, Pal!
Note: I added a more thorough explaination of this information to my "Bkgnds1" image tools webpage noted below.
If you take the time to understand and use the scripts I have here, or from the tutorials of many expert PageBuilders, you should be able to add an uploader to your webpages and email sig, box. Just be careful, especially when you C&P the codes, to use the correct HTML syntax; ie, remove all extra spaces between HTML tag attributes – one-space only allowed between attributes and no spaces between opening and closing HTML angle brackets (< >), quote (" ") all attribute values, be sure URL's are not broken with spaces when wrapped, verify the exact capitalization syntax in all your URL's, and never add any "hard returns" ("Return" key) when entering code in a PageBuilder editor text box – always use single spaces and allow your code to "auto-wrap" by typing the code and required spaces in a continous line.
Check my background image webpage, view, and copy the source code for the uploader and image URL scripts, and use the tools any way you like. I have several examples of using the "Redirect URL" in uploader codes on this webpage as explained above.
http://community-2.webtv.net/jaxred/Bkgnds1/
|