[DISC] Syntax Highlighting 0.4.1 (DISCONTINUED)

A place for MOD Authors to post and receive feedback on MODs still in development. No MODs within this forum should be used within a live environment! No new topics are allowed in this forum.
Forum rules
READ: phpBB.com Board-Wide Rules and Regulations

IMPORTANT: MOD Development Forum rules

On February 1, 2009 this forum will be set to read only as part of retiring of phpBB2.
Locked
Arm@nd
Registered User
Posts: 12
Joined: Mon Jan 10, 2005 5:10 pm

Post by Arm@nd »

Thanks for this great mod, It works fine !

But I've a question : Why does it not work with phpBB mods that support BBcode ?
Arm@nd
Registered User
Posts: 12
Joined: Mon Jan 10, 2005 5:10 pm

Post by Arm@nd »

Here's my french translation :

lang_admin.php
// Mod - Syntax Highlighting
$lang['Syntax_Highlighting'] = 'Mise en évidence de syntaxe';
$lang['syntax_explain'] = 'Ici vous pouvez contrôler la mise en évidence de syntaxe dans les messages. Ce mod utilise le BBCode [syntax]. Le mod Syntax Highlighting est créé par <a href="http://qbnz.com/highlighter">GeSHi</a>, la documentation se situe <a href="http://qbnz.com/highlighter/documentation.php">ici</a> si vous voulez améliorer ce mod vous même.';
$lang['Syntax_highlighting_advanced_mode'] = 'La mise en évidence de syntaxe est en mode <span style="color: green;">avancé</span>.';
$lang['Syntax_highlighting_simple_mode'] = 'La mise en évidence de syntaxe est en mode <span style="color: #FF6600;">simple</span>. Pour la mettre en mode avancé, vous devez exécuter le script <code>install_syntax.php</code> inclu avec le mod Syntax Highlighter, ou la requète SQL spécifiée dans le fichier du MOD.';
$lang['Syntax_main_control'] = 'Configuration Principale';
$lang['Syntax_cache_control'] = 'Contrôle du cache';
$lang['Syntax_enabled'] = 'Activer la mise en évidence de syntaxe';
$lang['Syntax_partial'] = 'Désactiver la mise en évidence de syntaxe, mais reconnaitre le tag [syntax] comme

Code: Select all

';
$lang['Syntax_disabled'] = 'Désactiver la mise en évidence de syntaxe';
$lang['Syntax_update_status'] = 'Mettre à jour';
$lang['Syntax_main_control_disabled'] = 'Comme vous êtes en mod simple, vous ne pouvez pas changer le status de la mise en évidence de syntaxe depuis le panneau d\'admin. Si vous voulez activer/désactiver le mod syntax highlighter, allez dans <code>includes/bbcode.php</code>, et éditez les champs correspondants. En plus, si vous utilisez un répertoire de cache, vous devriez vider le cache (voir le contrôle du cache ci-dessous).';
$lang['Syntax_cache_control_disabled'] = 'Comme vous êtes en mod simple, vous ne pouvez pas choisir d\'utiliser le cache ou pas. Si vous souhaitez activer/désactiver le cache, allez dans <code>includes/bbcode.php</code>, et éditez les champs correspondants. En plus, vous devriez vider le cache après chaque changement de cette option (voir ci-dessous).';
$lang['Syntax_enable_cache'] = 'Activer le cache';
$lang['Syntax_update_cache_enabled'] = 'Mettre à jour';
$lang['Syntax_clear_the_cache'] = 'Vider le cache';
$lang['Syntax_clear_cache_yes_no'] = 'Vider le cache?';
$lang['Syntax_clear_cache'] = 'Vider le cache';
$lang['Syntax_cache_options'] = 'Options du cache';
$lang['Syntax_bytes'] = 'Octets';
$lang['Syntax_kilobytes'] = 'Ko';
$lang['Syntax_megabytes'] = 'Mo';
$lang['Syntax_gigabytes'] = 'Go';
$lang['Syntax_cache_dir_size'] = 'Taille maximale du répertoire du cache autorisée (0 pour illimitée, sinon au moins 1 Ko). Il est recommandé que vous laissiez ceci à illimité ou à un grand nombre, et que vous utilisiez le temps (ci-dessous) pour contrôler la taille du cache.';
$lang['Syntax_set_cache_options'] = 'Mettre à jour les options du cache';
$lang['Syntax_cache_options_disabled'] = 'Comme vous êtes en mod simple, vous ne pouvez pas changer les options du cache. Par défaut, le cache a une taille de 20 Go maximum, et les objets datant d\'il y a plus de 30 jours seront supprimés. Si vous voulez changer les options du cache , allez dans <code>includes/bbcode.php</code>, et éditez les champs correspondants. En plus, vous devriez vider le cache après chaque changement de cette option (voir ci-dessus).';
$lang['Syntax_seconds'] = 'Secondes';
$lang['Syntax_minutes'] = 'Minutes';
$lang['Syntax_hours'] = 'Heures';
$lang['Syntax_days'] = 'Jours';
$lang['Syntax_months'] = 'Mois';
$lang['Syntax_years'] = 'Années';
$lang['Syntax_cache_expiry_time'] = 'Temps avant que les fichiers d\'une syntaxe deviennent invalides et soient supprimés du cache (0 pour illimité, ceci n\'est pas recommandé).';
$lang['Syntax_line_numbers_enabled'] = 'Numérotation de ligne activée ou pas (le cache sera vidé si cette option est changée)';
$lang['Syntax_function_urls_enabled'] = 'Les fonctions sont transformées en URL vers la documentation appropriée (le cache sera vidé si cette option est changée, et s\'applique uniquement à quelque languages qui ont la documentation disponible).';
$lang['Syntax_general_options'] = 'Options Générales';
$lang['Syntax_change_general_options'] = 'Changer les Options Générales';
$lang['Syntax_language_control'] = 'Administration des languages';
$lang['Syntax_advanced_language_control_explain'] = 'Utilisez ce formulaire pour contrôler quels languages sont mis en évidence, sous quel nom ils sont utilisés avec le BBCode [syntax="..."], et leur nom d\'affichage. En changeant ces options le cache sera vidé.';
$lang['Syntax_simple_language_control_explain'] = 'Utilisez ce formulaire pour contrôler quels languages seront mis en évidence. En changeant ces options le cache sera vidé';
$lang['Syntax_language_name'] = 'Nom du language';
$lang['Syntax_language_enabled'] = 'Language Activé ?';
$lang['Syntax_language_code'] = 'Code du language';
$lang['Syntax_language_code_explain'] = 'Ce qui doit être entré [syntax="..."] pour mettre en évidence avec ce language';
$lang['Syntax_language_display_name'] = 'Nom d\'affichage du language';
$lang['Syntax_language_display_name_explain'] = 'Le nom sous lequel le language est affiché sur votre forum';
$lang['Syntax_update_language_options'] = 'Mettre à jour les options des languages';
$lang['Syntax_reset_language_form'] = 'Annuler';

$lang['Syntax_click_return_syntaxadmin'] = 'Cliquez %sici%s pour retourner à l\'administration de la mise en évidence de syntaxe';

$lang['Syntax_cache_cleared_successfully'] = 'Le cache de la mise en évidence de syntaxe a été vidé avec succès';
$lang['Syntax_cache_not_cleared'] = 'Le cache de la mise en évidence de syntaxe n\'a pas été vidé';
$lang['Syntax_status_updated_successfully'] = 'Le status de la mise en évidence de syntaxe a été mis à jour avec succès. Le cache a été vidé.';
$lang['Syntax_status_not_updated'] = 'Le status de la mise en évidence de syntaxe n\'a pas été mis à jour car il n\'a pas été modifié.';
[/quote]
Thallium
Registered User
Posts: 395
Joined: Mon Aug 30, 2004 12:30 am
Contact:

Post by Thallium »

Arm@nd wrote: Thanks for this great mod, It works fine !

But I've a question : Why does it not work with phpBB mods that support BBcode ?


Good question. It'd be even sweeter if you could use a [syntax] block inside say a quote block. :lol: Maybe in a future version?
Complete phpBB powered websites, Mods/Hacks installed, unique templates, updates and repairs... reasonable. Email, PM or IM.
0racle
Registered User
Posts: 304
Joined: Fri Jul 25, 2003 6:28 am
Location: Somewhere I Belong
Contact:

Post by 0racle »

Arm@nd wrote: Thanks for this great mod, It works fine !

But I've a question : Why does it not work with phpBB mods that support BBcode ?


I don't get the question, could you rephrase it?
Thallium wrote: Good question. It'd be even sweeter if you could use a [syntax] block inside say a quote block. :lol: Maybe in a future version?


You can! The only thing you cannot do is put a syntax block inside another syntax block, and as I explain in the MOD that is because the authors of phpBB decided not to support regex matching of starters when building the bbcode tree.
Thallium
Registered User
Posts: 395
Joined: Mon Aug 30, 2004 12:30 am
Contact:

Post by Thallium »

Umm, no not always. You're right about with quote blocks, but I can't use it in between code blocks. As in (code)some code(syntax="php")more code(/syntax)yet more code(/code) *subbing () for [] of course*

All I get is a code block, it has all the code from all three sections as listed above, but the center one I'd like to draw attention to with the highlight isn't coloured. I thought maybe it was interference from the select/expand bbcode, but it does work with the quote blocks so maybe not.

Not a big deal, this is still a top rate mod in my opinion! :lol:

edit: I'm going to try and add the select/expand bbcode to this mod, will post what I come up with (if it works).
Complete phpBB powered websites, Mods/Hacks installed, unique templates, updates and repairs... reasonable. Email, PM or IM.
0racle
Registered User
Posts: 304
Joined: Fri Jul 25, 2003 6:28 am
Location: Somewhere I Belong
Contact:

Post by 0racle »

Thallium wrote: Umm, no not always. You're right about with quote blocks, but I can't use it in between code blocks. As in (code)some code(syntax="php")more code(/syntax)yet more code(/code) *subbing () for [] of course*


Well of course not. phpBB rips out everything in code blocks, and handles it very specially by, among other things, making sure that no bbcodes can be parsed within it.

What I could do would be to make a string sequence that turns highlighting off. E.g.:

[syntax="php"][[[
// code that isn't highlighted
]]]
// code that is highlighted
[[[
// code that isn't highlighted
]]][/syntax]

Although, you can already use >>> at the beginning of a line with <<< at the end to highlight that line extra:

[syntax="php"]
>>>// take notice of this line!<<<
[/syntax]
Thallium wrote: edit: I'm going to try and add the select/expand bbcode to this mod, will post what I come up with (if it works).


The author of that mod has something in the contrib/ directory that will assist you on that I think, though I'm not sure.
Thallium
Registered User
Posts: 395
Joined: Mon Aug 30, 2004 12:30 am
Contact:

Post by Thallium »

Awesome, thanks! :lol:

By the way, the idea of using [[[ and ]]] to toggle it on/off - awesome, that'd really add to it for me, but I can't speak for anyone else. :lol:

edit: I tried the >>>line<<< but don't see a difference, other than the >>> and <<< being present. :? And on an aside here, is there a way to convert all the bloody nbsp's so as not to have them fill up the block?
Last edited by Thallium on Mon Jan 24, 2005 3:02 am, edited 1 time in total.
Complete phpBB powered websites, Mods/Hacks installed, unique templates, updates and repairs... reasonable. Email, PM or IM.
0racle
Registered User
Posts: 304
Joined: Fri Jul 25, 2003 6:28 am
Location: Somewhere I Belong
Contact:

Post by 0racle »

No worries, I'll look to do it for version 0.4
Arm@nd
Registered User
Posts: 12
Joined: Mon Jan 10, 2005 5:10 pm

Post by Arm@nd »

OK, I'll explain my problem (sorry if I don't speak English very well)

I've installed a mod like "Blank Template". I can put all what I want on a blank page, and I can use BBCode (additionals BBCode too)

Only the Syntax Highlighter BBCode doesn't work
0racle
Registered User
Posts: 304
Joined: Fri Jul 25, 2003 6:28 am
Location: Somewhere I Belong
Contact:

Post by 0racle »

Did you put <link rel="stylesheet" type="text/css" href="templates/subSilver/geshi.css" /> in the header of that page?
KI
Registered User
Posts: 32
Joined: Sat Nov 20, 2004 11:46 pm

Post by KI »

0racle wrote: No worries, I'll look to do it for version 0.4

I'm looking forward to your new mod. :)
Are you going to implent the new fast highlighting engine ver. 1.2.X.
Is the release date for 21st of Ferburary realistic?
Arm@nd
Registered User
Posts: 12
Joined: Mon Jan 10, 2005 5:10 pm

Post by Arm@nd »

Yes, I did. The mod uses the overall_header

Here's an example of the bug
Thallium
Registered User
Posts: 395
Joined: Mon Aug 30, 2004 12:30 am
Contact:

Post by Thallium »

Which version of Multi-BBcode are you using? if you've upgraded to 1.4.0c the install is a little different. can you post a link to the text of your bbcode.php and bbcode.tpl(s) and I'll see if I can spot the problem. It installed for me perfectly, though I did adjust it to use Multi-BBcode 1.4.0c

---Thallium
Complete phpBB powered websites, Mods/Hacks installed, unique templates, updates and repairs... reasonable. Email, PM or IM.
0racle
Registered User
Posts: 304
Joined: Fri Jul 25, 2003 6:28 am
Location: Somewhere I Belong
Contact:

Post by 0racle »

KI wrote:
0racle wrote:No worries, I'll look to do it for version 0.4

I'm looking forward to your new mod. :)
Are you going to implent the new fast highlighting engine ver. 1.2.X.
Is the release date for 21st of Ferburary realistic?


No, it will not include the fast highlighting engine - I have no idea when I'll be done with that. But it will include the yet-to-be-released 1.0.5.

So the release date is realistic, for this mod ;). Don't expect the new fast highlighting engine yet ;)

@Arm@nd: Hmm, I'm not sure. I don't know anything about the multi bbcode mod, so I can't help you in that regard.

All I can guess at is that you haven't installed part of the mod correctly...
Arm@nd
Registered User
Posts: 12
Joined: Mon Jan 10, 2005 5:10 pm

Post by Arm@nd »

Thallium wrote: Which version of Multi-BBcode are you using? if you've upgraded to 1.4.0c the install is a little different. can you post a link to the text of your bbcode.php and bbcode.tpl(s) and I'll see if I can spot the problem. It installed for me perfectly, though I did adjust it to use Multi-BBcode 1.4.0c

---Thallium

It's 1.4.0c too

bbcode.php
bbcode.tpl

Thanks for your help :)
Locked

Return to “[2.0.x] MODs in Development”