Hi,
may i ask some help,please
There is forum (Invisionboard 1.1.x) with about 800 users.Since bandwidth over usage can occure any time,i need to limit daily topic view for each member.Daily limit is reseted by cron at midnight.
I already added a dv (dailyview) in the table where stored user data.This dv is counting down
on each topic view for that particular user.
$DB->query("SELECT dv FROM ibf_members WHERE id='".$ibforums->member['id']."'");
This query above working and gave the actual value of the daily view counter for that particular user.But i not really succeded to integrate into forum.
if dv>1 user can vew topics....
if dv<1 user forbidden to view topics
//-------------------------------------
// Check viewing permissions, private forums,
// password forums, etc
//-------------------------------------
$DB->query("SELECT dv FROM ibf_members WHERE id='".$ibforums->member['id']."'");
$dv = $DB->fetch_row();
if ( (!$this->topic['pinned']) and (!$ibforums->member['g_other_topics']) and ($dv->dv['dv']>1) )
{
$std->Error( array( LEVEL => 1, MSG => 'no_view_topic') );
}
$bad_entry = $this->check_access();
if ($bad_entry == 1)
{
$std->Error( array( LEVEL => 1, MSG => 'no_view_topic') );
}
Is there any advice,how possible to integrate this?
This is above not limiting the topic view,maybe i entered into wrong place or just simply my knowled is not enough for this.
I really appreciate any suggestion.