Quick & Dirty -- Opening Editable Illustrator Vector Images in Fireworks

I have created a Vector image in Illustrator that I want to open in FW CS3. FW CS3 doesn't integrate well with AI files, and EPS files usually import as bitmap.

To open a vector Illustrator file in Fireworks CS3, to this:

1) In Illustrator, save as .eps, then choose a legacy Illustrator 8 version.

2) In Fireworks, import that newly saved .eps file and you should import all the paths and and shape along with it.

There may be some fine tuning involved, but at least you are not recreating the image

Quick & Dirty: Using LightBox with Image maps

Lightbox technique is very cool way to view enlarged photos, details for text etc. I use Four Level's extension but didn't know if it would work in an image map situation.

It does. I set the lightbox up to link to a normal image, allowing the jquery and other scripts to be copied over to the website directory. Then I updated the image map to contain the reference code to the popup instead of the image.

In the example below, each area mapping has only a 'rel' added, and a ref for the photo to be shown. Quite simple.



<img src="../images/dbfloorplan.jpg" name="floorplan" width="600" height="370" border="0" usemap="#floorplanMap" relalt="" />

<map name="floorplanMap" id="floorplanMap">
<area shape="rect" coords="234,14,314,81" rel="lightbox[tour]" ref="../images/office/bob.jpg" title="Estimator's Office" />
<area shape="rect" coords="357,13,518,81" rel="lightbox[tour]" href="../images/office/elizabeth.jpg" title="Elizabeth's Office" />
<area shape="rect" coords="523,13,591,147"rel="lightbox[tour]" href="../images/office/deck.jpg" title="Trex Decking" />
:
<!--- and so forth --->
:
</map>

Quick & Dirty Right SideBar ... or Not,

If you have a site that you some pages to have a sidebar and some NOT without having to create 2 similar templates (if you are using DW Template feature), you can easily set a variable in the file to turn the side bar on or off. This method creates a floating right sidebar if the variable is set, but it can be adjusted for a left sidebar as well.

There are two quick and dirty methods of doing this. The first involves a dynamic div creation by setting up the Div id to be evaluated at run time using 2 CSS ids, one for content width accommodating the sidebar and one without:


<div id="<cfoutput>#IIF(useRtSideBar eq true, DE('contentwsidebar'), DE('content'))#</cfoutput>">
Put Content Stuff Here

<div id='sidebar' style="<cfoutput>#IIF(useRtSideBar eq true, DE('display:block'), DE('display:none'))#</cfoutput>">
Put Your SideBar Stuff Here
</div>
</div>

The second is a more basic method that simply shows or hides the sidebar div based on the setting of the variable:


<head>
<cfset useRtSideBar = true>
:
</head>
<body>
<div id='banner'> banner here </div>
<div id='nav'> nav here </div>
<div id='contentwrapper'> Wraps Content and Sidebar
<cfif useRdSideBar>
<div id='rtsidebar> Sidebar </div>
</cfif>

Rest of Content goes here
</div> <!---contentwrapper --->
</body>

Quick & Dirty: Carrying Form Variables on Multi=page Forms

Since HTML is a 'stateless' environment (meaning that once you go to a new page, the information on the old page isn't saved on its own merit), multi-page forms can be a pain.

You could make either a LOOONNNGGG form that bogs down the user and risks potential session timeouts. Or use a multi-page form, taking care to manage the variables from page to page.

In Coldfusion, this is very easy. And you don't have to even keep up with all the variable names from page to page.

You can either keep up with the values on previous form pages by re-establishing them in the current page form, or you san save them as session variables.

To re-establish them as form variables on your second (and subsequent form pages), add the following to your code after your

tag. (I used the generic HTML form tag here, but CFFORM should work as well)


<cfloop list="#form.fieldnames#" index="i">
<input type='hidden' name="#i#" id='#i#' value="#evaluate(i)#" />
</cfloop>

This will recreate the form variables as hidden fields in your form.

To save them as session variables, do the similar loop:


<cfloop list="#form.fieldnames#" index="i">
<cfset "session.formdata.#i#" = "#evaluate(i)#" />
</cfloop>
(Note, Assumption is you are working in CF7/8. If using earlier versions, remember to place a scope lock around your loop)

Or... You could do both to make absolutely sure you have the data for your user:


<cfloop list="#form.fieldnames#" index="i">
<input type='hidden' name="#i#" id='#i#' value="#evaluate(i)#" />
<cfset "session.formdata.#i#" = "#evaluate(i)#" />
</cfloop>

Of course, remember to add your data validation per page, so that the user doesn't get all the way to the end of the form to find an error on page 1 :).

More Entries

BlogCFC was created by Raymond Camden. This blog is running version 5.9.1.002. Contact HHWD