By David Montoya on Thursday, 20 April 2017
Posted in General Issues
Replies 10
Likes 0
Views 503
Votes 0
The only place I've found prism.js stored is within /media/com_easydiscuss/scripts/site/vendors/. I've tried removing the file and it still loads.

I can't figure out where this is referencing the file or if it's actually being stored in the database. I've tried clearing Joomla and browser cache.
<?php if ($this->config->get('main_syntax_highlighter')) { ?>
// Prism support
ed.require(['site/vendors/prism'], function() {
Prism.highlightAll();
});
<?php } ?>
Unless I broke something, it looks like Prism.JS isn't being called at all for EasySocial when using the Discussions App to show posts from EasyDiscuss with code.
·
Thursday, 20 April 2017 10:59
·
0 Likes
·
0 Votes
·
0 Comments
·
Hello David,

Can you provide me with the link that is displaying this issue?
·
Thursday, 20 April 2017 12:14
·
0 Likes
·
0 Votes
·
0 Comments
·
http://affinitypixel.com/team


http://affinitypixel.com/discussions/uncategorized/markup-test


I've already established with Mark that Prism.js is ran dependently in each component. What I can't find out is how it's ran or if it's being ran elsewhere. I temporarily deleted (now restored) prism.js from their respective folders of ES and ED within media and they're still functioning. Right now ES version is being ran through my template's post-added Prism.js as it isn't running at all without. But even loading it through template, not everything is working properly, like the numbered line plugin. If I could get the ES variant to run like ED and just use my own styling, that'd be an ideal situation.

I also noted that Prism.js for both ES and ED have a slight modification so their called by the ES/ED systems, so the earlier suggestion (from a different post) of simply replacing the file won't work.
·
Friday, 21 April 2017 06:15
·
0 Likes
·
0 Votes
·
0 Comments
·
Hello David,

In EasySocial, we do not compile prism in the main script file so unless someone tries to render the prism from EasySocial, it wouldn't load /media/com_easysocial/scripts/site/vendors/prism.js

If someone were to invoke the following in the JS, only then the prism library in EasySocial would be invoked.

[gist]
EasySocial.require()
.library('site/vendors/prism')
.done(function(){
});
[/gist]

As for the css, the less file is compiled into EasySocial automatically as we do not have a loader like javascript for css. What I strongly suggest you to do to override with your own prism's styling is to use a more detailed selector like having a body prefix in those codes so that it would win the inheritance game (if other prism css is loaded on the page).
·
Friday, 21 April 2017 12:31
·
0 Likes
·
0 Votes
·
0 Comments
·
At what point does the LESS get compiled? Only on installation, perhaps?
·
Sunday, 23 April 2017 12:44
·
0 Likes
·
0 Votes
·
0 Comments
·
Also, does Prism.JS get invoked at all for EasySocial's stream view? Renaming Prism.js in media/ES renders no changes, and it's not honoring output generated from EasyDiscuss. In particular, the line numbers plugin. I have my implementation of JS and CSS through template disabled so it can be looked at.
·
Sunday, 23 April 2017 12:47
·
0 Likes
·
0 Votes
·
0 Comments
·
Hello David,

The less files gets compiled during the packaging process when we build the extensions. If there was a discussion stream item, the prism js file would get rendered. You can try editing /components/com_easysocial/themes/wireframe/discussions/item/default.js and removing the site/vendors/prism from the required library.
·
Sunday, 23 April 2017 14:50
·
0 Likes
·
0 Votes
·
0 Comments
·
View Full Post