Previous Thread
Next Thread
Print Thread
Rate Thread
Joined: Dec 2002
Posts: 2
Junior Member
Junior Member
Offline
Joined: Dec 2002
Posts: 2
OK, quick summary first. The town of Merrimack, NH, USA had been running a ubb.classic web forum until last month. On November 14th the town selectmen (a board of 5 elected officials responsible for running the town) voted to close it down. You can see the locked/closed forum at http://www.ci.merrimack.nh.us/ubb-bin/ There is also a http://www.townsforum.com/HollisNHforum/viewtopic.php?t=270 collection of newspaper articles about forum closure on another web forum for a nearby town.

The town has archived the data, and as a citizen I've gotten a copy of the data (no licensed code, just the text based files that the cgi-bin would read from) and I'm looking for a simple and quick way to generate passable static HTML from these flat files. Is a tool like this available? If there isn't a tool available is there a description of the file format? It's clear that || is a field delimiter, but many of the fields are blank.

I don't want to run a forum using this data, I simply want to make it available for reading online.

Thanks,
-Nat

Sponsored Links
Joined: Dec 2002
Posts: 2
Junior Member
Junior Member
Offline
Joined: Dec 2002
Posts: 2
I've put together a quick and dirty perl script to generate static HTML already, but some of the field values still elude me. Any ideas?

Thanks,
-Nat
Code
#!/usr/local/bin/perl

open INDEX,"> index.html" or die "could not open index.html : $!n";

print INDEX << "EOF";
<html>
<head>
<title>Merrimack town forum read only archive</title>
</head>
<body bgcolor="EEEEEE" text="#000000" vlink="#1111FF" alink="#222222" link="#FF1111">
<table border=2><tr>
<th>Topic Marker</th>
<th>unkn1</th>
<th>Num Replies</th>
<th>Author Name?</th>
<th>Subject</th>
<th>unkn5</th>
<th>unkn6</th>
<th>unkn7</th>
<th>User name?</th>
<th>unkn9</th></tr>
EOF

foreach $topic (@ARGV) {
open TOPIC,"< $topic" or die "all args must be a UBB flat file (000###.cgi) file name : $!n";

open HTML,"> ${topic}.html" or die "can't open ${topic}.html for writing : $!n";

$line=<TOPIC>;
($topic_header, $unknown1, $num_replies, $author, $subject, $unknown5, $unknown6, $unknown7, $user_name, $unknown9) = split(/||/,$line);

print INDEX "<tr><td>$topic_header</td><td>$unknown1</td><td>$num_replies</td><td>$author</td><td><a href="${topic}.html">$subject</a></td><td>$unknown5</td><td>$unknown6</td><td>$unknown7</td><td>$user_name</td><td>$unknown9</td></tr>n";

print HTML << "EOF";
<html>
<head>
<title>$subject</title>
</head>
<body bgcolor="EEEEEE" text="#000000" vlink="#1111FF" alink="#222222" link="#FF1111">
<table border=2><tr>
<th>Topic Marker</th>
<th>Reply Number</th>
<th>Author Name?</th>
<th>Date</th>
<th>Time</th>
<th>email addr</th>
<th>IP</th>
<th>registered?</th>
<th>unkn9</th>
<th>User name?</th>
<th>unkn11</th>
<th>unkn12</th></tr>
EOF

while ($line=<TOPIC>) {
($tm, $rn, $an, $date, $time, $email, $post, $ip, $reg, $unkn9, $un, $unkn11, $unkn12) = split(/||/,$line);

print HTML "<tr><td>$tm</td><td>$rn</td><td>$an</td><td>$date</td><td>$time</td><td>$email</td><td>$ip</td><td>$reg</td><td>$unkn9</td><td>$un</td><td>$unkn11</td><td>$unkn12</td></tr>n";
print HTML "<tr><td colspan=12>$post</td></tr>n";
}
print HTML << "EOF";
</table>
</body>
</html>
EOF

close HTML;
close TOPIC;

}

print INDEX << "EOF";
</table>
</body>
</html>
EOF

close INDEX;

Joined: May 2000
Posts: 1,356
Addict
Addict
Joined: May 2000
Posts: 1,356
Allen or someone else, posted an info about ubb member slots... But there may be another thread for ubb thread info... Try to search (but they can be a little old) Anyway, Charles Capps or an UBB mod writer can give real info I believe...

Joined: Mar 2000
Posts: 21,079
Likes: 3
I type Like navaho
I type Like navaho
Joined: Mar 2000
Posts: 21,079
Likes: 3
we have a thread about current profile fields in the beta forum for 6.3 and 6.x smile


- Allen wavey
- What Drives You?

Link Copied to Clipboard
Donate Today!
Donate via PayPal

Donate to UBBDev today to help aid in Operational, Server and Script Maintenance, and Development costs.

Please also see our parent organization VNC Web Services if you're in the need of a new UBB.threads Install or Upgrade, Site/Server Migrations, or Security and Coding Services.
Recommended Hosts
We have personally worked with and recommend the following Web Hosts:
Stable Host
bluehost
InterServer
Visit us on Facebook
Member Spotlight
isaac
isaac
California
Posts: 1,157
Joined: July 2001
Forum Statistics
Forums63
Topics37,573
Posts293,925
Members13,849
Most Online5,166
Sep 15th, 2019
Today's Statistics
Currently Online
Topics Created
Posts Made
Users Online
Birthdays
Top Posters
AllenAyres 21,079
JoshPet 10,369
LK 7,394
Lord Dexter 6,708
Gizmo 5,833
Greg Hard 4,625
Top Posters(30 Days)
Top Likes Received
isaac 82
Gizmo 20
Brett 7
WebGuy 2
Morgan 2
Top Likes Received (30 Days)
None yet
The UBB.Developers Network (UBB.Dev/Threads.Dev) is ©2000-2024 VNC Web Services

 
Powered by UBB.threads™ PHP Forum Software 8.0.0
(Preview build 20221218)