Gossamer Forum
Home : Products : Gossamer Links : Development, Plugins and Globals :

Private messaging between applications.

Quote Reply
Private messaging between applications.
How would you go about using the Forum PM with LinksSQL and Community.
What I would like to implement is "contact link owner" on each listing and this would automatically take them to the message form, send a PM and inturn email the link owner that there is a message.

I could see a real benifit in contacting owners of the links and letting them know that there is interest being generated from the Directory and also for the Classifieds Ads.

I know this subject has been raised a few times but without a clear cut explaination on how to go about it.

Any pointers.

Thanks

Regards

minesite
Quote Reply
Re: [minesite] Private messaging between applications. In reply to
Try this global:

sub {
my $tags=shift;
my ($output,$sth,$user);
my $owner=$tags->{LinkOwner}; #this may need changing to tag containing username
use lib('/path/to/forum/admin'); #change
my $db = GT::SQL->new('/path/to/forum/admin/defs')->table('User');#change
my $forumid = $db->select ( { user_username => $owner, user_accept_privmsg=>'1' }, ['user_id'] )->fetchrow_array;
if ($forumid) {
$output .= qq~<form action='url to gforum.cgi' method=POST><tr><td><input type=submit name="do=message;user=$forumid" value="Contact Author" class=button></td></tr></form>~;
}
return $output;
}

Last edited by:

afinlr: Mar 17, 2004, 12:12 PM
Quote Reply
Re: [afinlr] Private messaging between applications. In reply to
Works perfectly. Cool

Its much appreciated.

Regards

minesite