Syntax Highlighter

All new MODs released in our MOD Database will be announced in here. All support for released MODs needs to take place in the Customisations Database.
Forum rules
READ: phpBB.com Board-Wide Rules and Regulations

NOTICE: This forum is only for the announcement of new releases and/or updates of MODs. Any MOD support should be obtained through the Customisations Database in the support area designated for each MOD.

A direct link to support for each MOD is in the first post of the respective topic.
gongadze
Registered User
Posts: 8
Joined: Tue Aug 11, 2009 10:22 am
Location: Hungary

Re: Syntax Highlighter

Post by gongadze » Tue Aug 11, 2009 11:02 am

1.0.12 strange errors with lua and bash parsing in viewtopic. No debug info, nothing comes back from webserver.
In posting mode and preview mode works everything ok.

Installed MODs: (1) QuickEdit (2) QuickReply (3) RSS (4) Ajax Chat (5) Adaptive Search (6) All posts printing (7) Unread posts (8) Instant redirect by posting (9) Forums' background and color change (10) Synthax Highlighter(GeSHi) (11) Pastebin with diff

User avatar
UseLess
Registered User
Posts: 521
Joined: Mon Jul 22, 2002 7:26 pm
Location: North East UK

Re: Syntax Highlighter

Post by UseLess » Tue Aug 11, 2009 1:09 pm

Greetings,

Can you supply me with some lua and bash code?

And I've asked for the submitted update to be denied as bigwebmaster came up with an easier way of handling malformed tags... I've changed the code a little and also added the option to override the 'code' tag.
Movie Quote:
It's not the years honey, it's the mileage...
phpBB 3 Mods @ phpBBStyles

gongadze
Registered User
Posts: 8
Joined: Tue Aug 11, 2009 10:22 am
Location: Hungary

Re: Syntax Highlighter

Post by gongadze » Tue Aug 11, 2009 1:31 pm

The Killer Code:
FIRST POST:

Code: Select all

[bash]
% xsltproc --version
Using libxml 20628, libxslt 10119CVS1096 and libexslt 813CVS1096
xsltproc was compiled against libxml 20627, libxslt 10119 and libexslt 813
libxslt 10119 was compiled against libxml 20627
libexslt 813 was compiled against libxml 20627

% xsltproc at.xsl be.xml

% ls *.html
chap1.html  chap2.html  chap3.html
[/bash]
SECOND POST

Code: Select all

[lua]
anything
[/lua]

gongadze
Registered User
Posts: 8
Joined: Tue Aug 11, 2009 10:22 am
Location: Hungary

Re: Syntax Highlighter

Post by gongadze » Tue Aug 11, 2009 5:00 pm

How can I gain some debug info?

User avatar
Fire-Fox
Registered User
Posts: 68
Joined: Tue Jun 16, 2009 1:13 pm
Contact:

Re: Syntax Highlighter

Post by Fire-Fox » Tue Aug 11, 2009 7:12 pm

Hey


How do i add various bbcode buttons, to the posting page? like the code tag?

can't find a guide
Regards
Fire-Fox
Denmark

User avatar
UseLess
Registered User
Posts: 521
Joined: Mon Jul 22, 2002 7:26 pm
Location: North East UK

Re: Syntax Highlighter

Post by UseLess » Tue Aug 11, 2009 9:23 pm

Greetings,
gongadze wrote:How can I gain some debug info?
Enable the debug options in 'config.php' in the root of your forum.
Fire-Fox wrote:How do i add various bbcode buttons, to the posting page? like the code tag?
You'd need to edit the posting_buttons.html file to add whatever buttons you want.
Movie Quote:
It's not the years honey, it's the mileage...
phpBB 3 Mods @ phpBBStyles

gongadze
Registered User
Posts: 8
Joined: Tue Aug 11, 2009 10:22 am
Location: Hungary

Re: Syntax Highlighter

Post by gongadze » Tue Aug 11, 2009 9:58 pm

Nothing usable. :( No error messages

User avatar
UseLess
Registered User
Posts: 521
Joined: Mon Jul 22, 2002 7:26 pm
Location: North East UK

Re: Syntax Highlighter

Post by UseLess » Wed Aug 12, 2009 2:18 am

Greetings,

Have you tried using: [syntax lang=bash] instead of [bash] and what is the problem with the post?

If there are no errors then a screen shot may help.
Movie Quote:
It's not the years honey, it's the mileage...
phpBB 3 Mods @ phpBBStyles

gongadze
Registered User
Posts: 8
Joined: Tue Aug 11, 2009 10:22 am
Location: Hungary

Re: Syntax Highlighter

Post by gongadze » Wed Aug 12, 2009 1:26 pm

Code: Select all

			'BBCODE_HELPLINE'	=> $user->lang[$value['bbcode_helpline']],
Warning:

Code: Select all

[phpBB Debug] PHP Notice: in file /boardbbcodes.php on line 45: Undefined index: 
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 3897: Cannot modify header information - headers already sent by (output started at /includes/functions.php:3259)
RESOLVED:

Code: Select all

			'BBCODE_HELPLINE'	=> (isset($user->lang[$value['bbcode_helpline']]))?$user->lang[$value['bbcode_helpline']]:'',
#############################################################
Trying this bbCode [version][/version] resulted in:

Code: Select all

Fatal error: Call to undefined function: get_version() in /phpBB3/includes/hooks/hook_syntax_highlighter.php on line 284

gongadze
Registered User
Posts: 8
Joined: Tue Aug 11, 2009 10:22 am
Location: Hungary

Re: Syntax Highlighter

Post by gongadze » Wed Aug 12, 2009 3:36 pm

GeSHi 1.0.8.2.

Next try:

two posts:

post one:

Code: Select all

some text
post two:

Code: Select all

<?
echo
?>

Error:

Code: Select all

[phpBB Debug] PHP Notice: in file /includes/geshi.php on line 2151: preg_match(): Compilation failed: unrecognized character after (?< at offset 3

User avatar
UseLess
Registered User
Posts: 521
Joined: Mon Jul 22, 2002 7:26 pm
Location: North East UK

Re: Syntax Highlighter

Post by UseLess » Wed Aug 12, 2009 9:15 pm

Greetings,

If your using the board bbcodes mod then have you added the changes in: contrib/boardbbcodes_changes.txt ?

To fix the version tag problem:

open: includes/geshi.php
find: function version()
replace with: function get_version()

If you cannot find 'function version()' then your not using the version of GeSHi supplied with this mod. A function was added to return the version of GeSHi used.

The GeSHi version should be 1.0.8.4 for Syntax Highlighter 1.0.12 if your using another mod that requires GeSHi then you may need to update the version used.
Movie Quote:
It's not the years honey, it's the mileage...
phpBB 3 Mods @ phpBBStyles

gongadze
Registered User
Posts: 8
Joined: Tue Aug 11, 2009 10:22 am
Location: Hungary

Re: Syntax Highlighter

Post by gongadze » Wed Aug 12, 2009 10:46 pm

After:

Code: Select all

// Flags
	var $debug_enable = true;
	var $allow_bbcode = true;
	var $allow_html = false;
	var $is_sig = false;
	var $pm = false;
	/*

Code: Select all

[phpBB Debug] PHP Notice: in file /includes/hooks/hook_syntax_highlighter.php on line 1151: Undefined index: XS_BBC_DEBUG_DEBUG
[phpBB Debug] PHP Notice: in file /includes/hooks/hook_syntax_highlighter.php on line 1151: Undefined index: XS_BBC_DEBUG_DEBUG
[phpBB Debug] PHP Notice: in file /includes/hooks/hook_syntax_highlighter.php on line 1151: Undefined index: XS_BBC_DEBUG_DEBUG
[phpBB Debug] PHP Notice: in file /includes/hooks/hook_syntax_highlighter.php on line 1151: Undefined index: XS_BBC_DEBUG_DEBUG

User avatar
UseLess
Registered User
Posts: 521
Joined: Mon Jul 22, 2002 7:26 pm
Location: North East UK

Re: Syntax Highlighter

Post by UseLess » Wed Aug 12, 2009 11:58 pm

Greetings,

To resolve that problem move the language entry from 'language/en/mods/useless_xs_bbcode.php' to 'language/en/common.php' and put it with the other Syntax related entries at the bottom of the file.

The problem was resolved in 1.0.13 (I think) but since it's been held back for other things it'll be fixed in the next update.
Movie Quote:
It's not the years honey, it's the mileage...
phpBB 3 Mods @ phpBBStyles

gongadze
Registered User
Posts: 8
Joined: Tue Aug 11, 2009 10:22 am
Location: Hungary

Re: Syntax Highlighter

Post by gongadze » Thu Aug 13, 2009 2:10 am

I think my very strange problem is a PHP4 issue. May I wrong?
The mirror of phpBB3 on localhost works fine with PHP5.

User avatar
UseLess
Registered User
Posts: 521
Joined: Mon Jul 22, 2002 7:26 pm
Location: North East UK

Re: Syntax Highlighter

Post by UseLess » Thu Aug 13, 2009 11:24 am

Greetings,

The problem is more likely to be the version of GeSHi your using.
Movie Quote:
It's not the years honey, it's the mileage...
phpBB 3 Mods @ phpBBStyles

Locked

Return to “[3.0.x] MOD Database Releases”