| <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.
| <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.
.co.uk are two different sites. Thats why you should set up a permanent redirect (technically called a “301 redirect”) between these sites. Once you do that, you will get full search engine credit for your work on these sites.
| Options +FollowSymLinks RewriteEngine on # RewriteCond %{HTTP_HOST} ^yourdomain\.co.uk RewriteRule (.*) http://www.yourdomain.co.uk/$1 [R=301,L] |
If you open a document window (PC) / finder window (Mac) you may not see the file this is because operating systems treat the .htaccess file as a hidden file. If you turn on show hidden files you will be able to see it.
Many control now have this feature, one that we use on Host Media UK is cPanel and this feature is on the control panel.
Enjoy!
We are going to look into using the ColdFusion components known as CFC’s and how easy they can make your web applications.
Some benefits of using CFCs
The tutorial
Our first step is to create a database & datasource, you can find all SQL & source files with the ZIP file attached to this thread (You may need to login to access).
So I thought I would post this code as it has come in handy on all my projects for major websites:
| /* This code goes on the start on the movie clip or root The buttons instance is called ‘actionBtn’ on line 2 of the AS you will see this */ var theCase:String = “doPlay”; |
As Sessions is a big deal I have decided to make parts to it. In part 1 we are going to see how to detect if a session is undefined and to create it.
First thing you need to know is that sessions uses structures, you can have multiply structures for your website for different things.
We are going to work up a simple login system using sessions. We are calling the structure loggedin. The first step is to see if the session has been created, so we will need some if statements for the session detect:
| <cfif not isDefined(‘SESSION.loggedin’)> </cfif> |
Next we want to create the session if its not defined, the code above is shown below but with cfset tags:
| <cfif not isDefined(‘SESSION.loggedin’)> <cfset SESSION.loggedin = StructNew()> <cfset SESSION.loggedin.username = test> </cfif> |
Now what we have asked coldfusion to do is create a new structure (StructNew) with ‘SESSION.loggedin’ as the structure name. After this we want to populate the session structure with a value within the ‘username’ session. We have just used test for now but we go onto bringing in database from a database to work with a login script.
I was searching for an easy way to create thumbnails for this blog and came across a really easy site to use packed with features.
Thumbalizr: http://www.thumbalizr.com/
“Online and API interfaces have been improved with some new features and better data handling. To make use of the new features, you’ll have to sign up at least for the free standard API. After Sign up, the online version is enhanced by capture delay, image quality and encoding (jpg, png)”
cPanel Email Account Creator [eac]
The cPanel Email Account Creator is the perfect script to setup a Hotmail / Yahoo email system to allow your users to signup and start sending emails to friends and family with your hosting.
Current Release: 1.6.2 (Updated 6 November 2008)
The latest update (V1.6.2) fixes many of the issues reported by customers regarding the problems with creating the accounts through cPanel. The issue is related to the settings used within the script which is integrated into cPanel.
If you are running on a version pre 1.6.2 please contact us with your Share-It reference number so AeonCube development team can send you the updated version. Contact Request
Price
£5 (Excluding VAT) + £0.95 (VAT)
AeonCube Networks main designers have been talking about a full corporate update of the company website. This would include integrated PayPal systems for all product ordering and user account management.
New areas such as ticket support systems and members product download areas would be opened up to allow customers to feel more at home using the corporate site. Some designs have been placed but the main areas the teams wants to improve on is the integrated systems on the site.
Branding
The AeonCube Networks branding would stay the same and basic styles would be kept but layout and systems would be greatly improved.
HOSTING FIRM FASTHOSTS sent a letter to its customers warning them a server had been hacked.
The firm said: “We have recently discovered evidence of a network intrusion involving a Fasthosts server. We have reason to believe that the intruder has gained access to our internal systems, and that this may have in turn given them access to your username and some service passwords.”
As a precaution, it is asking customers to change main account passwords, email passwords, FTP passwords and MySQL and MS SQL database passwords.
It added: “We recognise that this may cause some inconvenience and concern, and for that we sincerely apologise. Please be assured that your account security is extremely important to us, and we have taken every step possible to secure your information against any future intrusion attempts.”
I am going to be going into how to get the current date & time with coldfusion, dont worry it is very simple to do and does not require anything special like a datasource.
Date
First we are going to be working with getting the date onto your page.
Step 1
First within your Application.cfm/.cfc we want to add the following cfset to get the date. If you wish you can add this to the same page as the output of the date but it is always nice to have an application file.
| <cfset TheDate = Now()> |
Step 2
The following code mainly formats how the date gets displayed, the sample code below will output the date in the format of YYYY/MM/DD but you can easily turn this into: DD/MM/YYYY.
| <cfoutput> #DateFormat(TheDate, ‘yyyy-mm-dd’)# </cfoutput> |
Time
Step 1
Just like the date we want to add the following code to detect what the current time is
| <cfset TheTime = Now()> |
Step 2
Again same as the date we want to format the time in to something we can display and read on screen. There is something that is very different to the date and that is using capitol letters, when you have for example ‘HH’ instead of ‘hh’ for the hour to are saying to the coldfusion to use a 24 hour system with the hours. Below we have set the time to display in a 24 hour clock with HH:MM:SS you can take out the ‘SS’ if you do not wish to display the seconds.
| <cfoutput> #TimeFormat(TheTime, ‘HH:mm:ss’)# </cfoutput> |
Thats it for time and dates