- Posts: 55
COMMUNITY FORUM
- Forum
- K2 Community Forum
- English K2 Community
- Disable loading of magnific-popup and simple-line-icons
Disable loading of magnific-popup and simple-line-icons
- WinniePooh
- Topic Author
- Offline
- Senior Member
Less
More
7 years 3 months ago #163532
by WinniePooh
Disable loading of magnific-popup and simple-line-icons was created by WinniePooh
Hello,
with the new 2.8 update of K2 (thank you for this one) I've noticed that K2 loads the CSS files magnific-popup.min.css and simple-line-icons.min.css from a CDN. Why needs the files to be loaded? I'm using a template override, so I can't see any changes. How can I disable the loading of these files?
Regards
with the new 2.8 update of K2 (thank you for this one) I've noticed that K2 loads the CSS files magnific-popup.min.css and simple-line-icons.min.css from a CDN. Why needs the files to be loaded? I'm using a template override, so I can't see any changes. How can I disable the loading of these files?
Regards
Please Log in or Create an account to join the conversation.
- Krikor Boghossian
- Offline
- Platinum Member
Less
More
- Posts: 15920
7 years 3 months ago #163554
by Krikor Boghossian
JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)
Replied by Krikor Boghossian on topic Disable loading of magnific-popup and simple-line-icons
You can alter some core files to remove the lightbox but since it is bound with frontend editing, this can lead to unexpected behaviour and some JS issues. I would not recommend performing such actions.
JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)
Please Log in or Create an account to join the conversation.
- 野草工作室
- Offline
- New Member
- 专业Joomla建站
6 years 9 months ago #166503
by 野草工作室
Why does K2 load more and more of these CDN resources? And can not switch to localhost resources?
I come from China, when we use K2, because of the need to load these CDNs, causing K2 to run very slowly ...
I know using CDN is to some extent to speed up loading, but for some areas may be the opposite,
Hope later updated version, at least to switch localhost load, so that can meet the needs of different situations
thank you very much
野草工作室提供专业Joomla建站服务
www.ycway.com
Replied by 野草工作室 on topic Disable loading of magnific-popup and simple-line-icons
Krikor wrote: You can alter some core files to remove the lightbox but since it is bound with frontend editing, this can lead to unexpected behaviour and some JS issues. I would not recommend performing such actions.
Why does K2 load more and more of these CDN resources? And can not switch to localhost resources?
I come from China, when we use K2, because of the need to load these CDNs, causing K2 to run very slowly ...
I know using CDN is to some extent to speed up loading, but for some areas may be the opposite,
Hope later updated version, at least to switch localhost load, so that can meet the needs of different situations
thank you very much
野草工作室提供专业Joomla建站服务
www.ycway.com
Please Log in or Create an account to join the conversation.
- Eddie Hamasaki
- Offline
- New Member
Less
More
- Posts: 1
6 years 9 months ago #166574
by Eddie Hamasaki
Replied by Eddie Hamasaki on topic Disable loading of magnific-popup and simple-line-icons
I have this same issue
Krikor said "You can alter some core files to remove the lightbox but since it is bound with frontend editing, this can lead to unexpected behaviour and some JS issues. I would not recommend performing such actions."
Im not using frontend editing, I even disabled it
What core files should I edit to remove magnific and simple line icons?
Krikor said "You can alter some core files to remove the lightbox but since it is bound with frontend editing, this can lead to unexpected behaviour and some JS issues. I would not recommend performing such actions."
Im not using frontend editing, I even disabled it
What core files should I edit to remove magnific and simple line icons?
Please Log in or Create an account to join the conversation.
- 野草工作室
- Offline
- New Member
- 专业Joomla建站
6 years 9 months ago - 6 years 9 months ago #166583
by 野草工作室
野草工作室提供专业Joomla建站服务
www.ycway.com
Replied by 野草工作室 on topic Disable loading of magnific-popup and simple-line-icons
You can try to modify this file,
administrator/components/com_k2/helpers/html.php
Find the relevant load file and comment it
E.gModified as such
administrator/components/com_k2/helpers/html.php
Find the relevant load file and comment it
E.g
$document->addStyleSheet('https://cdnjs.cloudflare.com/ajax/libs/simple-line-icons/2.4.1/css/simple-line-icons.min.css');
//$document->addStyleSheet('https://cdnjs.cloudflare.com/ajax/libs/simple-line-icons/2.4.1/css/simple-line-icons.min.css');
野草工作室提供专业Joomla建站服务
www.ycway.com
Last edit: 6 years 9 months ago by 野草工作室.
Please Log in or Create an account to join the conversation.
- Krikor Boghossian
- Offline
- Platinum Member
Less
More
- Posts: 15920
6 years 9 months ago #166637
by Krikor Boghossian
JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)
Replied by Krikor Boghossian on topic Disable loading of magnific-popup and simple-line-icons
I would recommend moving this file into your local installation and change the path instead of not loading it at all.
JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)
Please Log in or Create an account to join the conversation.
- Jean Machuron
- Offline
- New Member
Less
More
- Posts: 15
6 years 3 months ago - 6 years 3 months ago #168636
by Jean Machuron
Replied by Jean Machuron on topic Disable loading of magnific-popup and simple-line-icons
I agree that you should provide the ability to choose loading from local or cloud for all the outside files
That's also a problem for minification and provides lots of js errors
That's also a problem for minification and provides lots of js errors
Last edit: 6 years 3 months ago by Jean Machuron.
Please Log in or Create an account to join the conversation.
- Nadal Kumar
- Offline
- Junior Member
Less
More
- Posts: 28
6 years 3 months ago #168642
by Nadal Kumar
Replied by Nadal Kumar on topic Disable loading of magnific-popup and simple-line-icons
Instead of editing a core file which will be ovewritten on updates, use one of the following:
- Create a simple system plugin and use php unset method within the onBeforeCompileHead() function.
- Install one of the many plugins that already has a method to unset and script. 2 that are popular are JCHOptimize and Jquery Easy
Plugin code
- Create a simple system plugin and use php unset method within the onBeforeCompileHead() function.
- Install one of the many plugins that already has a method to unset and script. 2 that are popular are JCHOptimize and Jquery Easy
Plugin code
class plgSystemUnsetScripts extends JPlugin
{
public function onBeforeCompileHead()
{
if( JFactory::getApplication()->isAdmin() ) { return;}
$head = JFactory::getDocument()->getHeadData();
unset($head['styleSheets']['https://cdnjs.cloudflare.com/ajax/libs/simple-line-icons/2.4.1/css/simple-line-icons.min.css']);
JFactory::getDocument()->setHeadData($head);
}
}
Please Log in or Create an account to join the conversation.
- Forum
- K2 Community Forum
- English K2 Community
- Disable loading of magnific-popup and simple-line-icons