Jump to content

Add "Upcoming Domain Renewals" to client area


RPS

Recommended Posts

  • Replies 87
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Posted Images

  • 3 months later...

That is a nice script and exactly what is needed. Can someone tell me what I alter to set the number of days to 30, rather than 60?

 

UK names cannot be renewed more than 30-days in advance, so although they appear in the list, they can’t actually be renewed.

 

Trevor

Link to comment
Share on other sites

Well, you gotta make an attempt here.. Look for the code that works for 30 to 60 days. Post the code, then *try* to change what you think would be a logical change, to make it go from 30 to 60, to 1 to 30.

 

So #1, post the code for the 30-60.

 

#2, look at the code, think about what you would change on it to go from 30-60, to 1-30.

 

Post both of those, then I'll check out the code for #2, and let you know what else needs to be changed.

Link to comment
Share on other sites

Firstly, I have no idea how the code works. I am simply trying to adjust something that provides a facility that should be in WHMCS as a default.

 

I can see no references in any of the code to 30, 60 or indeed any other range of days which was the purpose of my question. And I didn’t want a range, I simply wanted to have a fixed figure of 30-days.

 

Looking at the code, the business element seems to be this:

 

{php}

$date = date("Ymd",mktime(0,0,0,date("m")+2,date("d"),date("Y")));

$i=1;

$result = mysql_query("SELECT * FROM tbldomains WHERE userid='".$_SESSION['uid']."' AND expirydate<'".$date."' AND status='Active' ORDER BY `expirydate` ASC ");

while($data = mysql_fetch_array($result))

 

but, as I said – I can’t see any clue as to where the number of days is determined. There is no 30 or 60 anywhere in that code.

 

Trevor

Link to comment
Share on other sites

You didn't read through the thread though.. you would have found this post if you did: http://forum.whmcs.com/showpost.php?p=51938&postcount=36

 

Read through the post/code.

 

To comment a line in PHP, you add two forwardslashes to the left of the line.

 

So:

 

$hello this is a php line

 

To comment that, you would change it to read

 

//$hello this is a php line

 

To remove the comment, you just remove the two slashes.

 

Uncomment the line that says "between", then change the numbers to what you think they should be. Post your final code.

Link to comment
Share on other sites

You are correct. I didn’t read the thread all the way through. I got to the part where the code I wanted worked and did what I wanted. I did not have time to read a further six pages :oops:

 

The example you refer to is easy to amend and works perfectly.

 

Its just what I wanted to encourage our lazy clients to renew. They normally only bother when the name has expired! :lol:

Link to comment
Share on other sites

I didn't do anything except what you advised.

 

I looked at the code in the link you suggested.

 

I then uncommented the lines that determined the display of the domains dependant on whether they were <30 &etc more days to expiry.

I commented out the lines that were not relevant.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated