*

siken

  • ****
  • 136 posts
New versions of .css and .js in head.php
« on: October 02, 2019, 04:43:54 PM »
From time to time, the .css and .js files of the companies are updated.

I usually check every 6 months or 1 year for new updates and replace them in head.php, then I try to see if everything is ok.

I recommend updating these lines in the head.php file for the next updates.

Regards


Code: [Select]
if(osc_is_ad_page() || (osc_get_osclass_location() == 'item' && osc_get_osclass_section() == 'send_friend')) {
  osc_enqueue_style('bxslider', 'https://cdnjs.cloudflare.com/ajax/libs/bxslider/4.2.15/jquery.bxslider.min.css');
//  osc_enqueue_style('bxslider', 'https://cdnjs.cloudflare.com/ajax/libs/bxslider/4.1.2/jquery.bxslider.css');
  osc_enqueue_style('lightgallery', 'https://cdnjs.cloudflare.com/ajax/libs/lightgallery/1.6.12/css/lightgallery.min.css');
//  osc_enqueue_style('lightgallery', 'https://cdnjs.cloudflare.com/ajax/libs/lightgallery/1.6.11/css/lightgallery.min.css');
}

Code: [Select]
osc_register_script('bxslider', 'https://cdnjs.cloudflare.com/ajax/libs/bxslider/4.2.15/jquery.bxslider.min.js');
//osc_register_script('bxslider', 'https://cdnjs.cloudflare.com/ajax/libs/bxslider/4.1.2/jquery.bxslider.min.js');
osc_register_script('lazyload', 'https://cdnjs.cloudflare.com/ajax/libs/jquery.lazy/1.7.10/jquery.lazy.min.js');
//osc_register_script('lazyload', 'https://cdnjs.cloudflare.com/ajax/libs/jquery.lazy/1.7.9/jquery.lazy.min.js');
osc_register_script('lightbox', 'https://cdnjs.cloudflare.com/ajax/libs/lightgallery/1.6.12/js/lightgallery-all.min.js');
//osc_register_script('lightbox', 'https://cdnjs.cloudflare.com/ajax/libs/lightgallery/1.6.11/js/lightgallery-all.min.js');


I have put the old ones with the text // at the beginning to deactivate them and be able to restore them if you see that something is not going well.



- Font-awesome:

The new version of fontawesome brings hundreds of icons more than the previous one, as well as being faster and improved. Version 4 is already many years old, now version 5 is available...

You have to modify the line in head.php:

Code: [Select]
osc_enqueue_style('font-awesome', 'https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.11.2/css/all.min.css');
//osc_enqueue_style('font-awesome', 'https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css');

The problem is that instead of "fa fa-" you have to use "fas fa-" for solid icons, and change "fa fa -...- or" to "far fa-" for the other icons. For company icons, change "fa fa-" to "fab fa-", for example: <i classes = "fab fa-facebook"> </i>

Opening all php and replacing "fa fa-" with "fas fa-" is almost done, then the icons ending in "fa fa -...- or" must be replaced manually with "far fa -... -o ", in addition to the company icons, which instead of fas, use fab.

I have done it on my website and I have been able to add hundreds of different icons, in addition to looking better.

As before, I put // at the beginning of the original line. If you want to leave it again as it was: you just have to put // at the beginning of the new line and remove it from the previous line.
« Last Edit: October 02, 2019, 04:45:33 PM by alexandromt »

*

MB Themes

Re: New versions of .css and .js in head.php
« Reply #1 on: October 02, 2019, 08:45:59 PM »
Problem is that each library may bring differences that require theme modification (like font awesome)
  To get fast support, we need following details: Detail description, URL to reproduce problem, Screenshots