Site Links
Home
Features
Documentation
Pricing & Order
Members Area
Support Options
UBBDev.com
UBBWiki.com
Who's Online
0 registered (), 26 Guests and 15 Spiders online.
Key: Admin, Global Mod, Mod
Featured Member
Registered: 10/19/08
Posts: 52
Top Posters (30 Days)
Ruben 50
DennyP 24
Gizmo 23
Dunny 15
SteveS 13
AllenAyres 12
dbremer 10
SD 10
drkknght00 9
doug 8
Latest Photos
OK Corral Shoot Out
Testing
Basildon Train Station
Basildon Town Centre looking from the rounderbout
Basildon Town Square
Topic Options
#99427 - 06/24/03 09:41 PM GoForum mod
Anonymous
Unregistered

Hello GoForum is a free mod that allows certain forums to link to InterActive Tools "Article Manager" I would like to use but it only works with UBB5. Here is part of the script... would any Perl expert help me modify it? So it works with UBB6?

<pre>
# ----------------------------------------------------------------------------
# Function : post_ubbclassic5
# Description : login to ubbclassic 5.x+ and create a new thread
# Usage : &post_ubbclassic5($subject,$message);
# ----------------------------------------------------------------------------

sub post_ubbclassic5 {
my($forum_subj,$forum_body) = @_;
my($url, $headers, $postdata, $head, $html, $cookie);

unless ($g{'forum_num'} && $g{'forum_board'}) { die "Error: both forum_num and form_board must be specified for UBB Classic!"; }

### Login and create new thread in one step

$url = "$g{'forum_url'}/postings.cgi";
$headers = { 'Cookie' => $cookie, };
my $postdata= {
# login data
'UserName' => $g{'forum_user'},
'Password' => $g{'forum_pass'},
# message metadata
'number' => $g{'forum_num'},
'forum' => $g{'forum_board'},
'MsgIcon' => '1',
# message data
'TopicSubject' => $forum_subj,
'Message' => $forum_body,
# other
'Submit' => 'Submit New Topic',
'action' => 'posttopic',
};
($head, $html) = &GetPage($url, $headers, $postdata);
if ($g{'debug'}) { print "<h1>Server response to new thread request<hr></h1>$head$html"; }

# Check for errors
if ($head !~ m|^HTTP/d+.d+ 200|i) { die "Error logging in to forum. No 200 response code!n"; }
if ($html =~ /no one registered with the UserName/i) { die "Error logging in, invalid username."; }
if ($html =~ /password you entered was not correct/i) { die "Error logging in, invalid password."; }
if ($html !~ /Thanks for posting your message/i) { die "Error creating thread in forum!"; }

### Display forum and "guess" that first message matching our subject is us

$url = "$g{'forum_url'}/forumdisplay.cgi?action=topics&number=$g{'forum_num'}";
$headers = { 'Cookie' => $cookie, };
($head, $html) = &GetPage($url, $headers);
if ($g{'debug'}) { print "<h1>Server response to forum list request<hr></h1>$head$html"; }

# get URL out of results page
my $thread_url;
if ($html =~ m|<a href="([^">]+)">Q$forum_subjE</a>|i) { $thread_url = $1; }

# Check for errors
if ($head !~ m|^HTTP/d+.d+ 200|i) { die "Error logging in to forum. No 200 response code!n"; }
if (!$thread_url) { die "Error parsing story thread URL. Unable to redirect."; }

# and we're done, return URL
return $thread_url;

}
</pre>
Top
Express Hosting
Express Hosting "We are the official hosting company of UBB.threads. Ask us about our free migration services to migrate your UBB.threads installation."
#99428 - 06/25/03 04:42 AM Re: GoForum mod
Anonymous
Unregistered

This is a question for UBBDev, not here. Wrong forum, too.

-----------------
Need your UBB.classic installed, upgraded or moved to a new server by an experienced admin? Want hacks installed by someone who knows what he's doing? Need any scripts installed? PM or e-mail me!
Top
#99429 - 06/25/03 01:46 PM Re: GoForum mod
Anonymous
Unregistered

Where is UBB dev ?? Wasn't this UBBClassic forum?
Top
#99430 - 06/25/03 01:59 PM Re: GoForum mod
Anonymous
Unregistered

UBBDev.com

There is a separate forum for UBB 5.xx posts. (Since it's old.)

-----------------
Need your UBB.classic installed, upgraded or moved to a new server by an experienced admin? Want hacks installed by someone who knows what he's doing? Need any scripts installed? PM or e-mail me!
Top



Shout Box

Today's Birthdays
No Birthdays
Recent Topics
Temporary Password email not being received
by
05/24/12 10:02 PM
Ability to "like" individual posts (not Facebook "likes)
by doug
05/23/12 09:03 AM
Island Permissions
by ThreadsUser
05/22/12 03:03 PM
streaming video
by prkrgrp
05/20/12 07:02 PM
New Posts Corrupted? Can someone help?
by PianoWorld
05/19/12 09:41 AM
Forum Stats
10492 Members
36 Forums
33842 Topics
181709 Posts

Max Online: 978 @ 06/24/07 11:19 PM
Random Image