fireboard

style2k 26 Jun, 2008
hi there.

i am lookign for a way to send a form directly to fireboard when it is filled in.
is there any way to do that .
it might also be good if i could send the form directly to an article wich is publiched in a certain page so that slected users can revieuw thos forms etc.

anyone who know how i can do that ?

greetingsB)
GreyHead 27 Jun, 2008
Hi style2k,

I remember someone asked the FireBoard question before. I don't remember if it wsa fully resolved or not though. Search the forums and you should find the thread easily enough.

Bob
style2k 27 Jun, 2008
yeah after i posted this i found some things .
it is possible indeed to send something to fireboard.
involved a guild site same sort of thing im making so thats good .
only thing is i am a noob when it comes to coding etcetc..
i wil try to copy paste it .
but ill doubt it work cause that code was for joomla 1.0 and i run on 1.5 now and since im a noob in coding im not sure what to do .
i go check the thing and fill in some things like my db etcetc and check it but not sure if it is goin to work since its 1.0 code ...

greetings :laugh: B)
style2k 27 Jun, 2008
so i looked at it changed some settings and things but after submit the post is not in the forum i use joomla 1.5 what is wrogn here🙂
<?php 
// :: Remove all this Joomla will handle it for you 
// $db_host = "xxxxx";
// $db_user = "xxxxxx";
// $db_pwd = "xxxxxxx";
// $db_name = "xxxxxxxxx";
// mysql_connect($db_host, $db_user, $db_pwd);
// mysql_select_db($db_name);

// :: here's now you call the database 
global $database;
// :: set some variables that may need to be changed 
$catid = 8;
$userid = 53;
$author = "admin";
$fieldname = 'field_name';
$subject = $_POST['char_name']." - ".$_POST['class'];
$date = strtotime("now");

// $_POST['armory'] = "[URL=".$_POST['armory']."]LINK[/URL]";
$_POST[$fieldname] = "[url=".$_POST[$fieldname]."]LINK[/url]";
foreach($_POST as $key => $value) { 
  // capitalize the first letter of each field 
  $key = ucfirst($key);
  //make the title bold 
  $key = "".$key."";
  //make it part of the msg string 
  $msg = "$msg $key : $value";
} 
// get rid of the submit button bit at the end 
$msg_array = explode("[b]Button", $msg);
$msg = $msg_array[0];
/* $msg = substr($msg, 0, -3); */ 
// Because I'm lazy ... 
// :: I'm not sure this is correct - needs testing 
$msg = str_replace("\n","\n\n",$msg);

// Create the new topic 
$sql = " INSERT INTO #__fb_messages 
  SET id=NULL, parent=0, thread=0, catid=$catid, 
    name='$author', userid=$userid, email=NULL, 
    subject='$subject', time=$date, ip=NULL";
$database->setQuery($sql);
if ( !$database->query() ) { echo "<script> alert('".$database->getErrorMsg()."');
window.history.go(-1);
</script>";
} 
// Figure out what the correct threadid is of that new topic 
$mesid = $database->insertid;

// Set the thread id to the same as the message id, 
// as it's the first in the thread 
// Note: this solves the order problem in the forum 
$sql = " UPDATE #__fb_messages SET thread=id WHERE id=$mesid";
$database->setQuery($sql);
if ( !$database->query() ) { 
  echo "<script> alert('".$database->getErrorMsg()."'); window.history.go(-1);
</script>";
} 
// Tell the forum that there's a new latest message 
// Note: this solves the problem where the new message 
// isn't showing up as the latest message in the forum 
// Note: it's the categories table because FB sees 
// categories and forums as the same thing 
$sql = " UPDATE #__fb_categories SET id_last_msg=$mesid WHERE id=$catid";
$database->setQuery($sql);
if ( !$database->query() ) { 
  echo "<script> alert('".$database->getErrorMsg()."');
    window.history.go(-1);</script>";
} 
// Stick the $msg variable into the body of the topic 
$sql = " INSERT INTO #__fb_messages_text SET mesid=$mesid, message='$msg'";
$database->setQuery($sql);
if ( !$database->query() ) { 
  echo "<script> alert('".$database->getErrorMsg()."');
    window.history.go(-1);</script>";
} ?>
GreyHead 29 Jun, 2008
Hi style2k,

I don't know - now you need to start debugging.

Bob
Idyll 09 Jul, 2008
Have you checked wheter something has been added into the database?

I've got the same idea as you; setting up a form which can be sent into an application forum at Fireboard. Though I'm at the very starting point, and still wondering how it can be done.

A couple of things though:
1. Link to the previous topic:
http://www.chronoengine.com/component/option,com_fireboard/Itemid,37/func,view/id,8463/catid,2/
2. Eventhough the code was meant for Joomla! 1.0.x, it's still valid for Joomla! 1.5 due to the legacy mode. If there are differences, I reckon it's possible to ask what needs to be changed.
This topic is locked and no more replies can be posted.