globalwin
06-17-2002, 10:46 PM
$findwords=array(0 => '{getmicrostats}');
$replacewords=array(0 => $microstats);
$i=1;
while ($var=$DB_site->fetch_array($vars) and $i++) {
if ($var['findword']!="") {
$findwords[$i]=$var['findword'];
$replacewords[$i]=$var['replaceword'];
}
}
$newtext=str_replace($findwords,$replacewords,$new text);
$findwords=array(0 => '{bbusername}');
$replacewords=array(0 => "$bbuserinfo[username]<!-- auto name hack -->");
$i=1;
while ($var=$DB_site->fetch_array($vars) and $i++) {
if ($var['findword']!='') {
$findwords[$i]=$var['findword'];
$replacewords[$i]=$var['replaceword'];
}
}
$newtext=str_replace($findwords,$replacewords,$new text);
I have these pieces of code from the vBMicroStats Hack and the Readers Username hack, I need to merge them some how, can anyone help me?
$replacewords=array(0 => $microstats);
$i=1;
while ($var=$DB_site->fetch_array($vars) and $i++) {
if ($var['findword']!="") {
$findwords[$i]=$var['findword'];
$replacewords[$i]=$var['replaceword'];
}
}
$newtext=str_replace($findwords,$replacewords,$new text);
$findwords=array(0 => '{bbusername}');
$replacewords=array(0 => "$bbuserinfo[username]<!-- auto name hack -->");
$i=1;
while ($var=$DB_site->fetch_array($vars) and $i++) {
if ($var['findword']!='') {
$findwords[$i]=$var['findword'];
$replacewords[$i]=$var['replaceword'];
}
}
$newtext=str_replace($findwords,$replacewords,$new text);
I have these pieces of code from the vBMicroStats Hack and the Readers Username hack, I need to merge them some how, can anyone help me?