| Macik |
|
|---|---|
|
As I remember… not. You can not just add addition styles this way. To add it you must do these steps:
Replace:
$sh_core_js = $cfg['plugins_dir'] . '/syntaxhighlighter/lib/scripts/shAll.min.js';
cot_rc_embed_footer(<<<JS
$(function(){if($('pre').length>0){ $('head').append('$sh_core_css');$('head').append('$sh_theme_css');var sh_e1=document.createElement('script');sh_e1.async=true;sh_e1.src ='$sh_core_js';document.getElementById('body').appendChild(sh_e1);}});
JS
);
With something like this (I'm not check the actual code):
$sh_core_js = $cfg['plugins_dir'] . '/syntaxhighlighter/lib/scripts/shCore.js';
$sh_autoloader_js = $cfg['plugins_dir'] . '/syntaxhighlighter/lib/scripts/shAutoloader.js';
cot_rc_embed_footer(<<<JS
$(function(){if($('pre').length>0){ $('head').append('$sh_core_css');$('head').append('$sh_theme_css');var sh_e1=document.createElement('script');sh_e1.async=true;sh_e1.src ='$sh_core_js';$('body').append(sh_e1);
var sh_e2=document.createElement('script');sh_e2.async=true;sh_e2.src ='$sh_autoloader_js';$('body').append(sh_e2);
}});
JS
);
We load 2 files (shCore.js, shAutoloader.js) instead of `shAll.min.js` Any way, look at doc for autoloader — http://alexgorbatchev.com/SyntaxHighlighter/manual/api/autoloader.html
https://github.com/macik
правильный хостинг — https://goo.gl/fjCa1F Dieser Beitrag wurde von Macik (am 2. Mai 2014, 16:33, vor 11 Jahre) bearbeitet |