Loading ...
Sorry, an error occurred while loading the content.

Images to HTML - Modified version

Expand Messages
  • Mike Breiding
    Greetings, I modified the Images to HTML clip in the Utilities library Below is what I am using now. I wish to reinstate the ability to have the width= xxx
    Message 1 of 2 , Sep 25, 2006

      I modified the Images to HTML clip in the Utilities library
      Below is what I am using now.
      I wish to reinstate the ability to have the width="xxx" height="xxx"
      border="0" alt=" included and add the "title" tag as well. Why I removed
      these from the original clip is beyond me!
      I also need to have the image name replace the "-------------Insert photo
      text here------------- " in this line :
      <div id="content">^p<p>-------------Insert photo text here-------------

      My attempts at fixing this myself have resulting in a series of big messes.
      If anyone can help I would appreciate it.

      My modified version of Images to HTML follows.

      ;This Clip will create a web page based on all the images that match the
      specified criteria. You can then easily preview all the images in your
      favorite browser

      ;Prompt user with Clip wizard to determine which image files should be
      listed and how the page should be built

      ^!Set %PageTitle%=^?{Page title=Images}; %FileName%=^?{Web page file name
      (no path or extension)=Images}; %Directory%=^?{(T=D)Directory to search};
      %Specs%=^?{File Specs=*.gif;*.png;*.jpg}; %Sorting%=^?{(T=C)File
      sorting==Unsorted|_Name|Type|Date|Size}; %Reverse%=^?{(T=C)Descending

      ;End procedure if the user canceled the Clip wizard
      ^!IfCancel Exit

      ^!SetPasteIndent Off
      ;Set variable for sorting parameter
      ^!Set %Sorting%=^%Reverse%^%Sorting%

      ;Close the output file if there is one open in NoteTab
      ^!Close "^%Directory%^%FileName%.htm"

      ;Create a new document with specified name for web page
      ^!Set %KeepNameFormat%=^$GetNameFormat$
      ^!SetNameFormat ^%Directory%^%FileName%.htm
      ^!ToolBar New Document
      ^!SetNameFormat ^%KeepNameFormat%

      ;Turn word wrap off
      ^!SetWordWrap OFF

      ;Insert web page header and title
      ^!InsertHtml <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0
      Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
      ^!InsertHtml <html xmlns="http://www.w3.org/1999/xhtml">
      ^!InsertHtml ^P<HEAD>
      ^!InsertHtml <meta name="description" content="Photos and commentary about
      Florida State Parks, Highlands Hammock State Park, Civilian Conservation
      Corps and epic road trips" />
      ^!InsertHtml <meta name="keywords" content="Highlands Hammock State Park,
      florida, florida state parks, boating, kayaking, rivers, cycling, trees,
      birds, hiking" />
      ^!InsertHtml <meta http-equiv="content-type" content="text/html;
      charset=us-ascii" />

      ; TITLE
      ^!InsertHtml ^P<TITLE>^%PageTitle%</TITLE>^P
      ; CSS
      ^!InsertHtml <link rel="stylesheet" href="sampler.css" type="text/css" />

      ^!InsertHtml <!--[if IE]><style type="text/css">html .wrapper, html
      .columns-float,html .menu, html .content,html h2 {p\osition:
      ^!InsertHtml </HEAD>^P<BODY>^P

      ; Wrapper DIV and TITLE conent
      ^!InsertHtml <div id="wrapper"><div

      ;Insert GALLERY DIV
      ^!InsertHtml <div id="gallery">^p

      ;Retrieve first image name that matches specified search criteria
      ^!Set %ImageFullName%=^$GetFileFirst(^%Directory%;"^%Specs%";^%Sorting%)$

      ;If the image name is empty (no more matching files), leave the loop
      ^!IfTrue ^$IsEmpty(^%ImageFullName%)$ ExitLoop

      ;Copy image name without path to variable
      ^!Set %ImageName%=^$GetFileName(^%ImageFullName%)$

      ;Copy image width and height information into variables
      ;^!Set %ImgWidth%=^$GetImgWidth(^%ImageFullName%)$;
      ;Insert image tag and information into document

      ^!InsertHtml <IMG SRC="^$StrLower("^%ImageName%")$" >^p

      ;Insert CONTENT DIV
      ^!InsertText <div id="content">^p<p>-------------Insert photo text
      here--------------------------Insert photo text here-------------
      ;Get next matching image name and go back to start of loop
      ^!Set %ImageFullName%=^$GetFileNext$
      ^!GoTo StartLoop

      ;Close the file-find variable to restore system resources

      ;Close GALLERY DIV
      ^!InsertHtml </div>^p^p

      ;Insert footer
      ^!InsertHtml <div id="footer">^p
      ^!InsertHtml Photos and text © <a
      Breiding</a> ^$GetDate(mmmm dd, yyyy -- tt)$
      ^!InsertHtml ^p</div>
      ;close WRAPPER div
      ^!InsertHtml </div>
      ^!InsertHtml </BODY>^P</HTML>^P

      ;Place cursor back to top of page
      ^!Jump Text_Start

      [Non-text portions of this message have been removed]
    Your message has been successfully submitted and would be delivered to recipients shortly.