Powered by EverLive.net
Script Code Highlighter Topics

TOPIC: It does not work in Joomla 3.8

It does not work in Joomla 3.8 6 years 6 months ago #325

  • sweta
  • sweta's Avatar
  • Offline
  • Administrator
  • Posts: 111
  • Thank you received: 6
  • Karma: 0
jstuardo wrote:
Site is opening

First I found out that the default editor was codemirror not tinymce. Anyways for my account I changed it to tiny mce and added the tags manually. I also checked that the plugins are enabled but I could not check their version as administrator dont have privilege to manage extensions. I tried but could not succeed to get the code display properly. I am sorry, I tried but it seems issue lies somewhere else.[code] tags manually. I also checked that the plugins are enabled but I could not check their version as administrator dont have privilege to manage extensions. I tried but could not succeed to get the code display properly. I am sorry, I tried but it seems issue lies somewhere else.
Joomla Extensions Directory Listings

extensions.joomla.org/profile/profile/details/176905
Last Edit: 6 years 6 months ago by sweta.
The administrator has disabled public write access.

It does not work in Joomla 3.8 6 years 6 months ago #326

  • jstuardo
  • jstuardo's Avatar
  • Offline
  • New Member
  • Posts: 14
  • Karma: 0
Default editor is JCE, however, I don't think that the editor is the problem since source code does contain the "pre" and "code" tags, and that is how it is saved in database, independetly of the editor that was used.

Plugin version is 1.2.0 (version you have sent me).That version is for the following extensions: Button - Script Code Highlighter (GeSHi), Content - Script Code Highlighter (GeSHi), pkg_scriptcodehighlighter and Script Code Highlighter!

I sincerely think that the problem is not in backend but in frontend. When the article is displayed, a JavaScript or a CSS should be run. If you teach me how the code highlighter should work, I can try to find out the problem. For example, what JS or CSS should be loaded by the plugin when an article is loaded? In any case, all JS are loaded at the end of the page and in a minimize way, but I can configure the system to not minimize, but I need a starting point to start the research.,

regards
Jaime
The administrator has disabled public write access.

It does not work in Joomla 3.8 6 years 6 months ago #327

  • sweta
  • sweta's Avatar
  • Offline
  • Administrator
  • Posts: 111
  • Thank you received: 6
  • Karma: 0
jstuardo wrote:
Default editor is JCE, however, I don't think that the editor is the problem since source code does contain the "pre" and "code" tags, and that is how it is saved in database, independetly of the editor that was used.

Plugin version is 1.2.0 (version you have sent me).That version is for the following extensions: Button - Script Code Highlighter (GeSHi), Content - Script Code Highlighter (GeSHi), pkg_scriptcodehighlighter and Script Code Highlighter!

I sincerely think that the problem is not in backend but in frontend. When the article is displayed, a JavaScript or a CSS should be run. If you teach me how the code highlighter should work, I can try to find out the problem. For example, what JS or CSS should be loaded by the plugin when an article is loaded? In any case, all JS are loaded at the end of the page and in a minimize way, but I can configure the system to not minimize, but I need a starting point to start the research.,

regards
Jaime

I have prepared a short note that can help you

The Script Code button plugin

1. This plugin works with Tinymce enabled and makes your work easy by click of a button.

2. Main plugin which actually does the highlighting work:

You can go to plugins->contents->scriptcodehighlighter you will find scriptcodehighlighter.php file.

Open that file.

The code that starts before an article shows at frontend is

onContentPrepare($context, &$article, &$params, $page = 0)

You can get the details here docs.joomla.org/Plugin/Events/Content

Next is the code that parses the code,pre values

$article->text = preg_replace_callback($regex, array(&$this, '_replace'), $article->text);

So whereever it finds the code tags it highlights the code with desired colours.
Joomla Extensions Directory Listings

extensions.joomla.org/profile/profile/details/176905
Last Edit: 6 years 6 months ago by sweta.
The administrator has disabled public write access.
Time to create page: 0.058 seconds
Powered by Kunena Forum