[TH] Donate - Multi-campaign manager [Deleted]

I replaced this and got the below error?

width: {xen:calc 'intval(@sidebar.width) - 20'}px;
height: 120px;



upload_2017-2-15_16-44-42.webp
 
I replaced this and got the below error?

width: {xen:calc 'intval(@sidebar.width) - 20'}px;
height: 120px;



View attachment 148298

Try to find and remove any instances of "intval" that you find in that template (You can leave the parenthesis in place)

I wish there was a nicer way we could fix this, it's sort of a catch-22, if we don't distribute it with the intval in place people get warnings in PHP 7.1, and if we do have it people get errors in XenForo 1.5.8 and below, the best case fix would be to upgrade XenForo to at least 1.5.9, or if The XF developers released a patch that could be applied to lower versions to add support for this function.
 
Changes this

}
.donationCampaign .campaignIconSidebar .avatar.donationCampaignImage{
width: {xen:calc 'intval(@sidebar.width) - 20'}px;
height: 120px;

}
.donationCampaign .campaignIconSidebar .avatar.donationCampaignImage img {
max-width: {xen:calc 'intval(@sidebar.width) - 20'}px;
max-height: 120px;

}


To This
taken out the intval


}
.donationCampaign .campaignIconSidebar .avatar.donationCampaignImage{
width: {xen:calc '@sidebar.width - 20'}px;
height: 120px;

}
.donationCampaign .campaignIconSidebar .avatar.donationCampaignImage img {
max-width: {xen:calc '(@sidebar.width) - 20'}px;
max-height: 120px;
}
 
changed to 100

An exception occurred: addm.css - Line 30: Invalid math expression in /******/******/public_html/******. com/forums/library/XenForo/Template/Compiler.php on line 991

  1. XenForo_Template_Compiler->getNewCompilerException() in XenForo/Template/Compiler/Function/Calc.php at line 189
  2. XenForo_Template_Compiler_Function_Calc->_parseMathExpression() in XenForo/Template/Compiler/Function/Calc.php at line 55
  3. XenForo_Template_Compiler_Function_Calc->compile() in XenForo/Template/Compiler.php at line 700
  4. XenForo_Template_Compiler->compileFunction() in XenForo/Template/Compiler.php at line 576
  5. XenForo_Template_Compiler->compileSegment() in XenForo/Template/Compiler.php at line 509
  6. XenForo_Template_Compiler->compileSegments() in XenForo/Template/Compiler.php at line 372
  7. XenForo_Template_Compiler->compileParsed() in XenForo/Model/Template.php at line 1601
  8. XenForo_Model_Template->compileAndInsertParsedTemplate() in XenForo/Model/Template.php at line 1379
  9. XenForo_Model_Template->compileTemplateInStyleTree() in XenForo/Model/Template.php at line 1329
  10. XenForo_Model_Template->compileNamedTemplateInStyleTree() in XenForo/Model/Template.php at line 1268
  11. XenForo_Model_Template->compileAllTemplates() in XenForo/Deferred/Template.php at line 36
  12. XenForo_Deferred_Template->execute() in XenForo/Deferred/Atomic.php at line 66
  13. XenForo_Deferred_Atomic->execute() in XenForo/Model/Deferred.php at line 295
  14. XenForo_Model_Deferred->runDeferred() in XenForo/Model/Deferred.php at line 429
  15. XenForo_Model_Deferred->_runInternal() in XenForo/Model/Deferred.php at line 374
  16. XenForo_Model_Deferred->run() in XenForo/ViewRenderer/Abstract.php at line 352
  17. XenForo_ViewRenderer_Abstract::hasManualDeferredToRun() in XenForo/ViewRenderer/HtmlAdmin.php at line 130
  18. XenForo_ViewRenderer_HtmlAdmin->renderContainer() in XenForo/FrontController.php at line 637
  19. XenForo_FrontController->renderView() in XenForo/FrontController.php at line 158
  20. XenForo_FrontController->run() in /******/******/public_html/******. com/forums/admin.php at line 13
 
changed to 100

An exception occurred: addm.css - Line 30: Invalid math expression in /******/******/public_html/******. com/forums/library/XenForo/Template/Compiler.php on line 991

  1. XenForo_Template_Compiler->getNewCompilerException() in XenForo/Template/Compiler/Function/Calc.php at line 189
  2. XenForo_Template_Compiler_Function_Calc->_parseMathExpression() in XenForo/Template/Compiler/Function/Calc.php at line 55
  3. XenForo_Template_Compiler_Function_Calc->compile() in XenForo/Template/Compiler.php at line 700
  4. XenForo_Template_Compiler->compileFunction() in XenForo/Template/Compiler.php at line 576
  5. XenForo_Template_Compiler->compileSegment() in XenForo/Template/Compiler.php at line 509
  6. XenForo_Template_Compiler->compileSegments() in XenForo/Template/Compiler.php at line 372
  7. XenForo_Template_Compiler->compileParsed() in XenForo/Model/Template.php at line 1601
  8. XenForo_Model_Template->compileAndInsertParsedTemplate() in XenForo/Model/Template.php at line 1379
  9. XenForo_Model_Template->compileTemplateInStyleTree() in XenForo/Model/Template.php at line 1329
  10. XenForo_Model_Template->compileNamedTemplateInStyleTree() in XenForo/Model/Template.php at line 1268
  11. XenForo_Model_Template->compileAllTemplates() in XenForo/Deferred/Template.php at line 36
  12. XenForo_Deferred_Template->execute() in XenForo/Deferred/Atomic.php at line 66
  13. XenForo_Deferred_Atomic->execute() in XenForo/Model/Deferred.php at line 295
  14. XenForo_Model_Deferred->runDeferred() in XenForo/Model/Deferred.php at line 429
  15. XenForo_Model_Deferred->_runInternal() in XenForo/Model/Deferred.php at line 374
  16. XenForo_Model_Deferred->run() in XenForo/ViewRenderer/Abstract.php at line 352
  17. XenForo_ViewRenderer_Abstract::hasManualDeferredToRun() in XenForo/ViewRenderer/HtmlAdmin.php at line 130
  18. XenForo_ViewRenderer_HtmlAdmin->renderContainer() in XenForo/FrontController.php at line 637
  19. XenForo_FrontController->renderView() in XenForo/FrontController.php at line 158
  20. XenForo_FrontController->run() in /******/******/public_html/******. com/forums/admin.php at line 13
Hmmm just change
width: {xen:calc '@sidebar.width - 20'}px;
to this:
width: 100px;
 
Changed to this

.donationCampaign .campaignIconSidebar .avatar.donationCampaignImage{

width: 100px;
height: 120px;



An exception occurred: addm.css - Line 30: Invalid math expression in /****** /******/public_html/******. com/forums/library/XenForo/Template/Compiler.php on line 991

  1. XenForo_Template_Compiler->getNewCompilerException() in XenForo/Template/Compiler/Function/Calc.php at line 189
  2. XenForo_Template_Compiler_Function_Calc->_parseMathExpression() in XenForo/Template/Compiler/Function/Calc.php at line 55
  3. XenForo_Template_Compiler_Function_Calc->compile() in XenForo/Template/Compiler.php at line 700
  4. XenForo_Template_Compiler->compileFunction() in XenForo/Template/Compiler.php at line 576
  5. XenForo_Template_Compiler->compileSegment() in XenForo/Template/Compiler.php at line 509
  6. XenForo_Template_Compiler->compileSegments() in XenForo/Template/Compiler.php at line 372
  7. XenForo_Template_Compiler->compileParsed() in XenForo/Model/Template.php at line 1601
  8. XenForo_Model_Template->compileAndInsertParsedTemplate() in XenForo/Model/Template.php at line 1379
  9. XenForo_Model_Template->compileTemplateInStyleTree() in XenForo/Model/Template.php at line 1329
  10. XenForo_Model_Template->compileNamedTemplateInStyleTree() in XenForo/Model/Template.php at line 1268
  11. XenForo_Model_Template->compileAllTemplates() in XenForo/Deferred/Template.php at line 36
  12. XenForo_Deferred_Template->execute() in XenForo/Deferred/Atomic.php at line 66
  13. XenForo_Deferred_Atomic->execute() in XenForo/Model/Deferred.php at line 295
  14. XenForo_Model_Deferred->runDeferred() in XenForo/Model/Deferred.php at line 429
  15. XenForo_Model_Deferred->_runInternal() in XenForo/Model/Deferred.php at line 374
  16. XenForo_Model_Deferred->run() in XenForo/ViewRenderer/Abstract.php at line 352
  17. XenForo_ViewRenderer_Abstract::hasManualDeferredToRun() in XenForo/ViewRenderer/HtmlAdmin.php at line 130
  18. XenForo_ViewRenderer_HtmlAdmin->renderContainer() in XenForo/FrontController.php at line 637
  19. XenForo_FrontController->renderView() in XenForo/FrontController.php at line 158
  20. XenForo_FrontController->run() in /****** /****** /public_html/******. com/forums/admin.php at line 13
 
Changed to this

.donationCampaign .campaignIconSidebar .avatar.donationCampaignImage{

width: 100px;
height: 120px;



An exception occurred: addm.css - Line 30: Invalid math expression in /****** /******/public_html/******. com/forums/library/XenForo/Template/Compiler.php on line 991

  1. XenForo_Template_Compiler->getNewCompilerException() in XenForo/Template/Compiler/Function/Calc.php at line 189
  2. XenForo_Template_Compiler_Function_Calc->_parseMathExpression() in XenForo/Template/Compiler/Function/Calc.php at line 55
  3. XenForo_Template_Compiler_Function_Calc->compile() in XenForo/Template/Compiler.php at line 700
  4. XenForo_Template_Compiler->compileFunction() in XenForo/Template/Compiler.php at line 576
  5. XenForo_Template_Compiler->compileSegment() in XenForo/Template/Compiler.php at line 509
  6. XenForo_Template_Compiler->compileSegments() in XenForo/Template/Compiler.php at line 372
  7. XenForo_Template_Compiler->compileParsed() in XenForo/Model/Template.php at line 1601
  8. XenForo_Model_Template->compileAndInsertParsedTemplate() in XenForo/Model/Template.php at line 1379
  9. XenForo_Model_Template->compileTemplateInStyleTree() in XenForo/Model/Template.php at line 1329
  10. XenForo_Model_Template->compileNamedTemplateInStyleTree() in XenForo/Model/Template.php at line 1268
  11. XenForo_Model_Template->compileAllTemplates() in XenForo/Deferred/Template.php at line 36
  12. XenForo_Deferred_Template->execute() in XenForo/Deferred/Atomic.php at line 66
  13. XenForo_Deferred_Atomic->execute() in XenForo/Model/Deferred.php at line 295
  14. XenForo_Model_Deferred->runDeferred() in XenForo/Model/Deferred.php at line 429
  15. XenForo_Model_Deferred->_runInternal() in XenForo/Model/Deferred.php at line 374
  16. XenForo_Model_Deferred->run() in XenForo/ViewRenderer/Abstract.php at line 352
  17. XenForo_ViewRenderer_Abstract::hasManualDeferredToRun() in XenForo/ViewRenderer/HtmlAdmin.php at line 130
  18. XenForo_ViewRenderer_HtmlAdmin->renderContainer() in XenForo/FrontController.php at line 637
  19. XenForo_FrontController->renderView() in XenForo/FrontController.php at line 158
  20. XenForo_FrontController->run() in /****** /****** /public_html/******. com/forums/admin.php at line 13
And if you search addm.css for xen:calc it's no longer within the template?
 
it is here:

}
.donationCampaign .campaignIconSidebar .avatar.donationCampaignImage img {
max-width: {xen:calc '(@sidebar.width) - 20'}px;
max-height: 120px;
}


Should I also change it to this?

width: 100px;
height: 120px;
 
it is here:

}
.donationCampaign .campaignIconSidebar .avatar.donationCampaignImage img {
max-width: {xen:calc '(@sidebar.width) - 20'}px;
max-height: 120px;
}


Should I also change it to this?

width: 100px;
height: 120px;
Just change `{xen:calc '(@sidebar.width) - 20'}px;` to `120px`.
 
Try to find and remove any instances of "intval" that you find in that template (You can leave the parenthesis in place)

I wish there was a nicer way we could fix this, it's sort of a catch-22, if we don't distribute it with the intval in place people get warnings in PHP 7.1, and if we do have it people get errors in XenForo 1.5.8 and below, the best case fix would be to upgrade XenForo to at least 1.5.9, or if The XF developers released a patch that could be applied to lower versions to add support for this function.

well should i revert back to the last version, it was working great?
 
I have an open campaign setep with this addon, and it's displaying the total earned. I went into the options and unchecked the "Show total money earned" checkbox and hit save. It was still displaying the total earned, so I went back into the options only to see that the "Show total money earned" checkbox was enabled again. I tried several more times to uncheck it and hit save. Each time it reset to show the earned total.

I also have a campaign that it's not allowing me to delete. I hit the x and a loading thing pops up briefly in the upper right corner, vanishes, and nothing has happened. The campaign is still there.

Any light shed upon either of these issues would be greatly appreciated.
 
Installed it today. It is working so far. (XF 1.5.12 + PHP 7.0.9).

Good job on the Campaign Image feature update. It looks better now.

I will have to wait another day to see if the initial problem with the disappearing sidebar blocks is gone.
 
Back
Top Bottom