By Roman Lipatov on Tuesday, 27 September 2022
Posted in Technical Issues
Replies 17
Likes 0
Views 0.9K
Votes 0
Hello!
Have you heard about Google Page Speed?
I have heard.
I'm working hard to minimize code on my sites.
So, I placed your Latest Posts Module in sidebar.
And what we have now on page without Easy Discuss component (I mean only module is enabled)?
1. media/com_easydiscuss/vendors/prism/prism.css (not big size)
2. media/com_easydiscuss/themes/wireframe/css/style.min.css (really big size file with 99.9999% unused css)
3. media/com_easydiscuss/scripts/site/easydiscuss-5.0.10.js (extremely big file with 100% unused JS)

Question is: How to disable loading of those files, when we're using Latest Posts Module just to displays LINKS to latest posts.
Thanks.
If you are referring to the Easydiscuss - recent discussion module, you can edit the following file and comment out this line of code:

JoomlaFolder/modules/mod_easydiscuss_recentdiscussions/mod_easydiscuss_recentdiscussions.php


ED::init();


Then you need to customize the file only to show the discussion title and the permalink in the module.

This is the file output the module content.
JoomlaFolder/modules/mod_easydiscuss_recentdiscussions/tmpl/default.php
·
Wednesday, 28 September 2022 11:03
·
0 Likes
·
0 Votes
·
0 Comments
·

JoomlaFolder/modules/mod_easydiscuss_recentdiscussions/mod_easydiscuss_recentdiscussions.php


Is it possible to override this file?
·
Thursday, 29 September 2022 01:31
·
0 Likes
·
0 Votes
·
0 Comments
·
Unfortunately, it is not possible to override this file because the file is not a theme file.

The alternative way is you can duplicate this module's core file JoomlaFolder/modules/mod_easydiscuss_recentdiscussions/... then change the module file name and this mod_easydiscuss_recentdiscussions.xml file. Once you modify the code finish, you can zip this module files and install it from the backend, so the system will treat it as another new module.

But you might need to understand how the Joomla module structure work then you only can know what thing to modify.

https://docs.joomla.org/J3.x:Creating_a_simple_module/Developing_a_Basic_Module
·
Thursday, 29 September 2022 10:44
·
0 Likes
·
0 Votes
·
0 Comments
·
Unfortunately, it is not possible to override this file because the file is not a theme file.


Since we have Google Core Web Vitals metrics, It should be an option in module settings - Disable CSS Yes/No, Disable JS Yes/No.
It's not normal for one module to load a larger JS file size than all the other JS files on the site combined.
Same with CSS.
Same with the whole component.
Just one checkbox - Yes/No.
But you suggest creating a new module.
What I'll do, when one of your next updates will use new functions or variables and this module will not work?
Create a new module again?
·
Wednesday, 12 October 2022 02:47
·
0 Likes
·
0 Votes
·
0 Comments
·
Thanks for your input.

But you suggest creating a new module.
What I'll do, when one of your next updates will use new functions or variables and this module will not work?
Create a new module again?

If the future updates the new function or variables in the module, then you need compare these with your new module and the original module in these 3 files only:

.../modules/mod_easydiscuss_recentdiscussions/tmpl/default.php
.../modules/mod_easydiscuss_recentdiscussions/helper.php
.../modules/mod_easydiscuss_recentdiscussions/mod_easydiscuss_recentdiscussions.php

But most likely we do not have modify the existing function name, meaning to said that you duplicate the same module code, it will still work.
·
Wednesday, 12 October 2022 10:31
·
0 Likes
·
0 Votes
·
0 Comments
·
Ok, I've created (copy) folder mod_easydiscuss_recentdiscussions_da
Then I rename module in xml file
<name>EasyDiscuss - Recent Discussions (DA Edition)</name>

After that I use Discover option in Joomla, but new module was not found.
·
Wednesday, 12 October 2022 17:19
·
0 Likes
·
0 Votes
·
0 Comments
·
You can try my attached zip file.
·
Wednesday, 12 October 2022 19:06
·
0 Likes
·
0 Votes
·
0 Comments
·
Thank you. It's ok.
But I have new question.
I tested the normal Recent Discussions module and found strange code - classes without names.




<div class>some content</div>


div has class, but class doesn't have a name.

Why?
·
Thursday, 13 October 2022 03:08
·
0 Likes
·
0 Votes
·
0 Comments
·
I believe the developer who add this last time is to get ready to fill in the necessary class name if the designer would like to add a specific class for each of the div to style it differently. And then it might be no need to add a special class there but we forgot to remove it.
·
Thursday, 13 October 2022 12:38
·
0 Likes
·
0 Votes
·
0 Comments
·
OK, thanks.
How to override /media/com_easydiscuss/themes/wireframe/css/style.min.css

I tried to use paths
/templates/g5_helium/css/com_easydiscuss/style.min.css
/templates/g5_helium/css/com_easydiscuss/wireframe/style.min.css

Not working...
·
Thursday, 13 October 2022 21:59
·
0 Likes
·
0 Votes
·
0 Comments
·
You can add something like this in this file .../modules/mod_easydiscuss_recentdiscussions_da/mod_easydiscuss_recentdiscussions_da.php


$url = rtrim(JURI::root(), '/');
$lib->doc->addStyleSheet($url . '/templates/g5_helium/css/com_easydiscuss/style.min.css');
$lib->doc->addStyleSheet($url . '/templates/g5_helium/css/com_easydiscuss/wireframe/style.min.css');
·
Friday, 14 October 2022 09:41
·
0 Likes
·
0 Votes
·
0 Comments
·
You can add something like this in this file


I need to make changes in css file for EasyDiscuss component, so I need to override it.
I read this article https://docs.joomla.org/Understanding_Output_Overrides
but using examples from the article is not working.
·
Friday, 14 October 2022 19:42
·
0 Likes
·
0 Votes
·
0 Comments
·
How to override /media/com_easydiscuss/themes/wireframe/css/style.min.css

Unfortunately, it is not possible to override this stylesheet file in Easydiscuss.

And this is the file to render this stylesheet .../media/com_easydiscuss/themes/wireframe/css/style.min.css

JoomlaFolder/administrator/components/com_easydiscuss/includes/stylesheet/stylesheet.php
·
Saturday, 15 October 2022 09:31
·
0 Likes
·
0 Votes
·
0 Comments
·
OK, is it possible to duplicate theme template and select it in settings?
In this case I can edit css files directly for my own theme without overriding.
·
Saturday, 15 October 2022 21:30
·
0 Likes
·
0 Votes
·
0 Comments
·
Unfortunately, we do not have a setting to allow the admin to choose a custom theme in Easydiscuss.

The only way I can think of is to add your custom CSS styling from your site backend > Easydiscuss > settings > custom CSS

If you want to stop rendering this ../media/com_easydiscuss/themes/wireframe/css/style.min.css default Easydiscuss style CSS file on the page, then you need to modify the core file.
·
Monday, 17 October 2022 13:03
·
0 Likes
·
0 Votes
·
0 Comments
·
Unfortunately, we do not have a setting to allow the admin to choose a custom theme in Easydiscuss.


So, EasyDiscuss only has 1 theme template???
Can't we create our own template??
So all sites with EasyDiscuss installed look the same???
·
Monday, 17 October 2022 19:02
·
0 Likes
·
0 Votes
·
0 Comments
·
Yes, Easydiscuss will only support a single-core theme (Wireframe) along with the dark mode feature currently.

If you would like your site Easydiscuss to show a different layout compared to others, you can make the changes from the theme core files (JoomlaFolder/components/com_easydiscuss/themes/wireframe/...) and then override this file into your current template.

For example, if you would like to do some changes to the Easydiscuss frontpage layout, then you can edit it from this original file JoomlaFolder/components/com_easydiscuss/themes/wireframe/frontpage/default.php. If the output of the change show correctly, then you can copy this original file then place it into your current template's new directory location e.g. JoomlaFolder/templates/yourCurrentTemplate/html/com_easydiscuss/frontpage/default.php

For the styling part, you can add your custom CSS styling code to this file template override file JoomlaFolder/templates/yourCurrentTemplate/html/com_easydiscuss/css/custom.css.
·
Tuesday, 18 October 2022 11:11
·
0 Likes
·
0 Votes
·
0 Comments
·
View Full Post