Ok dan in version 2 this code will allow only paying members to initiate IM
if they are not they will be redirected to the billing page
open the file:
engine/pages/preview_profile.php
comment out lines 101,103,104
so the original code looks like this:
- Code: Select all
//Does this profile (member) have IM rights
$fThisMember = f(q("SELECT unlimited, unlimited_end FROM dt_members WHERE id='$member_id'"));
if( $fThisMember["unlimited"]==1 && ($fThisMember["unlimited_end"]>time()) )
$can_be_imed = 1;
else
$can_be_imed = 0;
will now look like this:
- Code: Select all
//Does this profile (member) have IM rights
$fThisMember = f(q("SELECT unlimited, unlimited_end FROM dt_members WHERE id='$member_id'"));
//if( $fThisMember["unlimited"]==1 && ($fThisMember["unlimited_end"]>time()) )
$can_be_imed = 1;
//else
//$can_be_imed = 0;
next go to line 113:
original code looks like:
- Code: Select all
else
{
$profile_im .= '<img src="images/im_small_gray.gif" width="12" height="12" border="0"> <font class="e">'."Instant Message".'</font>';
}
$profile_mailbox = parseVariables("templates/preview_profile_mailbox.html",0);
Modify this code to look like this:
- Code: Select all
else
{ // added
if ($can_be_imed==1 && $i_can_im==0){$profile_im .= '<img src="images/im_small.gif" width="12" height="12" border="0"> <a href="index.php?page=billing">Instant Message</a>';
} else {
$profile_im .= '<img src="images/im_small_gray.gif" width="12" height="12" border="0"> <font class="e">'."Instant Message".'</font>'; }// end modified
}
$profile_mailbox = parseVariables("templates/preview_profile_mailbox.html",0);
This should take care of it...
I ran a quick test on so let me know that it's all good
Paul