[sources] bbcode parser

Conventional discussion only. No politics, religion and other topics that might cause conflicts.
Strictly appropriate discussions only, meaning spammers and trolls will be banned on first offense.

Moderator: Moderators

Postby Magnotta on Fri Jun 17, 2005 6:14 pm

[quote user="DoobDee" post="39957"][quote user="Magnotta" post="39947"]Thanks for posting this CA. Ever since I joined here I wanted to have a code bbcode like the one here where the lines are numbered. While I know that someones made a mod for it, it wasn;t really what I was looking for, as I wanted something simpler with just the lined numbers. Now, thanks to you posting this, I've figured out a nice simple way to get it done(so far only on a testboard, as it needs more polishing before I'll actually use it, but still happy to get it started). So thanks :)[/quote]

Ca's version does not only do lined numbers.[/quote]

I know, but all I really ever wanted was the lined numbers. Thanks to this, I've been able to figure out how to just add them to the regular bbcode.php. If I was better at php I'd probably try and get this whole thing working as a mod, but since I'm not good enough I'm just trying to pick out a few small things I need/want.
User avatar
Magnotta
Registered User
Registered User
 
Posts: 315
Joined: Wed Jan 19, 2005 11:11 pm

Postby DeividD on Wed Jul 13, 2005 11:45 am

Somebody was able to adapt it to phpbb. I do not know much of php and wanted to put it in my page created with phpnuke
DeividD
Registered User
Registered User
 
Posts: 4
Joined: Tue Jul 12, 2005 5:14 pm

Postby ALEXIS on Wed Jul 13, 2005 6:51 pm

Hi, how use this code, I modified my viewtopic.php long time ago, how re-modified this files for "bbcode parser" ?



Edit: I use you modified files, error ??

SQL Error : 1054 Unknown column 'pt.post_text_compiled' in 'field list'
User avatar
ALEXIS
Registered User
Registered User
 
Posts: 3
Joined: Thu Jun 17, 2004 1:29 am

Postby baz-x on Wed Jul 13, 2005 8:09 pm

[quote user="CyberAlien"]Note: these files are not fully compatible with phpBB so don't try to simply put it on your forum. It won't work. You'll need to do lots of other adjustments before using these files. But it can be used to create mods that have similar functionality.[/quote]
Regards
baz-x [blog] [website]
current projects:
» [span style="color: darkgreen"]Mex[/span] [span style="color: darkred"][ 75% ][/span]
» Nickpage Mod 2.0.0 ME [span style="color: red"][ paused ][/span]
» Style Demo Mod 1.2.2 ME [span style="color: red"][ paused ][/span]
User avatar
baz-x
Moderator
Moderator
 
Posts: 706
Joined: Sun Aug 15, 2004 9:12 pm
Location: Cache Management of Mex

Thanks CA

Postby Mighty Gorgon on Tue Aug 23, 2005 8:33 am

Thank you CA for this wonderful and amazing piece of code. :D

I've played around and tried to understand the way it works, and now I'm running this code on a test board with some added BBCode.

I want to point out that this code is not only faster that the standard parsing, but is also more secure, because it has less security issue than the standard BBCode (I've played with some script to test it).

Last, but not least, I've noticed that most of the speed in ViewTopic is due to the $compiled_message which stores in the DB a fully formatted post so it has not to be compiled (parsed) again. This speed up tremendously the viewing of heavy formatted messages.

Again, CA I think you're one of the best coder around the web.

Thank you for all.
:mrgreen:
Luca
User avatar
Mighty Gorgon
Registered User
Registered User
 
Posts: 15
Joined: Mon May 23, 2005 8:58 pm
Location: Italy

Postby javispedro on Wed Nov 30, 2005 3:33 pm

If i disable the DB cache, is this parser still faster than regexp parser?
(on vBulletin's bbcode parser) wrote:The recursive parser is approximately 30% slower than the regex parser.

Has anyone done any tests?
I'm planning to use it since after having spent hours on a full HTML->BBcode convertor (with support for CSS & nested-tags, based on pear html parser) I noticed than vainilla phpBB doesn't support nested tags :x . Ugly.
javispedro
Registered User
Registered User
 
Posts: 1
Joined: Wed Nov 30, 2005 3:28 pm

Postby PostBot on Wed Nov 30, 2005 3:41 pm

Yes, I did tests when was developing it. Results are opposite to vBulletin tests. It all depends on algorythms used in parsers and this one is much faster than phpBB default algorythm. Algorythms used in vBulletin tests that you mention are completely different, so results of those tests have nothing to do with phpBB and this parsers.
Do NOT pm me, I don't visit this forum anymore, don't own it, don't provide any support and don't moderate.
User avatar
PostBot
Moderator
Moderator
 
Posts: 10659
Joined: Sat Aug 02, 2003 3:52 pm
Location: Mars

Postby Mighty Gorgon on Thu Dec 01, 2005 12:52 am

[quote user="javispedro" post="58860"]If i disable the DB cache, is this parser still faster than regexp parser?
(on vBulletin's bbcode parser) wrote:The recursive parser is approximately 30% slower than the regex parser.

Has anyone done any tests?
I'm planning to use it since after having spent hours on a full HTML->BBcode convertor (with support for CSS & nested-tags, based on pear html parser) I noticed than vainilla phpBB doesn't support nested tags :x . Ugly.[/quote]
This BBCode parser is very fast, and by the way faster than vanilla phpBB parser.

You can test it here (with some little modifications to CA original code):

http://www.area69.phphost.info/
Luca
User avatar
Mighty Gorgon
Registered User
Registered User
 
Posts: 15
Joined: Mon May 23, 2005 8:58 pm
Location: Italy

Postby Basilakis on Thu Jan 05, 2006 8:47 am

Why dont you give as code to use Mighty? Thsi phraser is very good and as you understand we all wanted! ;)
Basilakis
Registered User
Registered User
 
Posts: 113
Joined: Sat Oct 09, 2004 4:40 pm

Postby Mighty Gorgon on Sun Jan 08, 2006 12:49 am

[quote user="Basilakis" post="63275"]Why dont you give as code to use Mighty? Thsi phraser is very good and as you understand we all wanted! ;)[/quote]
I've integrated the code in phpBB XS which is a premodded version of phpBB, which me and Bicet are distributing for free... so you can download the full package and grab whatever you want from it:

http://www.area69.phphost.info/

I won't release it as a stand alone mod, because I wouldn't have the time to support it... and most important... the core code has been written by CA, and I'm not so skilled to be able to fully support his code. :oops:
Luca
User avatar
Mighty Gorgon
Registered User
Registered User
 
Posts: 15
Joined: Mon May 23, 2005 8:58 pm
Location: Italy

Postby Basilakis on Sun Jan 08, 2006 10:45 am

I have downloaded this pack, and it is greate. I just do not know so good english, and that is why i am not repling to things that iti is difficult to say. ;)

Thanks a lot for the answer!~
Basilakis
Registered User
Registered User
 
Posts: 113
Joined: Sat Oct 09, 2004 4:40 pm

CyberAlien BBCode Parser

Postby Mighty Gorgon on Sun Jan 08, 2006 12:50 pm

I'm glad you like it. I hope you can reuse the code written there.

Anyway, for anyone who could be interested in an easy way to integrate this parser on any PHP page, I have created an example using a very simple PHP script.

http://www.mightygorgon.com/viewtopic.php?p=24241#24241

The BBCode parser included in the package is the one posted by CA, but slightly modified with some other BBCodes and functions.

Please notice that this is not a mod, but just a hint on how to use this parser on any PHP page... useful for guestbooks, blogs, galleries, etc...
Luca
User avatar
Mighty Gorgon
Registered User
Registered User
 
Posts: 15
Joined: Mon May 23, 2005 8:58 pm
Location: Italy

Postby Basilakis on Mon Jan 09, 2006 8:11 pm

;)

Thanks man. I will look on it ;)
Basilakis
Registered User
Registered User
 
Posts: 113
Joined: Sat Oct 09, 2004 4:40 pm

Postby Basilakis on Mon Jan 09, 2006 9:58 pm

Ok, Might i need your help. I tried to just copy and paste just /include/bbcode.php and the template
file of phpbb from your cms - mod to my website but nothing happened. It did not worked, as i though.
Can you plz tell me what else i should do to make it works?

As you understarnd i need this code and if you help me a little, i will do it. I know it is difficult,
from time and all staff like that but plz help me.
Basilakis
Registered User
Registered User
 
Posts: 113
Joined: Sat Oct 09, 2004 4:40 pm

Postby Reiji Kurosaky on Mon Jan 09, 2006 10:03 pm

You don´t need to copy the includes/bbcode.php file, you need to include it in your site (use the code UseLess provide).
My sites:
Villavizar.com

My Styles:
[Venus]
User avatar
Reiji Kurosaky
Registered User
Registered User
 
Posts: 858
Joined: Sat Dec 03, 2005 4:05 pm

PreviousNext

Return to Regular Discussion

Who is online

Users browsing this forum: No registered users and 3 guests

cron