new to Contentbox

Hi all,

I am completely new to Content Box. I have just downloaded it. I have created a DB and Datasource and am at the point to upload the content from the extracted file to the root. My question is should I just upload all extracted files to the root as they are or should I upload the files within the www map to the root?

Thank you in advance

Hi Donald,

You can upload the content of the zip into the root of your webspace 1:1. After this, open application.cfc with you editor and replace this.datasource = “contentbox”; with your datasource, e.g. this.datasource = “MyDatasource.”;

After this you can start you site and the setup UI of ContentBox will welcome you.

Cheers

Hi Martin,

Thank you very much for the reply. Sorry to botter you but to which application.cfc file are you reffering? The only one I found was in WWW/ROOT but it is all in grey (one big comment)?

Cheers,
Donald

Hello Donald,

Yes, this is the right one. With which editor did you open the file? Some editors with syntax highlighting are in trouble with cfscript based syntax.

Hi Martin,

I opened it with Dreamweaver. Should I open it wit another editor?

Chers, Donald

I’m not really familiary with DreamWeaver. I can imagine, that DreamWeaver might be not able to display this cfc right. On the other hand, you are using Dreamweaver as your CFML-Development UI?

To make it short: Open application.cfc with a simple text editor like notepad, edit the datasource and try run the setup.

Yeah Dreamweaver doesn’t have syntax highlighting for script based components. However it does have it for script code within the tags.

If you are doing a lot of CFML coding I would recommend ColdFusion Builder, there is a free version and you can use the ColdBox Platform Utilities and ContentBox CMS Utilities extensions which are great time savers.

Richard

I didn’t know, that ColdFusion Builder has a free edition, thanks for sharing this. Using ColdBox Platform Utilities and ContentBox CMS Utilities would be great.
Actually i’m using Sublime Text, which is quite good.

Yeah just let the 30 day trial run out and it switches to the Express Edition I have a licensed version so I’m not sure what features aren’t in the Express version. I tend to use Sublime Text for all my front end stuff and CF Builder for everything else.

I haven’t used DreamWeaver in a few years, but for what it’s worth, the new Creative Cloud version has dropped support for CF. I think they’re trying to get people to move over to CFBuilder where the CF time is devoting their time.

You should be able to simply look at the file and figure out if it is actually commented out or if the code formatting is just messed up.

<~— Multiline tag comment —>
/* Multiline script comment */

:slight_smile:

Thanks!

~Brad

ColdBox Platform Evangelist
Ortus Solutions, Corp

E-mail: brad@coldbox.org
ColdBox Platform: http://www.coldbox.org
Blog: http://www.codersrevolution.com

Yeah, I’m using the free version of CF Builder. (I won’t be after CF Summit in Vegas when I get my free copy :slight_smile:

Basically, just download the trial from Adobe’s site and never register it. It will still bug you every time you start it, but just click through and you’re good. It has some limited functionality, but for the most part everything works.

Thanks!

~Brad

ColdBox Platform Evangelist
Ortus Solutions, Corp

E-mail: brad@coldbox.org
ColdBox Platform: http://www.coldbox.org
Blog: http://www.codersrevolution.com

Hi Brad. I.M.O. I took all comments out but it still looks the same. There are a lot of comments like I usually see in Javascript!

e.a. //comment comment comment

and the funny thing is the function starts like this:

component{

Never seen tis before. Do you or someone else has the normal Application.cfc file

Thanks,
Donald

Hello Donald,

and the funny thing is the function starts like this:

Maybe your learned today the alternate way how to program in CFML instead of using the tag based syntax. This is the script based syntax, which smells like JS, but it’s CFML.
Ask Google by searching “cfml scripting language” and you will enlighted soon.

Is your ContentBox now up und running?

Cheers

// is a single line comment in CF Script.

and the funny thing is the function starts like this: component{

That’s not a function declaration, that’s a component declaration.

Never seen tis before. Do you or someone else has the normal Application.cfc file

That is a normal application.cfc, it’s just written in CFScript. Dreamweaver is out of date-- you’ll need to switch to a different editor that’s familiar with CF’s script syntax. (All-script CFCs have been possible since 2009)

I forgot what your original issue was. Is there an error you’re trying to fix, or are you just confused by the improper color coding of DW?

Thanks!

~Brad

ColdBox Platform Evangelist
Ortus Solutions, Corp

E-mail: brad@coldbox.org
ColdBox Platform: http://www.coldbox.org
Blog: http://www.codersrevolution.com

Hi Brad. The issue is that I want to start working with Contentbox, but when the Application.cfc is like this when I open it to change the Datasource, will it even work?

Please read up on all-script CFCs.
http://andymatthews.net/read/2011/02/01/ColdFusion-9-and-pure-CFScript-CFCs

Thanks!

~Brad

ColdBox Platform Evangelist
Ortus Solutions, Corp

E-mail: brad@coldbox.org
ColdBox Platform: http://www.coldbox.org
Blog: http://www.codersrevolution.com

Hello Donald

I want to start working with Contentbox, but when the Application.cfc is like this when I open it to change the Datasource, will it even work

As we wrote already, add the datasource into Application.cfc and hit the URL of your site into the browser. The setup will start and everything will be fine.

Hi martin. That is what I did, but it isn’t working? Cane someone tell me if this for example:

//if( structKeyExists(url,“ormReload”) ){ ormReload(); }
//applicationstop();abort;

are comments or belonging to the function?

Because there are a lot of these in Applicatiion.cfm

//if( structKeyExists(url,"
ormReload") ){ ormReload(); }
//applicationstop();abort;

This two lines are disabled by default, don’t worry.

So, your site works now?

Hi Martin,

So all lines with the // infront are disabled? Those were the ones that were confusing me!

No it still isn’t working. I changed the datasource to: this.datasource = “CONTENTBOX_DS”; But when I hit the url nothing is happening as you can see here: http://contentbox.sothenwhat.com/

Thanks