SimpleDesk

SimpleDesk! => SimpleDesk Support => Topic started by: MaddSmokerz on June 26, 2011, 05:45:55 PM

Title: Trouble with Board Veiwers Mod and Simpledesk Mod
Post by: MaddSmokerz on June 26, 2011, 05:45:55 PM
This Mod Is Awsome For My Site, Everything is working ok but im getting a few errors in the Admin, I Know Which Mod Is Doing It The "Board Viewers Mod" Here is a Few Pics Of What is Happening....

(https://www.simpledesk.net/community/proxy.php?request=http%3A%2F%2Fimg4.imageshack.us%2Fimg4%2F2788%2Fline862png.png&hash=e121636e77a3e3f21e38b88190cbf99c95629291)

(https://www.simpledesk.net/community/proxy.php?request=http%3A%2F%2Fimg600.imageshack.us%2Fimg600%2F7233%2Fline86png.png&hash=ceece142281ee326bdc13ff97a876ed52a4ed615)

(https://www.simpledesk.net/community/proxy.php?request=http%3A%2F%2Fimg848.imageshack.us%2Fimg848%2F816%2Fline84png.png&hash=f61da8899a0235d94a69777db9bd09355a4ded2f)

(https://www.simpledesk.net/community/proxy.php?request=http%3A%2F%2Fimg43.imageshack.us%2Fimg43%2F1918%2Fline69png.png&hash=1ef61f632f0fe15fa7481c11b4b4139fdfe06b89)

(https://www.simpledesk.net/community/proxy.php?request=http%3A%2F%2Fimg13.imageshack.us%2Fimg13%2F3715%2Fline68png.png&hash=5a1628ba6e906b9b62ca3561df21d1010e7597d3)

And This Is Whats Happening in the admin...but everything is showing fine, so im pretty sure it the board viewers mod thats causing the errors...was woundering if there was something i could add to the board index to stop the board viewers mod from doing that, it only gives me those errors when i click on the forum button and the "Department Catagories are put to the forum, if they are not shown on the forum i get no errors in the admin....Peace MaddSmokerz







Title: Re: Trouble with Board Veiwers Mod and Simpledesk Mod
Post by: Spoogs on June 26, 2011, 06:03:50 PM
I'd say attach your BoardIndex.php as well ;)
Title: Re: Trouble with Board Veiwers Mod and Simpledesk Mod
Post by: MaddSmokerz on June 26, 2011, 06:10:07 PM
Attached It To The First Post Spoogs...Thanks for your help  ;D
Title: Re: Trouble with Board Veiwers Mod and Simpledesk Mod
Post by: Spoogs on June 26, 2011, 06:16:46 PM
Not entirely sure I can help but having the file attached make it easier to look at the code and not have to go searching for the mod to see what's what :P
Title: Re: Trouble with Board Veiwers Mod and Simpledesk Mod
Post by: MaddSmokerz on June 26, 2011, 06:21:42 PM
sorry about that Spoogs ....I Did Disable The Board Viewers Mod For Right Now and went back to the forum and then back to the admin and Had No Errors... so its that mod but thank you for taking a look at it....Peace MaddSmokerz
Title: Re: Trouble with Board Veiwers Mod and Simpledesk Mod
Post by: Gruffen on June 26, 2011, 07:02:55 PM
Oh, that's a fairly bad mod there. It makes certain assumptions that it really, really shouldn't.

OK, how to fix, all in BoardIndex.php based on the above code.

Code (find) Select
$this_guests = $boards['viewers']['guests'];
$this_members = $boards['viewers']['members'];


Code (replace) Select
$this_guests = !empty($boards['viewers']['guests']) ? $boards['viewers']['guests'] : 0;
$this_members = !empty($boards['viewers']['members']) ? $boards['viewers']['members'] : 0;


And this, this is very, very wrong for so many reasons.
Code (find) Select
if($boards['children'] !== array())

Code (replace) Select
if (!empty($boards['children']) && is_array($boards['children']))

Make those two changes and it'll all be good.
Title: Re: Trouble with Board Veiwers Mod and Simpledesk Mod
Post by: MaddSmokerz on June 26, 2011, 07:21:42 PM
Thank you Gruffen and Spoogs For Fixing This its working fine now and im getting no errors in the Admin.....Thanks MaddSmokerz  8) 8)