[BETA] Advanced PHP Highlighter

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.
hakonsa
Registered User
Posts: 7
Joined: Tue Jan 06, 2004 6:52 pm

[BETA] Advanced PHP Highlighter

Post by hakonsa »

Hello!

I've made a modification which highlights PHP code(s) inside the

Code: Select all

 BBCode tag and makes function links to the Manual. It's partically based on the PHP Syntax Highlighter BBCode mod, but that's only some lines of code.

Only the PHP code inside [code] will be highlighted, so you can nest both PHP and HTML codes inside [code].

I would really like to hearing from you if you find any bugs  :wink: 

And here it is: http://www.lotteriet.net/~hakonsa/php/hightlightmod.txt
Last edited by hakonsa on Wed Jan 07, 2004 3:14 pm, edited 1 time in total.

romihaitza
Registered User
Posts: 40
Joined: Fri Jul 25, 2003 5:51 pm
Location: Romania
Contact:

Post by romihaitza »

What will be highlighted?

My forum highlighted both php and HTML.... i try again and see what happen whit simple text.
All the best,
Mike

My latest MOD : Second WebSite

romihaitza
Registered User
Posts: 40
Joined: Fri Jul 25, 2003 5:51 pm
Location: Romania
Contact:

Post by romihaitza »

I've reinstalled your MOD on another forum and nothing happen .... i don't see this :

Code: Select all

Code
I see

Code: Select all

 Code [./code]

( [./code] whitout "." )
All the best,
Mike

My latest MOD : Second WebSite

hakonsa
Registered User
Posts: 7
Joined: Tue Jan 06, 2004 6:52 pm

Post by hakonsa »

This is what it should look like: http://www.norskwebforum.no/viewtopic.php?t=6666. Note that the HTML code is green and the PHP code is highlighted.

romihaitza
Registered User
Posts: 40
Joined: Fri Jul 25, 2003 5:51 pm
Location: Romania
Contact:

Post by romihaitza »

Whit that text it is working .... I will do another test now.
All the best,
Mike

My latest MOD : Second WebSite

romihaitza
Registered User
Posts: 40
Joined: Fri Jul 25, 2003 5:51 pm
Location: Romania
Contact:

Post by romihaitza »

It is working ... I tried whit a very long text that was containing plain text, html, php, phpbb mod template and a javascript and didn't worked.
All the best,
Mike

My latest MOD : Second WebSite

romihaitza
Registered User
Posts: 40
Joined: Fri Jul 25, 2003 5:51 pm
Location: Romania
Contact:

Post by romihaitza »

The only thing that isn't working it is a MOD in [code]

I tried whit yours and.... not working

I can see

[code] your mod text [code]
All the best,
Mike

My latest MOD : Second WebSite

User avatar
morpheus2matrix
Former Team Member
Posts: 9171
Joined: Wed Apr 10, 2002 7:31 pm
Location: France
Contact:

Post by morpheus2matrix »

looks interesting :)
Former phpBB MOD-Team Member -

Forgive my bad English :(

No support by PM/Email - Thanks - You can thanks me here :) - Pay me for installing MOD's :lol:

hakonsa
Registered User
Posts: 7
Joined: Tue Jan 06, 2004 6:52 pm

Post by hakonsa »

romihaitza wrote: It is working ... I tried whit a very long text that was containing plain text, html, php, phpbb mod template and a javascript and didn't worked.


The length of the text shouldn't matter. Perhaps there is a bug, I'll check.
The only thing that isn't working it is a MOD in

Code: Select all

 

I tried whit yours and.... not working 

I can see 

[code] your mod text [code]
[/quote] 

I don't really understand what you mean. Can you please try to explain once more? Doesn't the [code] tag work after installing my mod?

hakonsa
Registered User
Posts: 7
Joined: Tue Jan 06, 2004 6:52 pm

Post by hakonsa »

I've now tried to make the mod easier to install. Now it's more clear that the mod is to be placed into the bbencode_second_pass_code function. The link is in the first post of this thread. I would really appreciate if some more people test it.

romihaitza
Registered User
Posts: 40
Joined: Fri Jul 25, 2003 5:51 pm
Location: Romania
Contact:

Post by romihaitza »

hakonsa wrote: I don't really understand what you mean. Can you please try to explain once more? Doesn't the

Code: Select all

 tag work after installing my mod?
[/quote] 

The tag it's working. The only bug finded it's on plain-text very long ....

like if I put the contents of your MOD file entre [code] tags like the code I'd put into my MOD : http://www.phpbb.com/phpBB/viewtopic.php?t=162991#917237
All the best,
Mike

My latest MOD : Second WebSite

hakonsa
Registered User
Posts: 7
Joined: Tue Jan 06, 2004 6:52 pm

Post by hakonsa »

romihaitza wrote: The tag it's working. The only bug finded it's on plain-text very long ....

like if I put the contents of your MOD file entre

Code: Select all

 tags like the code I'd put into my MOD : http://www.phpbb.com/phpBB/viewtopic.php?t=162991#917237
[/quote] 

I've installed a test forum to test my own mod. And I've tried to paste your large mod code inside [code]. And it's working fine. Nothing is highlighted since there is no PHP code.

Have a look at my test forum: http://www.lotteriet.net/~hakonsa/php/testforum/viewtopic.php?p=4#4

romihaitza
Registered User
Posts: 40
Joined: Fri Jul 25, 2003 5:51 pm
Location: Romania
Contact:

Post by romihaitza »

I've tried only whit your Mod code.

http://www.lotteriet.net/~hakonsa/php/t ... .php?p=6#6
All the best,
Mike

My latest MOD : Second WebSite

hakonsa
Registered User
Posts: 7
Joined: Tue Jan 06, 2004 6:52 pm

Post by hakonsa »

romihaitza wrote: I've tried only whit your Mod code.

http://www.lotteriet.net/~hakonsa/php/t ... .php?p=6#6


Looks bad! I've tested with the same code in this forum (http://www.phpbb.com/phpBB/viewtopic.ph ... 786#919786) and the same thing happened! I don't know why it happens, but the conclusion is that it's not my mod's fault. Looks like there is a bug in the phpBB forum 8O

romihaitza
Registered User
Posts: 40
Joined: Fri Jul 25, 2003 5:51 pm
Location: Romania
Contact:

Post by romihaitza »

Yes, I tried on a clean forum and same .....
may be an phpBB error
All the best,
Mike

My latest MOD : Second WebSite

Post Reply

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