Mapping Issue

30 views
Skip to first unread message

Dan Vega

unread,
Jun 4, 2011, 1:17:21 PM6/4/11
to col...@googlegroups.com
So everything was working great on my site when I had it just under root and the url was http://localhost/danvega. I changed the domain over to http://dev.danvega.me and I am still on my localhost. I added a mapping in the administrator for /coldbox to c:\www\coldbox. Now I am finding places where coldbox thinks that it is located under my project. For instance when the message box displays an error message it thinks the icon is located at


What did I miss here? 

Matt Quackenbush

unread,
Jun 4, 2011, 1:22:36 PM6/4/11
to col...@googlegroups.com
Sounds like you're missing a virtual directory (IIS) or alias (apache) pointing to coldbox.


--
You received this message because you are subscribed to the Google Groups "ColdBox Platform" group.
To post to this group, send email to col...@googlegroups.com
To unsubscribe from this group, send email to coldbox-u...@googlegroups.com
For more options, visit this group at http://groups-beta.google.com/group/coldbox
For News, visit http://blog.coldbox.org
For Documentation, visit http://wiki.coldbox.org

Matt Quackenbush

unread,
Jun 4, 2011, 1:23:51 PM6/4/11
to col...@googlegroups.com
Oh, and by the way, in my opinion you should not actually have those, as it makes the entire coldbox directory structure available on the web.  I would change the CSS to point to images in a safe spot.

Dan Vega

unread,
Jun 5, 2011, 11:01:49 PM6/5/11
to col...@googlegroups.com
How does everyone else do it? Changing the ColdBox css seems like a bad move to me.. there has to be a better answer here.

Jason Durham

unread,
Jun 5, 2011, 11:18:38 PM6/5/11
to col...@googlegroups.com

Override the messagebox CSS.

On Jun 5, 2011 10:01 PM, "Dan Vega" <dan...@gmail.com> wrote:
> How does everyone else do it? Changing the ColdBox css seems like a bad move
> to me.. there has to be a better answer here.
>

Andrew Scott

unread,
Jun 6, 2011, 12:26:00 AM6/6/11
to col...@googlegroups.com

Dan,

 

Not sure exactly what you’re are experiencing here, but it sounds more like the settings more than anything.

 

Personally I would be using the mapping in the Application.cfc and not in the Adminstrator, the upside to this is that you can run multiple ColdBox sites with different versions of ColdBox and/or make sure that they all use the same location and can copy to another server without touching the CF Admin.

 

Caching, saving of Class files can maybe also effect this when dishing up the cached or saved class.

 

But to be honest this sounds like the CSS should be using ..\images rather than /coldbox/images to avoid this. This might be something Luis might need to have a look at.

 

 

Regards,

Andrew Scott

http://www.andyscott.id.au/

 

 

 

--

Brad Wood

unread,
Jun 6, 2011, 1:19:40 AM6/6/11
to col...@googlegroups.com
We customized the message box plugin that let's us add messages client-side with jQuery and made our own version that we inject with coldbox:myplugin.  We just point to our own images.
 
One way or another, if you are going to use the standard images though, that folder will need to be web accessible be it a mapping, or just putting /coldbox in the web root.  If you don't want all of coldbox/system dangling out there on the interwebs, you could create a web server mapping to only the coldbox/system/includes/images folder. 
Well, I suppose if we wanted to be sneaky, we could write a CF proxy for the images so the path was like /coldbox/system/includes/images/imageProxy.cfm?file=cmsg.gif but I can think of a couple of reasons not to do that.
 
Perhaps a good enhancement would be a setting for the plugin to specify the external path for where you are going to make the info, warning, and error images available. 
 
Thanks!
 
~Brad
----- Original Message -----
From: Dan Vega
Sent: Sunday, June 05, 2011 10:01 PM
Subject: Re: [coldbox:10318] Mapping Issue

How does everyone else do it? Changing the ColdBox css seems like a bad move to me.. there has to be a better answer here.

--

Matt Quackenbush

unread,
Jun 6, 2011, 1:42:10 AM6/6/11
to col...@googlegroups.com
Dan,

I did not mean to change the CSS file(s) that ship with ColdBox, but rather to override them in your local style sheet.  And not only is that not a bad idea, but it's a great one.  That's why they're cascading style sheets.  :-)

Jason Durham

unread,
Jun 6, 2011, 10:22:54 AM6/6/11
to col...@googlegroups.com
The simplest answer has now been provided twice. :) Open the messagebox CSS file, copy/paste the relevant styling into another stylesheet and give it a more specific selector.  Voila.  There is no need for changes to the framework... this is how CSS is _supposed_ to work. 

I'd hate to see Coldbox get too big and cluttered with small stuff like this.  Just because you _can_ do it, doesn't mean you _should_. :)

Just my $.02.

Jason Durham


On Mon, Jun 6, 2011 at 12:42 AM, Matt Quackenbush <quack...@gmail.com> wrote:
Dan,

I did not mean to change the CSS file(s) that ship with ColdBox, but rather to override them in your local style sheet.  And not only is that not a bad idea, but it's a great one.  That's why they're cascading style sheets.  :-)

Luis Majano

unread,
Jun 6, 2011, 11:21:55 AM6/6/11
to col...@googlegroups.com
Guys read the docs. The messagebo plugin has a setting you do for CSS override. Then it uses yours and not the coldbox internal one. 

Luis Majano
President
Ortus Solutions, Corp
Toll free phone/fax: 1-888-557-8057
Mobile: 909-248-3408

Dan Vega

unread,
Jun 6, 2011, 9:46:42 PM6/6/11
to col...@googlegroups.com
I am sorry but I must be missing something, I don't see anything in the docs (or in the code) about a css setting


@Andy - I have to use a mapping from cf because the application inherits from coldbox and by default cf doesn't know where that is.

Curt Gratz

unread,
Jun 6, 2011, 9:55:46 PM6/6/11
to col...@googlegroups.com

Dan,

 

http://wiki.coldbox.org/wiki/WhatsNew:3.0.0.cfm#MessageBox_Updates

 

settings = {
     messagebox_style_override = true
};

 

Then setup some styles in your stylesheet like this.

 

/* ------------------------------------------------------------------------------------------------------------------------------------------------------

ColdBox Message Box

------------------------------------------------------------------------------------------------------------------------------------------------------ */

p

.cbox_messagebox {

margin: 0;

}

.cbox_messagebox

{

font-size: 13px;

font-weight: bold;

}

.cbox_messagebox_info

, .cbox_messagebox_warning, .cbox_messagebox_error {

border: 1px solid #630000;

margin: 0 0 10px 0;

padding: 10px 10px 10px 40px;

}

.cbox_messagebox_info

{

background: #ccffcc url(/includes/images/icons/shine/24x24/accept.png) no-repeat scroll .5em 50%;

}

.cbox_messagebox_info

a {

color: #42a642;

}

.cbox_messagebox_info

a:hover {

color: #a3bfa3;

text-decoration: none;

}

.cbox_messagebox_warning

{

background: #ffffcc url(/includes/images/icons/shine/24x24/warning.png) no-repeat scroll .5em 50%;

}

.cbox_messagebox_warning

a {

color: #ec981f;

}

.cbox_messagebox_warning

a:hover {

color: #806b4d;

text-decoration: none;

}

.cbox_messagebox_error

{

background: #b53232 url(/includes/images/icons/shine/24x24/delete.png) no-repeat scroll .5em 50%;

color: #fdf3e7;

}

.cbox_messagebox_error

a {

color: #fdf3e7;

}

.cbox_messagebox_error

a:hover {

color: #ccc;

text-decoration: none;

}

 

Hope that helps.

 

Curt Gratz

Computer Know How



From: col...@googlegroups.com [col...@googlegroups.com] on behalf of Dan Vega [dan...@gmail.com]
Sent: Monday, June 06, 2011 8:46 PM
To: col...@googlegroups.com
Subject: Re: [coldbox:10338] Mapping Issue

I am sorry but I must be missing something, I don't see anything in the docs (or in the code) about a css setting


@Andy - I have to use a mapping from cf because the application inherits from coldbox and by default cf doesn't know where that is.

--

Dan Vega

unread,
Jun 6, 2011, 10:01:43 PM6/6/11
to col...@googlegroups.com
that worked..thank you.

Curt Gratz

unread,
Jun 6, 2011, 10:09:21 PM6/6/11
to col...@googlegroups.com

FYI,

 

I updated the docs at http://wiki.coldbox.org/wiki/Plugins:MessageBox.cfm to avoid confusion in the future.

 

Curt


Sent: Monday, June 06, 2011 9:01 PM
To: col...@googlegroups.com
Subject: Re: RE: [coldbox:10340] Mapping Issue

that worked..thank you.

Dan Vega

unread,
Jun 6, 2011, 10:42:37 PM6/6/11
to col...@googlegroups.com
You rock..thanks Curt!

Andrew Scott

unread,
Jun 7, 2011, 2:18:29 AM6/7/11
to col...@googlegroups.com

Ok my advice switch to the non iheritance version, the only difference is that instead of inherting ColdBox it is imported in the Application.cfc I actually prefer this method because of what you describe.

 

Regards,

Andrew Scott

http://www.andyscott.id.au/

 

 

 

From: col...@googlegroups.com [mailto:col...@googlegroups.com] On Behalf Of Dan Vega
Sent: Tuesday, 7 June 2011 11:47 AM
To: col...@googlegroups.com
Subject: Re: [coldbox:10338] Mapping Issue

 

I am sorry but I must be missing something, I don't see anything in the docs (or in the code) about a css setting

Dan Vega

unread,
Jun 7, 2011, 11:06:47 AM6/7/11
to col...@googlegroups.com
I didn't even realize that was an option, thanks Andrew!
--
Reply all
Reply to author
Forward
0 new messages