PEAK XOOPS - 2.0 to 2.2 minor bug fix re: # of posts in englishin japanese

2.0 to 2.2 minor bug fix re: # of posts

  • You cannot open a new topic into this forum
  • Guests cannot post into this forum
Previous post - Next post | Parent - Children.1 | Posted on 2006/7/15 6:21
Monique  二等兵   Posts: 9
My posts weren't incrementing when a user uploaded a picture in 2.2. I fixed it and wanted to share it with you. Around line 200 in submit.php, change:

$xoopsDB->query( "UPDATE ".$xoopsDB->prefix('users')." SET posts=posts+'$myalbum_addposts' WHERE uid='$submitter'" ) ;

to:

$xoopsDB->query( "UPDATE ".$xoopsDB->prefix('user_profile')." SET posts = posts +'$myalbum_addposts' WHERE profileid='$submitter'" ) ;
Votes:8 Average:0.00
Previous post - Next post | Parent - No child | Posted on 2006/7/16 5:40
GIJOE  先任軍曹   Posts: 4110
hi Monique.

Thank you for sharing it.
I just know such an incompatibility.

Anyway it should be replaced XoopsUser::incrementPost() for the compatibility.

like this:

$user_handler =& xoops_gethandler('user') ;
$submitter_obj =& $user_handler->get( $submitter ) ;
for( $i = 0 ; $i < $myalbum_addposts ; $i ++ ) {
	$submitter_obj->incrementPost() ;
}
Votes:14 Average:5.00

  Advanced search


Login
Username or e-mail:

Password:

Remember Me

Lost Password?

Register now!