Link to Mod (http://custom.simplemachines.org/mods/index.php?mod=3070)
cb|GeSHi-mod 1.2
cb|GeSHi-mod adds code syntax highlighting to your forum. Powered by GeSHi (http://qbnz.com/highlighter/), the mod supports +200 different languages and is fully customizable for each of your themes.
Compatible with SMF 2.0 and later.
What's new in 1.2?
- GeSHi sources updated to 1.0.8.11 which includes some new languages
- Minor fix to avoid error notices in the logs when running on PHP 5.4
GNU General Public License v3.0
cb|GeSHi-mod - Syntax Highlighter mod for SMF powered by GeSHi
Copyright (C) 2012-2013, codebirth
Website: http://www.codebirth.com
Powered by GeSHi - http://qbnz.com/highlighter/
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>
More info
Help about customization and usage
http://codebirth.com/index.php?topic=81.0
Feel free to try the mod in the Testing area of my forum and please let me know if you find any issue!
http://codebirth.com/
I hope one day GeShi will support the PAWN language. This is nice though, very helpful for my forum. Thanks!
Hi,
I have several errors like the ones below, do you have any idea why?
Quotehttp://myforum.com/index.php?topic=2841.msg343698: Undefined offset: 1File: /myforum/Sources/geshi.php
Line: 3513
Quotehttp://myforum.com/index.php?topic=6523.msg720028: Constant GESHI_SEARCH already definedFile: /myforum/Sources/geshi/geshi.php
Line: 133
The second one varies a lot on the constant. I have 300 error entries for just one day after installation, with lots of different constants.
Thanks
Sorry, I have no idea why you get those errors. Maybe you have other mods not compatible with this one? I don't know.
Quote from: codebirth on September 11, 2011, 01:12:33 PM
Sorry, I have no idea why you get those errors. Maybe you have other mods not compatible with this one? I don't know.
Thanks for the reply.
No, I don't think so - this is almost a clean install of 2.0 ..
where i can find queries to install into database? can anybody post it here?
When Update dont forget portuguese
<file name="$themedir/languages/Themes.portuguese_pt.php" error="skip">
<operation>
<search position="end" />
<add><![CDATA[
$txt['geshi_code_container'] = 'GeSHi Code Container';
$txt['geshi_code_container_desc'] = 'Para referência, consulte <a href="http://qbnz.com/highlighter/geshi-doc.html#the-code-container" target="_blank">3.1 O Container Código</a>.';
$txt['geshi_line_numbers'] = 'Números de linha';
$txt['geshi_line_numbers_desc'] = 'Para referência, consulte <a href="http://qbnz.com/highlighter/geshi-doc.html#line-numbers" target="_blank">3.2 Números de Linha</a>.';
$txt['geshi_fancy_line_number'] = 'Fantasia números de linha';
$txt['geshi_fancy_line_number_desc'] = 'Para referência, consulte <a href="http://qbnz.com/highlighter/geshi-doc.html#line-numbers" target="_blank">3.2 Números de Linha</a>.';
$txt['geshi_line_style'] = 'Line style';
$txt['geshi_line_style_desc'] = 'Para referência, consulte <a href="http://qbnz.com/highlighter/geshi-doc.html#styling-line-numbers" target="_blank">3.2.2 Styling Números de Linha</a>.';
$txt['geshi_line_style_fancy'] = 'Fancy line style';
$txt['geshi_line_style_fancy_desc'] = 'Para referência, consulte <a href="http://qbnz.com/highlighter/geshi-doc.html#styling-line-numbers" target="_blank">3.2.2 Styling Números de Linha</a>.';
$txt['geshi_highlight_lines_extra_style'] = 'Linhas em destaque style';
$txt['geshi_highlight_lines_extra_style_desc'] = 'Para referência, consulte <a href="http://qbnz.com/highlighter/geshi-doc.html#styles-for-highlighted-lines" target="_blank">3.15.2 Destaque para as Linhas de Styles</a>.';
$txt['geshi_enable_pre_header'] = 'Show header above GeSHi Code Container';
$txt['geshi_enable_pre_header_desc'] = '';
$txt['geshi_pre_header'] = 'Header above GeSHi Code Container';
$txt['geshi_pre_header_desc'] = 'Você pode usar {CODE}, {TAG} and {LANGUAGE} keywords. Para referência, consulte <a href="http://codebirth.com/index.php?topic=81.0" target="_blank">cb|GeSHi-mod help</a>.';
$txt['geshi_enable_header'] = 'Mostrar cabeçalho dentro GeSHi Código Container';
$txt['geshi_enable_header_desc'] = '';
$txt['geshi_header'] = 'Header inside GeSHi Code Container';
$txt['geshi_header_desc'] = 'Você pode usar <a href="http://qbnz.com/highlighter/geshi-doc.html#keyword-substitution" target="_blank">these keywords</a>. Para referência, consulte <a href="http://qbnz.com/highlighter/geshi-doc.html#setting-header-content" target="_blank">3.12.2 Conteúdo Header definição</a>.';
$txt['geshi_enable_footer'] = 'Mostrar Rodapé dentro GeSHi Código Container';
$txt['geshi_enable_footer_desc'] = '';
$txt['geshi_footer'] = 'Rodapé dentro GeSHi Código Container';
$txt['geshi_footer_desc'] = 'Você pode usar <a href="http://qbnz.com/highlighter/geshi-doc.html#keyword-substitution" target="_blank">these keywords</a>. Para referência, consulte <a href="http://qbnz.com/highlighter/geshi-doc.html#setting-footer-content" target="_blank">3.12.3 Setting Footer Content</a>.';
$txt['geshi_enable_language_selector'] = 'Mostrar o selector de línguas';
$txt['geshi_enable_language_selector_desc'] = 'Para referência, consulte <a href="http://codebirth.com/index.php?topic=81.0" target="_blank">cb|GeSHi-mod help</a>.';
$txt['geshi_language_selector'] = 'Línguas selecionáveis';
$txt['geshi_language_selector_desc'] = 'Para referência, consulte <a href="http://codebirth.com/index.php?topic=81.0" target="_blank">cb|GeSHi-mod help</a>.';
]]></add>
</operation>
</file>
<file name="$themedir/languages/Themes.portuguese_pt-utf8.php" error="skip">
<operation>
<search position="end" />
<add><![CDATA[
$txt['geshi_code_container'] = 'GeSHi Code Container';
$txt['geshi_code_container_desc'] = 'Para referência, consulte <a href="http://qbnz.com/highlighter/geshi-doc.html#the-code-container" target="_blank">3.1 O Container Código</a>.';
$txt['geshi_line_numbers'] = 'Números de linha';
$txt['geshi_line_numbers_desc'] = 'Para referência, consulte <a href="http://qbnz.com/highlighter/geshi-doc.html#line-numbers" target="_blank">3.2 Números de Linha</a>.';
$txt['geshi_fancy_line_number'] = 'Fantasia números de linha';
$txt['geshi_fancy_line_number_desc'] = 'Para referência, consulte <a href="http://qbnz.com/highlighter/geshi-doc.html#line-numbers" target="_blank">3.2 Números de Linha</a>.';
$txt['geshi_line_style'] = 'Line style';
$txt['geshi_line_style_desc'] = 'Para referência, consulte <a href="http://qbnz.com/highlighter/geshi-doc.html#styling-line-numbers" target="_blank">3.2.2 Styling Números de Linha</a>.';
$txt['geshi_line_style_fancy'] = 'Fancy line style';
$txt['geshi_line_style_fancy_desc'] = 'Para referência, consulte <a href="http://qbnz.com/highlighter/geshi-doc.html#styling-line-numbers" target="_blank">3.2.2 Styling Números de Linha</a>.';
$txt['geshi_highlight_lines_extra_style'] = 'Linhas em destaque style';
$txt['geshi_highlight_lines_extra_style_desc'] = 'Para referência, consulte <a href="http://qbnz.com/highlighter/geshi-doc.html#styles-for-highlighted-lines" target="_blank">3.15.2 Destaque para as Linhas de Styles</a>.';
$txt['geshi_enable_pre_header'] = 'Show header above GeSHi Code Container';
$txt['geshi_enable_pre_header_desc'] = '';
$txt['geshi_pre_header'] = 'Header above GeSHi Code Container';
$txt['geshi_pre_header_desc'] = 'Você pode usar {CODE}, {TAG} and {LANGUAGE} keywords. Para referência, consulte <a href="http://codebirth.com/index.php?topic=81.0" target="_blank">cb|GeSHi-mod help</a>.';
$txt['geshi_enable_header'] = 'Mostrar cabeçalho dentro GeSHi Código Container';
$txt['geshi_enable_header_desc'] = '';
$txt['geshi_header'] = 'Header inside GeSHi Code Container';
$txt['geshi_header_desc'] = 'Você pode usar <a href="http://qbnz.com/highlighter/geshi-doc.html#keyword-substitution" target="_blank">these keywords</a>. Para referência, consulte <a href="http://qbnz.com/highlighter/geshi-doc.html#setting-header-content" target="_blank">3.12.2 Conteúdo Header definição</a>.';
$txt['geshi_enable_footer'] = 'Mostrar Rodapé dentro GeSHi Código Container';
$txt['geshi_enable_footer_desc'] = '';
$txt['geshi_footer'] = 'Rodapé dentro GeSHi Código Container';
$txt['geshi_footer_desc'] = 'Você pode usar <a href="http://qbnz.com/highlighter/geshi-doc.html#keyword-substitution" target="_blank">these keywords</a>. Para referência, consulte <a href="http://qbnz.com/highlighter/geshi-doc.html#setting-footer-content" target="_blank">3.12.3 Setting Footer Content</a>.';
$txt['geshi_enable_language_selector'] = 'Mostrar o selector de línguas';
$txt['geshi_enable_language_selector_desc'] = 'Para referência, consulte <a href="http://codebirth.com/index.php?topic=81.0" target="_blank">cb|GeSHi-mod help</a>.';
$txt['geshi_language_selector'] = 'Línguas selecionáveis';
$txt['geshi_language_selector_desc'] = 'Para referência, consulte <a href="http://codebirth.com/index.php?topic=81.0" target="_blank">cb|GeSHi-mod help</a>.';
]]></add>
</operation>
</file>
<file name="$themedir/languages/Themes.portuguese_brazilian.php" error="skip">
<operation>
<search position="end" />
<add><![CDATA[
$txt['geshi_code_container'] = 'GeSHi Code Container';
$txt['geshi_code_container_desc'] = 'Para referência, consulte <a href="http://qbnz.com/highlighter/geshi-doc.html#the-code-container" target="_blank">3.1 O Container Código</a>.';
$txt['geshi_line_numbers'] = 'Números de linha';
$txt['geshi_line_numbers_desc'] = 'Para referência, consulte <a href="http://qbnz.com/highlighter/geshi-doc.html#line-numbers" target="_blank">3.2 Números de Linha</a>.';
$txt['geshi_fancy_line_number'] = 'Fantasia números de linha';
$txt['geshi_fancy_line_number_desc'] = 'Para referência, consulte <a href="http://qbnz.com/highlighter/geshi-doc.html#line-numbers" target="_blank">3.2 Números de Linha</a>.';
$txt['geshi_line_style'] = 'Line style';
$txt['geshi_line_style_desc'] = 'Para referência, consulte <a href="http://qbnz.com/highlighter/geshi-doc.html#styling-line-numbers" target="_blank">3.2.2 Styling Números de Linha</a>.';
$txt['geshi_line_style_fancy'] = 'Fancy line style';
$txt['geshi_line_style_fancy_desc'] = 'Para referência, consulte <a href="http://qbnz.com/highlighter/geshi-doc.html#styling-line-numbers" target="_blank">3.2.2 Styling Números de Linha</a>.';
$txt['geshi_highlight_lines_extra_style'] = 'Linhas em destaque style';
$txt['geshi_highlight_lines_extra_style_desc'] = 'Para referência, consulte <a href="http://qbnz.com/highlighter/geshi-doc.html#styles-for-highlighted-lines" target="_blank">3.15.2 Destaque para as Linhas de Styles</a>.';
$txt['geshi_enable_pre_header'] = 'Show header above GeSHi Code Container';
$txt['geshi_enable_pre_header_desc'] = '';
$txt['geshi_pre_header'] = 'Header above GeSHi Code Container';
$txt['geshi_pre_header_desc'] = 'Você pode usar {CODE}, {TAG} and {LANGUAGE} keywords. Para referência, consulte <a href="http://codebirth.com/index.php?topic=81.0" target="_blank">cb|GeSHi-mod help</a>.';
$txt['geshi_enable_header'] = 'Mostrar cabeçalho dentro GeSHi Código Container';
$txt['geshi_enable_header_desc'] = '';
$txt['geshi_header'] = 'Header inside GeSHi Code Container';
$txt['geshi_header_desc'] = 'Você pode usar <a href="http://qbnz.com/highlighter/geshi-doc.html#keyword-substitution" target="_blank">these keywords</a>. Para referência, consulte <a href="http://qbnz.com/highlighter/geshi-doc.html#setting-header-content" target="_blank">3.12.2 Conteúdo Header definição</a>.';
$txt['geshi_enable_footer'] = 'Mostrar Rodapé dentro GeSHi Código Container';
$txt['geshi_enable_footer_desc'] = '';
$txt['geshi_footer'] = 'Rodapé dentro GeSHi Código Container';
$txt['geshi_footer_desc'] = 'Você pode usar <a href="http://qbnz.com/highlighter/geshi-doc.html#keyword-substitution" target="_blank">these keywords</a>. Para referência, consulte <a href="http://qbnz.com/highlighter/geshi-doc.html#setting-footer-content" target="_blank">3.12.3 Setting Footer Content</a>.';
$txt['geshi_enable_language_selector'] = 'Mostrar o selector de línguas';
$txt['geshi_enable_language_selector_desc'] = 'Para referência, consulte <a href="http://codebirth.com/index.php?topic=81.0" target="_blank">cb|GeSHi-mod help</a>.';
$txt['geshi_language_selector'] = 'Línguas selecionáveis';
$txt['geshi_language_selector_desc'] = 'Para referência, consulte <a href="http://codebirth.com/index.php?topic=81.0" target="_blank">cb|GeSHi-mod help</a>.';
]]></add>
</operation>
</file>
<file name="$themedir/languages/Themes.portuguese_brazilian-utf8.php" error="skip">
<operation>
<search position="end" />
<add><![CDATA[
$txt['geshi_code_container'] = 'GeSHi Code Container';
$txt['geshi_code_container_desc'] = 'Para referência, consulte <a href="http://qbnz.com/highlighter/geshi-doc.html#the-code-container" target="_blank">3.1 O Container Código</a>.';
$txt['geshi_line_numbers'] = 'Números de linha';
$txt['geshi_line_numbers_desc'] = 'Para referência, consulte <a href="http://qbnz.com/highlighter/geshi-doc.html#line-numbers" target="_blank">3.2 Números de Linha</a>.';
$txt['geshi_fancy_line_number'] = 'Fantasia números de linha';
$txt['geshi_fancy_line_number_desc'] = 'Para referência, consulte <a href="http://qbnz.com/highlighter/geshi-doc.html#line-numbers" target="_blank">3.2 Números de Linha</a>.';
$txt['geshi_line_style'] = 'Line style';
$txt['geshi_line_style_desc'] = 'Para referência, consulte <a href="http://qbnz.com/highlighter/geshi-doc.html#styling-line-numbers" target="_blank">3.2.2 Styling Números de Linha</a>.';
$txt['geshi_line_style_fancy'] = 'Fancy line style';
$txt['geshi_line_style_fancy_desc'] = 'Para referência, consulte <a href="http://qbnz.com/highlighter/geshi-doc.html#styling-line-numbers" target="_blank">3.2.2 Styling Números de Linha</a>.';
$txt['geshi_highlight_lines_extra_style'] = 'Linhas em destaque style';
$txt['geshi_highlight_lines_extra_style_desc'] = 'Para referência, consulte <a href="http://qbnz.com/highlighter/geshi-doc.html#styles-for-highlighted-lines" target="_blank">3.15.2 Destaque para as Linhas de Styles</a>.';
$txt['geshi_enable_pre_header'] = 'Show header above GeSHi Code Container';
$txt['geshi_enable_pre_header_desc'] = '';
$txt['geshi_pre_header'] = 'Header above GeSHi Code Container';
$txt['geshi_pre_header_desc'] = 'Você pode usar {CODE}, {TAG} and {LANGUAGE} keywords. Para referência, consulte <a href="http://codebirth.com/index.php?topic=81.0" target="_blank">cb|GeSHi-mod help</a>.';
$txt['geshi_enable_header'] = 'Mostrar cabeçalho dentro GeSHi Código Container';
$txt['geshi_enable_header_desc'] = '';
$txt['geshi_header'] = 'Header inside GeSHi Code Container';
$txt['geshi_header_desc'] = 'Você pode usar <a href="http://qbnz.com/highlighter/geshi-doc.html#keyword-substitution" target="_blank">these keywords</a>. Para referência, consulte <a href="http://qbnz.com/highlighter/geshi-doc.html#setting-header-content" target="_blank">3.12.2 Conteúdo Header definição</a>.';
$txt['geshi_enable_footer'] = 'Mostrar Rodapé dentro GeSHi Código Container';
$txt['geshi_enable_footer_desc'] = '';
$txt['geshi_footer'] = 'Rodapé dentro GeSHi Código Container';
$txt['geshi_footer_desc'] = 'Você pode usar <a href="http://qbnz.com/highlighter/geshi-doc.html#keyword-substitution" target="_blank">these keywords</a>. Para referência, consulte <a href="http://qbnz.com/highlighter/geshi-doc.html#setting-footer-content" target="_blank">3.12.3 Setting Footer Content</a>.';
$txt['geshi_enable_language_selector'] = 'Mostrar o selector de línguas';
$txt['geshi_enable_language_selector_desc'] = 'Para referência, consulte <a href="http://codebirth.com/index.php?topic=81.0" target="_blank">cb|GeSHi-mod help</a>.';
$txt['geshi_language_selector'] = 'Línguas selecionáveis';
$txt['geshi_language_selector_desc'] = 'Para referência, consulte <a href="http://codebirth.com/index.php?topic=81.0" target="_blank">cb|GeSHi-mod help</a>.';
]]></add>
</operation>
</file>
Obrigado!
Quote from: Joomlamz on December 26, 2011, 07:45:55 AM
When Update dont forget portuguese
<file name="$themedir/languages/Themes.portuguese_pt.php" error="skip">
<operation>
<search position="end" />
<add><![CDATA[
$txt['geshi_code_container'] = 'GeSHi Code Container';
$txt['geshi_code_container_desc'] = 'Para referência, consulte <a href="http://qbnz.com/highlighter/geshi-doc.html#the-code-container" target="_blank">3.1 O Container Código</a>.';
$txt['geshi_line_numbers'] = 'Números de linha';
$txt['geshi_line_numbers_desc'] = 'Para referência, consulte <a href="http://qbnz.com/highlighter/geshi-doc.html#line-numbers" target="_blank">3.2 Números de Linha</a>.';
$txt['geshi_fancy_line_number'] = 'Fantasia números de linha';
$txt['geshi_fancy_line_number_desc'] = 'Para referência, consulte <a href="http://qbnz.com/highlighter/geshi-doc.html#line-numbers" target="_blank">3.2 Números de Linha</a>.';
$txt['geshi_line_style'] = 'Line style';
$txt['geshi_line_style_desc'] = 'Para referência, consulte <a href="http://qbnz.com/highlighter/geshi-doc.html#styling-line-numbers" target="_blank">3.2.2 Styling Números de Linha</a>.';
$txt['geshi_line_style_fancy'] = 'Fancy line style';
$txt['geshi_line_style_fancy_desc'] = 'Para referência, consulte <a href="http://qbnz.com/highlighter/geshi-doc.html#styling-line-numbers" target="_blank">3.2.2 Styling Números de Linha</a>.';
$txt['geshi_highlight_lines_extra_style'] = 'Linhas em destaque style';
$txt['geshi_highlight_lines_extra_style_desc'] = 'Para referência, consulte <a href="http://qbnz.com/highlighter/geshi-doc.html#styles-for-highlighted-lines" target="_blank">3.15.2 Destaque para as Linhas de Styles</a>.';
$txt['geshi_enable_pre_header'] = 'Show header above GeSHi Code Container';
$txt['geshi_enable_pre_header_desc'] = '';
$txt['geshi_pre_header'] = 'Header above GeSHi Code Container';
$txt['geshi_pre_header_desc'] = 'Você pode usar {CODE}, {TAG} and {LANGUAGE} keywords. Para referência, consulte <a href="http://codebirth.com/index.php?topic=81.0" target="_blank">cb|GeSHi-mod help</a>.';
$txt['geshi_enable_header'] = 'Mostrar cabeçalho dentro GeSHi Código Container';
$txt['geshi_enable_header_desc'] = '';
$txt['geshi_header'] = 'Header inside GeSHi Code Container';
$txt['geshi_header_desc'] = 'Você pode usar <a href="http://qbnz.com/highlighter/geshi-doc.html#keyword-substitution" target="_blank">these keywords</a>. Para referência, consulte <a href="http://qbnz.com/highlighter/geshi-doc.html#setting-header-content" target="_blank">3.12.2 Conteúdo Header definição</a>.';
$txt['geshi_enable_footer'] = 'Mostrar Rodapé dentro GeSHi Código Container';
$txt['geshi_enable_footer_desc'] = '';
$txt['geshi_footer'] = 'Rodapé dentro GeSHi Código Container';
$txt['geshi_footer_desc'] = 'Você pode usar <a href="http://qbnz.com/highlighter/geshi-doc.html#keyword-substitution" target="_blank">these keywords</a>. Para referência, consulte <a href="http://qbnz.com/highlighter/geshi-doc.html#setting-footer-content" target="_blank">3.12.3 Setting Footer Content</a>.';
$txt['geshi_enable_language_selector'] = 'Mostrar o selector de línguas';
$txt['geshi_enable_language_selector_desc'] = 'Para referência, consulte <a href="http://codebirth.com/index.php?topic=81.0" target="_blank">cb|GeSHi-mod help</a>.';
$txt['geshi_language_selector'] = 'Línguas selecionáveis';
$txt['geshi_language_selector_desc'] = 'Para referência, consulte <a href="http://codebirth.com/index.php?topic=81.0" target="_blank">cb|GeSHi-mod help</a>.';
]]></add>
</operation>
</file>
<file name="$themedir/languages/Themes.portuguese_pt-utf8.php" error="skip">
<operation>
<search position="end" />
<add><![CDATA[
$txt['geshi_code_container'] = 'GeSHi Code Container';
$txt['geshi_code_container_desc'] = 'Para referência, consulte <a href="http://qbnz.com/highlighter/geshi-doc.html#the-code-container" target="_blank">3.1 O Container Código</a>.';
$txt['geshi_line_numbers'] = 'Números de linha';
$txt['geshi_line_numbers_desc'] = 'Para referência, consulte <a href="http://qbnz.com/highlighter/geshi-doc.html#line-numbers" target="_blank">3.2 Números de Linha</a>.';
$txt['geshi_fancy_line_number'] = 'Fantasia números de linha';
$txt['geshi_fancy_line_number_desc'] = 'Para referência, consulte <a href="http://qbnz.com/highlighter/geshi-doc.html#line-numbers" target="_blank">3.2 Números de Linha</a>.';
$txt['geshi_line_style'] = 'Line style';
$txt['geshi_line_style_desc'] = 'Para referência, consulte <a href="http://qbnz.com/highlighter/geshi-doc.html#styling-line-numbers" target="_blank">3.2.2 Styling Números de Linha</a>.';
$txt['geshi_line_style_fancy'] = 'Fancy line style';
$txt['geshi_line_style_fancy_desc'] = 'Para referência, consulte <a href="http://qbnz.com/highlighter/geshi-doc.html#styling-line-numbers" target="_blank">3.2.2 Styling Números de Linha</a>.';
$txt['geshi_highlight_lines_extra_style'] = 'Linhas em destaque style';
$txt['geshi_highlight_lines_extra_style_desc'] = 'Para referência, consulte <a href="http://qbnz.com/highlighter/geshi-doc.html#styles-for-highlighted-lines" target="_blank">3.15.2 Destaque para as Linhas de Styles</a>.';
$txt['geshi_enable_pre_header'] = 'Show header above GeSHi Code Container';
$txt['geshi_enable_pre_header_desc'] = '';
$txt['geshi_pre_header'] = 'Header above GeSHi Code Container';
$txt['geshi_pre_header_desc'] = 'Você pode usar {CODE}, {TAG} and {LANGUAGE} keywords. Para referência, consulte <a href="http://codebirth.com/index.php?topic=81.0" target="_blank">cb|GeSHi-mod help</a>.';
$txt['geshi_enable_header'] = 'Mostrar cabeçalho dentro GeSHi Código Container';
$txt['geshi_enable_header_desc'] = '';
$txt['geshi_header'] = 'Header inside GeSHi Code Container';
$txt['geshi_header_desc'] = 'Você pode usar <a href="http://qbnz.com/highlighter/geshi-doc.html#keyword-substitution" target="_blank">these keywords</a>. Para referência, consulte <a href="http://qbnz.com/highlighter/geshi-doc.html#setting-header-content" target="_blank">3.12.2 Conteúdo Header definição</a>.';
$txt['geshi_enable_footer'] = 'Mostrar Rodapé dentro GeSHi Código Container';
$txt['geshi_enable_footer_desc'] = '';
$txt['geshi_footer'] = 'Rodapé dentro GeSHi Código Container';
$txt['geshi_footer_desc'] = 'Você pode usar <a href="http://qbnz.com/highlighter/geshi-doc.html#keyword-substitution" target="_blank">these keywords</a>. Para referência, consulte <a href="http://qbnz.com/highlighter/geshi-doc.html#setting-footer-content" target="_blank">3.12.3 Setting Footer Content</a>.';
$txt['geshi_enable_language_selector'] = 'Mostrar o selector de línguas';
$txt['geshi_enable_language_selector_desc'] = 'Para referência, consulte <a href="http://codebirth.com/index.php?topic=81.0" target="_blank">cb|GeSHi-mod help</a>.';
$txt['geshi_language_selector'] = 'Línguas selecionáveis';
$txt['geshi_language_selector_desc'] = 'Para referência, consulte <a href="http://codebirth.com/index.php?topic=81.0" target="_blank">cb|GeSHi-mod help</a>.';
]]></add>
</operation>
</file>
<file name="$themedir/languages/Themes.portuguese_brazilian.php" error="skip">
<operation>
<search position="end" />
<add><![CDATA[
$txt['geshi_code_container'] = 'GeSHi Code Container';
$txt['geshi_code_container_desc'] = 'Para referência, consulte <a href="http://qbnz.com/highlighter/geshi-doc.html#the-code-container" target="_blank">3.1 O Container Código</a>.';
$txt['geshi_line_numbers'] = 'Números de linha';
$txt['geshi_line_numbers_desc'] = 'Para referência, consulte <a href="http://qbnz.com/highlighter/geshi-doc.html#line-numbers" target="_blank">3.2 Números de Linha</a>.';
$txt['geshi_fancy_line_number'] = 'Fantasia números de linha';
$txt['geshi_fancy_line_number_desc'] = 'Para referência, consulte <a href="http://qbnz.com/highlighter/geshi-doc.html#line-numbers" target="_blank">3.2 Números de Linha</a>.';
$txt['geshi_line_style'] = 'Line style';
$txt['geshi_line_style_desc'] = 'Para referência, consulte <a href="http://qbnz.com/highlighter/geshi-doc.html#styling-line-numbers" target="_blank">3.2.2 Styling Números de Linha</a>.';
$txt['geshi_line_style_fancy'] = 'Fancy line style';
$txt['geshi_line_style_fancy_desc'] = 'Para referência, consulte <a href="http://qbnz.com/highlighter/geshi-doc.html#styling-line-numbers" target="_blank">3.2.2 Styling Números de Linha</a>.';
$txt['geshi_highlight_lines_extra_style'] = 'Linhas em destaque style';
$txt['geshi_highlight_lines_extra_style_desc'] = 'Para referência, consulte <a href="http://qbnz.com/highlighter/geshi-doc.html#styles-for-highlighted-lines" target="_blank">3.15.2 Destaque para as Linhas de Styles</a>.';
$txt['geshi_enable_pre_header'] = 'Show header above GeSHi Code Container';
$txt['geshi_enable_pre_header_desc'] = '';
$txt['geshi_pre_header'] = 'Header above GeSHi Code Container';
$txt['geshi_pre_header_desc'] = 'Você pode usar {CODE}, {TAG} and {LANGUAGE} keywords. Para referência, consulte <a href="http://codebirth.com/index.php?topic=81.0" target="_blank">cb|GeSHi-mod help</a>.';
$txt['geshi_enable_header'] = 'Mostrar cabeçalho dentro GeSHi Código Container';
$txt['geshi_enable_header_desc'] = '';
$txt['geshi_header'] = 'Header inside GeSHi Code Container';
$txt['geshi_header_desc'] = 'Você pode usar <a href="http://qbnz.com/highlighter/geshi-doc.html#keyword-substitution" target="_blank">these keywords</a>. Para referência, consulte <a href="http://qbnz.com/highlighter/geshi-doc.html#setting-header-content" target="_blank">3.12.2 Conteúdo Header definição</a>.';
$txt['geshi_enable_footer'] = 'Mostrar Rodapé dentro GeSHi Código Container';
$txt['geshi_enable_footer_desc'] = '';
$txt['geshi_footer'] = 'Rodapé dentro GeSHi Código Container';
$txt['geshi_footer_desc'] = 'Você pode usar <a href="http://qbnz.com/highlighter/geshi-doc.html#keyword-substitution" target="_blank">these keywords</a>. Para referência, consulte <a href="http://qbnz.com/highlighter/geshi-doc.html#setting-footer-content" target="_blank">3.12.3 Setting Footer Content</a>.';
$txt['geshi_enable_language_selector'] = 'Mostrar o selector de línguas';
$txt['geshi_enable_language_selector_desc'] = 'Para referência, consulte <a href="http://codebirth.com/index.php?topic=81.0" target="_blank">cb|GeSHi-mod help</a>.';
$txt['geshi_language_selector'] = 'Línguas selecionáveis';
$txt['geshi_language_selector_desc'] = 'Para referência, consulte <a href="http://codebirth.com/index.php?topic=81.0" target="_blank">cb|GeSHi-mod help</a>.';
]]></add>
</operation>
</file>
<file name="$themedir/languages/Themes.portuguese_brazilian-utf8.php" error="skip">
<operation>
<search position="end" />
<add><![CDATA[
$txt['geshi_code_container'] = 'GeSHi Code Container';
$txt['geshi_code_container_desc'] = 'Para referência, consulte <a href="http://qbnz.com/highlighter/geshi-doc.html#the-code-container" target="_blank">3.1 O Container Código</a>.';
$txt['geshi_line_numbers'] = 'Números de linha';
$txt['geshi_line_numbers_desc'] = 'Para referência, consulte <a href="http://qbnz.com/highlighter/geshi-doc.html#line-numbers" target="_blank">3.2 Números de Linha</a>.';
$txt['geshi_fancy_line_number'] = 'Fantasia números de linha';
$txt['geshi_fancy_line_number_desc'] = 'Para referência, consulte <a href="http://qbnz.com/highlighter/geshi-doc.html#line-numbers" target="_blank">3.2 Números de Linha</a>.';
$txt['geshi_line_style'] = 'Line style';
$txt['geshi_line_style_desc'] = 'Para referência, consulte <a href="http://qbnz.com/highlighter/geshi-doc.html#styling-line-numbers" target="_blank">3.2.2 Styling Números de Linha</a>.';
$txt['geshi_line_style_fancy'] = 'Fancy line style';
$txt['geshi_line_style_fancy_desc'] = 'Para referência, consulte <a href="http://qbnz.com/highlighter/geshi-doc.html#styling-line-numbers" target="_blank">3.2.2 Styling Números de Linha</a>.';
$txt['geshi_highlight_lines_extra_style'] = 'Linhas em destaque style';
$txt['geshi_highlight_lines_extra_style_desc'] = 'Para referência, consulte <a href="http://qbnz.com/highlighter/geshi-doc.html#styles-for-highlighted-lines" target="_blank">3.15.2 Destaque para as Linhas de Styles</a>.';
$txt['geshi_enable_pre_header'] = 'Show header above GeSHi Code Container';
$txt['geshi_enable_pre_header_desc'] = '';
$txt['geshi_pre_header'] = 'Header above GeSHi Code Container';
$txt['geshi_pre_header_desc'] = 'Você pode usar {CODE}, {TAG} and {LANGUAGE} keywords. Para referência, consulte <a href="http://codebirth.com/index.php?topic=81.0" target="_blank">cb|GeSHi-mod help</a>.';
$txt['geshi_enable_header'] = 'Mostrar cabeçalho dentro GeSHi Código Container';
$txt['geshi_enable_header_desc'] = '';
$txt['geshi_header'] = 'Header inside GeSHi Code Container';
$txt['geshi_header_desc'] = 'Você pode usar <a href="http://qbnz.com/highlighter/geshi-doc.html#keyword-substitution" target="_blank">these keywords</a>. Para referência, consulte <a href="http://qbnz.com/highlighter/geshi-doc.html#setting-header-content" target="_blank">3.12.2 Conteúdo Header definição</a>.';
$txt['geshi_enable_footer'] = 'Mostrar Rodapé dentro GeSHi Código Container';
$txt['geshi_enable_footer_desc'] = '';
$txt['geshi_footer'] = 'Rodapé dentro GeSHi Código Container';
$txt['geshi_footer_desc'] = 'Você pode usar <a href="http://qbnz.com/highlighter/geshi-doc.html#keyword-substitution" target="_blank">these keywords</a>. Para referência, consulte <a href="http://qbnz.com/highlighter/geshi-doc.html#setting-footer-content" target="_blank">3.12.3 Setting Footer Content</a>.';
$txt['geshi_enable_language_selector'] = 'Mostrar o selector de línguas';
$txt['geshi_enable_language_selector_desc'] = 'Para referência, consulte <a href="http://codebirth.com/index.php?topic=81.0" target="_blank">cb|GeSHi-mod help</a>.';
$txt['geshi_language_selector'] = 'Línguas selecionáveis';
$txt['geshi_language_selector_desc'] = 'Para referência, consulte <a href="http://codebirth.com/index.php?topic=81.0" target="_blank">cb|GeSHi-mod help</a>.';
]]></add>
</operation>
</file>
Hi, trying to install GeSHi mod.
- patched the required files
- downloaded the module, copied the entire directory Sources/ into the smf root directory
Now I am stuck at db_install.php.
QuoteThis file should not be able to execute standalone. You may have to run the following queries manually.
Ok, standalone executing gives me "Hacking attemp". What queries do I have to run? Where are they?
I dont have mods installed, its almost running on default options
???
Hi,
Why don't you install the MOD in the usual way? I mean, uploading the package through the Package Manager of your Admin Center. That would mofify the files for you and run the needed queries. And most important, you'll have the option to uninstall the MOD.
Didn't know about that. thanks.
Thank you for Geshi update
Here is a small change by me to add the Codeselector to Geshi:
Search in Subs.php:
$pre_header = "";
if ($settings[\'geshi_enable_pre_header\']) {
$pre_header = \'<div class="codeheader">\' . str_replace(array("{CODE}", "{TAG}", "{LANGUAGE}"), array($txt[\'code\'], strtoupper($lang), $geshi->get_language_name()), $settings[\'geshi_pre_header\']) . "</div>";
}
Replace
$pre_header = "";
if ($settings[\'geshi_enable_pre_header\']) {
$codeselector = $geshi->get_language_name() . \' <a href="javascript:void(0);" onclick="return smfSelectText(this);" class="codeoperation">\' . $txt[\'code_select\'] . \'</a>\';
$pre_header = \'<div class="codeheader">\' . str_replace(array("{CODE}", "{TAG}", "{LANGUAGE}"), array($txt[\'code\'], strtoupper($lang), $codeselector), $settings[\'geshi_pre_header\']) . "</div>";
}
Regards
Andreas
could someone please post some screen shots
I would like to see that this mods does and looks like!
Thank You
Hi, is anyone still using GeSHi?
I managed to update the code to run in SMF 2.0.18:
https://github.com/alkisg/smf-geshi
...it works, but PHP isn't my forte.
Has anyone made a better version?
We're still using it, however after the 2.0.19 update, the apostrophe is rendered wrong. So if we can't fix it I don't know how long we'll use it.
Marc
This is a great mod...
I don't really use it, but I think you can get most of the way back to pre-2.0.19 functionality by adding:
$data[0] = strtr($data[0], array(
\''\' => \''\',
\'&\' => \'&\',
)
);
Into Subs.php, ~line 1128, so the new code looks like:
'tag' => 'code',
'type' => 'unparsed_equals_content',
'content' => '$1',
// !!! Maybe this can be simplified?
'validate' => isset($disabled['code']) ? null : create_function('&$tag, &$data, $disabled', '
global $sourcedir, $settings, $txt;
$data[0] = strtr($data[0], array(
\''\' => \''\',
\'&\' => \'&\',
)
);
$data[0] = strtr($data[0], array(
\'[]\' => \'[]\',
\'['\' => \'['\',
\'<br />\' => "\n",
)
);
I hope this helps you get started....
This mod really doesn't install cleanly, and hasn't in a while. But if you do the Subs.php part that fails by hand, and try the above, you should be close.
It can run on php 7.4, but NOT php 8.0. I think it will need a pretty significant amount of rework to work under php 8.
Thanks for looking at it, this fixed the issue. All code is shown as it should :)
Also thanks for warning about php8, I'm not really into php
- so I don't track the releases. I'm still in the progress to update the server from 5.6 to to 7 (need to check if out main site supports it)
Marc
- I do understand php, I can code a bit, but that's more monkey see is monkey do