By Mist on Friday, 11 July 2014
Posted in General
Replies 7
Likes 0
Views 1.7K
Votes 0
Hi guys, i am trying to optimize our project and i want to remove some stuff that we don't use.
There is no point of loading tons of stuff is is not mandatory.

So i will keep this topic updated with some code that stackideas components area loading, asking what the code is doing, how it can be removed ... and from where.

 <script type="text/javascript">
/*<![CDATA[*/
var eblog_site = 'http://mysite.com/index.php?option=com_easyblog&lang=&Itemid=128';
var spinnerPath = 'http://mysite.com/components/com_easyblog/assets/images/loader.gif';
var lang_direction = 'ltr';
var eblog_lightbox_title = false;
var eblog_enable_lightbox = false;
var eblog_lightbox_enforce_size = false;
var eblog_lightbox_width = 640;
var eblog_lightbox_height = 480;
var eblog_lightbox_strip_extension = false;
/*]]>*/
</script>


What is this doing ? I don't need any core EasyBlog lightbox because we use our own stuff.
Where i can remove it ?


  <link rel="stylesheet" href="http://mysite.com/components/com_easyblog/assets/css/common.css" type="text/css" />


We user our own stuff in EasyBlog .... so we don't need to load any extra Easyblog css.
How (where) i can disable/remove everything css related coming from EasyBlog ?

<script>EasyBlog.token = "26690472f370c32a857536b3f3dc6043";</script>


What is this token for ? It is mandatory ? If not, can i remove it ? Where ?


<link href="http://mysite.com/components/com_easyblog/classes/wlwmanifest.xml" rel="wlwmanifest" type="application/wlwmanifest+xml" />


Same thing, what it is for this xml ? It is mandatory ? If not, can i remove it ? Where ?


That's it for now. I have more stuff but let's take care of this first.
I want to optimize the assets output to bare minimum so our website will not be bloated with a lot of stuff that is not used.

Thanks in advance for your tips !
Hello Mist,

All of the codes above are actually mandatory because EasyBlog is actually still in the midst of transitioning from our older "ajax" library to Foundry. Because the transition takes a lot of time, we are only able to do this correctly in EasyBlog 4.0. As for the last wlwmanifest, it isn't really an issue loading that and that is only an identifier that lets any XMLRPC clients know that the site allows xmlrpc
·
Saturday, 12 July 2014 00:09
·
0 Likes
·
0 Votes
·
0 Comments
·
I understand that is mandatory for the default EasyBlog functionality.

We basically customized everything
For example, we don't need any easyblog lightbox since our template don't use anything coming from easyblog.
We customized the entire frontend easyblog pages (list views, categories view, blog read template and so on ...)
We customized the entire easyblog dashboard.
We use our own implementation of Dropzone JS uploader

Basically we have our "own stuff" applied on everything related to EasyBlog.

It would be great to cut down on bloatware, stuff that we don't use as there is no point in loading it if we don't use it.

As soon as we are close to the beta i would be glad to provide you guys a link with some access credentials to see how much we achieved with EasyBlog and your other products. It's great !!!

The only thing is that is a little bit "bloated" for our needs.
·
Saturday, 12 July 2014 06:05
·
0 Likes
·
0 Votes
·
0 Comments
·
Hello Mist,

The common.css file is used not only for lightboxes but it also includes common css codes which is used throughout EasyBlog
·
Saturday, 12 July 2014 14:44
·
0 Likes
·
0 Votes
·
0 Comments
·
Right, i know .... but as i told previously, we don't use any of the "default" EasyBlog interface .
On our website, EasyBlog is not "EasyBlog" anymore (in a good way)

We basically implemented our own stuff and css.
- our own boostrap 3 grid for list pages
- our own javascript functionality and our own UX for article detail ("read") pages.
- our own javascript functionality and our own UX for Dashboard.

So there is no point into keep loading the default EasyBlog stuff that we don't need .... since it's not used at all on in our website.
·
Saturday, 12 July 2014 18:18
·
0 Likes
·
0 Votes
·
0 Comments
·
You can try to remove this from the /components/com_easyblog/helpers/helper.php under the method loadHeaders
·
Sunday, 13 July 2014 13:15
·
0 Likes
·
0 Votes
·
0 Comments
·
Hi, since we are a desing studio this "problem" sometimes cames to us, the unset method is the best way.

Open your head.php template file a put this code:

StyleSheets

$doc = JFactory::getDocument();
unset($doc->_styleSheets['http://'.$_SERVER[HTTP_HOST].$this->baseurl.'/components/com_easyblog/pathto.css']);


Scripts
unset($doc->_scripts['http://'.$_SERVER[HTTP_HOST].$this->baseurl.'/components/com_easyblog/pathto.js']);


If $doc was declared is not neccesary.

This always works because is in the joomla framework, and save a loot of unnecesary load time.


PD: We answer this because we think this method is the best way to do it, and there is no info in stackideas documentation
·
Friday, 13 November 2015 00:26
·
0 Likes
·
0 Votes
·
0 Comments
·
Thanks for sharing this Zeosing
·
Friday, 13 November 2015 00:37
·
0 Likes
·
0 Votes
·
0 Comments
·
View Full Post