zaterdag, 27 augustus, 2011

iWeb : iframe alternative in the HTML Snippet

To display a remote webpage in an iWeb webpage, you use the HTML Snippet with the <iframe> HTML element.

It's a line of code with a lot of attributes :

<iframe src="http://url.to.file.html" frameborder="0" width="500" height="500" scrolling="no" allowTransparency="true"></iframe>

iWeb uses an separate file, widget0-markup.html, to display that remote page.

And since the HTML Snippet itself is an <iframe> it's double.

To avoid that you can use a JavaScript that replaces the widget0-markup.html with another file, be it a webpage or an image.

Here's the code you paste :

<div style="width: 650px; height: 650px">
  <script language="JavaScript">
    location.replace('../../../your files.html');
  </script>
</div>

Use three sets of ../ to escape from the folder with the Sitename if you use a relative URL, Use "/url-to-file", when using a relative to root URL or use an absolute URL to the remote file.

De <div> is used to define the size of the HTML Snippet. It is assumed that the file doesn't have to scroll inside the HTML Snippet. If you want that, you'll have to find a solution for that, or use the <iframe>.

See sample pages here : demo pages... 

See also this blog entry : Using the iWeb HTML Snippet

Geplaatst door wyodor at 10:05 PM
Bijgewerkt op: zaterdag, 27 augustus, 2011 10:30 PM
Categories: Design, Tutorials, Web

donderdag, 18 augustus, 2011

HTML as PHP (cont.)

Discovered that one.com does not support this Apache Directive :

<files widget*.html>
AddType application/x-httpd-php .html
</files>

See this blog post for details :

HTML as PHP »

If applied, the widget markup file downloads.

Sent Tweet for answers :

Does one.com support this directive

Update 19 aug 2010 :

Got the answer : AddType will not work etc...

Well, this problem is not unique. Some searching showed that it is common with other providers as well. See this discussion :

Make PHP to work in your HTML files with .htacess

So now we have to find a solution for at least the iWeb Widget issue. And as per usual, I found one.

Here's how to proceed.

In the Finder do Command-Shift-G and paste this line :

/Applications/iWeb.app/Contents/Resources/Widgets/

Hit Return.

Right-click file HTMLRegion.iwdgt and choose Show package content from the pop-up menu.

Open file Info.plist in either the Property List Editor (part of Xcode) or a Plain Text editor.

Find this :

<key>DynamicResourceValuePrefsKeys</key>
<dict>
<key>x-html-markup</key>
<string>$WIDGET_ID_markup.html</string>
</dict>

and change the extention to php.

<string>$WIDGET_ID_markup.php</string>

Save the file (you need Administrator right to do this) and start iWeb.

The drawback is that the HTML Snippet behaves differently now. When you add code it also shows the code it will add when you publish the pages. The HTML Snippet expands when more code is added. It doesn't take the various widths and heights of <divs> into account. You have to manually resize the HTML Snippet yourself.

But it will publish the widget markup file as php.

So use it when you feel certain you can cope with it.

You may have to update pages with the old extension.

And if you haven't been there yet, here's a sample page.

Geplaatst door wyodor at 6:51 PM
Categories: Design, Web

woensdag, 17 augustus, 2011

Succesfully migrated from MobileMe to One.com

Well, I made the step to migrate my webpages from MobileMe to One.com.

Here are the steps I took with the date/time :

15-aug-2011 — 21:00 : Signed up at One.com.

15-aug-2011 — 21:10 : Received confirmation from One.com and instructions how to transfer the domainname.

15-aug-2011 — 21:21 : Sent a request for an Authorization Identification ID (Auth-ID) to domainname hoster KPN to transfer the domainname to One.com.

16-aug-2011 — 07:07 : Received Auth-ID and sent it One.com for processing.

16-aug-2011 — 08:24 : Received and confirmed message from ascio.com (domainname hoster in Denmark) to transfer domainname.

16-aug-2011 — 21:15 : Received and confirmed message from opensrs.com to transfer domainname from Tucows to Ascio.

17-aug-2011 — 11:17 : Received message from One.com that domainname transfer was complete.

17-aug-2011 — 11:30 : Mail working under domainname.

17-aug-2011 — 11:45 : Website working on new server.

; <<>> DiG 9.6.0-APPLE-P2 <<>> www.wyodor.net ns +multiline +nocomments +nocmd +noquestion +nostats +search
;; global options: +cmd
wyodor.net. 900 IN SOA ns01.one.com. hostmaster.one.com. (
2004000000 ; serial 10800 ; refresh (3 hours)
1800 ; retry (30 minutes)
1209600 ; expire (2 weeks)
900 ; minimum (15 minutes)

Depending on where you live and which DNS Server you use, it takes some time for the new domainname settings to propagate through the internet. At the bottom of my Homepage you'll see that it's hosted at One.com.

While waiting for the transfer, I downloaded my pages, and everything else, from iDisk to a folder on my computer. All in All it was some 2,75GB.

I used Cyberduck to upload everything that was in the iDisk > Web > Sites folder.

It took a few hours to upload about 2GB, most of which were about 1GB of movies.

The website at MobileMe can still be looked at : http://web.me.com/wyodor/

The website can also be reached at http://wyodor.net.

Other subdomains default to a server elsewhere. I use it to prepare pages, new ideas and other stuff.

Common e-mail names like webmaster, postmaster and info are now supported with my domainname.

Geplaatst door wyodor at 11:51 AM
Categories: Web