Kratheous
05-18-2003, 01:40 PM
Okay... I'm making a bug report hack for a program development on my forums. Anyways, I've made it so that it stores all the extra data needed in the bug report in message with a seperator (<<SPACER>>) and then when editing it, I use explode to make them variables again...
Anyways, I also need to do this for the display... but since only the first post of a thread in this one forum is a bug report, I had to put certain limitations on when to use the secondary postbit. But, the problem is, even when I AM veiwing a first post in the correct thread, it doesn't use the correct postbit.
In showthread.php (Lines 14-21):
$zcbarray = $DB_site->query("SELECT forumid FROM forum WHERE forumtype='1'");
$arraycount = '0';
$zcbforums = array();
while ($zcbforum = $DB_site->fetch_array($zcbarray)) {
$zcbforums[$arraycount] = $zcbforum['forumid'];
$arraycount++;
}
In showthread.php (Lines 586-590):
if (in_array($forumid,$zcbforums) AND $counter==1 AND $pagenumber==1) {
$bugreport == "1";
}
// modified for vbProArcade
$postbits .= getpostbit($post,$bugreport,$vpa_champs_a);
In functions.php (Line 106):
function getpostbit($post,$bugreport=0,$vpa_champs=0) {
In functions.php (Lines 475-490):
if ($bugreport == "1") {
$vararray = explode('<<SPACER>>',$post[message]);
$os = $vararray[0];
$otheros = $vararray[1];
$version = $vararray[2];
$build = $vararray[3];
$osbase = $vararray[4];
$message = $vararray[5];
eval("\$retval = \"".gettemplate("postbit_zcbug")."\";");
} else {
if (($ignore[$post[userid]] and $post[userid] != 0)) {
eval("\$retval = \"".gettemplate("postbit_ignore")."\";");
} else {
eval("\$retval = \"".gettemplate("postbit")."\";");
}
}
Any help is appreciated.
Anyways, I also need to do this for the display... but since only the first post of a thread in this one forum is a bug report, I had to put certain limitations on when to use the secondary postbit. But, the problem is, even when I AM veiwing a first post in the correct thread, it doesn't use the correct postbit.
In showthread.php (Lines 14-21):
$zcbarray = $DB_site->query("SELECT forumid FROM forum WHERE forumtype='1'");
$arraycount = '0';
$zcbforums = array();
while ($zcbforum = $DB_site->fetch_array($zcbarray)) {
$zcbforums[$arraycount] = $zcbforum['forumid'];
$arraycount++;
}
In showthread.php (Lines 586-590):
if (in_array($forumid,$zcbforums) AND $counter==1 AND $pagenumber==1) {
$bugreport == "1";
}
// modified for vbProArcade
$postbits .= getpostbit($post,$bugreport,$vpa_champs_a);
In functions.php (Line 106):
function getpostbit($post,$bugreport=0,$vpa_champs=0) {
In functions.php (Lines 475-490):
if ($bugreport == "1") {
$vararray = explode('<<SPACER>>',$post[message]);
$os = $vararray[0];
$otheros = $vararray[1];
$version = $vararray[2];
$build = $vararray[3];
$osbase = $vararray[4];
$message = $vararray[5];
eval("\$retval = \"".gettemplate("postbit_zcbug")."\";");
} else {
if (($ignore[$post[userid]] and $post[userid] != 0)) {
eval("\$retval = \"".gettemplate("postbit_ignore")."\";");
} else {
eval("\$retval = \"".gettemplate("postbit")."\";");
}
}
Any help is appreciated.