1
ros256
Re: Hack for multi upload atavars
  • 2004/10/13 9:13

  • ros256

  • Just popping in

  • Posts: 3

  • Since: 2004/10/12


I found that the code in modules/wfsection/class/wfslists.php calls the getarray function of the object-type WfsLists, of which no instance had been created. So I added the line

$wfslistsx=new WfsLists;

and modified the call to getarray to read

$wfslistsx->getarray( XOOPS_ROOTR_PATH . "/uploads/cache");

Was this hack written for a different version of XOOPS perhaps? I'm using the latest (2.0.7.3)

That fixed that problem, but left me with another problem I had to work around. The module doesn't pull the information in user settings about limits when uploading avatars. It thinks the "avatar_maxsize" "avatar_width" and "avatar_height" values in $xoopsConfigUser are all null. Perhaps whatever function populates $xoopsConfigUser is not being called properly?

I was able to work around this by hardcoding my own limits to use but this is less than ideal. Any input?

-Rosencrantz



2
ros256
Re: Hack for multi upload atavars
  • 2004/10/13 0:30

  • ros256

  • Just popping in

  • Posts: 3

  • Since: 2004/10/12


Found the problem. Apparently this hack didn't declare any instance of WfsLists, so I did it for it.

In the avatars/main.php file, go to line 58 where there's a call to WfsLists::getarray(). Insert before this line:

$wfslistsx = new WfsLists;

Then change the call to getarray() as such:

$wfslistsx->getarray( XOOPS_ROOT_PATH . "/uploads/cache");

This fixed it for me.

-Rosencrantz



3
ros256
Re: Hack for multi upload atavars
  • 2004/10/13 0:20

  • ros256

  • Just popping in

  • Posts: 3

  • Since: 2004/10/12


Hi,

I installed WF-Sections and applied the code hack above, then moved my images to the uploads/cache directory (chmod'd 0777 as directed). Now when I go to the avatars admin page (with PHP debug on) I get the following:

Avatar Manager
System Avatars (0 images) [List]
Custom Avatars (0 images) [List]
Notice [PHP]: Undefined variable: this in file modules/wfsection/class/wfslists.php line 40
Warning [PHP]: Missing argument 2 for getdirlistasarray() in file modules/wfsection/class/wfslists.php line 65

Any idea what the problem is?

Thanks,

Rosencrantz




TopTop



Login

Who's Online

159 user(s) are online (82 user(s) are browsing Support Forums)


Members: 0


Guests: 159


more...

Donat-O-Meter

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

Latest GitHub Commits