The Arcive of vBulletin Modifications Site. |
|
2 Hacks, 1 piece of code Details »»
|
|||||||||||||||||||||||||||
$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? Download Now
Show Your Support
|
|||||||||||||||||||||||||||
| Comments |
|
#2
|
||||
|
||||
|
Check out this post: https://vborg.vbsupport.ru/showthrea...200#post257200
|
|
#3
|
||||
|
||||
|
thanks you so much
|
|
#4
|
||||
|
||||
|
still doesnt work
|
|
#5
|
||||
|
||||
|
Proper errordescriptions usually helps when trying to debug a problem
|
|
#6
|
||||
|
||||
|
there is no error, just the hack doesnt work.
![]() Code:
// ###################### Start dovars #######################
function dovars($newtext,$sendheader=1) {
// parses replacement vars
global $DB_site,$replacementsetid,$gzipoutput,$gziplevel,$newpmmsg,$fullpm,$microstats,$bbuserinfo;
static $vars;
if (connection_status()) {
exit;
}
if (!isset($vars)) {
$vars=$DB_site->query("SELECT findword,replaceword FROM replacement WHERE replacementsetid IN(-1,'$replacementsetid') ORDER BY replacementsetid DESC,replacementid DESC");
} else {
$DB_site->data_seek(0,$vars);
}
$findwords=array(0 => '{getmicrostats}', 1 => '{bbusername}');
$replacewords=array(0 => $microstats, 1 => "$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,$newtext);
|
![]() |
|
|