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

HTML template ability to remember color values clip

Expand Messages
  • Alan C.
    Hello, Here s a clip that if you manually edit your HTML library and replace contents of Body clip therein with content of this next/my_file s_code. Make a
    Message 1 of 1 , Jun 11, 2002
      Hello,

      Here's a clip that if you manually edit your HTML library and replace contents of "Body" clip therein with content of this next/my_file's_code.

      Make a backup copy of your HTML clip library before you start on this.

      Only the body clip needs this modification. No other modification necessary.

      After you've completed as per above, the first time that you use the HTML template, the colors defaults will be blank. Just choose colors and they will be remembered.

      Then, the next time that you use the HTML template all your previously chosen colors will be recalled as defaults.

      So, whatever colors you had chosen the previous time are now the default colors for your current session. And to choose different colors in the current session makes it remember these colors now as defaults for the next session.

      Profiles anybody? Beyond the scope of this little article, a future project might be to create or make 4 ability to save or have remembered say about up to as many as 5 different color profiles.

      body_clip_code.zip

      http://users.cwnet.com/acummi/proj/

      hopefully you could right click on the file and choose save target as.

      But, that file is not uploaded yet. My local ISP's User's section is temporarily down. I'll try to upload the zip file tomorrow some time.

      Meanwhile, I include the clip next. But it has 8 long lines so beware of possible email accrued line break(s). Have fun. Alan.

      ; H="Body"
      ; 6-11-2001 AC Alan C's remember the color values body clip
      ; remembers color values, saves them to ini
      ; make a backup of your HTML library then all of this clip code
      ; replaces all code in the HTML library's body clip
      ^!Set %HasBody%=False
      ; next 2 lines/clips initialize or set variables for colors
      ^!Clip "Color Codes"
      ^!Clip "Basic Color Codes"
      ; next 3 lines make 4 ability to have the set default value section
      ^!Set %LnkBasClrs%=^%BasicColors%
      ^!Set %VlnkBasClrs%=^%BasicColors%
      ^!Set %AlnkBasClrs%=^%BasicColors%
      ; next 5 lines are the set default value section
      ^!Set %AllColors%=^$SetDefaultValue(^%AllColors%;^$GetValue(HTML_bgclr)$)$
      ^!Set %BasicColors%=^$SetDefaultValue(^%BasicColors%;^$GetValue(HTML_txtclr)$)$
      ^!Set %LnkBasClrs%=^$SetDefaultValue(^%LnkBasClrs%;^$GetValue(HTML_lnkclr)$)$
      ^!Set %VlnkBasClrs%=^$SetDefaultValue(^%VlnkBasClrs%;^$GetValue(HTML_vlnkclr)$)$
      ^!Set %AlnkBasClrs%=^$SetDefaultValue(^%AlnkBasClrs%;^$GetValue(HTML_alnkclr)$)$
      ; next is a long line which is the wizard
      ^!Set %BgFil%=^?{(T=O;F="Image Files|*.gif;*.png;*.jpg;*.jpeg;*.jpe")Background &file name=^$GetValue(HTML_bgfil)$}; %BgClr%=^?{&Background Color=^%AllColors%}; %TxtClr%=^?{&Text Color=^%BasicColors%}; %LnkClr%=^?{&Link Color=^%LnkBasClrs%}; %VlnkClr%=^?{&Visited Link Color=^%VlnkBasClrs%}; %AlnkClr%=^?{&Active Link Color=^%AlnkBasClrs%}
      ; next 6 lines save the remembered values to the ini file
      ^!SaveValue HTML_bgclr=^%BgClr%
      ^!SaveValue HTML_txtclr=^%TxtClr%
      ^!SaveValue HTML_lnkclr=^%LnkClr%
      ^!SaveValue HTML_vlnkclr=^%VlnkClr%
      ^!SaveValue HTML_alnkclr=^%AlnkClr%
      ^!SaveValue HTML_bgfil=^%BgFil%
      ^!IfCancel End
      ; next section tests and makes able 2 have an empty/no background file field
      ^!IfFalse ^%BgFil% NoBakGrnd
      ^!InsertHtml <body bgcolor="^%BgClr%" text="^%TxtClr%" link="^%LnkClr%" vlink="^%VlnkClr%" alink="^%AlnkClr%" background="^%BgFil%">^P^P
      ^!Set %HasBody%=True
      ^!Goto end
      :NoBakGrnd
      ^!InsertHtml <body bgcolor="^%BgClr%" text="^%TxtClr%" link="^%LnkClr%" vlink="^%VlnkClr%" alink="^%AlnkClr%">^P^P
      ^!Set %HasBody%=True
      ; ------<end<<
    Your message has been successfully submitted and would be delivered to recipients shortly.