2014-02-11, 05:08 PM
I know it's pretty simply PHP but I am only starting with all this stuff!
Please how to make this pappy work, it suppose to restrict access to users under 10 posts?
Please how to make this pappy work, it suppose to restrict access to users under 10 posts?
<?php
// Disallow direct access to this file for security reasons
if(!defined("IN_MYBB"))
{
die("Direct initialization of this file is not allowed.<br /><br />Please make sure IN_MYBB is defined.");
}
$plugins->add_hook("online_today_start", "online_restrict");
function uor_info()
{
return array(
"name" => "Online User Restrict",
"description" => "Restrict access to who's online to users under 10 posts",
"website" => "http://letsforum.com",
"author" => "Victor Dub",
"authorsite" => "http://letsforum.com",
"version" => "1.0",
"guid" => "",
"compatibility" => "*"
);
}
function online_restrict()
{
if(!$mybb->user['postnum'] >= 10)
{
error;
}
}
?>