Advertisement:

Author Topic: Code Highlighting  (Read 19473 times)

Offline alexetgus

  • Full Member
  • ***
  • Posts: 573
  • Gender: Male
    • alexetgus on Facebook
    • alexetgus on GitHub
    • @alexetgus on Twitter
    • Chez oim, forum libre !
Re: Code Highlighting
« Reply #40 on: December 05, 2017, 06:39:46 PM »
The mod is a fork of https://highlightjs.org/.
The Github repository is https://github.com/isagalaev/highlight.js

Thanks, Bugo, for your working ! ;)

Offline alexetgus

  • Full Member
  • ***
  • Posts: 573
  • Gender: Male
    • alexetgus on Facebook
    • alexetgus on GitHub
    • @alexetgus on Twitter
    • Chez oim, forum libre !
Re: Code Highlighting
« Reply #41 on: December 07, 2017, 06:32:59 AM »
French translation
Traduction française.

French
Code: [Select]
<?php

/**
 * .french.php
 *
 * @package Code Highlighting
 * @author Bugo https://dragomano.ru/mods/code-highlighting
 * @French translation by Alex - https://chez-oim.org
 *
 */

$txt['ch_title']    = 'Coloration de la syntaxe';
$txt['ch_settings'] = 'Param&egrave;tres de la coloration';
$txt['ch_desc']     = 'Ici, vous pouvez activer/d&eacute;sactiver la mise en surbrillance, choisir le th&egrave;me de style pr&eacute;f&eacute;r&eacute;, etc.';
$txt['ch_enable']   = 'Activer la coloration syntaxique';
$txt['ch_cdn_use']  = 'Utiliser un CDN pour charger les scripts et styles';
$txt['ch_style']    = 'Style de la coloration syntaxique';
$txt['ch_tab']      = 'Nombre de d\'espaces pour les tabulations (indentation)';
$txt['ch_fontsize'] = 'Taille des caract&egrave;res';
$txt['ch_example']  = 'Exemple';
$txt['ch_copy']     = 'Copier';


French-utf8
(ATTENTION ! Copie non recommandée, téléchargez le fichier ci dessous. C'est plus prudent.
WARNING ! Copy not recommended, download the file below. It's more careful.)
Code: [Select]
<?php

/**
 * .french-utf8.php
 *
 * @package Code Highlighting
 * @author Bugo https://dragomano.ru/mods/code-highlighting
 * @French translation by Alex - https://chez-oim.org
 *
 */

$txt['ch_title']    = 'Coloration de la syntaxe';
$txt['ch_settings'] = 'Paramètres de la coloration';
$txt['ch_desc']     = 'Ici, vous pouvez activer/désactiver la mise en surbrillance, choisir le thème de style préféré, etc.';
$txt['ch_enable']   = 'Activer la coloration syntaxique';
$txt['ch_cdn_use']  = 'Utiliser un CDN pour charger les scripts et styles';
$txt['ch_style']    = 'Style de la coloration syntaxique';
$txt['ch_tab']      = 'Nombre d\'espaces pour les tabulations (indentation)';
$txt['ch_fontsize'] = 'Taille des caractères';
$txt['ch_example']  = 'Exemple';
$txt['ch_copy']     = 'Copier';


Stoquer les fichiers dans le dossier /Themes/default/languages/Highlight
Stock the files in the directory /Themes/default/languages/Highlight
.french.php
.french-utf8.php



Offline Rock Lee

  • Native Language Support Specialist
  • SMF Hero
  • *
  • Posts: 2,033
  • Gender: Male
  • I also speak english :D
    • BomberCode.Oficial on Facebook
    • RockLee-BC on GitHub
    • @Bomber_Code on Twitter
    • Bomber Code ~ La nueva era del conocimiento
Re: Code Highlighting
« Reply #42 on: December 07, 2017, 06:24:13 PM »
I leave the translation attached to the normal Latin Spanish and utf-8, they should put it inside the folder ../Themes/default/languages/Highlight/


Regards!
¡Regresando como cual Fenix! ~ Bomber Code © 2018
Ayudas - Aportes - Tutoriales - Y mucho mas!!!


Ayudame via PayPal

Offline Bugo

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 1,483
  • Gender: Male
    • dragomano on GitHub
    • @dragomano on Twitter
    • Russian translations for SMF mods
Re: Code Highlighting
« Reply #43 on: December 12, 2017, 10:23:22 AM »
Thanks. The mod has updated.

Offline alexetgus

  • Full Member
  • ***
  • Posts: 573
  • Gender: Male
    • alexetgus on Facebook
    • alexetgus on GitHub
    • @alexetgus on Twitter
    • Chez oim, forum libre !
Re: Code Highlighting
« Reply #44 on: December 12, 2017, 02:37:49 PM »
Thanks for all users! :)

Offline Parmaster

  • Semi-Newbie
  • *
  • Posts: 14
Re: Code Highlighting
« Reply #45 on: January 31, 2018, 11:32:57 AM »
Hi Bugo!

Can you help me to integrate your mod into the knwoledge base mod https://custom.simplemachines.org/mods/index.php?mod=3185 ?

In my forum your mod works perfectly, but I would like to have the highlighting inside the kb mod too, if it's possible.

Offline Bugo

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 1,483
  • Gender: Male
    • dragomano on GitHub
    • @dragomano on Twitter
    • Russian translations for SMF mods
Re: Code Highlighting
« Reply #46 on: February 05, 2018, 03:39:20 AM »
Open Sources/Subs-Highlight.php, find
Code: [Select]
$hl = preg_match('/topic|msg|action=post|action=recent|action=unreadreplies|action=admin/i', $_SERVER['REQUEST_URI']) ? true : false;
and replace with
Code: [Select]
$hl = preg_match('/topic|msg|action=post|action=recent|action=unreadreplies|action=admin|action=kb/i', $_SERVER['REQUEST_URI']) ? true : false;

Offline Parmaster

  • Semi-Newbie
  • *
  • Posts: 14
Re: Code Highlighting
« Reply #47 on: February 06, 2018, 05:25:58 PM »
Thank you!

That helped me alot!

Offline Erikson

  • Jr. Member
  • **
  • Posts: 103
  • Gender: Male
  • Great SMF Fan - Fanlist...
Re: Code Highlighting
« Reply #48 on: September 01, 2018, 09:17:04 AM »
Dear Bugo.

Big Problem. Hope you can help me?! Version 1.2 does not work anymore. But has worked wonderfully before. Now I have made an update to Version 1.3. Does not work too. I can not find a mistake . ??? ::).

Erikson
The best Forum Software? - SMF ./. The Best Support? - SMF-Support

Offline Bugo

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 1,483
  • Gender: Male
    • dragomano on GitHub
    • @dragomano on Twitter
    • Russian translations for SMF mods
Re: Code Highlighting
« Reply #49 on: September 01, 2018, 12:53:24 PM »
What is your SMF version?
Please, make a screenshot of your settings.

Offline Erikson

  • Jr. Member
  • **
  • Posts: 103
  • Gender: Male
  • Great SMF Fan - Fanlist...
Re: Code Highlighting
« Reply #50 on: September 01, 2018, 07:57:13 PM »
Dear Bugo ;)

SMF Version:  - 2.0.15

Screenshot of Settings:



Notice! - * - You see the Black and White... ??? ::)

Erikson ???
The best Forum Software? - SMF ./. The Best Support? - SMF-Support

Offline Bugo

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 1,483
  • Gender: Male
    • dragomano on GitHub
    • @dragomano on Twitter
    • Russian translations for SMF mods
Re: Code Highlighting
« Reply #51 on: September 02, 2018, 04:03:14 AM »
Check these paths:
/Themes/default/scripts/highlight.pack.js
/Themes/default/css/highlight.css
/Themes/default/css/highlight dir

Make sure they exist and not empty.

Offline Erikson

  • Jr. Member
  • **
  • Posts: 103
  • Gender: Male
  • Great SMF Fan - Fanlist...
Re: Code Highlighting
« Reply #52 on: September 02, 2018, 07:10:57 PM »
Dear Bugo,

I checked. Everything okay.

Check these paths:
/Themes/default/scripts/highlight.pack.js
/Themes/default/css/highlight.css
/Themes/default/css/highlight dir

Make sure they exist and not empty.

Erikson
The best Forum Software? - SMF ./. The Best Support? - SMF-Support

Offline Bugo

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 1,483
  • Gender: Male
    • dragomano on GitHub
    • @dragomano on Twitter
    • Russian translations for SMF mods
Re: Code Highlighting
« Reply #53 on: September 03, 2018, 01:18:07 AM »
Well, send me via PM or post here a link to any example message with code on your forum.

Offline Erikson

  • Jr. Member
  • **
  • Posts: 103
  • Gender: Male
  • Great SMF Fan - Fanlist...
Re: Code Highlighting
« Reply #54 on: September 04, 2018, 05:34:21 PM »
Dear Bugo.

PM was send! ;)

Well, send me via PM or post here a link to any example message with code on your forum.

Erikson
The best Forum Software? - SMF ./. The Best Support? - SMF-Support