Surge-ee / Surgedown

A Markdown fieldtype
17 stars 3 forks source link

CSS Override isn't working for me… #5

Open curtisblackwell opened 12 years ago

curtisblackwell commented 12 years ago

I added 'MARKDOWN_GLOBAL_CSS' => NSM_BASEPATH . '/themes/third_party/_overrides/markdown/markdown.css', to NSM Config Bootstrap.

There is no change to my preview pane, and the Default CSS File URL in the fieldtype settings remains at the default. With other overrides, the CP setting is updated to reflect what's in the file, so I expected that to happen here, too.

Here's an excerpt of the file:


$default_config = array(

    // Add-ons
    // Markdown
    'MARKDOWN_GLOBAL_CSS' => NSM_BASEPATH . '/themes/third_party/_overrides/markdown/markdown.css',

    …

);

P.S. It would be good to have the override variable with an example in the docs.

fideloper commented 12 years ago

Ah, I have it set as a PHP constant, not a configuration variable in the application. (Much like NSM_BASEPATH in that example is a constant).

You would have to do: define("MARKDOWN_GLOBAL_CSS" => NSM_BASEPATH . '/themes/third_party/_overrides/markdown/markdown.css');

I'm currently not using EE config object for the fieldtype, as it is a separate add-on.

I agree, more documentation on this portion would be helpful :D

curtisblackwell commented 12 years ago

Ah, cool, i'll give that a try later tonight/tomorrow morning. My PHP knowledge is pretty limited…

Curtis curtisblackwell.com

On Wed, Apr 25, 2012 at 10:07 PM, Chris Fidao < reply@reply.github.com

wrote:

Ah, I have it set as a PHP constant, not a configuration variable in the application. (Much like NSM_BASEPATH in that example is a constant).

You would have to do: define("MARKDOWN_GLOBAL_CSS" => NSM_BASEPATH . '/themes/third_party/_overrides/markdown/markdown.css');

I'm currently not using EE config object for the fieldtype, as it is a separate add-on.

I agree, more documentation on this portion would be helpful :D


Reply to this email directly or view it on GitHub:

https://github.com/fideloper/fid.field_markdown.ee_addon/issues/5#issuecomment-5330645

curtisblackwell commented 12 years ago

should actually be define('MARKDOWN_GLOBAL_CSS', NSM_BASEPATH . '/themes/third_party/_overrides/markdown/markdown.css');, but the style still isn't being overwritten. nor is the path updating in the CP.

fideloper commented 12 years ago

I'll check in on that when I have a few this afternoon :D

curtisblackwell commented 12 years ago

Even changing the variable in Markdown's config.php has no effect in the CP.

fideloper commented 12 years ago

Sounds like one of two scenarios: 1) I missed replacing a variable in the code or 2) You need to uninstall and then reinstall the fieldtype

I also just realized that the config variable won't override the current setting, it simply serves as the initial value used when installing the fieldtype.

I'll have to do some more leg work to make an over-ride variable.

curtisblackwell commented 12 years ago

Ah, that must be the issue (the non-override part). That would be necessary for working properly in multiple environments.

Curtis curtisblackwell.com

On Thu, Apr 26, 2012 at 12:04 AM, Chris Fidao < reply@reply.github.com

wrote:

Sounds like one of two scenarios: 1) I missed replacing a variable in the code or 2) You need to uninstall and then reinstall the fieldtype

I also just realized that the config variable won't override the current setting, it simply serves as the initial value used when installing the fieldtype.

I'll have to do some more leg work to make an over-ride variable.


Reply to this email directly or view it on GitHub:

https://github.com/fideloper/fid.field_markdown.ee_addon/issues/5#issuecomment-5333399