21
aerograf
Re: Problems with Soapbox
  • 2017/5/22 17:55

  • aerograf

  • Quite a regular

  • Posts: 214

  • Since: 2017/1/7 1


XOOPS 2.5.9-Beta3
PHP 7.0.17 (For which I plan to move, so I prepare modules for it)
MYSQL 5.7.13-6-log
I think we'll sort out what the problem is.

22
Mamba
Re: Problems with Soapbox
  • 2017/5/22 18:21

  • Mamba

  • Moderator

  • Posts: 11409

  • Since: 2004/4/23


I just updated few files is Soapbox - please download and test
https://github.com/mambax7/soapbox
Support XOOPS => DONATE
Use 2.5.11 | Docs | Modules | Bugs

23
aerograf
Re: Problems with Soapbox
  • 2017/5/23 6:50

  • aerograf

  • Quite a regular

  • Posts: 214

  • Since: 2017/1/7 1


Mamba thanks. It was fixed.
But still, for some reason, the result of voting in the database table "__sbarticles" is not recorded.
The table "__sbvotedata" is written, as it was, but not written to the main data. Why, I can not understand.
In debugging, all functions work, but there is no record in the database

24
Mamba
Re: Problems with Soapbox
  • 2017/5/23 9:50

  • Mamba

  • Moderator

  • Posts: 11409

  • Since: 2004/4/23


Quote:
But still, for some reason, the result of voting in the database table "__sbarticles" is not recorded.
The table "__sbvotedata" is written, as it was, but not written to the main data. Why, I can not understand.
In debugging, all functions work, but there is no record in the database

This is still work in progress, so please keep testing and reporting all the bugs and potential fixes....
Support XOOPS => DONATE
Use 2.5.11 | Docs | Modules | Bugs

25
aerograf
Re: Problems with Soapbox
  • 2017/5/23 13:01

  • aerograf

  • Quite a regular

  • Posts: 214

  • Since: 2017/1/7 1


It seems that this function does not work ...
public function updateRating(&$sbarticle$force false)
    {
        if (
strtolower(get_class($sbarticle)) !== strtolower('SoapboxSbarticles')) {
            return 
false;
        }
        
$totalrating 0.00;
        
$votesDB     0;
        
$finalrating 0;

        
$sbvotedata_arr =& $this->getVotedatasByArticleID($sbarticle->getVar('articleID'), true00);
        
$votesDB        count($sbvotedata_arr);
        if (empty(
$sbvotedata_arr) || $votesDB === 0) {
            return 
false;
        }
        foreach (
$sbvotedata_arr as $sbvotedata) {
            if (
is_object($sbvotedata)) {
                
$totalrating += $sbvotedata->getVar('rating');
            }
        }
        if (
$totalrating !== && $votesDB !== 0) {
            
$finalrating = ($totalrating $votesDB) + 0.00005;
            
$finalrating number_format($finalrating4);
        }
        
//
        
$sbarticle->setVar('rating'$finalrating);
        
$sbarticle->setVar('votes'$votesDB);
        if (!
$this->insertArticle($sbarticle$force)) {
            return 
false;
        }

        return 
true;
    }

26
Mamba
Re: Problems with Soapbox
  • 2017/5/23 14:12

  • Mamba

  • Moderator

  • Posts: 11409

  • Since: 2004/4/23


Just uploaded few changes - it should work now.
Please download from https://github.com/mambax7/soapbox and test....

You can use the "Add Sample data" button to speed-up the testing.
Support XOOPS => DONATE
Use 2.5.11 | Docs | Modules | Bugs

27
aerograf
Re: Problems with Soapbox
  • 2017/5/23 15:42

  • aerograf

  • Quite a regular

  • Posts: 214

  • Since: 2017/1/7 1


Unfortunately it did not work.

28
Mamba
Re: Problems with Soapbox
  • 2017/5/24 1:01

  • Mamba

  • Moderator

  • Posts: 11409

  • Since: 2004/4/23


What didn't work? We need details....
Support XOOPS => DONATE
Use 2.5.11 | Docs | Modules | Bugs

29
aerograf
Re: Problems with Soapbox
  • 2017/5/24 6:04

  • aerograf

  • Quite a regular

  • Posts: 214

  • Since: 2017/1/7 1


Posted in PM

30
Mamba
Re: Problems with Soapbox
  • 2017/5/24 10:04

  • Mamba

  • Moderator

  • Posts: 11409

  • Since: 2004/4/23


I hope, this is the last time you're downloading it from GitHub

Try it again - uninstall you current version, copy the files there, and install it again.
Support XOOPS => DONATE
Use 2.5.11 | Docs | Modules | Bugs

Login

Who's Online

81 user(s) are online (41 user(s) are browsing Support Forums)


Members: 0


Guests: 81


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Dec 31
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits