Quote:
Originally Posted by nitro
Parse error: parse error, unexpected '[', expecting ',' or ';' in irc.php line 10
this is line 10 after changing 2 of each of the instances you suggested
global $threadid, $bbuserinfo['username'], $_POST['subject'], $forumid;
|
Sorry should have made directions clear
the irc.php should look like this
PHP Code:
<?
function postonirc ($posttext) {
global $goto, $DB_site, $Action, $homeurl, $ircdata, $ircchan;
$fp = fsockopen ($ircdata[ircserver], $ircdata[ircport], $errno, $errstr, 30);
if (!$fp) { echo "$errstr ($errno)<br>\n"; }
else
{
global $threadid, $postusername, $subject, $forumid;
if($ircdata[ircchannel1] != FALSE){
fputs($fp,$posttext);
}
$info .= fgets ($fp,1280);
fclose ($fp);
}
}
$forumname = $DB_site->query_first("SELECT title FROM forum WHERE forumid=".$forumid);
$putstring = "?".$ircchan;
$putstring .= "?\002\00309[\00304,01Board\00309,01]\002\00304 New thread in: \002\00309".$forumname[title]."\002\00304 Poster: \002\00309".$bbuserinfo['username']." \002\00304 Subject: \002\00309".$_POST['subject']."\002";
$putstring .= "?\002\00309[\00304,01Board\00309,01]\002\00304 Link: \00309 http://www.yourdomain.com/forums/".$url."\002";
$putstring .= "\n";
postonirc($putstring);
?>