Installation Bugs ###############################
Quote:
------------------------------------------------
loginstall.php :: admin/functions.php :: Modification No.2
there are two modifications called Modification No.2. Doesn't bother me, but just thought i'd say.
------------------------------------------------
loginstall.php :: admin/functions.php :: Modification No.13
the modification details say
PHP Code:
// ###################### Start delete post #######################
function deletepost($postid,$countposts=1,$threadid=0, $stoplog=0) {
global $DB_site, $bbuserinfo;
// decrement user post count
if ($postinfo=getpostinfo($postid)) {
if ($countposts) {
$DB_site->query("UPDATE user SET posts=posts-1 WHERE userid='$postinfo[userid]'");
}
//log mod
However, you check later whether or not post counts should be updated so:
PHP Code:
// decrement user post count
if ($postinfo=getpostinfo($postid)) {
if ($countposts) {
$DB_site->query("UPDATE user SET posts=posts-1 WHERE userid='$postinfo[userid]'");
}
should be but highlighted in red (as it needs to be removed otherwise post counts are updated incorrectly)
There's also a problem related to this, see the editpost section
|
Quote:
------------------------------------------------
loginstall.php :: editpost.php :: Modification No.2 to 4
Modification No.2
PHP Code:
//delete just this post
$foruminfo=getforuminfo($threadinfo[forumid]);
deletepost($postid,$foruminfo[countposts],$threadinfo[threadid]);
$logperms=deletepost($postid,$foruminfo[countposts],$threadinfo[threadid]);
$threadreturn=$threadinfo[threadid];
updatethreadcount($threadinfo[threadid]);
updateforumcount($threadinfo[forumid]);
Modification No.3
PHP Code:
updatethreadcount($threadinfo[threadid]);
updateforumcount($threadinfo[forumid]);
updatethreadcount($logperms[delpost]);//modlog
updateforumcount($logperms[recforumid]); //modlog
eval("standardredirect(\"".gettemplate("redirect_deletepost")."\",
\"showthread.php?s=$session[sessionhash]&threadid=$threadinfo[threadid]\");");
Modification No.4
PHP Code:
$threadinfo[threadid]$threadreturn
Just a couple of things i'd like to query here:
Modification No.2:
"$logperms=deletepost($postid,$foruminfo[countposts],$threadinfo[threadid]);
$threadreturn=$threadinfo[threadid];"
Those two added lines don't actually seem nessesary.
Firstly, you've already called the deletepost function on the line above so when i deleted the line
"$logperms=deletepost($postid,$foruminfo[countposts],$threadinfo[threadid]);" everything still worked fine.
Also, the variable $threadinfo[threadid] doesn't actually change at any point (as far as i can see) the line to copy it to a new variable isn't needed.
Point two means that Modification No.4 wouldn't be needed.
I think modification 2 and 4 can really be skipped 
No issues would Modification No.3
|
Quote:
------------------------------------------------
loginstall.php :: showthread.php :: Modification No.3
PHP Code:
$viewattachedimages=0;
}
$postbits = getpostbit($post);
//modlog
// with rest of modlog code following here
this line (the one just above //modlog):
PHP Code:
$postbits = getpostbit($post);
should be highlighted in red (it needs to be removed). Otherwise the postbit template appears twice per post
------------------------------------------------
loginstall.php :: showthread.php :: Modification No.7
PHP Code:
//$postbits .= getpostbit($post);
//modlog
// with rest of modlog code following here
this line (the one just above //modlog):
PHP Code:
$postbits .= getpostbit($post);
should be highlighted in red (it needs to be removed). Otherwise the postbit template appears twice per post
------------------------------------------------
loginstall.php :: showthread.php :: Modification No.8
PHP Code:
eval("dooutput(\"".gettemplate("showthread")."\");");
//modlog
// with rest of modlog code following here
this line (the one just above //modlog):
PHP Code:
//eval("dooutput(\"".gettemplate("showthread")."\");");
should be highlighted in red (it needs to be removed). If not, the script never gets to the //modlog code that follows (which also outputs the template anyway!)
|
Quote:
------------------------------------------------
logbit :: template :: -
Uploaded in the zip, minor changes.
Judging by the other templates, i don't think it's actually used!
------------------------------------------------
postbit_reedit :: template :: -
Uploaded in the zip, minor changes.
------------------------------------------------
postbit_recycle :: template :: -
Uploaded in the zip, minor changes.
|
################################################## ############
Notes:
Tested on vb2.2.9 | Don't know if it works on vb2.3.0, can't get it
Tried both automatic and manual installation options.
Find it works best if everything is done automatically, except for template changes.
Quote:
General Bugs ###############################
Problems when users have weird usernames. Here's my example one (the quotes are part of it):
"';:*->Test<-*:;'"
I think you need to use addslashes() when entering info into the logs table, i'll test this later.
=============
/* -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Listed this problem already, check my earlier notes on editpost.php and admin/functions.php
If a user deletes their own post, their post count becomes 0. If they delete their own thread, the post count is updated correctly.
I think (really, not sure here) that this line in admin/functions.php
- just after function deletepost($postid,$countposts=1,$threadid=0, $stoplog=0) {:
Find:
PHP Code:
// decrement user post count
if ($postinfo=getpostinfo($postid)) {
if ($countposts) {
$DB_site->query("UPDATE user SET posts=posts-1 WHERE userid='$postinfo[userid]'");
}
This needs to be changed to just:
PHP Code:
// decrement user post count
if ($postinfo=getpostinfo($postid)) {
/*if ($countposts) {
$DB_site->query("UPDATE user SET posts=posts-1 WHERE userid='$postinfo[userid]'");
}*/
This is because you check later whether or not post counts should be updated (incase posts are being deleted from the log forum, etc).
The second modification (this time in edit.php):
Find:
PHP Code:
} else {
//delete just this post
$foruminfo=getforuminfo($threadinfo[forumid]);
deletepost($postid,$foruminfo[countposts],$threadinfo[threadid]);
$logperms=deletepost($postid,$foruminfo[countposts],$threadinfo[threadid]);
$threadreturn=$threadinfo[threadid];
Should become:
PHP Code:
} else {
//delete just this post
$foruminfo=getforuminfo($threadinfo[forumid]);
deletepost($postid,$foruminfo[countposts],$threadinfo[threadid]);
//$logperms=deletepost($postid,$foruminfo[countposts],$threadinfo[threadid]);
$threadreturn=$threadinfo[threadid];
otherwise, again, the post count seems to be done twice. It seems to work fine when that line is removed. Everything is still logged correctly.
=============
Listed this problem already
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= */
|
But that's it. This hack is absolutely brilliant!
Much thanks
[ mY edit note:
Corrected one or two things i wrote originally.
Listed a bit more details
If you're unsure what i'm on about with anything you can email me at
info@radgam.fsworld.co.uk ]