|
| |||||||
| Mods and contribution Discussion This forum is only for discussion of modding phpLD. For specific mod releases, please see the appropriate forum. |
![]() |
| | topic widgets |
| | #1 |
| Join Date: Dec 2005 Location: webmaster-forums.code-head.com Posts: 69 | 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. Code: Content visible to registered users only. Code: Content visible to registered users only. Code: Content visible to registered users only. Code: Content visible to registered users only. Code: Content visible to registered users only. 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. Code: Content visible to registered users only. Last edited by hamidof; 03-29-2007 at 03:21 PM. Reason: Typo:) |
| |
| | #2 |
| :) phpLD Support phpLD Administrator Supporter Moderator Join Date: Aug 2006 Location: Nanaimo, BC , Canada Posts: 24,016 | 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 |
| |
| | #3 |
| Join Date: Dec 2005 Location: webmaster-forums.code-head.com Posts: 69 | 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. Last edited by hamidof; 03-28-2007 at 11:26 PM. Reason: Typo:) |
| |
| | #4 |
| Join Date: Dec 2005 Location: webmaster-forums.code-head.com Posts: 69 | Dawzz, I titled this thread like that (***) because I didn't know what to call it |
| |
| | #5 |
| Supporter Join Date: Jul 2006 Posts: 376 | Great mod here, gonna install it as soon as I get some time http://www.directorymix.com/blog/ |
| |
| | #6 |
| Join Date: Aug 2005 Location: Dhaka, Bangladesh Posts: 857 | Great work, I was looking for this |
| |
| | #7 |
| Supporter Join Date: Oct 2006 Location: Somewhere near the Mekong River - Where's a GPS when you need it! Posts: 128 | 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. [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. __________________ php Link Directory Mods --> phpLD Advanced Submissions with Deep Links Mods Real Estate Classified Ads | Real Estate Directory Premium Business Directory Last edited by MadDog; 04-13-2007 at 06:18 AM. |
| |
| | #8 |
| :) phpLD Support phpLD Administrator Supporter Moderator Join Date: Aug 2006 Location: Nanaimo, BC , Canada Posts: 24,016 | 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 |
| |
| | #9 |
| Join Date: Feb 2007 Posts: 113 | 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? |
| |
| | #10 |
| :) phpLD Support phpLD Administrator Supporter Moderator Join Date: Aug 2006 Location: Nanaimo, BC , Canada Posts: 24,016 | 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 |
| |
| | #11 |
| Supporter Join Date: Oct 2005 Posts: 540 | thanks for sharing. __________________ many thanks. thompson. |
| |
| | #12 |
| Join Date: Feb 2007 Posts: 113 | 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? |
| |
| | #13 |
| :) phpLD Support phpLD Administrator Supporter Moderator Join Date: Aug 2006 Location: Nanaimo, BC , Canada Posts: 24,016 | 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 |
| |
| | #14 |
| Supporter Join Date: Oct 2006 Location: Somewhere near the Mekong River - Where's a GPS when you need it! Posts: 128 | 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. __________________ php Link Directory Mods --> phpLD Advanced Submissions with Deep Links Mods Real Estate Classified Ads | Real Estate Directory Premium Business Directory |
| |
| | #15 |
| :) phpLD Support phpLD Administrator Supporter Moderator Join Date: Aug 2006 Location: Nanaimo, BC , Canada Posts: 24,016 | 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 |
| |
| | #16 |
| Join Date: Feb 2007 Posts: 113 | 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? |
| |
| | #17 |
| Join Date: Nov 2006 Posts: 58 | 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! |
| |
| | #18 |
| Supporter Join Date: Oct 2006 Location: Somewhere near the Mekong River - Where's a GPS when you need it! Posts: 128 | 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. __________________ php Link Directory Mods --> phpLD Advanced Submissions with Deep Links Mods Real Estate Classified Ads | Real Estate Directory Premium Business Directory |
| |
| | #19 |
| Join Date: Feb 2007 Posts: 113 | 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? |
| |
| | #20 |
| Join Date: May 2006 Posts: 58 | 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. |
| |