Jump to content

c0nnr

New Members
  • Posts

    1
  • Joined

  • Last visited

c0nnr's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. I'm making forums at the minute and everything is going well, apart from these stupid errors that I can't seem to get rid of for the life of me. It is frustrating me so much! I've looked through the code and cannot find anything wrong. The first error appears at the top of my forums whenever you're logged in about strict standards. This is what the error says: Line 6 of viewthread.php is - require('../structure/forum.thread.php');; Here is the code of the thread::canView() and thread::canView() that is located within my structure. thread::canView function below public function canView($id, $username, $powerLevel) { //extract thread details $thread = $this->database->processQuery("SELECT `parent`,`hidden` FROM `threads` WHERE `id` = ? LIMIT 1", array($id), true); $canSee = true; //get the parent's type $parent = $this->database->processQuery("SELECT `type` FROM `forums` WHERE `id` = ? LIMIT 1", array($thread[0]['parent']), true); if($parent[0]['type'] > 2) { //if it's a protected forum, make sure they are the thread owner or staff in order to view if($parent[0]['type'] == 3 && ($username != $thread[0]['username'] && $powerLevel < 3)) $canSee = false; //forum moderator forum, let only moderators view it if($parent[0]['type'] == 4 && $powerLevel < 3) $canSee = false; //administrator forum, let only administrators see it if($parent[0]['type'] == 5 && $powerLevel < 4) $canSee = false; //member forum, let only members see it if($parent[0]['type'] == 6 && !isset($_COOKIE['user'])) $canSee = false; } //only let staff view hidden threads if($thread[0]['hidden'] == 1 && $powerLevel < 3) $canSee = false; return $canSee; } forum::canView function below public function canView($id, $rank) { //extract forum details $forum = $this->database->processQuery("SELECT `type` FROM `forums` WHERE `id` = ? LIMIT 1", array($id), true); return ((($forum[0]['type'] == 4 && $rank < 3) || ($forum[0]['type'] == 5 && $rank < 4)) || $this->database->getRowCount() == 0 || ($forum[0]['type'] == 6 && !isset($_COOKIE['user']))) ? false : true; } The next error is when you reply to a thread. It comes up with the following error but it still sends the reply. Strict Standards: Declaration of thread::canView() should be compatible with forum::canView($id, $rank) in /home/connorb/public_html/06kayos/forums/reply.php on line 6 Warning: Cannot modify header information - headers already sent by (output started at /home/connorb/public_html/06kayos/forums/reply.php:6) in /home/connorb/public_html/06kayos/structure/base.phpon line 66 Thank you for any help!
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.