Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Not Solved Sorry you need X post
#1
Not Solved
So I have the plugin that lets me use PhP in templates but what is the PhP code to make it so a user needs X post EACH DAY to click on a link? Excluding staff.
Ansem Wrote:Lets admit, phpbb is a joke, smf is a joke but atleast thats a little funny, things like xmb or punbb just don't cut it and vb is like the douchbag of them all. Mybb wins.
My mods Clicky!
#2
Not Solved
Some thing like this; (didn't tested though)
$one_day = TIME_NOW - 24*60*60;
$required_posts = "25"; // Edit this value
$query = $db->query("SELECT SUM(pid) AS odp FROM ".TABLE_PREFIX."posts WHERE uid='".$mybb->user['uid']."' AND dateline > $one_day");
$one_day_posts = $db->fetch_field($query, "odp");

if ($one_day_posts < $required_posts)
{
   error("Sorry we need X amount of posts in order to see this link.");
}
#3
Not Solved
Ok, now, where would I add this into it?

<a href="{$mybb->settings['homeurl']}">{$mybb->settings['homename']}</a><a href="{$mybb->settings['bburl']}/index.php">Forums</a>
Ansem Wrote:Lets admit, phpbb is a joke, smf is a joke but atleast thats a little funny, things like xmb or punbb just don't cut it and vb is like the douchbag of them all. Mybb wins.
My mods Clicky!
#4
Not Solved
You've to do it yourself. Because I don't know the code of your plugin.
#5
Not Solved
It's not a plugin, just going to edit the code my self but I will figure it out.
Ansem Wrote:Lets admit, phpbb is a joke, smf is a joke but atleast thats a little funny, things like xmb or punbb just don't cut it and vb is like the douchbag of them all. Mybb wins.
My mods Clicky!


Forum Jump:


Users browsing this thread: 1 Guest(s)