Instant messaging initiated by paid members only

Modifications To The Webdate Script. Including Image Resize And Branding. Many More.

Instant messaging initiated by paid members only

Postby mutton on Fri Mar 28, 2008 7:06 pm

I had this working the way I wanted with V2, but V3 has wiped out my changes. I want paid members to be able to start an IM conversation with anyone, but unpaid members can respond but not participate in an IM conversation.

Here's what I had coded in V2:

<? if ( ($fMemberX[ unlimited ]==1)

|| ($fMember[login] == "admin")
|| ($fMemberX[login] == "admin") ){ ?>
<?= $im_link ?>

<? } else { ?>
<img src="images/im_small_gray.gif" width="10" height="10" border="0">
<a href="index.php?page=billing"><b>Instant Message</b></a>
<? } ?>
mutton
 
Posts: 100
Joined: Mon Feb 11, 2008 11:47 pm

Re: Instant messaging initiated by paid members only

Postby paul on Sat Mar 29, 2008 8:45 pm

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
User avatar
paul
Site Admin
 
Posts: 264
Joined: Sat Jan 26, 2008 7:30 pm
Location: Newington,Ct,USA

Re: Instant messaging initiated by paid members only

Postby paul on Sat Mar 29, 2008 9:00 pm

just noticed

the same modifications should be done on

engine/pages/whos_online.php

find the code on lines 138-149

Paul
User avatar
paul
Site Admin
 
Posts: 264
Joined: Sat Jan 26, 2008 7:30 pm
Location: Newington,Ct,USA


Return to Webscribble Custom Modifications

Who is online

Users browsing this forum: No registered users and 2 guests

cron