Virtual Mechanics: Community Forums and FAQs
Virtual Mechanics: Community Forums and FAQs
User's Created Tips and Insights
CD presentations of your web site|
Go
![]() |
New
![]() |
Find
![]() |
Notify
![]() |
Tools
![]() |
Reply
![]() |
|
|
Guru 'Geezer' Mechanic |
This tip would not be possible without the idea and extensive help (and patience) from TonyC. Thank you.
After extensive testing, this tip has been fund to work, but with one big caveat. Since users can configure their browsers to control the manner in which pop-up appear, These instructions will not work 100% of the time on all computers. It has been tested in IE6, IE7 and FF and works with the default browser configurations. This article discusses how to create a CD presentation of your web site that will auto-start when the disk is inserted in the user's CD drive. The procedures presented are designed to work with a CD drive capable of direct read/write access. If you have a CD writer that is only supported by CD burning software, you will need to use either a USB flash drive or hard disk folder for building and testing the CD image before copying to disk. Hint: You should perform these steps using a R/W CD. This way if you make an error (or the instructions are in error), you won't be wasting CDs. After you have a good working version, you can then finalize the disk and copy the contents to a CD-R disk. Foremost, you must make sure your project is self-contained. It cannot make any reference to external URLs or other disks/folders outside the CD root folder. For example, if you use a web counter service, Google Analytics, shopping carts, etc., as these will result in broken links. You cannot rely upon your user having an Internet connection or any other required file on their disk. You will have to correct these links before continuing. If your web site is self-contained, then create your web site on the CD by using SiteSpinner's "Files to Disk" option. When you publish, make sure you choose to place your site in a folder under the CD's root directory. For example, if your CD burner is drive E: then you would specify a path of "E:\mysite" (no quotes). Use whatever folder name you want, but remember what it is - you will need it later. If the folder doesn't already exist, don't worry. SiteSpinner will ask if you want it created; answer yes. At this point, you can test if your web site is self-contained. Simply disconnect your Internet connection. Or turn it off via the Control Panel->Network Connections; right-click the Local Area Connection entry and choose "Disable" (do not forget to re-activate when you are done!). Then navigate to the CD folder containing your web site and double-click the index.html file. If you have the .html file extension associated with a browser, it will start and show your index page. Navigate through your pages, verifying your links are not broken. The next step is to create an auto-starting CD. This is done by placing an autorun.inf file on the CD. Using a plain text editor, enter the following: [autorun] shellexecute=index.html Save this file to the root directory of the CD as "autorun.inf" (e.g., "E:\autorun.inf"). Make sure you save in it plain text format (also know as DOS format). Before continuing, you have to decide if you want your CD web site presentation to appear in a standard window-sized browser or full-screen. Using a normal sized browser If you elect to use a normal browser window, the procedures are simple. Using a plain text editor, create a file containing: <html> <head> <meta http-equiv="refresh" content="0; url=./mysite/index.html"> </head> <body> </body> </html> where the url folder "mysite" matches the folder name you gave when you published your site to the CD. Save this file to the root directory of the CD as "index.html" (e.g., "E:\index.html"). Make sure you save this file in plain text format. It is very important that this file is named "index.html". The autorun's shellexecute command performs its task by opening the default browser that is associated with the .html file extension. Unfortunately, most browsers started this way require the file name be "index.html"; any other file name will result in an error message. You have just created an auto-start CD. You can now test it by ejecting/inserting the CD or double-clicking the drive icon from the My Computer window. When your user inserts the CD, the autorun.inf file will be processed. This in turn will start a Window's shell process which will execute the user's default browser in order to display the specified index page. This index page contains a meta-tag that redirects itself to your published web site on the CD in the folder you specified. Simple, no? Well, maybe not. Some users turn off auto-start so they will have to open the CD and double-click the index.html file to kick things off. But these users are probably in the minority and if they have turned off auto-start, they must know how to manually start a program from disk (why would they disable it otherwise?). Using a browser in full-screen mode: Before continuing, you should be warned that this presentation method will require you to modify you web site. Putting a browser into full screen mode is (in MS jargon) known a kiosk mode. In this mode, no menu bars are displayed. The user must either use Alt-F4 to close the browser or use the Task Manager to end the process. Neither of these is a desirable solution. (Actually, only the IE browser removes all menu bars. The other browsers at least leave the minimize/maximize/close buttons. But since IE is the most commonly used browser, we must design for it.) The best solution is for you to provide a link on you web page(s) that will allow the user to gracefully close the browser. You can use any type of link (text, image, grouped object, etc) or a form button. With a standard link, use the link editor; make sure you assign a blank link type and specify the URL as: javascript:close(); If you use a form button, set the Code field to read: onclick="close();" Place you window close link in a conspicuous location on your page so your user won't get frustrated trying to close the browser. If you want the close link to appear on more than one page, right-click the link and select the "Include on All Pages" option. The problem of having two different versions of your web site (one for the web and one for CD) can be easily handled using SiteSpinner's Special Effects->Loading menu option. For your web site pages, select both the "Hide While Loading: and "Hide After Loading" options. This will completely hide the link from our on-line visitors. Then before you publish to CD, uncheck these options and the link will be visible for your CD web site. In this presentation mode, you can add the autorun.inf to the CD as outlined above; no change is needed. However, the contents of the autorun index.html file is not the same. Using SiteSpinner, create a new index page and on this page, create a new custom header and insert the following code: <script language="javascript"> function viewCD() { window.open ("./mysite/index.html", "","fullscreen=yes,scrollbars=no,"+ "width="+screen.width+",height="+screen.height+",top=0,left=0"); } </script> Where "mysite" is the folder name you used when you published your web site to the CD. The full screen presentation method involves creating a pop-up window via javascript. Normally, this would be a simple thing. The problem with this approach is that with the advent of tabbed-browsing in the newer versions of browsers, you cannot reliably specify javascript code that will work with the myriad of browser configurations. What may work in one user's IE browser may produce different result in another IE browser. On top of that, you must content with the differences between browsers. The script shown here has been tested with various browsers and represents a combination of options that work in the majority of browser configurations. See the Notes section below for a discussion on the quirks found during testing the script. When this index page is viewed, you will need a way to execute the javascript code to get your CD web site displayed. The index page outlined above will be displayed as a plain white page. This is very ugly and looks unprofessional. Since you must include a link to execute the code, you might as well make a nice looking pseudo-"splash screen." To this page, you must add a link to provide a way to execute the javascript. If you use the link editor, assign a blank link type and set URL to: javascript:viewCD(); If you use a form button, set the Code field to read: onclick="viewCD();" Use a link caption such as "Click to view our site" or some other welcoming message. Using an index page with this link gives the user the option to either view your CD contents or exiting the browser. This is a user-friendly approach. When you are finished building your autorun index page, publish it to the CD's root directory. For example, if your CD is drive E:, then "E:\" would be your destination. Congratulations! You have now created an auto-start CD that will present a normal web page inviting the user to view your CD web site. Notes: The following browsers were used to test these procedures: Firefox 2, IE 7, Opera 9, and Netscape 8. All of these have the newer tabbed-browser functions. If a user has configured their browser for tab-only viewing, then the full-screen effects will often appear in a tab rather than full screen. There is nothing you can do to override the user's configuration. Firefox behaved as expected to all window open options. In IE7, there is a setting of "Always open pop-ups in a new tab" and if checked, you cannot use full-screen displays. The default for this if off, so unless the user has changed it, the procedures should work. Opera also has a setting of "Open windows instead of tabs" and has a default setting of off, so all pop-ups will occur in a tabbed pane instead of full screen Netscape 8 has its setting is hidden within the Security Center options and is defaulted to open pop-ups in a tabbed pane. This setting can either be applied globally or on a site-by-site basis. Editorial: After setting NS as my default browser and visiting a few sites, I noticed pop-ups appearing even through I had the option set for pop-ups to appear in a tabbed pane. It seems that certain companies have paid to be placed on a "trusted site" list which is allowed by the NS browser to pop-up ads. I shouldn't be surprised by this behavior since Netscape is owned by AOL, but find it irritating that a "free" program would knowingly subject its users to pop-up ads by overriding your configuration and presetting certain sites. some cases, a browser has a setting to allow new windows in place of a tabbed pane This message has been edited. Last edited by: larryd, |
||
|
| Previous Topic | Next Topic | powered by eve community |
| Please Wait. Your request is being processed... |
|
Virtual Mechanics: Community Forums and FAQs
Virtual Mechanics: Community Forums and FAQs
User's Created Tips and Insights
CD presentations of your web site
