hello. so my boss gave me these cfm files to convert to html. i have zero knowledge of coldfusion. could someone help me out? a link or something that has a list of html/cfm equivalents?

though from the few pages i opened the only tag i see different from html is <cfinclude>. what's the equivalent of that in html?

TIA!

Member Avatar for diafol

<cfinclude> is to include a file (e.g. template):

<cfinclude template="footer.html">

Similar to php's

include "footer.html";

or SSI's

<!--#include file="footer.html" -->

HTML cannot include a file, however you can use server side tech to do this. Typically you will need support for a particular language on your server. SSI is included in almost all (Apache, IIS ...), but you need to use a special file extension for any files that contain server side code. For SSI it can be .shtml, .shtm, or .stm
For php it is usually .php
I'm assuming that your files are .cfm. Changing this could be problematic unless you provide a redirect.

example from page contact.cfm : <cfinclude template="header2.htm">

header2.htm:

<script language="JavaScript" type="text/JavaScript">
<!--
function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}
//-->
</script>
<body onLoad="MM_preloadImages('images/btn_forward02.gif','images/btn_events02.gif','images/btn_contest02.gif')"><table width="780" cellpadding="0" cellspacing="0" align="center" border="0">
    <tr>
        <td height="4" bgcolor="#343837"></td>
    </tr>
    <tr>
        <td background="images/btn_headerbg01.gif">
            <table width="100%" cellpadding="0" cellspacing="0" border="0">
                <tr>
                  <td height="56" align="center" valign="bottom"><script type="text/javascript" language="JavaScript1.2">
            stm_bm(["ivvnair",600,"","blank.gif",0,"","",0,0,250,0,1000,1,0,0,""],this);

            stm_bp("p0",[0,4,0,0,1,4,0,0,100,"",-2,"",-2,90,0,0,"#000000","#6EB000","",3,0,0,"#ffffff"]);

            stm_ai("p0i0",[0,"HOME","","",-1,-1,0,"default.cfm","_self","","","","",0,0,0,"","",0,0,0,0,1,"#6EB000",0,"#4F8A10",0,"","",3,3,0,0,"#ffffff","#ffffff","#ffffff","#ffffff","bold 7pt Tahoma","bold 7pt Tahoma",0,0]);


            stm_aix("p0i1","p0i0",[0," | ","","",-1,-1,0,"","","","","","",0,0,0,"","",0,0,0,0,1,"#6EB000",0,"#6EB000",0,"","",3,3,0,0,"#edeae6 #666666 #666666 #edeae6","#edeae6 #666666 #666666 #edeae6"]);

            stm_aix("p0i2","p0i0",[0,"ABOUT KENJUL","","",-1,-1,0,"#"]);

            stm_bpx("p1","p0",[1,4,0,2,0,4,0,0,100,"progid:DXImageTransform.Microsoft.Wipe(GradientSize=1.0,wipeStyle=1,motion=reverse,enabled=0,Duration=0.60)",4,"progid:DXImageTransform.Microsoft.Wipe(GradientSize=1.0,wipeStyle=1,motion=forward,enabled=0,Duration=0.60)",5,50,2,3,"#999999","#ffffff"]);

            stm_aix("p1i0","p0i0",[0,"THE COMPANY","","",-1,-1,0,"thecompany.cfm","_self","","","","",0,0,0,"","",0,0,0,0,1,"#6EB000",0,"#4F8A10",0,"","",3,3,0,0,"#edeae6 #666666 #666666 #edeae6","#edeae6 #666666 #666666 #edeae6"]);

            stm_aix("p1i1","p0i0",[0,"RETAIL OUTLETS","","",-1,-1,0,"outlets.cfm","_self","","","","",0,0,0,"","",0,0,0,0,1,"#6EB000",0,"#4F8A10",0,"","",3,3,0,0,"#edeae6 #666666 #666666 #edeae6","#edeae6 #666666 #666666 #edeae6"]);

            stm_aix("p1i2","p0i0",[0,"INTERNATIONAL MARKETING","","",-1,-1,0,"intmarketing.cfm","_self","","","","",0,0,0,"","",0,0,0,0,1,"#6EB000",0,"#4F8A10",0,"","",3,3,0,0,"#edeae6 #666666 #666666 #edeae6","#edeae6 #666666 #666666 #edeae6"]);

            stm_aix("p1i3","p0i0",[0,"FACILITIES","","",-1,-1,0,"facilities.cfm","_self","","","","",0,0,0,"","",0,0,0,0,1,"#6EB000",0,"#4F8A10",0,"","",3,3,0,0,"#edeae6 #666666 #666666 #edeae6","#edeae6 #666666 #666666 #edeae6"]);

            stm_aix("p1i4","p0i0",[0,"ENQUIRY","","",-1,-1,0,"enquiry.cfm","_self","","","","",0,0,0,"","",0,0,0,0,1,"#6EB000",0,"#4F8A10",0,"","",3,3,0,0,"#edeae6 #666666 #666666 #edeae6","#edeae6 #666666 #666666 #edeae6"]);

            stm_aix("p1i5","p0i0",[0,"CONTACT US","","",-1,-1,0,"contact.cfm","_self","","","","",0,0,0,"","",0,0,0,0,1,"#6EB000",0,"#4F8A10",0,"","",3,3,0,0,"#edeae6 #666666 #666666 #edeae6","#edeae6 #666666 #666666 #edeae6"]);

            stm_ep();

            stm_aix("p0i3","p0i0",[0," | ","","",-1,-1,0,"","","","","","",0,0,0,"","",0,0,0,0,1,"#6EB000",0,"#6EB000",0,"","",3,3,0,0,"#edeae6 #666666 #666666 #edeae6","#edeae6 #666666 #666666 #edeae6"]);

            stm_aix("p0i4","p0i0",[0,"OUR RECIPES","","",-1,-1,0,"recipes.cfm","_self","","","","",0,0,0,"","",0,0,0,0,1,"#6EB000",0,"#4F8A10",0,"","",3,3,0,0,"#edeae6 #666666 #666666 #edeae6","#edeae6 #666666 #666666 #edeae6"]);

            stm_bpx("p2","p1",[1,4,0,2,0,4,0,0,100,"progid:DXImageTransform.Microsoft.Wipe(GradientSize=1.0,wipeStyle=1,motion=reverse,enabled=0,Duration=0.60)",4,"progid:DXImageTransform.Microsoft.Wipe(GradientSize=1.0,wipeStyle=1,motion=forward,enabled=0,Duration=0.60)",5,50,2,3,"#999999","#ffffff"]);

            stm_aix("p2i0","p0i0",[0,"LIFE RECIPE","","",-1,-1,0,"life.cfm","_self","","","","",0,0,0,"","",0,0,0,0,1,"#6EB000",0,"#4F8A10",0,"","",3,3,0,0,"#edeae6 #666666 #666666 #edeae6","#edeae6 #666666 #666666 #edeae6"]);

            stm_aix("p2i1","p0i0",[0,"DIET RECIPE","","",-1,-1,0,"diet.cfm","_self","","","","",0,0,0,"","",0,0,0,0,1,"#6EB000",0,"#4F8A10",0,"","",3,3,0,0,"#edeae6 #666666 #666666 #edeae6","#edeae6 #666666 #666666 #edeae6"]);

            stm_aix("p2i2","p0i0",[0,"NOURISH RECIPE","","",-1,-1,0,"nourish.cfm","_self","","","","",0,0,0,"","",0,0,0,0,1,"#6EB000",0,"#4F8A10",0,"","",3,3,0,0,"#edeae6 #666666 #666666 #edeae6","#edeae6 #666666 #666666 #edeae6"]);

            stm_aix("p2i3","p0i0",[0,"HEALTH RECIPE","","",-1,-1,0,"health.cfm","_self","","","","",0,0,0,"","",0,0,0,0,1,"#6EB000",0,"#4F8A10",0,"","",3,3,0,0,"#edeae6 #666666 #666666 #edeae6","#edeae6 #666666 #666666 #edeae6"]);

            stm_aix("p2i4","p0i0",[0,"KIDS RECIPE","","",-1,-1,0,"kids.cfm","_self","","","","",0,0,0,"","",0,0,0,0,1,"#6EB000",0,"#4F8A10",0,"","",3,3,0,0,"#edeae6 #666666 #666666 #edeae6","#edeae6 #666666 #666666 #edeae6"]);

            stm_ep();

            stm_aix("p0i5","p0i0",[0," | ","","",-1,-1,0,"","","","","","",0,0,0,"","",0,0,0,0,1,"#6EB000",0,"#6EB000",0,"","",3,3,0,0,"#edeae6 #666666 #666666 #edeae6","#edeae6 #666666 #666666 #edeae6"]);

            stm_aix("p0i6","p0i0",[0,"HOW TO PREPARE","","",-1,-1,0,"#","_self","","","","",0,0,0,"","",0,0,0,0,1,"#6EB000",0,"#4F8A10",0,"","",3,3,0,0,"#edeae6 #666666 #666666 #edeae6","#edeae6 #666666 #666666 #edeae6"]);

            stm_bpx("p3","p2",[1,4,0,2,0,4,0,0,100,"progid:DXImageTransform.Microsoft.Wipe(GradientSize=1.0,wipeStyle=1,motion=reverse,enabled=0,Duration=0.60)",4,"progid:DXImageTransform.Microsoft.Wipe(GradientSize=1.0,wipeStyle=1,motion=forward,enabled=0,Duration=0.60)",5,50,2,3,"#999999","#ffffff"]);

            stm_aix("p3i0","p0i0",[0,"INGREDIENTS","","",-1,-1,0,"ingredients.cfm","_self","","","","",0,0,0,"","",0,0,0,0,1,"#6EB000",0,"#4F8A10",0,"","",3,3,0,0,"#edeae6 #666666 #666666 #edeae6","#edeae6 #666666 #666666 #edeae6"]);

            stm_aix("p3i1","p0i0",[0,"PROCESS","","",-1,-1,0,"process.cfm","_self","","","","",0,0,0,"","",0,0,0,0,1,"#6EB000",0,"#4F8A10",0,"","",3,3,0,0,"#edeae6 #666666 #666666 #edeae6","#edeae6 #666666 #666666 #edeae6"]);

            stm_aix("p3i2","p0i0",[0,"WAYS TO CONSUME","","",-1,-1,0,"consume.cfm","_self","","","","",0,0,0,"","",0,0,0,0,1,"#6EB000",0,"#4F8A10",0,"","",3,3,0,0,"#edeae6 #666666 #666666 #edeae6","#edeae6 #666666 #666666 #edeae6"]);

            stm_aix("p3i3","p0i0",[0,"REACTION","","",-1,-1,0,"reaction.cfm","_self","","","","",0,0,0,"","",0,0,0,0,1,"#6EB000",0,"#4F8A10",0,"","",3,3,0,0,"#edeae6 #666666 #666666 #edeae6","#edeae6 #666666 #666666 #edeae6"]);

            stm_ep();

            stm_aix("p0i7","p0i0",[0," | ","","",-1,-1,0,"","","","","","",0,0,0,"","",0,0,0,0,1,"#6EB000",0,"#6EB000",0,"","",3,3,0,0,"#edeae6 #666666 #666666 #edeae6","#edeae6 #666666 #666666 #edeae6"]);

            stm_aix("p0i8","p0i0",[0,"SECRET OF NATURAL INGREDIENTS","","",-1,-1,0,"secret.cfm","_self","","","","",0,0,0,"","",0,0,0,0,1,"#6EB000",0,"#4F8A10",0,"","",3,3,0,0,"#edeae6 #666666 #666666 #edeae6","#edeae6 #666666 #666666 #edeae6"]);

            stm_aix("p0i9","p0i0",[0," | ","","",-1,-1,0,"","","","","","",0,0,0,"","",0,0,0,0,1,"#6EB000",0,"#6EB000",0,"","",3,3,0,0,"#edeae6 #666666 #666666 #edeae6","#edeae6 #666666 #666666 #edeae6"]);

            stm_aix("p0i10","p0i0",[0,"CONTACT US","","",-1,-1,0,"contact.cfm","_self","","","","",0,0,0,"","",0,0,0,0,1,"#6EB000",0,"#4F8A10",0,"","",3,3,0,0,"#edeae6 #666666 #666666 #edeae6","#edeae6 #666666 #666666 #edeae6"]);

            stm_em();

            </script><a href="forward.cfm" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Image1','','images/btn_forward02.gif',1)"><img src="images/btn_forward01.gif" name="Image1" width="191" height="20" border="0"></a>&nbsp;<img src="images/btn_sep.gif" width="4" height="20">&nbsp;<a href="events.cfm" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Image3','','images/btn_events02.gif',1)"><img src="images/btn_events01.gif" name="Image3" width="52" height="20" border="0"></a>&nbsp;<img src="images/btn_sep.gif" width="4" height="20">&nbsp;<a href="contest.cfm" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Image5','','images/btn_contest02.gif',1)"><img src="images/btn_contest01.gif" name="Image5" width="61" height="20" border="0"></a></td>
        </tr>
            </table>
      </td>
    </tr>
</table>

would it be as easy as just changing the contact.cfm to contact.php remove <cfinclude template="header2.htm"> and replace with <?php include 'header2.htm' ?>. and with all the other .cfm? just poking it with a stick here. --white flag--

I would convert everything to PHP, in your code above I see nothing that would prevent from changing to .html.. All I see is javascript and html. Now, the above code is out dated in my opinion, but it will still work.

One thing you can do is copy and page the header, body, footer into a new html page and clean up any CF code you find. This will take alot of time depending on all the pages you have. Also you have to think about any dynamic data, or anything coming from a database.. You may have to setup a new database script and use php as well to handle that problem if should arise.

sounds doable but i have no idea where to start. coz this website is already up and running but its in cfm and as i said now the company doesn't want it in cfm so my boss asked me if i could convert it into html/php. this is the site

that page has these sorta like 2 buttons which when clicked redirects to default.cfm but seems to be controlled by javascript or something:

<td colspan="2" height="290">
    <script type="text/javascript" >         AC_FL_RunContent('codebase','http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0','border','0','width','651','height','290','src','intro','movie','intro','name','obj1','quality','high','wmode','transparent','pluginspage','http://www.macromedia.com/go/getflashplayer');
    </script> 
    <noscript>
        <object classid="clsid:D27CDB6E-AE6D-11CF-96B8-444553540000" id="obj1" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0" border="0" width="651" height="290">
            <param name="movie" value="intro.swf">
            <param name="quality" value="High">
            <param name="wmode" value="transparent">
            <embed src="intro.swf" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" name="obj1" width="651" height="290" quality="High" wmode="transparent">
        </object>
    </noscript>
</td>

and so i am lost as to how its redirecting to default.cfm with no mention of default.cfm in the page.

Member Avatar for diafol

No this is flash. None of this needs to change. Actually I hate flash so if you could get rid of it, fine, but that code in .html file would be ok.

You need to look out for <cf..> tags - that's where all the intersting stuff is going on.

You provide a link, but we shouldn't really see anything other than js, styling and html in the source.

don't think i am allowed to get rid of the flash haha. but thats the thing in the index.htm file there isn't any <cf..> tag, i used Find.. to search. even default.cfm isn't mentioned.

e0a59c8c724eae9ced76b3151078eab4

see Sunseeds and Sunrise. when either name is hovered the background changes, im guessing that is the flash working. then when either name is clicked the page redirects to either /Sunseeds/default.cfm or /Sunrise/index.htm. Im trying to figure out how that works. in this page, index.htm no <cf..> or default.cfm or sunrise or sunseeds. unless im missing something major here.

index.htm

<html>

<head>
    <meta http-equiv="Content-Language" content="en-us">
    <meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
    <title>KENJUL CORPORATION SDN BHD</title>
    <link href="js/class.css" rel="stylesheet" type="text/css">
    <script language="javascript" src="js/time2000.js"></script>
    <script src="js/AC_RunActiveContent.js" type="text/javascript"></script>
</head>

<body>

<div align="center">
    <table border="0" cellpadding="0" cellspacing="0" width="651" id="table1">
        <tr>
            <td width="50%">
            <img border="0" src="pic/logo.gif" width="126" height="48"></td>
            <td width="50%" valign="bottom">
            <p align="right">
            <img border="0" src="pic/comname.gif" width="229" height="18" vspace="5"></td>
        </tr>
        <tr>
            <td colspan="2" height="15"></td>
        </tr>
        <tr>
            <td colspan="2" height="290">
                <script type="text/javascript" >
                AC_FL_RunContent('codebase','http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0','border','0','width','651','height','290','src','intro','movie','intro','name','obj1','quality','high','wmode','transparent','pluginspage','http://www.macromedia.com/go/getflashplayer');
                </script> 
                <noscript>
                    <object classid="clsid:D27CDB6E-AE6D-11CF-96B8-444553540000" id="obj1" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0" border="0" width="651" height="290">
                        <param name="movie" value="intro.swf">
                        <param name="quality" value="High">
                        <param name="wmode" value="transparent">
                        <embed src="intro.swf" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" name="obj1" width="651" height="290" quality="High" wmode="transparent">
                    </object>
                </noscript>
            </td>
        </tr>
        <tr>
            <td colspan="2" height="90">
            <p align="center"><a href="Yokomon/index.htm">
            <img border="0" src="pic/banner_Yokomon.gif" width="468" height="60" alt="Yokomon - Japanese Favourite Ice-Cream"></a></td>
        </tr>
        <tr>
            <td colspan="2">
            <p align="center"><span class="con11A"><b>KENJUL CORPORATION SDN BHD</b> 
            (Reg. No. 643312-K )<br>
            Wisma Kenjul,
            29-2, Jalan Sg. Besi Indah 5/2, Taman Sg. Besi Indah, 43300 Balakong, 
            Selangor, Malaysia.<br>
            Tel : 603 8941 8131&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Fax : 603 8942 
            3131&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Email :
            <a href="mailto:info@kenjul.com">info@kenjul.com</a></span></td>
        </tr>
        <tr>
            <td colspan="2" height="20"></td>
        </tr>
        <tr>
            <td colspan="2">
            <p align="center"><span class="con11A">Copyright ® KENJUL 
            CORPORATION SDN BHD. All rights reserved.<br>
        <font color="#898989">Powered by </font>
        <a target="_blank" href="http://www.equatosolutions.com">
        <font color="#898989">Equato Solutions Sdn Bhd</font></a></span></td>
        </tr>
    </table>
</div>

</body>

</html>
Member Avatar for diafol

From what I can see all the pages are htm and that horrible flash thing is a joke. Far better to have a js carousel or similar. However, the company probably paid a lot of money for it (about 15 years ago!!!). All the flash click does is move you on (like a normal link).

So I'm a bit lost as to where you need help. If there's no cf, what do you need?

now i just need to know how it redirects to default.cfm because i've already changed it to default.php but it still gets redirected to default.cfm.

Member Avatar for diafol

Use a text search for '.cfm' in the source code (in an editor/IDE).
Possibly you have something in a htaccess file.

im using sublime text 2. did the search for '.cfm' nothing came up.

Member Avatar for diafol

Not being a flash developer, I'm a bit lost, but I'm assuming that the default.cfm is hard coded into the flash file itself. You need to edit the flash file and change the url. The only other way I can think of if this isn't possible is to set up a permanent redirect in apache .htaccess for all default.cfm to go to default.php (in the Sunseeds directory):

Redirect 301 /Sunseeds/default.cfm http://www.kenjul.com/Sunseeds/default.php
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.