WebmasterSite.net: PHP scripts to enable your creativity
WSN Links PHP Directory Software
PHP Scripts Webmaster Links Support Forums

Register | Forgot Password

funds deduction misbehavior
all reverted to regular after one day

Version:
Example URL: 4.1.9
printPrint


funds deduction misbehavior
peumus
Forum Regular
Avatar

Usergroup: Customer
Joined: Aug 09, 2004
Location: Chile
Total Topics: 141
Total Posts: 369
Posted 11/06/07 - 03:51 PM:
quote post
#1
Paul,

Can you have a moment to check if your having the same difficulty:

At my customized version 4.1.9 :

At link settings:
Link types: priority1,priority2,priority3,priority4,priority5,priority6
Default days to expiration 32

At Sponsorship Settings:
Deduct the incrimental fee every 1 days
Use different funds for each sponsorship level? Yes.

Link Type Promotion: Yes
Incremental Fee: 1.06,0.78,0.71,0.62,0.56,0.5

I have added different links of different types with different amount of funds.
Two of them should have to be reverted to regular after one day, they were, but all of the links were reverted to regular after one day too regardless of their funds. I have added funds of 17,15,1 etc.

I will continue testing anyway
peumus
Forum Regular
Avatar

Usergroup: Customer
Joined: Aug 09, 2004
Location: Chile
Total Topics: 141
Total Posts: 369
Posted 11/07/07 - 05:16 PM:
quote post
#2
Paul,

It remebered me the difficulty we had at:
http://www.webmastersite.net/forums/comments.php?...

Also all these links were submitted and edited at the very first hour of the morning.

Searching for " if ($tryit > time()) " within the files ,
I found at that at suggest.php we have:


if ($thislink->expire)
{
$tryit = strtotime($thislink->expire);
if ($tryit > time()) $thislink->expire = $tryit;
else $thislink->expire = time() + ($thislink->expire * 86400); // calculate expiration date


I believe the difficulty is here, I will do mere tests and comment.

Edited by peumus on 11/07/07 - 06:22 PM
peumus
Forum Regular
Avatar

Usergroup: Customer
Joined: Aug 09, 2004
Location: Chile
Total Topics: 141
Total Posts: 369
Posted 11/07/07 - 07:15 PM:
quote post
#3
Paul,

I confirm that publishing the very first hour of the day expire value is changed to 0.

I believe we would need to do the same correction here at suggest.php as it was done before for edit.php .

Also maybe a simmilar situation would happen to $effectivetime variable at edit.php and suggest.php that would need to be modified.

Thanks.
Paul
Administrator
Avatar

Usergroup: Administrator
Joined: Dec 21, 2001
Location: Northern California
Total Topics: 55
Total Posts: 5926
Posted 11/08/07 - 11:36 AM:
quote post
#4
What do expirations have to do with sponsorship? Nothing that I can see.

The code you're quoting makes it try to convert a date to a timestamp, and if it's not a date it caclulates from the assumption that it's a number of days. That's what it should do so there's nothing wrong with it.

effectivetime is a little different -- it only accepts a date, not a number of days. That is, however, in line with what the page requests so I don't see a problem.

Edited by Paul on 11/08/07 - 11:41 AM

"Do things you love doing, because then it ain't work. Don't do something you don't really enjoy, because you're never going to work hard enough at it." - Bob Young, founder of Red Hat
peumus
Forum Regular
Avatar

Usergroup: Customer
Joined: Aug 09, 2004
Location: Chile
Total Topics: 141
Total Posts: 369
Posted 11/08/07 - 02:36 PM:
quote post
#5
Paul,

- When a link expires it's usually reverted to regular this is why I started presenting a sponsorship problem but finally realizing the problem was on the expiration side really.

- The main difficulty is that ,
If I post a link before 1:20 am, (let's say at 1:05am) with a expire value of 120 days, strtotime (120) is giving the timestamp of the same day at the hour of 1:20 am. If we have not reached that hour we have the problem I presented, with the link expiring the same day.

You already found a solution that you implemented at edit.php , it's at the link I mentioned, please reviewed at : http://www.webmastersite.net/forums/comments.php?...

Edited by peumus on 11/08/07 - 02:41 PM
Paul
Administrator
Avatar

Usergroup: Administrator
Joined: Dec 21, 2001
Location: Northern California
Total Topics: 55
Total Posts: 5926
Posted 11/09/07 - 06:45 PM:
quote post
#6
I don't see why strtotime would accept a number, but I'll check directly to exclude numeric values.

"Do things you love doing, because then it ain't work. Don't do something you don't really enjoy, because you're never going to work hard enough at it." - Bob Young, founder of Red Hat
Search thread for
Download thread as


You don't have permission to post.

Please login or register.

   
 
© 2008 Paul Knierim. All rights reserved.