RSS   Twitter   Copiny   Copiny
Нашел ошибку? 

Выдели фрагмент текста с ошибкой или неточностью и нажми Ctrl+Enter!

Как отключить MooTools из шаблона сайта?

По умолчанию библиотека JavaScript "MooTools" подгружается во все шаблоны Joomla. Но зачастую разработчики веб-сайтов сами выбирают себе js-библиотеки для разработки, и не всегда их точка зрения совпадает с выбором Joomla. Чтобы избавиться от лишнего веса страницы, в начало кода, после проверки константы "_JEXEC" вставим код, так как показано ниже.

$user = JFactory::getUser();
if ($user->get('guest') == 1 or $user->usertype == 'Registered') {
    $headerstuff = $this->getHeadData();    
    $tmp = array();
    foreach ($headerstuff['scripts'] as $path=>$type) {
         if ( !preg_match('#media/system/js#i', $path, $ar) ) $tmp[$path] = $type;
    }
    $headerstuff['scripts'] = $tmp;
    $this->setHeadData($headerstuff);
}

Примечание: эту вставку сделать нужно перед позицией заголовков сайта

<jdoc:include type="head" />

Этот фрагмент кода будет предварительно отчищать установленные по умолчанию библиотеки для гостей сайта (пользователи, которые еще не авторизовались) и для зарегистрированных пользователей.

Почему не отключить для всех посетителей сайта? Потому что пользовательская часть может использоваться администраторами сайта для редактирования контента, а для этого лучше оставлять библиотеку включенной.

Смотрите также:
Комментарии (19) Добавить комментарий
  • Дмитрий
    Дмитрий
    25 Июля 2011, 16:25
     ↑  0  ↓     ответ

    Это не сработает если кроме MooTools никаких скриптов нету.

  • Олег
    Олег
    21 Декабря 2011, 18:13
     ↑  0  ↓     ответ

    И что? У меня это не работает. Куда вставлять-то? В head.php??

    Или это только для joomla 1.5?

  • Алекс
    Алекс
    26 Декабря 2011, 14:07
     ↑  0  ↓     ответ

    Тоже непонятно, куда вставлять. В инете все тырят друг у друга статьи, вместо того, чтобы написать нормальную инструкцию. Автор, это камень в Вашу сторону. Потому что данную инструкцию без конкретных уточнений я вижу уже на 10-ке сайтов

  • Александр
    Александр
    16 Января 2012, 03:43
     ↑  +2  ↓     ответ

    Я вот здесь подробно расписал как правильно отключить mootools php-jquery.ru/poleznosti-dlya-web-razrabotki/otklyuchenie-mootools-v-joomla

    • Александр
      Александр
      20 Февраля 2012, 22:57
       ↑  -1  ↓     ответ

      Спасибо, дельный совет и без ковыряний в самом движке. В общем - то что доктор прописал :)

    • Александр
      Александр
      20 Февраля 2012, 22:59
       ↑  0  ↓     ответ

      Кстати на joomla 2.5 работает (проверено)

  • Александр
    Александр
    20 Февраля 2012, 23:09
     ↑  0  ↓     ответ

    Да способ довольно интересный, позволяющий без навешивания чудо-компонентов править четко содеожимое тега <head></head>, причем кстати это можно использовать к примеру совместно с $_SERVER['REQUEST_URI'] и в зависимости от значения менять содержимое, опять же без чудо-компонентов, а попросту используя if else

  • amorexxx
    amorexxx
    22 Июня 2012, 15:46
     ↑  0  ↓     ответ

    есть ещё более простой и понятный способ отключить мутулз и дефолтные скрипты, у кого что то не работает можете его попробовать

    si-web.ru/blog/53-otkljuchenie-mootools-v-joomla-25-17.html

  • http://tinyurl.com/
    http://tinyurl.com/
    24 Ноября 2019, 01:14
     ↑  0  ↓     ответ

    Hello, everything is going fine here and ofcourse every one is sharing facts,

    that's genuinely excellent, keep up writing.

  • tinyurl.com
    tinyurl.com
    25 Ноября 2019, 03:43
     ↑  0  ↓     ответ

    At this time it appears like Wordpress is the preferred

    blogging platform out there right now. (from what I've read)

    Is that what you're using on your blog?

  • are coconut oil
    are coconut oil
    25 Ноября 2019, 12:59
     ↑  0  ↓     ответ

    I am not positive the place you're getting your information, but good topic.

    I must spend some time finding out much more or understanding more.

    Thank you for wonderful information I used to be looking for this info for my

    mission.

  • plenty of fish dating site
    plenty of fish dating site
    26 Ноября 2019, 19:22
     ↑  0  ↓     ответ

    I'm extremely impressed with your writing skills and

    also with the layout on your weblog. Is this a paid theme or did you customize it yourself?

    Either way keep up the nice quality writing, it is rare to see a nice blog

    like this one today.

  • g
    g
    17 Июня 2020, 03:27
     ↑  0  ↓     ответ

    Very quickly this web site will be famous among all blog

    people, due to it's good content

  • g
    g
    18 Июня 2020, 02:17
     ↑  0  ↓     ответ

    Wonderful post however , I was wanting to

    know if you could write a litte more on this topic?

    I'd be very grateful if you could elaborate a

    little bit further. Thanks!

  • silly-colden-0637ea.netlify.app
    silly-colden-0637ea.netlify.app
    17 Февраля 2021, 05:05
     ↑  0  ↓     ответ

    Pseb 12th Result 2019 Website Calicut University Official Website

    Sde

  • Adrianna
    Adrianna
    20 Января 2023, 05:59
     ↑  0  ↓     ответ

    Hi joomla-book.ru Webmaster, exact same right here: <a href="/ 695example695.com " rel="nofollow">Link Text</a>

  • Karma
    Karma
    28 Января 2023, 06:13
     ↑  0  ↓     ответ

    To the joomla-book.ru administrator, Your posts are always well-written and easy to understand.

  • best online steroid source
    best online steroid source
    20 Марта 2025, 16:04
     ↑  0  ↓     ответ

    References:

    purchasing anabolic steroids online https://reckoningz.com/the-best-steroid-cycles-everything-you-need-to-know/

    connor Murphy steroids https://usellbuybid.com/user/profile/1032085

    anabolic Steroids prescription visualchemy.gallery/forum/viewtopic.php?id=3048648

    what is The function of steroids https://medtrain.biztechnosys.com/blog/index.php?entryid=3786

    Steroids In Pill Form https://sitiosecuador.com/author/teshacoughl/

    safe steroid cycles https://segundamano.icu/index.php?page=user&action=pub_profile&id=67759

    mens steroids https://setiathome.berkeley.edu/view_profile.php?userid=11989266

    Why Do Athletes Take Anabolic Steroids https://myvisualdatabase.com/forum/profile.php?id=108715

    steroid tablets for gym https://theterritorian.com.au/index.php?page=user&action=pub_profile&id=1146498

    which of the following is true about anabolic steroids?

    https://pigeon.bdfort.com/author/yelgrover36/

    steroids for women https://optimiserenergy.com/forums/users/chanelswint4/

    anabolic steroid dianabol https://optimiserenergy.com/forums/users/scarlettborges/

    best steroid stack for lean muscle https://2017.asiateleophth.org/community/profile/lizziemaccallum/

    athletes that used steroids https://rogerdeakins.com/forums/users/maribelmilner0/

    free trial legal steroids https://2017.asiateleophth.org/community/profile/lolitamcnutt191/

    gnc supplements with steroids https://pigeon.bdfort.com/author/adrianmonni/

  • steroid online shop
    steroid online shop
    30 Мая 2025, 20:20
     ↑  0  ↓     ответ

    We have observed numerous oral steroids activate hepatic lipase

    throughout their passage through the liver. Regrettably, this enzyme

    substantially reduces high-density lipoprotein (HDL), which is the cardioprotective

    type of cholesterol (1). They can even assist decrease estrogen levels, which might help treat estrogen receptor positive breast most cancers by blocking the

    growth of cancer cells that use estrogen to develop.

    For individuals with cancer or AIDS who're dropping muscle, anabolic

    steroids enhance the variety of androgen receptors in skeletal muscle and

    increase it in measurement and energy. To reach your bodybuilding program for mass gain, lean mass acquire, or weight reduction, purchase authentic anabolic steroids on-line at UPsteroid.

    Related laws exist in many different countries, including Canada,

    Australia, and the Uk. In our testing, oral steroids are typically worse for the

    guts, decreasing HDL cholesterol levels greater than injectables.

    HDL is the useful cholesterol score that, when excessive,

    can lower blood strain, and when low, can spike blood pressure.

    Winstrol is one other oral steroid typically utilized by ladies, notably

    within the health and determine competition circles.

    Nonetheless, Winstrol carries a better risk of virilization than Anavar and is generally recommended only for experienced feminine steroid customers.

    However, different research have shown combined outcomes,

    with no vital benefit when supplementing with milk

    thistle, especially in individuals who have broken livers from utilizing hepatotoxic drugs.

    Gynecomastia is when breast tissue in men begins to enlarge, resulting in swollen nipples or the

    pectorals beginning to type the form of feminine breasts.

    We have discovered common cardiovascular exercise to be the most beneficial protocol

    for reducing hypertension in sufferers. It’s worth noting that Dr.

    Ziegler later condemned Dianabol use, calling it a "disgrace" that healthy athletes were destroying their health.

    If you have breast most cancers, prostate

    cancer, or certain mineral imbalances (high blood calcium levels) in males, consult

    your physician or pharmacist earlier than utilizing this drug.

    Each product in our stock is sourced from reputable

    producers and verified suppliers, ensuring that the steroids on the market

    on our website are protected, efficient, and freed from dangerous additives.

    As a result, our stringent high quality management ensures that you can shop

    with confidence, understanding you're getting the best. Having personally tested all

    seven products on this listing, my recommendation for the most effective authorized steroid is D-Bal.

    After per week, I seen that my bench press was up 10%, and my endurance had considerably increased.

    Brutal Pressure developed TBulk as a secure and natural

    alternative to Trenbolone that gives comparable benefits with out causing any

    side effects.

    It doesn’t aromatize into estrogen, making it a strong option for slicing or lean bulking cycles.

    Its energy comes with potential unwanted aspect effects,

    including aggression and insomnia. Anadrol is one other potent bulking steroid that delivers rapid size and strength increases.

    It enhances pink blood cell production, improving oxygen supply and endurance.

    Fish oil will help within the regulation of blood strain, which is in a position to undoubtedly increase on account of this stack, with

    Dianabol being the first wrongdoer.

    Unexpectedly, TestoPrime also worked as a male enhancement complement which boosted my

    sex drive and improved my stamina within the bed room.

    If you wish to get ripped and construct muscle, TestoPrime is a wonderful alternative.

    I was able to lift heavier weights and push by way of more reps with

    less fatigue, and my post-workout restoration was faster.

    After utilizing Testo-Max for one month, I believe it is a wonderful supplement for anyone seeking to

    construct muscle. All orders are backed by Crazy Bulk’s 60-day 100% money-back guarantee,

    so you can try Testol a hundred and forty risk-free.

    If you would possibly be vulnerable to zits, taking steroids might

    produce cystic pimples, which can be severe. In some cases, cystic

    pimples can seem to resemble the dimensions of a golf ball beneath the

    skin (although this is uncommon). This is caused by stimulation of the

    sebaceous glands, causing a rise in sebum production. Its operate is

    to naturally moisturize your pores and skin, making

    it gentle and easy. Nonetheless, an excessive quantity of sebum ends

    in oily skin and may block your pores, resulting in acne

    breakouts. Some research have proven milk thistle to be efficient at decreasing irritation and reducing

    liver enzymes, especially in those suffering from

    acute hepatitis.

    Additionally, there is a risk of users contracting HIV or hepatitis by way of intramuscular injections if needles are shared.

    Thus, ladies who aren’t competing and wish to hold their femininity intact will opt for steroids such as Anavar (oxandrolone), which is less likely

    to trigger the above side effects. Dianabol barely increases ranges of the main androgen in men, DHT (dihydrotestosterone).

    This happens by way of the 5-AR (5-alpha-reductase) enzyme, which is answerable for

    converting testosterone into DHT.

    Its excessive hepatotoxicity necessitates meticulous liver

    perform monitoring and restricted length of use.

    The significant water retention can obscure true muscle gains and lead

    to momentary elevations in blood strain. Furthermore, its

    potential for androgenic effects, corresponding to pimples and hair loss, should be carefully thought-about.

    The elevated protein synthesis demands a higher protein intake, typically round

    1.5-2 grams of protein per pound of body weight.

    Anadrol could be cycled by itself, or stacked with other bulking steroids

    for maximum mass/strength acquire, such as Trenbolone, Testosterone or

    Deca Durabolin. Anadrol is surprisingly cycled by Men’s Physique athletes briefly before a competition to dramatically improve muscle fullness.

    They are capable of hold extracellular fluid retention at

    bay, preserving maximum definition, by adopting a low sodium diet.

    The mixture of excessive estrogen ranges and sodium-rich diets is known to

    trigger bloating.

Оставить комментарий




* обязательно для заполнения

1 введенный почтовый адрес используется только для обратной связи при ответах в комментариях и сервиса gravatar.com
.