LiveZilla Live Help

Our Online Blog

We have put together this blog to help, inform and inlight users regarding the internet, development and design. We also post all our network updates here to make sure you keep up to date with whats going on around you.

Search Blog

Posts Tagged ‘coldfusion’

Polar CMS in alpha testing

Wednesday, March 10th, 2010

After 3 months of development first staging of the Polar CMS script has been released to our testers / designers to start playing with.

Process of our testing

  • Running the install program to setup the databases and user accounts
  • Use the basic functions of the CMS:
    - Add pages
    - Add page elements to change
    - Use the WYSIWYG editor
    - Apply code to front end site to test speeds
  • Consult with development team to see how things can be improved

Next steps

  • Design second simple admin template / style sheet for simple viewing (Less images / design factor)
  • Develop modules system ready for alpha testing as this is still in development as one of the main features of the systems
  • Speed & load testing to make sure the script uses the smallest amount of CPU

We will be updating the Polar CMS website soon with some of this information. Also a new website will be released soon.

Visit polarcms.com

Using ColdFusion Custom Tags (cf_)

Thursday, January 7th, 2010

A new part of ColdFusion our development team has been looking into more is the custom tags (cf_). Soon to be used with the Polar CMS (Visit official site), custom tags allow you to have scripts and coding within a tag that can be called from a cfm page as shown below:

<!— CFM Page (cfcustomtag_caller.cfm)—>
<!DOCTYPE html PUBLIC “-//W3C//DTD XHTML 1.0 Transitional//EN” “http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd”>
<html xmlns=”http://www.w3.org/1999/xhtml”>
<head>
<meta http-equiv=”Content-Type” content=”text/html; charset=UTF-8″ />
<title>Call Tag</title>
</head>

<body>
<cf_cfcustomtag customVar=”test”>
<p>SOME HTML</p>
<cf_cfcustomtag form=”testFormCode”>
</body>
</html>

As you can see we are using a new tag <cf_cfcustomtag> with custom variables (customVar=”test”). These variables can be picked up within our custom tag cfm file we are about to create.

<!— CFM Page (cfcustomtag.cfm)—>
<cfoutput>
<cfif isDefined(“ATTRIBUTES.customVar”)>
<h1>#Now()#</h1>
<p>#ATTRIBUTES.customVar#</p>
</cfif>
<cfif isDefined(“ATTRIBUTES.form”)>
<p>#ATTRIBUTES.form#</p>
</cfif>
</cfoutput>

The above is a simple CFM file which has HTML and ColdFusion code. As you will notice we have named the file ‘cfcustomtag.cfm’ which is the same name as the tag: <cf_cfcustomtag> just without the cf_ at the start. Coldfusion will look for any files with the same naming tag.

You may ask why not use a <cfinclude> tag, but with cfincludes they can be slower and you are not able to reuse the cfinclude as easy as a cf_ custom tag. With custom tags you can lower the amount of code you need by using the extra variables (ATTRIBUTES).

Hope you enjoy using custom cf_ tags. Feel free to comment and add your code to show better ways of using cf_ tags. You may also want to research <cfmodule> tags.

Detecting iPhone, Blackberry etc using ColdFusion

Sunday, March 29th, 2009

Many of our clients have been asking about detecting if a user is using a blackberry or iPhone etc to view their website and redirect to a mobile version of their websites. Well we have put together a little bit of code to do this:

Code example:

<cfif findNoCase('blackberry', CGI.HTTP_USER_AGENT)>
<cflocation url="http://blackberry.yourdomain.com" addtoken="no">
<cfelseif findNoCase('iphone', CGI.HTTP_USER_AGENT)>
<cflocation url="http://iphone.yourdomain.com" addtoken="no">
<cfelseif CGI.HTTP_ACCEPT CONTAINS "text/vnd.wap.wml">
<cflocation url="http://wap.yourdomain.com" addtoken="no">
</cfif>

Hope you enjoy this code snippet.

Corporate Site Re-Design

Tuesday, March 17th, 2009
AeonCube Networks Re-Design

Over the past 3 months the AeonCube Network team has been designing, developing and researching a new website design for the top level of our network.

We are very happy to say this has now been finished and with only small after live amends to be finished the site is running online now.

The new site comes with more features and better user interface to allow our customers / clients to login and access their brought products.

As well as the new design we are proud to say we have upgraded our US Linux ColdFusion from 7 to 8 so we hope to use some of the great features from ColdFusion 8 with the site.

More features are planned for the website in the near future such as more paid items to be downloadable and paid through the website.

Hope you enjoy the new design, please visit: http://www.aeoncubenetworks.com/

Using Coldfusion tag: CFFEED

Friday, March 6th, 2009

Using the ‘cffeed’ allows you to read any websites RSS feed and display it within your coldfusion page. The ‘cffeed’ tag is a very easy tag to use and can be very handy when building a RSS display website.

Code to be placed at the top of .cfm page:

<cffeed action=”read” source=”http://www.hostmediauk.com/blog/?feed=rss2″ name=”myRSSFeed”>

Code to be placed within the <body> tags:

<cfloop from=”1″ to=”#ArrayLen(myRSSFeed.item)#” index=”i”>

<cfoutput>
#myRSSFeed.item[i].description.value#<br />
</cfoutput>

</cfloop>

You can view this working on our Coldfusion 8 servers in the UK at:
http://www.hostcoldfusion.co.uk/

Enjoy using RSS feeds on your website.

Having problems with not working with images

Tuesday, December 9th, 2008

When working with some of our clients on windows servers we have noticed Coldfusion has some problems when working with images for cfdocument. The Coldfusion shows a 60 second time out error.

We found out that it was due to the image location as Coldfusion appears to pull all the files onto is main application so full fold paths are required.

Normally using:

<img src=”/images/image.jpg”/>

Instead of using the HTTP you need to use the file system path:

<img src=”file:///C:\drivefolder\wwwroot\sitename\images\image.jpg“/>

This corrects the issues with Coldfusion 7+ (Problem still in CF 8).

[Tutorial] Coldfusion Detect mobile device

Tuesday, November 25th, 2008
Coldfusion Detect mobile device

This code detects if the browsing media is a mobile/wap device and redirects to a new directory.

Quote:
<CFIF CGI.HTTP_ACCEPT CONTAINS “text/vnd.wap.wml”>
<CFLOCATION URL=”/wap/index.cfm”>
</CFIF>

NOTE: This is untested but I have seen this code used on live projects.