Simian Circleted hawkins
 Home  About  Perl Scripts  Forum  Articles  Downloads  Links  Sitemap  Contact    

 

Square one, yet again

16 March, 2010

I can get BBCode working fine on the forum scripts. Or I can re-code it all and just have html. What I've done is go back and have the options for plain text or BBCode. No matter how I try, there is no way that I can insert code for say HTML or Perl, Javascript. This is a major pain.

 

I'm looking at how other forum scripts do this and maybe I can come up with an answer. I did try YABB's method and it just made things worse. There's nothing on the web about it that I can find. Perl modules exist, but none of them handle code and the main one that people point to has warnings that it fails unless everythng is exactly in it's extremely limited format (fat lot of good that is - another Perl module that's a waste of time).

 

So frustration is the order of the day (more lke the last 5 months as that's how long I've been trying to get code to work inside BBCode)
- I need an aargh! smiley

 

posted: 19:45   link  |  comments  (0)   . . . . .  up

 

 

No BBCode

13 March, 2010

I've spent most of today messing around seeing how well I could use HTML in a forum script instead of BBCode. What I've done is code an option to have HTML or not. Once I switch from plain text I can use Smilies and (at the moment) all HTML. In most cases this will probably be alright, but I am looking at which tags will be disallowed.

 

Code still has to be entities, so will have to find a way to isolate the code tags so that only entities can be used inside of them.

 

To this point I've saved myself a lot of translating BBCode into HTML so it will print to the files.

 

What about a WYSIWYG?

The thread files are plain text with special tags and are treated as plain text. A linebreak is a linebreak, not lines with a br or p tags. A WYSIWYG would make a right royal mess of things (plus be larger in size than the rest of the whole board software).

 

posted: 23:33   link  |  comments  (0)   . . . . .  up

 

 

BBCode Blues

12 March, 2010

My forum scripts work a treat for the plain text version. I can create new forums, delete them, edit/delete threads (and whole months), search, register users, ban IPs, have a log, etc-etc. Plus it installs in less than a minute. It's not live yet as I haven't had time.

 

But the BBcode version. Major problems. The reason is because HTML and BBCode are totaly banned on the plain text version.The way that is handled causes no end of grief with BBcode when I want to show CODE!

 

So, what to do?

It looks like I will have to back peddle on how HTML is taken care of in the BBCode version. I had wanted just one board and options.

 

Fri 12 Mar 2010 19:53

If I remember right, I kinda talked into using BBCode. Forums always use BBCode. That's why it's called BB(Bulletin Board)code. Why? Originally I was going to use HTML and a WYSIWYG, then ban specific html tags. I'm going to have look at that concept over the next week or so.

 

Just because it's a Bulletin Board, doesn't mean I have to use BBcode. Spammers use BBCode just as much as they use HTML - so why bother and go into all that hassle.

 

posted: 13:19   link  |  comments  (0)   . . . . .  up

 

 

Why I rarely use Perl Modules

07 March, 2010

Perl is a very flexible programming language and you can do anything from a simple print of a single line of  text to a huge application that would put most OS's to shame. There are a hundred and one ways of doing the same thing and when you find your niche, you tend to run with it.

 

One major aspect of Perl is, that there are thousands of modules to help you do things. Simply use the module in your program and it will handle whatever it's supposed to, as long as you match it's code calls. You can use several modules in a script if needed. I have found that, in many cases, what I am doing can be done without the module, with less code and more often than not - get a much faster result.

 

Such a case surfaced today as I set about coding a forum delete for the bulletin board software. Each forum has its own files and folders. A small flat-file database handles the forums ID, Name and description. Latest postings are recorded for the board homescreen in a one line file. All of these have to be deleted when I want to remove an entire forum from the board.

 

This entails directory work that I had not done before, so I Googled it. In most cases the forums, blogs and tutorials all led me to a module named File::Path. Now the source for this is around 900 lines of code - lose the blurbs and you still end up with hundreds of lines. Then, of course, I'd have to code into my script all that's needed in order to tap the module. I thought this was overkill (a bit like the CGI module).

 

I've ended up doing the usual. Coding it all manually and have managed the entire process in 18 lines of code.

 

I'm not against modules, I use LWP sometimes and occasionally the CGI qw standard one for the odd passiing of values. My mind says, "Why call up something that uses more code, plus the time of calling it, when I can to the same in a few lines?"

 

posted: 23:08   link  |  comments  (0)   . . . . .  up

 

 

Bulletin board growth

03 March, 2010

I've managed to get SCBB to the point where I can add forums. Easier than I thought it would be, but not as easy it could have been. As is the case with stuff like this, once you get the core idea up and running, you see the little bits that need adding or adjusting.

 

Why not have categories too?

You mean that having the possibility of up to 26 forums is not enough?

 

Whilst roaming around the web looking at different forum communites, very few have even half that amount (there are a couple which exceed 26 forums with several categories).

 

The actual base size is quite small, additional forums will, of course, increase that size online as your board grows.

 

I hope to have this done and dusted before summer.

 

posted: 09:21   link  |  comments  (0)   . . . . .  up

 

 

 

top of page

 

 Home  About  Perl Scripts  Forum  Articles  Downloads  Links  Sitemap  Contact    

 

© Simian Circles, 2010