Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CSS Override isn't working for me… #5

Open
curtisblackwell opened this issue Apr 25, 2012 · 7 comments
Open

CSS Override isn't working for me… #5

curtisblackwell opened this issue Apr 25, 2012 · 7 comments

Comments

@curtisblackwell
Copy link

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
Copy link
Contributor

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
Copy link
Author

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
Copy link
Author

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
Copy link
Contributor

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

@curtisblackwell
Copy link
Author

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

@fideloper
Copy link
Contributor

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
Copy link
Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants