Go Back   PHP Link Directory Forum > PHP Link Directory (phpLD) > Mods and contribution Discussion

Mods and contribution Discussion This forum is only for discussion of modding phpLD. For specific mod releases, please see the appropriate forum.

Closed Thread
 
topic widgets
Old 03-28-2007   #1
hamidof
 
hamidof's Avatar
 
Join Date: Dec 2005
Location: webmaster-forums.code-head.com
Posts: 69
Default Mod: Different Expiry Dates for Regular and Featured

In PHP Link Directory, if you enable payments and set the expiry date for the links, no matter which kind of link someone buys, it will expire after the expiry date (3 months for instance).
But I wanted to have it setup so when someone buys a normal link, it will be permanent and if someone buys a featured link and the link expires, the link becomes a normal link and not disappears from the directory.
So here is the solution:

In index.php find:

Code:
Content visible to registered users only.
Replace it with:
Code:
Content visible to registered users only.
Then find all the lines that has:

Code:
Content visible to registered users only.
In lines in between if(FTR_ENABLE){ and } queries will look like this:

Code:
Content visible to registered users only.
Then all the other queries that look like this:

Code:
Content visible to registered users only.
Has to look like this:
Code:
Content visible to registered users only.
Update (I forgot):
So after all this, you need to fix the payment form which has to say Lifetime for normal links, so open payment.tpl in your templates folder and find:
Code:
Content visible to registered users only.
Replace it with:
Code:
Content visible to registered users only.
Do this at your own risk.
__________________
Webmaster Forums
Resource-Index

Last edited by hamidof; 03-29-2007 at 03:21 PM. Reason: Typo:)
hamidof is offline  
Old 03-28-2007   #2
James
:)
phpLD Support
phpLD Administrator
Supporter
Moderator
 
James's Avatar
 
Join Date: Aug 2006
Location: Nanaimo, BC , Canada
Posts: 24,016
Default

Thank you for your contribution I look forward to hearing the feedback from people using it and think that this would be a great addition to the script (with your permission of course) if others agree
__________________
Attention: For Support Please Read this thread.
IF the domain is not listed in your PhpLD users area and it is 3.x
You will have to list it before ANY questions are answered.

My paypal is rentawebmaster @ gmail.com
^^ if I have helped you help me I need a new laptop
PhpLD Recommended Hosting: Here
They work with you not against you
Live Directory
James is offline  
Old 03-28-2007   #3
hamidof
 
hamidof's Avatar
 
Join Date: Dec 2005
Location: webmaster-forums.code-head.com
Posts: 69
Default

Thanks for changing the title

Of course you can use it where ever you want, you have my permission.
This can also have an option in admin panel, I can help on that if you guys want.
__________________
Webmaster Forums
Resource-Index

Last edited by hamidof; 03-28-2007 at 11:26 PM. Reason: Typo:)
hamidof is offline  
Old 03-28-2007   #4
hamidof
 
hamidof's Avatar
 
Join Date: Dec 2005
Location: webmaster-forums.code-head.com
Posts: 69
Default

Dawzz, I titled this thread like that (***) because I didn't know what to call it
__________________
Webmaster Forums
Resource-Index
hamidof is offline  
Old 03-28-2007   #5
SasaVtec
Supporter
 
SasaVtec's Avatar
 
Join Date: Jul 2006
Posts: 376
Default

Great mod here, gonna install it as soon as I get some time http://www.directorymix.com/blog/
__________________
NP Links Directory ~~ Online Web Resources ~~ Free Pro Templates
SasaVtec is offline  
Old 03-28-2007   #6
vegabond
 
vegabond's Avatar
 
Join Date: Aug 2005
Location: Dhaka, Bangladesh
Posts: 857
Default

Great work, I was looking for this
__________________
Web Mustang ~ Allthelink ~ OS Designer - phpLD Templates ~ Templates Pedia
vegabond is offline  
Old 04-09-2007   #7
MadDog
Supporter
 
MadDog's Avatar
 
Join Date: Oct 2006
Location: Somewhere near the Mekong River - Where's a GPS when you need it!
Posts: 128
Default

Great mod hamidof . Now a good addin if you want to automatically set the expiry_date for you will be as follows:
Open submit.php and find -
Code:
Content visible to registered users only.
Below that add this -
[code]
/////////BELOW LINE EXPIRY DATESTAMP

if (PAY_ENABLE == '1' && FTR_ENABLE == 1 && $_POST['LINK_TYPE'] == 'featured')
{
$data['EXPIRY_DATE'] = date("Y-m-d",time()+31536000);
}
else
$data['EXPIRY_DATE'] = date("Y-m-d H:i:s",time()+630720000);


////////////END EXPIRY DATESTAMP

The top line for featured will automatically stamp an expiry_date of 1 year from the signup date.
The below line is set for 20 years. You can modify it for what time you want all links to be set at. See this post: http://www.phplinkdirectory.com/foru...ad.php?t=11954

Using this together with this mod by hamidof gives you 2 different expiry dates that will automatically set and when feature link expires it will automatically convert to a normal link.
You can setup different link options with these mods now that will work automatically.

Last edited by MadDog; 04-13-2007 at 06:18 AM.
MadDog is offline  
Old 04-18-2007   #8
James
:)
phpLD Support
phpLD Administrator
Supporter
Moderator
 
James's Avatar
 
Join Date: Aug 2006
Location: Nanaimo, BC , Canada
Posts: 24,016
Default

Since I haven't played with this yet am wondering if
using the bold part



if (PAY_ENABLE == '1' && $price[$link_type] > 0)
{
$data['EXPIRY_DATE'] = date("Y-m-d",time()+31536000);
}
else
$data['EXPIRY_DATE'] = date("Y-m-d H:i:s",time()+630720000);


will set all paid ones to one year if your using a paid normal also
along with setting the free recip and perhaps free no follow to 20 yrs
__________________
Attention: For Support Please Read this thread.
IF the domain is not listed in your PhpLD users area and it is 3.x
You will have to list it before ANY questions are answered.

My paypal is rentawebmaster @ gmail.com
^^ if I have helped you help me I need a new laptop
PhpLD Recommended Hosting: Here
They work with you not against you
Live Directory
James is offline  
Old 04-24-2007   #9
giggler
 
Join Date: Feb 2007
Posts: 113
Default

If you want the others to not expire at all (with no expiration date), can you do this?

if (PAY_ENABLE == '1' && $price[$link_type] > 0)
{
$data['EXPIRY_DATE'] = date("Y-m-d",time()+31536000);
}
else
$data['EXPIRY_DATE'] = ;

Like leave it empty...how do you code that?
__________________
Do you have phpLD links for your signature?
giggler is offline  
Old 04-24-2007   #10
James
:)
phpLD Support
phpLD Administrator
Supporter
Moderator
 
James's Avatar
 
Join Date: Aug 2006
Location: Nanaimo, BC , Canada
Posts: 24,016
Default

well I would jsut use the 20 year one maddog posted if it dies 20 years from now,,,,,
__________________
Attention: For Support Please Read this thread.
IF the domain is not listed in your PhpLD users area and it is 3.x
You will have to list it before ANY questions are answered.

My paypal is rentawebmaster @ gmail.com
^^ if I have helped you help me I need a new laptop
PhpLD Recommended Hosting: Here
They work with you not against you
Live Directory
James is offline  
Old 04-25-2007   #11
thompson
Supporter
 
Join Date: Oct 2005
Posts: 540
Default

thanks for sharing.
__________________
many thanks.

thompson.
thompson is offline  
Old 04-27-2007   #12
giggler
 
Join Date: Feb 2007
Posts: 113
Default

If you have payment set as subscription, will the permenant setting for the regular listings and changes to the payment.tpl as describe let paypal know that it's a one time payment and not subscription based? Any changes needed to payment.php so that feature is subscription based and regular is one time payment?
__________________
Do you have phpLD links for your signature?
giggler is offline  
Old 04-27-2007   #13
James
:)
phpLD Support
phpLD Administrator
Supporter
Moderator
 
James's Avatar
 
Join Date: Aug 2006
Location: Nanaimo, BC , Canada
Posts: 24,016
Default

To do what you want to do yes it will be changes to the script needed.
The changes here are time based within the script there are no changes with the paypal code.
__________________
Attention: For Support Please Read this thread.
IF the domain is not listed in your PhpLD users area and it is 3.x
You will have to list it before ANY questions are answered.

My paypal is rentawebmaster @ gmail.com
^^ if I have helped you help me I need a new laptop
PhpLD Recommended Hosting: Here
They work with you not against you
Live Directory
James is offline  
Old 04-28-2007   #14
MadDog
Supporter
 
MadDog's Avatar
 
Join Date: Oct 2006
Location: Somewhere near the Mekong River - Where's a GPS when you need it!
Posts: 128
Default

If you want to have all other links have no timestamp you can use this and it will only stamp featured links 1 year and all others leave blank 'NULL' in your admin panel and database.
Do not alter the PayPal code and do no alterations to the database. Only add this to your submit.php and it will correctly do what you want if I am understanding you correctly.
Code:
Content visible to registered users only.
Hope that helps and is what you are looking for.
MadDog is offline  
Old 04-28-2007   #15
James
:)
phpLD Support
phpLD Administrator
Supporter
Moderator
 
James's Avatar
 
Join Date: Aug 2006
Location: Nanaimo, BC , Canada
Posts: 24,016
Default

Code:
Content visible to registered users only.

what he is asking for is a one time payment for regular and subscription set to reoccuring or so I take it.
__________________
Attention: For Support Please Read this thread.
IF the domain is not listed in your PhpLD users area and it is 3.x
You will have to list it before ANY questions are answered.

My paypal is rentawebmaster @ gmail.com
^^ if I have helped you help me I need a new laptop
PhpLD Recommended Hosting: Here
They work with you not against you
Live Directory
James is offline  
Old 04-28-2007   #16
giggler
 
Join Date: Feb 2007
Posts: 113
Default

Yes, permenant for regular and subscription for feature. I think it can be done in payment.tpl where it has {if $SubscriptionEnabled eq 1}, but it didn't work. Don't know what if and else to use...

Code:
Content visible to registered users only.
__________________
Do you have phpLD links for your signature?
giggler is offline  
Old 05-22-2007   #17
Grumps
 
Join Date: Nov 2006
Posts: 58
Default

This mod should be hardcoded into the next version. We should be able to choose what link package do we sell and set the name, duration of it in admin panel. Im sure everyone else will like it!
Grumps is offline  
Old 05-23-2007   #18
MadDog
Supporter
 
MadDog's Avatar
 
Join Date: Oct 2006
Location: Somewhere near the Mekong River - Where's a GPS when you need it!
Posts: 128
Default

I did this so far to have featured lifetime, featured year, featured month or regular lifetime all with ability to be activated or deactivated through the admin panel along with pricing of each type of link. Also all links types can be viewed and edited through the admin panel and expiry dates are automatically and correctly time stamped no matter if you set subcription or not.
Can view admin screenshots here of what I did so far with this:
http://www.phplinkdirectorymods.com/...issionsmod.php

I haven't had time lately to do anything else but I know that if it is set for subcriptions it will notify PayPal as such through the payment page and if set for say featured year it will show a 1 time payment so it could probably be modified to whatever settings anyone would want to offer. I may work on adding some other options to it later when I get some extra time.
MadDog is offline  
Old 05-26-2007   #19
giggler
 
Join Date: Feb 2007
Posts: 113
Default

I was able to get it to set payment to 1 time only also by doing the following in payment.tpl (this is assuming that the linktype you set for the permanent listing eq 2, if not, then set the number according:

Code:
Content visible to registered users only.
__________________
Do you have phpLD links for your signature?
giggler is offline  
Old 12-04-2007   #20
johnner
 
Join Date: May 2006
Posts: 58
Default

has this very necessary feature been included in 3.2?

thanks

john
__________________
Ethical Directory - PR4
Hostgator Coupons Save $50 - Special to PHPLD users, get an extra $10 rebate as well $10 will be donated to PHPLD development.
johnner is offline  
Closed Thread

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
topic widgets



All times are GMT +1. The time now is 05:37 PM.


Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.