JeevanisM Posted May 26, 2020 Share Posted May 26, 2020 Hello All, I need to make some style editing in the core module - FieldtypeComments But I dont want to edit in the Core itself, since it may got overwritten for the next update or so. so I searched form and found this option : But in my Admin, I dont see any notification as per the 4th step above. The debug option is true and I am using ProcessWire 3.0.148 © 2020 Any idea why its not happening ? Link to comment Share on other sites More sharing options...
adrian Posted May 26, 2020 Share Posted May 26, 2020 Firstly, are you sure you need to modify the module for "style editing"? In case you haven't read already: https://processwire.com/docs/modules/guides/comments/ Secondly, if you do find you need to modify, I would consider upgrading to the very latest dev as there have been some major changes to the comments field and an important bug fix. Consider those before worrying about why the approach you are taking isn't working yet. 3 Link to comment Share on other sites More sharing options...
flydev Posted May 26, 2020 Share Posted May 26, 2020 You might can explain what you are trying to achieve ? Maybe it's copying/editing the module is not required ? 1 Link to comment Share on other sites More sharing options...
qtguru Posted May 27, 2020 Share Posted May 27, 2020 If you want to make some style editing then it is overkill extending the main core php files, why not alter the CSS for the field comments, that is the approach i do for the FieldComments. Link to comment Share on other sites More sharing options...
Ivan Gretsky Posted May 27, 2020 Share Posted May 27, 2020 Hey @JeevanisM! You probably shouldn't override the core module, as all the good men stated above. But it's nice to know you can (and I actually did this before exactly with Comments field - hope it is easier to customize it now). Link to comment Share on other sites More sharing options...
JeevanisM Posted May 29, 2020 Author Share Posted May 29, 2020 On 5/26/2020 at 2:55 PM, adrian said: Firstly, are you sure you need to modify the module for "style editing"? In case you haven't read already: https://processwire.com/docs/modules/guides/comments/ Secondly, if you do find you need to modify, I would consider upgrading to the very latest dev as there have been some major changes to the comments field and an important bug fix. Consider those before worrying about why the approach you are taking isn't working yet. Expand ok, I will try the latest dev.. I am using the Master branch now Link to comment Share on other sites More sharing options...
JeevanisM Posted May 29, 2020 Author Share Posted May 29, 2020 and No, I dont want to ov On 5/27/2020 at 11:41 AM, Ivan Gretsky said: Hey @JeevanisM! You probably shouldn't override the core module, as all the good men stated above. But it's nice to know you can (and I actually did this before exactly with Comments field - hope it is easier to customize it now). Expand I dont want to edit the core module but I want to override the style used in the core module. In bootstrap we can override the default styles by writing our own params with same css class name used in BS and BS honor it if we call the custom css after the BS load. Same as that, I want to override the style used in the comments module but I dont want to edit the core files.. Hence I copied the module to site/modules directory as mentioned here But when I change the css file in the site/module - the css is again loading from the core module location. Any idea why this happens ? I will update to the latest dev branch and will try again Link to comment Share on other sites More sharing options...
JeevanisM Posted May 29, 2020 Author Share Posted May 29, 2020 On 5/26/2020 at 4:04 PM, flydev ?? said: You might can explain what you are trying to achieve ? Maybe it's copying/editing the module is not required ? Expand yes I want to make changes in the site/modules files but my problems is the change I made in the css file in site/module is not in effect, still the css is loading from the core location.. Link to comment Share on other sites More sharing options...
adrian Posted May 29, 2020 Share Posted May 29, 2020 On 5/29/2020 at 2:18 PM, JeevanisM said: yes I want to make changes in the site/modules files but my problems is the change I made in the css file in site/module is not in effect, still the css is loading from the core location.. Expand Ok, but overriding CSS doesn't require creating a new copy of the module. Just inject the CSS you want into the PW admin - I use AdminOnSteroids for this, but there are other ways. Link to comment Share on other sites More sharing options...
JeevanisM Posted May 29, 2020 Author Share Posted May 29, 2020 On 5/29/2020 at 2:22 PM, adrian said: Ok, but overriding CSS doesn't require creating a new copy of the module. Just inject the CSS you want into the PW admin - I use AdminOnSteroids for this, but there are other ways. Expand I am not sure about steroids.. but when I was using Concrete 5 CMS< they have this overriding method of modules, just copy the modules from the core DIR to the theme DIR, then it will honor the priority ... Does PW have some thing like that ? today its just css, what if I want to make changes in php files in module ? Link to comment Share on other sites More sharing options...
flydev Posted May 29, 2020 Share Posted May 29, 2020 On 5/29/2020 at 2:26 PM, JeevanisM said: Does PW have some thing like that ? Expand Yes, exactly what you did, copying the module from Wire to Site/modules then refresh and select the new module when asked. After a refresh : After a click on "InputfieldCommentsAdmin" link : Same thing for "FieldtypeComments" and the CSS should now load correctly. -------- Anyway, I suggest you to avoid this technique and to copy the CSS from the module and to paste it on your own principal main CSS file and tweak the CSS comments there. Once that done, you won't have to worry about keeping the module up-to-date. 1 Link to comment Share on other sites More sharing options...
JeevanisM Posted May 29, 2020 Author Share Posted May 29, 2020 On 5/29/2020 at 2:39 PM, flydev ?? said: Yes, exactly what you did, copying the module from Wire to Site/modules then refresh and select the new module when asked. After a refresh : After a click on "InputfieldCommentsAdmin" link : Same thing for "FieldtypeComments" and the CSS should now load correctly. -------- Anyway, I suggest you to avoid this technique and to copy the CSS from the module and to paste it on your own principal main CSS file and tweak the CSS comments there. Once that done, you won't have to worry about keeping the module up-to-date. Expand well thats my issue. I am not seeing such message notifications once I refresh module page in admin ? I double checked if I copied files, yes but not showing any message info ? Link to comment Share on other sites More sharing options...
JeevanisM Posted May 29, 2020 Author Share Posted May 29, 2020 this is what I see when I click the inputfieldcommentsAdmin Link to comment Share on other sites More sharing options...
adrian Posted May 29, 2020 Share Posted May 29, 2020 Just to clarify, are you do a Modules > Refresh? It also works fine for me. But. again, please don't use this technique for CSS tweaks - it will result in lots of unnecessary pain when the core version of the module is updated. 2 Link to comment Share on other sites More sharing options...
flydev Posted May 29, 2020 Share Posted May 29, 2020 You might copied the wrong folder. See my ./site/modules folder : (again, what @adrian said in his last comment, sorry for insisting too ?) Link to comment Share on other sites More sharing options...
JeevanisM Posted May 29, 2020 Author Share Posted May 29, 2020 On 5/29/2020 at 2:55 PM, flydev ?? said: You might copied the wrong folder. See my ./site/modules folder : (again, what @adrian said in his last comment, sorry for insisting too ?) Expand is this correct folder ? my folder screenshot below 1 Link to comment Share on other sites More sharing options...
flydev Posted June 2, 2020 Share Posted June 2, 2020 Sorry for the delay, did you sorted out your issue ? Indeed, yes, the folder is correct. Refreshing the modules should work as expected. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now