Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number

UBB Ultimate Bulletin Board

by LeGo (Chaplain)
on Oct 04, 2001 at 05:20 UTC ( #116620=perlquestion: print w/replies, xml ) Need Help??

LeGo has asked for the wisdom of the Perl Monks concerning the following question:

I am curious as to if any one here has ever worked with UBB. I am asking this for a specific reason. My room mate has a sight that uses UBB and he now would like to add to that site, by creating member profile areas, photo galaries and etc...

If you have a module, some subroutines, code, or basically anything that might help get me started on this project, I would appreciate it. I have some code written for the photo area but I am just using a dumbie variable for the user_name. I am in need of something to verify the user is whom they say they are (i.e. code to compare cookies to whatever it needs to be compared to).

All help is appreciated. I thought I would check before I delved into it.


Replies are listed 'Best First'.
Re: UBB Ultimate Bulletin Board
by perrin (Chancellor) on Oct 04, 2001 at 08:07 UTC
    I've never used it, but there was a long thread about it on the mod_perl list a couple of months ago. You can check the archive at The consensus seemed to be that it is a horrible piece of code which should be avoided at all costs.
Re: UBB Ultimate Bulletin Board
by czarfred (Beadle) on Oct 04, 2001 at 06:19 UTC
    Doing a google search for UBB perl, I found this site, where you might be able to find specific help.
      I have tried that site and I have also tried the forum on UBB's site. I did not ask on those sites, yet, hoping that Perl Monks could help first. I will try them soon though if no one here at Perl Monks has done anything like this. I have tried that site though and others from a google search, and cpan, and others to no avial.


Re: UBB Ultimate Bulletin Board
by SilverB1rd (Scribe) on Oct 04, 2001 at 08:01 UTC

    I use Ikonboard on my site and I was able to figureout how it work just by looking at the source(its all in perl). This may seem like a big task at first, but you should find they are layed out logicly.

    I'm not sure about UBB, we use it at work and I think its about the same. if your looking for a module look at If you cant find one there its most likely that one does not exist.

    If that is the case make one and and upload it to cpan :)

    PT - Perl Tanks %100 Perl programming game
    The Price of Freedom is Eternal Vigilance

      I have checked cpan and have not found anything. I am probably going to create a module to do this but being that I am new to UBB, I am not sure the difference between versions of UBB and all of the other entities that might create a problem. I am going to delve into it this afternoon after class.


Re: UBB Ultimate Bulletin Board
by ghost (Beadle) on Oct 04, 2001 at 19:12 UTC
    I altered a UBB bulletin board pretty significantly as a favor to a friend. They don't use any standard modules and they share a lot of tricks in common with Matt's Scripts. They also have an odd file-locking system where they open a separate "lock.file" before they open any file... you can figure out what the various pieces do without much difficulty by going through the code.

    Verifying users is simple enough. Passwords are stored as plain text in username.cgi files in the "Members/" directory. You just have to parse those files.

    But, since their code is only accidentally open source... i.e., they sell their program, I'm not sure how they feel about people digging around in there.
      It truly is horrid code. No, no strict, no warnings. My guess is this will be a nightmare to hack.

      BTW, here's that locking sub lifted from the freeware version. Yikes!

      sub Lock { local ($lockname) = @_; local ($endtime); $endtime = 15; $endtime = time + $endtime; while (-e $lockname && time < $endtime) { open (LOCKFILE, ">$lockname"); }
        After reviewing some of their code I do totally agree. I thought that I would post something that I found interesting. It seems like the non-perlish way to do the task.
        sub GeneratePassword { @digit = ("A", "B", "C", "D", "E", "F", "G", "H", "J", "K", "L", "M", +"N", "P", "Q", "R", "S", "T", "U", "V", "W", "Y", "Z", "a", "b", "c", + "d", "e", "f", "g", "h", "j", "k", "m", "n", "p", "q", "r", "s", "t" +, "u", "v", "w", "y", "z", "2", "3", "4", "5", "6", "7", "8", "9"); srand(time); $num1 = rand(@digit); $num2 = rand(@digit); $num3 = rand(@digit); $num4 = rand(@digit); $num5 = rand(@digit); $num6 = rand(@digit); $RandomPassword = ("$digit[$num1]" . "$digit[$num2]" . "$digit[$num3]" + . "$digit[$num4]" . "$digit[$num5]" . "$digit[$num6]"); return($RandomPassword); }
        I also found how they are getting the cookies, which seems to be what I am going to do. I am going to just get the cookies and check the user to the assigned cookies information. Here is what they had to get the cookies.
        sub get_cookie { local($chip, $val); foreach (split(/; /, $ENV{'HTTP_COOKIE'})) { # split cookie at each ; (cookie format is name=value; name=va +lue; etc...) # Convert plus to space (in case of encoding (not necessary, b +ut recommended) s/\+/ /g; # Split into key and value. ($chip, $val) = split(/=/,$_,2); # splits on the first =. # Convert %XX from hex numbers to alphanumeric $chip =~ s/%([A-Fa-f0-9]{2})/pack("c",hex($1))/ge; $val =~ s/%([A-Fa-f0-9]{2})/pack("c",hex($1))/ge; # Associate key and value #undef($cookie{$chip}); next if (defined($cookie{$chip})); # \1 is the multiple separator #$cookie{$chip} .= "\1" if (defined($cookie{$chip})); # \1 is the +multiple separator $cookie{$chip} .= $val; } } # end SR NB - the other subroutines from this library [set-cookie, +split-cookie, delete-cookie] have not been included here.


        That's version 5.
        Take a look at 6. It's much more sane... the author learned from his mistakes, then placed someone else *cough*geeIwonderwhothatmightbe*cough* in charge of maintaining the thing.
Re: UBB Ultimate Crappity Board
by Aristotle (Chancellor) on Oct 04, 2001 at 23:52 UTC

    I have done a lot of modifications to our UBB at - and let me tell you it is the absolutely most horrible, inconceivably bad piece of coding turd piled upon coding turd. Not even Netscape Navigator's code competes in crappiness. It's bloated, slow, full of bugs. We actually have had a noteworthy amount of occurences where it corrupted data files due to the idiotic locking code; in fact, it several times borked up its threadlist flatfile, resulting in blank forums, when I deleted several threads at once (so I have taken to the habit of waiting the 3 minutes it takes it to delete each thread, before deleting the next, if I have many to kill).

    In some stretches looks like a beginner's first programming excercise. Not just a Perl beginner's, but a programming beginner's. A nice tale I have is about my "optimization" to the admin function for searching users by various criteria. Because it stores the user records in numbered files, it maintains an alphabetically sorted flatfile userlist to associate names to their number. When searching for a user, the Infopop code reads this list, splits the lines, glues them back together to scalars using the opposite field order (a useless excercise), then in the loop splits it again and drops the number, only to call a subroutine to get the just thrown away number; this subroutine, get this, loads and splits the entire memberlist flatfile from scratch! For our 4000 user base, it was reading the same single file 4000 times per search, resulting in every single page of the results taking 7 minutes to bring up. Just by storing the thrown away number in a variable instead of using the subroutine for that, I reduced that runtime to seconds.

    That people actually pay for this steaming pile of crap on a stick makes me shiver. That Infopop even crawl the net and ask people their licenses when they find sites having a UBB is of course legally justified but it feels like absurd audacity to me.

    If you want my advice, switch software as soon as possible. (We are thinking about Ikonboard, but v3 is not yet ready and there is no UBB importer either.) If you don't care about loosing your threads I would in fact advise you get rid of that horrid insult to humanity ASAP

    For the more constructive part: in case you're stuck with it, you are not likely to find any help with it outside or On the other hand, the data file formats or extremly simplistic - double-pipe separated plaintext files in case of threads, forum thread lists and such; member files simply contain one field per line and the only remotely tricky line is the one with the permissions (which you can likely ignore if you're just using the files for username+password). It's very simple to hack up because as far as I can tell they didn't spend more than 5 seconds of thought on their data structures.

    (If you think I'm painting an excessively bad picture of the software, you're wrong. It's every bit as bad as you can imagine and then some.)

      What what is really pathetic is the fact that it is in version 6 now. I'm a serious perl novice and even I can see bad mistakes, and that's downright SAD.
      Uh, dude.

      You're using 5.40

      That was released nearly two YEARS AGO.

      The code you describe is SO much better, even in the last 5 series release, 5.47.

      Hell, it's even better in 6. The guy in charge of coding the new releases ran the thing through perltidy, a sanity filter, and is actually *gasp* trying to do the Right Thing.

      Before you criticize, learn.

        I have seen v6. Yes, it is tons better code. But it's stuck with a heavy legacy of zero design effort file formats which limit the power of the software in many areas and Infopop are unlikely to be able to get rid of any time soon. Something that really drove me off is their mess between wordlets and templates; their "templates" are a flat out lie since they're nothing other than a bunch of hardwired subroutine calls to generate the HTML and the wordlet system is a very inflexible, restricted way of modifying the looks of pages that depends on how much control Infopop or a hack's author deemed worth the effort to give you. Lastly, there is massive amounts of Javascript being thrown around, mostly as a quickhack to offload the "login" functionality to the browser rather than implementing it serverside.

        For me personally there is also the fact that our board is full of custom hacks I wrote myself. I started porting them to UBB6, but the above factors eventually put me off before I could waste too much effort on it. Right now I'm hoping for a UBB importer to Ikonboard v3..

Re: UBB Ultimate Bulletin Board
by Anonymous Monk on Oct 05, 2001 at 09:06 UTC
    Hi, I'm the guy in charge of maintaining the UBB source.

    No, really, I am. I have a login here, but I'm not using it to post this, as I've asked some potentially embarassing questions and don't want blackmail material. ;)

    If you are going to try and work with the UBB code, by all means, grab the current beta version, 6.1.0, release 2... it's far better than the 5 series that the guys below describe.

    We use (our own modified version, at least - stupid web hosting providers!), it runs under strict, and will eventually run under warnings.. ;)

    The original author of the script threw the entire thing out and rewrote it for 6.0... but he made some poorly planned design decisions and it turned out to be less than spectacular.

    We're finishing up over five months of reorganizations and optimizations, including a completely new I/O library and a whole bunch of other interesting stuff.

    See, you can actually WORK with it now. ;)

    Others have posted links to UBBDev - head over there, it's a great resource. ;)
      Where do I get the latest beta? Could you post a link. I tried to find it but couldn't from the website.

      Also just out of curiousity how many people work on this code?

      It is not too hard to work around, it is not what I grew up around being that I am a child of the Monastery (where use strict and -w are required at the gates). Now working with it is a different story. Unfortunately the person I am working with only has version 5.something. But if I can get a beta...

      I will be posting some code after the weekend asking for some suggestions.


        Not sure how much good a reply now will be, as these articles die pretty quickly... you can find the beta releases near the very bottom of the Members Area at It'll be marked with a big bold warning akin to "This beta release may be potentially unstable and is not suitable for use in production environments" yadda yadda yadda.
Re: UBB Ultimate Bulletin Board
by LeGo (Chaplain) on Oct 09, 2001 at 06:42 UTC

Log In?

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://116620]
Approved by root
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others perusing the Monastery: (4)
As of 2023-12-07 13:42 GMT
Find Nodes?
    Voting Booth?
    What's your preferred 'use VERSION' for new CPAN modules in 2023?

    Results (32 votes). Check out past polls.