corzblog bbcode parser preview



As well as providing its usual functions as my [search engine fodder] bbcode to html parser, and html to bbcode parser [/search engine fodder] *ahem* as well as providing these two functions, the corzblog bbcode to html parser with built-in html to bbcode parser also, erm, erm. where was I? oh yeah, the bbcode to html parser..

Anyway, here it is! the actual very onsite parser that parses the bbcode of my blog, which as well its usual tasks of, well, you know, the parsing stuff, also moonlights doing a cute wee background demo of itself, you're looking at it. it knew you wanted to do that. hit the "preview" button to see at least one half of the parser's bbcode to html/html to bbcode functionality.

So you know now how you found this page. The front-end (below) is built-in to the parser, you just call the function and it creates the form. The cool, super-portable JavaScript bbcode buttons and functions come in the package, too. Have fun. Oh, and by the way, output is 100% pure HTML5, or nice plain bbcode, which ever way you look at it, it's free.


 
text here..

 
button to undo the last javascript change
 
 

cbparser quick bbcode guide..

Most common bbtags are supported, and with cbparser's InfiniTags™ you can pretty much just make up tags as you go along. If cbparser can construct valid xhtml tags out of them, it will. Experimentation is the key, and preview often.

A few bbcode examples..
[b]bold[/b], [i]italic[/i], [big]big[/big], [sm]small[/sm], [img]http://foo.com/image.png[/img], [code]code[/code], [url="http://foo.com" title="foo!"]foo U![/url], and more.. To post code with indentation and/or strange characters, .htaccess, etc., use [pre][/pre] tags.
 
 
download cbparser X
an HTML5 compliant bbcode parser


 
cbparser powered comments..

previous comments (ten pages)   show all comments

cor - 18.11.08 7:26 pm

Interestingly, as you were posting that, I was adding all these ideas, and others, into the example script! check it out..

http://corz.org/engine?download=menu&section=beta/corzblog

while I read your post properly..

;o)
(or


cor - 18.11.08 7:35 pm

smiley for :lol:

Well, I did exactly as you (were going to) ask! First, the "show only recent comments". You can set any number there, or 0, to have it always show all comments.

There's also an optional link; in fact, it's two links, that change automatically; either "show all comments", or "show only recent comments", depending on the current state. I used a simple $_GET variable for that, either it's set or it's not. It won't interfere with the form in any way, either.

I dunno how embeddable this is (is that a word?), but it's a simple enough design (though with cbparser in the mix, also quite feature-packed!), it should be easy enough to get it to play nice with most any standards compliant page. I would work backwards, pasting your index page into the comments script, simply replace my headers and such with your own content. I even have a php comment to show where the footer goes!

Or if your page is large and/or complex, simply remove the header parts from the example script, and paste everything else into your page. Or something like that; shouldn't be too tricky. The comment facility here at the org is designed to be "included" inside other pages, the example script simply does its own headers and such so that it works as a stand-alone demo - remove that stuff, and you're good to go.

But if you do have problems at this stage, feel free mail me a copy of your page (before and after you've added the comments code) and I'll take a look at it for you.

I might look into providing some kind of simple switch inside the comment script to have it stand-alone or embedded (like corzoogle and the distro machine have), we'll see. I don't want to make it *too* good, though. One day, I do plan to put out my own comment script, the one we are using here. But there's still a few things I'd like it to do before it goes public, and I've not been in any great hurry, imagining that there must already be zillions of capable comments script out there. But after reading your comments, I might have to re-think this and get a move-on!

Hopefully this wee example script will keep you going in the meantime.

;o)
(or

p.s. YES! Install Apache. Do it now!

[edit]I went back in and enabled embedding. It's not an option, it just happens automatically, the script switching to stand-alone or embedded mode, as required, easily done. You could even access it both ways at once. Plus a few other wee improvements. If something like this really is needed, then here it is![/edit]


numstruck - 19.11.08 1:37 am

WOW


Sorry it took me so long to reply, I had downloaded the first script, had a
million problems...(again with the can't send headers errors. So like a fool
I tried hacking the parser itself...not a good plan. Then I deleted everything and
went back to the last version before the refresh script, it all worked again, so I
was coming back to ask how I might fix it...and shazam, you already have.
I downloaded the newest script, and it works like a finely crafted swiss timepiece.

Now some may think it is too much time to waste on a simple comment script, but I
think it is the little details that make a site worth returning to again and again.
Besides, I know many people will use it as a default chatroom, message board thingy.
(so for my site anyway, the refresh problem was key) and all the other features.

Tables, drop-caps, spans, boxes, references, formatting, colored code, smilies, lists,
headers, mail-mashing, anchors, floats, nesting, symbols, even a damn preview...

What
    more
        could
             anyone
                   possibly
                           want
                               ???



Thank You, Thank You, Thank You
an image

Interesting effect, spanning an image with a box... smiley for :lol:
PS - as soon as I have a few spare drachmas I will send them your way



numstruck - 19.11.08 5:25 am

FYI - on your bbtags page you say to add any examples that you're missing,
but there is no PUBLISH button, only a preview button...so here they are...

They are the 2 animated tags, blink and scroll (or marquee actually)
[blink] [/blink]

[marquee] [/marquee]

With the proper modifiers scroll can be faster or slower, l-r, r-l, or even delayed.
<marquee direction='left' behaviour='scroll' scrollamount='4' scrolldelay='3'>

Just thought you might find them interesting or useful...or amusing if nothing else.smiley for :D

Another fascinating tidbit...color tags won't work inside of blink tags smiley for :roll:

an image


cor - 19.11.08 6:50 am

Haha! No, there are no such tags! What you have discovered, is "InfiniTags™", which basically enables you to construct bbcode tags on-the-fly, and have cbparser convert them to XHTML, or in this case, HTML. cbparser is filled with such hidden wonders!

Some tags you might create on-the-fly could be valid XHTML, but those definitely aren't, which is the main reason cbparser doesn't have them built-in. You can do BLINK in css and still have valid pages, I do this elsewhere on-site - but generally it's a tag folk avoid, with good reason!

By the way, there used to a "publish" button on the bbtags page, but it was getting out of hand, and folk kept posting tech questions about cbparser there, instead of here, so I just switched it to preview-only. There's a mail link for missing tags, now. I think I have them all, though.

I'm glad you like the comment script. Even though it's small, it's very capable; and with automatic embedding and such, highly usable; drop-in-and-go. It will be interesting to see where it pops up.

Thanks for the feedback!

;o)
(or


numstruck - 19.11.08 6:32 pm

Well, I didn't exactly just discover them, I have used both for many years.
All of my old gallery pages had/have scrolling NO REPOST headers.
(which is why I knew you could used direction, speed, behavior, and delay modifiers)

They are deprecated now, but then so is the font tag, and millions use it regardless.
I don't really see any advantage of validating pages anyway, and have never bothered.
The validators themselves may be useful for finding errors in your code, but unless
you are creating websites for a customer who insists on valid pages, what is the appeal?
The most popular browser in the world, (micromush IE), isn't standards compliant anyway.

I have read a few debates on the subject, and they usually justify the validation with -
"...in the future...", which seems particularly humorous given IE's 15 year refusal to
adopt the standards compliant modes of all other modern browsers. (FireFox, OPERA, etc.)

But what really has me curious is, you say people avoid the tags "with good reason"
since I already know you are extremely web savvy, your opinion holds good weight.
I use both of these tags, (in html pages), on dozens of sites, and the blink tag will
work even in forums and shoutboxes. So what would be the point of avoiding using it?
... or deleting the examples for that matter. Not criticizing mind you, just curious.
I can see maybe changing the scroll since I hotlinked one of your own smilies, but
that still wouldn't explain deleting the blinking example...

On another subject, I finally had a chance to browse around the rest of you site here,
and of course discovered even more of your remarkable collection of assorted goodies.
Your blog is an especially fascinating read, I wish I had more time for the archives.
Anyhoo, I have used up enough ink for now, cheers and regards,


an image


cor - 19.11.08 8:53 pm

Oh, I could tell you had plenty of experience with the marquee tag! The discovery I was referring to, was InfiniTags™, which enables you to make up tags on-the-spot, even tags which are not built-in to cbparser. You see? You can even use [font]!

But if you do, I'll edit your post afterwards, and switch it for a valid css statement! Please don't take the deletions personally, I regularly delete whole posts, if I think they add nothing to the site and/or are pointless, or just because. I figured your point was well made without actual smileys scrolling across the page! Like lots of people, I find things flashing and moving on web pages quite distracting, which is why I earlier said, with good reason.

As I implied, you can still do perfectly valid blinking with CSS, and I do use it myself on the voyager router pages, once, where I want to REALLY grab their attention. I don't condemn its use, but I wouldn't encourage it, either. It all depends on the site and its content. In a fun chat page, loads of blinking isn't so bad. I generally associate blinking text with Religio-Jesus Sites.

As for XHTML and page validation; the biggest reason, for me, is that I can create simple, lightweight, easy-to-edit pages that are guaranteed to render in any standards-compliant device. More and more this is becoming important, even crucial, as web browsing is less and less something we do only on the desktop.

Most HTML4 is a soup of half-standard-compliant, half-proprietary tags, a confusing mess which is a very real challenge to render on a memory-starved, or CPU-starved device, as many smaller devices are. A device designed to go into, for example, space, isn't going to have gobs of spare memory and cpu capacity; it will be designed to be as efficient as possible, to use as little power as possible. Using less power is, of course, generally a good thing on Earth, too.

The XHTML+CSS model follows this design ethic by having a relatively small number of tags, which is therefor easy to parse, and easy to render. Moving style out of the content, and into included style sheets, again, creates a more efficient structure, geared towards rendering simplicity. Simplicity is good, not only because it makes working on your pages a helluva lot easier, it makes life for the browser easier, too.

IE might not be standards-compliant, per-se, but it is, up to a point, capable of rendering a simple standards-compliant page, and continuously improving in that area, but like most desktop browsers; Opera, Firefox, and so on, can also render pretty much any code, work around most errors to produce a highly readable page from any old jumble of HTML, but that's definitely not true of every platform, or every environment, right now.

For starters, spiders like simple, valid pages. If you want to have pages that are guaranteed to be spidered effectively, validation is a must. When I switched over to XHTML and started validating, I got an across-the-board hike in my Google rankings. And Google is one of the most advanced web bots in the world. Think about it; valid pages makes for better search engine rankings, even with Google - Like most desktop browsers, Google is expert at seeing through webmaster errors. Most bots are brain-dead by comparison..

Yes, Firefox et-al, will be spot that Oops! you forgot to close a div, and will correct this for you, visually. But unless you validate your page, you won't know about it. Then, along comes "SomeBot", which like all bots, sees your page as no more than one big string of text. Sadly, it isn't Firefox-in-a-bot, and so doesn't realize that you actually meant to close that div, and treats the rest of your page as div properties, ignores it. Same goes for wap-converter gateways trying to parse your content for cell phones, TV set-top browsers, etc.

If you install the Firefox "TIDY" plugin, you can see at-a-glance if a particular page is valid - if not, a big red X catches your eye. Be warned, though; if you do install it, and someone posts a <font> tag, or similar deprecated tag on your page*, you will have an almost uncontrollable urge to go in and switch it for a css class! smiley for :lol: Same goes for other deprecated tags!

As well as spiders (which make up a sizable proportion of modern web traffic), web content, in general, is more and more being scraped and utilized in a variety of unforeseen ways. Simple, standards-compliant, valid pages make this process relatively painless, and you may find your site being enjoyed and promoted in all sorts of places, on all sorts of interesting devices.

The shift to XHTML as the de-facto standard web language importantly signals a shift in our working style, the beginnings of discipline in our web coding. Sure, a lot of the design principles of strict XHTML + CSS, you could also adopt with regular HTML4+CSS, but people just don't. Old habits die hard.

Beginning (again) with XHTML is a chance to free ourselves from old-school limited (and limiting) thinking; layout with tables, styling with endless font tags, and so on - and thereby unleash our imaginations. Thinking back to when I used to have to edit these pages, it gives me the shivvers! Even trying to locate sections gave me a headache.

And don't forget screen-readers for the visually impaired. smiley for :ken:

Anyhoo, those are the main reasons I stand at this side of the HTML Vs XHTML debate**.

I seem to have gone off on one!

Glad you liked the blog; I recommend the archives on one of those hazy mornings after a party or gig. Let it wash over the mind. And never forget; just because it validates, doesn't mean it's valid!

;o)
(or

references:
If you still use HTML4 (or 3!) pages then the old tags not deprecated. Only if you have upgraded your pages to XHTML are they no longer valid. The blink tag was never valid, by the way; it's a proprietary Netscape tag. Marquee was Microsoft, I think. Other browsers and web entities may or may not recognize and implement them. And that's what was so wrong with non-standard tags.

** And don't get me started on the pure benefits of coding in XHTML. Not just design clarity and ease of editing, but extensibility; the ability to throw in other kinds of markup, even define namespaces and incorporate totally new kinds of markup at will. And don't forget automatic XML document conversion, so you could deliver your stuff as PDF, or SVG, and more, much more. The future is NOW!



numstruck - 20.11.08 8:21 pm

Hmmm, a very thorough explanation.

I suppose my problem is that my target audience is never going to be pda's or webTV,
they aren't going to be using screen-readers or browsing from outer space.

99.9% of them will be using OPERA or FireFox, and would think XML was a porno site.

Likewise, I'm not interested in ranks or SEO, in fact I hope to ban spiders completely.
(The last thing I need is web-crawlers using my limited free bandwidth)

It actually seems strange to me that something as useful as marquee would not be
included in web standards, even my digital watch can scroll numbers on the screen.
I suspect it has more to do with pushing technology like flash and java applets that
waste gigabytes of bandwidth and that the average user has no idea how to control.

It's a matter of perspective I guess, some say the web is becoming more "user friendly"
I say just the opposite is true. But I am admittedly biased, I think flash and java
are really nothing more than legal viruses, and most websites are only concerned with
advertising and tracking the users who visit them.

Sites like yours do give me some hope tho, not only offering free software and downloads,
but also giving advice and interacting with the people who wish to use that software.
I'm sure there are many in the industry who would happily see sites like this disappear,
along with all of the P2P, torrents, warez, hackers, crackers, tech-forums, security &
proxy sites, free file hosts, picture sharing sites, you-tube rippers, and a miriad of
other free and useful sites, forums and applications.

They would happily see the day that you first pay for a PC, then pay for a browser, then
pay for an ISP, then pay for every MB of bandwidth, then pay for the speed at which you
use that bandwidth, then pay for every application and program you use once you are
connected, then pay for any content you view, and pay again if you wish to save it. smiley for :roll:

But that day isn't here yet, and I hope my site will push it further into the future.

Time to fly, almost out of ink again...

an image


numstruck - 03.12.08 8:48 am

Hey Again,

I wonder if you might help me with a piece of code driving me insane...
I have installed a flat-file forum, and it doesn't display hotlinked thumbs.

In fact all of the "code" tags are basic html like <code> and <strong>
I checked their help forum and found this...

***************************
HOW TO DISPLAY IMAGES
Open function_list.php and find function basic_html. It starts around line 680. Anywhere in that function, paste this:

<?php
$text 
preg_replace("#\<img\>(.*?)\</img\>#si",'<img src="\1" />',$text);
?>


Then just enclose your images in <img> tags
***************************

It will work fine that way...
But what I really want is for it to turn something like this...

[URL=http://image.com/bigimage.jpg][IMG]http://image.com/smallimage.jpg[/IMG][/URL]


into a hotlinked thumbnail like..

<a href="http://image.com/bigimage.jpg" target=_blank><img src="http://image.com/smallimage.jpg"></a>


I have tried everything, can you help?
I just don't seem to be able to come up with the correct stringsmiley for :erm:


cor - 03.12.08 3:51 pm

Ahhh.. thanks for reminding me about that old section of code I meant to comment-out (or better yet, optionalize) in cbparser, the one where it slips into "legacy mode" during the html2bb() function when it discovers deprecated strings, like target=; makes it almost impossible to edit modern posts!

As to your issue, WTF? This has nothing to do with cbparser! Am I your free tech-dude now, or what? smiley for :lol:

Actually, it does have something to do with cbparser, because here's my answer; bypass that shoddy code, and use cbparser, instead. Really. It would be an easy project.

While I'm here, WHERE THE FUCK IS THAT HUGE REPLY I LEFT YOU A WEEK AGO? smiley for :eek:

I'll have to have a rake in the post-dump log and see if I can fish it out. I could have sworn I posted it, but perhaps not. I remember being slightly intoxicated at the time. smiley for :roll: There was some server trouble recently, so there's no guarantee that particular log is still around, but I'll look, I promise.

Back to your [IMG] tags and such; I deduced that you are using Silentum message board. Why not drop into their forum and suggest; in the nicest possible way, of course; that their posting system is complete shite, and perhaps they should consider plugging in something like, oh, I dunno … cbparser? Or if that doesn't appeal to them, maybe just cooking up some basic bbcode themselves.

If they bite, simply wait for the update. If they don't, or you don't want to wait, plug in cbparser for yourself.

l*rz..

;o)
(or

p.s. that's not a hot-link, this is a hot-link.


numstruck - 03.12.08 8:01 pm

Not sure where your reply went... I have that problem a LOT when I'm a "slightly intoxicated"

You deduce correctly that it is silentium board, and
Yeah, I know the post wasn't really about cbparser, but honestly, I figured you might have a solution.
Sorry for acting like you are free tech-support, it is just really hard to find someone to ask sh!t like this.

I have been to their forum, but even old questions go unanswered, I think the place is basically a ghostown.

Plugging in cbparser would be my dream come true solution, unfortunately I am totally clueless how to even begin.
I struggle with even simple rewrite rules like the one above, modifying the entire forum is out of my league.

On the bright side, they do give their permission to change "anything" in their README file.
So if you have time to explain how I might do it, (or waste five minutes and do it for me), I would be a very happy camper.

Heck, you already have the parser and the awesome comment script, you should just add a forum to your suite of offerings.
I bet you could make a forum script in no time that would be 100 times better anyway.
Finding a flat-file forum is as impossible as finding a decent comment script...

Cheers and Regards,
an image

PS - I probably wasn't clear about the hotlink thing, what I want is for people to be
able to post the regular forum code for thumbnails from sites like Imagevenue etc.
the codes that begin with [url= and have them display correctly as hotlinked thumbs.
EDIT: I just tested it with preview...cbparser doesn't display them either :(


cor - 04.12.08 3:44 pm

Aha! Here it is..

I said (slurred)..
The marquee is a proprietary tag. Microsoft thought it was a neat idea, and then implemented it in Internet Explorer (they assumed everyone used IE). I'm sure there are instances where it could be useful and effective on certain sites, but that's not the real issue.

I don't like to see flash in web pages, and don't use Java on-site, either, but these aren't the technologies behind the demise of these tags. The problem with proprietary tags is that, as a designer, you don't know a) if they will be supported by some other browser, and b) even if they are supported, there's no guarantee they will look anything like what you intended. This is bad for web designers and users alike. The problem with the marquee tag (and blink tag), in particular, is that it's almost universally hated. Really, lots of people find that stuff annoying. And some people simply can't read moving text.

The other problem was that back in the IE Vs Netscape days, with limited tags and unclear web standards, both crews were adding new tags every other day. Some tags were good, and were grudgingly adopted by the other side, many were not. But in reality, most modern desktop browsers support both blink and marquee tags these days, so as long as you don't mind about breaking standards, and annoying a few people (with no SEO, it will be a clique), feel free!

Designing to web standards means that, theoretically, I can create a page, and know, with a fair amount of certainty, that it will look a particular way, on all browsers. Actually, in practice, too - I was surprised, the last time I visited browsershots.org, by how remarkably similar corz.org looks on dozens of different browsers. This is definitely a good thing, and something that just wasn't possible a few years back. I keep things pretty simple; probably also has something to do with it.

Now to the money: Aside from the bandwidth (which should be unlimited and free, once connected), I think we *should* pay for everything else. Sadly, the free culture of the internet has made it extremely difficult for small developers to carve out a living - folk are so used to getting even the most expensive software for free. I love free stuff. I want software, and information, and everything that can be free, to be free. But I also want to put some money where it's due, reward good, hard work; that's how economies work.

As in many industries; TV and film, music and such, software companies have charged extortionate rates for their products. That software could cost tens of thousands of pounds is absurd. So your average guy isn't going to pay that for a program, or twenty bucks for an album; he gets a keygen, makes a tape, burns a disc, or whatever. He knows that Adobe are raking it in from corporate licensing, and sees nothing wrong with using Photoshop gratis. I don't use such apps, but I do tend to agree.

But when he applies the same thinking to those beautiful hand-crafted tool, such as one might find here at the org, he literally takes the food out of someone's mouth. For example, checksum, my best-of-class hashing app isn't the collective work of ten thousand volunteers all donating chunks of code, or the endeavours of a team of salaried software engineers; it's me, and hundreds of hours of my time, creating, conceiving, coding, web-designing, answering emails, tech support, comments, and so on; given for free. With a more balanced view of the worth of things in the net populace, people like me could actually make a living doing what we do best. If could have spent those hours working for a client, or employer, but then none of this would exist, and the Microsoft's of the world have won.

I'll carry on regardless, but aware that due to lack of consideration on the part of my guests, something's always gonna have to give. I've had to switch the comments off on many of my articles here because they were simply taking up so much time, and for no money, at all. I'm highly skilled, many say talented and more, and yet I don't even make a fraction of minimum wage from this site. If even 1% of my visitors donated just 10p, I could devote 100% of my time to putting work up here, as well as upgrade all my hardware, and have change!

One day, musicians will sell their music directly to their listeners; chat with them, get real. The prices will be way more real than now, too, and with the useless middle-third out of the equation, we'll get true, unfettered creativity from artists.

Obviously, I'm dreaming, smiley for :roll:
for now..

;o)
(or


Unexpurgated! As to your Silentum issue, firstly, I did download that board when I first read your issue, but dropping it onto two different servers and having it simply not work wasn't a good start.

Opening the php files in my text editor was bad2, use of the "short open tag" <? rather than proper <?php tags means I got no syntax highlighting, for a start (I have it set this way so that I NEVER use short open tags, because they are plain silly), which I could have fixed easily enough, even for every file, if it wasn't for the fact that they kept skipping in and out of php throughout the files, which is always infuriating, at best - they even have an .htaccess file in there, so why not at least add a php short_open_tags flag? Anyways..

That's as far as I got. But from what I remember, you have a function called basic_html(). Essentially, you include cbparser at the top of the script (probably inside function_list.php would be fine) , and then inside the .php files (run a find-in-files on your text editor) you replace every instance of the term basic_html(something) with bb2html(something). Then give it a whirl!

Or even easier than that, though a bit of a nasty hack; you could drop a cbparser call directly into the basic_html() function, here's the entire conversion..

<?php
// at the top of the document..
include ($_SERVER['DOCUMENT_ROOT'].'/site/path/to/cbparser.php');

// then inside the function..
function basic_html($text) {
    return 
bb2html($text);
    
// function's other code ignored (already returned)..
}
?>

Instructions on how to include and use cbparser are covered in greater depth inside cbparser.php itself - if you need more, open it in a text editor and have a read. If you have any issues performing the conversion, get back here with specifics, and I'll see what I can do to help.

I note we now occupy this entire page of comments! smiley for :lol:

Have fun!

;o)
(or

p.s. what's the exact code for these thumbs you are trying to post? (put it in [pre] tags) - If it's just a question of using UPPER CASE tags at the end of your post, forget posting code; there was a bug in the bbcode lowercasing function, that only affected tags at the end of your post - it's now fixed, and an updated cbparser release is available in the beta folder.


numstruck - 05.12.08 11:18 pm

Well, I gave up on using Silentium, (or even finding a flat-file forum).
I'm sure your parser would work, I'm just not good enough to hack it.

So, that actually makes the issue of thumbs moot too...
But, just as a test...

an image

Yeah, working fine now...(gotta love janice) smiley for :D

PS- If you use small tags IE: url img etc. the parser gives an "open tags" error tho.
[url=http://img143.imagevenue.com/img.php?image=16287_JanisJoplin60s_122_401lo.jpg]
[img=http://img143.imagevenue.com/loc401/th_16287_JanisJoplin60s_122_401lo.jpg][/url]

Not a big deal to me because 99.9% of everyone uses the first set of code anyway.
Anyway, enough about that (except thank-you for the updated release) smiley for :)

About the "rest" of your post...
I agree with very little of it, you may consider scrolling or blinking text annoying,
others would call it useful. Some would consider any font bigger than 12 pixels annoying
but that would be no reason to drop them from web standards. The same could be said for
colored text, or pictures or flash or backgrounds or smilies for that matter.
But there is really no point debating it, as you pointed out, they have been dropped
and yet all modern browsers will renderer them anyway. Quirks mode isn't going away
anytime soon I suspect. (At least not as long as IE is still around) lmao

About the money, well...my opinion is split.
For example, if you were selling cbparser, I wouldn't be here. I only seek out freeware.
Or, if it is a program I really want like winRAR, I just find a cracked version.
Am I hurting RARlabs? NO, because I wouldn't buy it even if a crack wasn't available.

The same can be said for any digital media, I may download an mp3 I like, but I still
wouldn't buy the song even if mp3's weren't easily available. And in my humble opinion
musicians, (and actors, and software developers, and CEO's), are obscenely overpaid.
No one, I repeat NO ONE, is worth $500,000 a week, for anything or any reason.
The fact that some people actually make that kind of money just proves to me how
distubingly unintelligent most of the human race really is.

On the other hand, I believe someone like you, creating useful tools that are above and
beyond what is available anywhere else, should be able to make a decent living doing it.
And you shouldn't have to rely on donations, but I can't think of an equitable solution
besides you going to work for a software company, or becoming webwide popular and then
start charging...which of course would lead right back to cracks and piracy.

But to be completely honest, my earlier drunken rant was mostly about ISP's trying to
change the laws so they can degrade service for everyone who doesn't pay a premium.
They want a tiered system of bandwidth, and in many places it is already happening...
it will be the end of the web as we know it, and I'm glad I'm old enough that I'll
probably die before it happens. Gawd knows the rest of the fuckin planet is too wimpy
to stand up and demand equal access for everyone.

Anyhoo, thanks again for all your help. I may yet need to hack the parser into ... well
into some sort of forum script somehow... just not sure what it might be yet.

(insert imaginary marquee tag here)
an image
(/) smiley for :)


numstruck - 05.12.08 11:33 pm

PSS. It won't let me edit my post either now, I was going to insert a line-break in the
code so it didn't break the page width, but the parser just keeps returning the preview?


cor - 06.12.08 3:37 pm

Hahah! That's ironic! You've been messing up the page formatting with every post, adding line-breaks when none are required (the column is formatted automatically), and the one place where you do need them (inside [pre] tags), you leave them out! smiley for :lol:   I'll fix that.

As for case, no lower case tags are preferable every time (if you use UPPERCASE tags, they are converted to lowercase, anyway), and will not give any errors. What DOES, or rather did give errors, is when cbparser detects the string "smilie", where it switches to legacy smiley mode (I used to misspell it, too, back when cbparser was born), and THAT is probably what messed up your ability to edit your post. I've now fixed this, so that cbparser looks for the specific string used inside legacy smiley tags, rather than just the word itself, which people obviously still use. Eventually, I'll remove all these hacks.

Back to your flat file forum. Did you read my last post? THAT is the ENTIRE conversion process! Two lines of code; one at the top (just below the <?php tags) and the other, inside the function. Copy and paste two lines. Done. I know you can do it!

On the subject of flat-file massage boards in general, there are actually quite a few of them out there - I Googled and downloaded netzbrett, eforum, puszbaza and navboard, all supporting flat-files, and mostly with their own bbcode, to boot. There are others. But if you want to stick with Silentum, two lines of code gets you cbparser bbcode.

;o)
(or

p.s. I quite like scrolling and blinking text in moderation, in the right place, I even use (XHTML-valid) blinking text elsewhere on site. But I am aware that for many people, it's a real accessibility issue. It all depends what the page is supposed to do; distraction isn't always a bad thing.


numstruck - 06.12.08 11:24 pm

Lol, yeah, I know the column is formatted, it's just habit to break my own lines.
Comes from the days before word-wrap, and using notepad for messages before posting.

I decided to try SimpleMachinesForum, it needs mySQL but if the forum gets big it is
probably a better option than having a giant text file anyway.

I have been telling a few people about Simple-Comments, so you might get a noticeable
bump in traffic to that page. (no spam, people specifically looking for a comment-script)

Anyway, just a quick stop this time...on my way to one of those "intoxicated" nights.

Cheers and Regards

an imagean imagean image


Marcus - 21.04.09 4:45 pm

Hi Cor,

First if all let me say, awesome job with the script! smiley for ;)

Im having som problems implementing the script with my blog and I hope you could help me out. To be more specific the script screwes with the new line entrys.

My text are sent to the database without converting nl2br.
I do not want any br's with the text in the database.
First when I print the database content (the post) on the blog do I run it through nr2br and the text shows up as it should in the browser.
I commented out this line in the top of the bb2html function so the script wont insert any br's for me.

$bb2html = str_replace("\r",'<br />', $bb2html);

Now when I want to edit my post, and I run it through your html2bb to view the bb code instead of html all text gets mashed togeather.
It seems to ignore my new lines in the database.

Suggestions?

Cheers!


Ensure you are using the correct form of linebreak (POST forms require "\r\n"). Also, if you are storing your text in a database, it makes sense to store it in bbcode format, and convert to HTML only for page output. ;o) Cor



Alexmos - 21.04.09 6:08 pm

how do i know if the site's admin have changed the tags?How do i find the changed tags

Ask the admin. ;o) Cor



andri - 20.02.10 10:43 am

wow... i like this script, where can i download?



Jason Drawmer - 11.11.10 12:14 pm

Brilliant script - the best bb code scripts I could find up until now were regular expression based and to be honest, not very in depth. This is great and very customisable!


Jason Drawmer - 27.04.11 11:01 am

I'm noticing with my installation of this bbcode parser, that each line space is doubled, so for each click of the return key, <br /><br /> is returned, which makes my line spaces look a bit silly! Any idea why that might be?

There's no reason why cbparser would do this. Maybe your browser is screwed. ;o) Cor



 

Leave a comment, become part of this site!


First, confirm that you are human by entering the code you see..

(if you find it difficult to read, refresh the page for a new code)


Enter the 5-digit code this text sounds like : lower-case elle, Upper-Case Aye, f-hive, lower-case tee, Upper-Case Ee