Oreo Killa 225 Posted June 19, 2008 Share Posted June 19, 2008 Ok, I was installing the Post Count Requirement MOD, and when opening a forum, I get this error: Fatal error: Call to undefined function check_post_count_requirement() Any help would be appreciated. Quote Link to comment Share on other sites More sharing options...
revraz Posted June 19, 2008 Share Posted June 19, 2008 Try the forums of the MOD or Product you installed it for. Quote Link to comment Share on other sites More sharing options...
Oreo Killa 225 Posted June 19, 2008 Author Share Posted June 19, 2008 I did, but receive no reply. Quote Link to comment Share on other sites More sharing options...
Oreo Killa 225 Posted June 19, 2008 Author Share Posted June 19, 2008 Here's the code I was supposed to insert into viewforum.php: // Check if user is allowed to bypass the requirements $postcount_bypass = FALSE; $sql = "SELECT b.group_bypass_post_req AS requirement FROM " . USER_GROUP_TABLE . " a, " . GROUPS_TABLE . " b WHERE user_id = " . $user->data['user_id'] . " AND a.group_id = b.group_id"; $result = $db->sql_query($sql); while ($membership = $db->sql_fetchrow($result)) { if ($membership['requirement'] == 1) { $postcount_bypass = TRUE; break; } } $db->sql_freeresult($result); // Check if the user has the required post count to view the forum if (check_post_count_requirement($forum_id,'view') == FALSE && $postcount_bypass == FALSE) { $user->setup('common'); $post1 = ($forum_data['forum_postcount_view'] == 1) ? $user->lang['POSTREQ_POST'] : $user->lang['POSTREQ_POSTS']; $remaining = ($forum_data['forum_postcount_view'] - $user->data['user_posts']); $post2 = ($remaining == 1) ? $user->lang['POSTREQ_POST'] : $user->lang['POSTREQ_POSTS']; $accesserror = sprintf($user->lang['POSTREQ_NOACCESS_VIEW'], $forum_data['forum_postcount_view'], $post1); if ($user->data['user_id'] != ANONYMOUS) { $neededposts = "<br /><br />" . sprintf($user->lang['POSTREQ_NOACCESS_MORE'], $remaining, $post2); } trigger_error($accesserror . $neededposts); } The red line is supposedly where the error is located. Quote Link to comment Share on other sites More sharing options...
Oreo Killa 225 Posted June 19, 2008 Author Share Posted June 19, 2008 Anyone? Quote Link to comment Share on other sites More sharing options...
revraz Posted June 19, 2008 Share Posted June 19, 2008 http://www.phpfreaks.com/forums/index.php/board,34.0.html Quote Link to comment Share on other sites More sharing options...
xyn Posted June 19, 2008 Share Posted June 19, 2008 Ok, I was installing the Post Count Requirement MOD, and when opening a forum, I get this error: Fatal error: Call to undefined function check_post_count_requirement() Any help would be appreciated. it means, your function doesnt exist. or is not included in that page your attempting to execute.. quick test: <? if(function_exists("check_post_count_requirement")){ print "YES"; }else{ print "NO" } ?> Quote Link to comment Share on other sites More sharing options...
Oreo Killa 225 Posted June 19, 2008 Author Share Posted June 19, 2008 Ok, I was installing the Post Count Requirement MOD, and when opening a forum, I get this error: Fatal error: Call to undefined function check_post_count_requirement() Any help would be appreciated. it means, your function doesnt exist. or is not included in that page your attempting to execute.. quick test: <? if(function_exists("check_post_count_requirement")){ print "YES"; }else{ print "NO" } ?> So I put: <? if(function_exists("check_post_count_requirement")){ print "YES"; }else{ print "NO" } ?> In a .php file, go to it and see what it says? Quote Link to comment Share on other sites More sharing options...
Oreo Killa 225 Posted June 19, 2008 Author Share Posted June 19, 2008 OMFG. I forgot to add the function into includes/functions.php. Damn I feel retarted. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.