![]() |
| |||||||
| Mods and contribution Discussion This forum is only for discussion of modding phpLD. For specific mod releases, please see the appropriate forum. |
![]() |
| | Thread Tools | Display Modes |
| | #1 |
| Supporter Join Date: Dec 2005 Posts: 487 | Have just done this myself thought i'd share Adding 'Accept Agreement' checkbox to submit form. Form will not submit until user checks this box. In submit.tpl Near top, Replace: Code: <form method="post" action=""> Code: <form method="post" action="" onsubmit="return checkCheckBox(this)"> Scroll down to end of file, Replace: Code: <td colspan="2" class="buttons"><input type="submit" name="submit" value="{l}Continue{/l}" class="btn"/></td> Code: <td colspan="2" class="buttons">
Accept Terms of Agreement <input type="checkbox" value="0" name="agree">
<input type="submit" name="submit" value="{l}Continue{/l}" class="btn">
<input type="button" value="Exit" class="btn" onclick="document.location.href='/index.php';"/></td> <input type="button" value="Exit" class="btn" onclick="document.location.href='/index.php';"/> class="btn" sets button colour. 3. Just before {include file="footer.tpl"} place: Code: {* Javascript for Accept Terms of Agreement box *}
{literal}
<script>
<!-- Begin
function checkCheckBox(f){
if (f.agree.checked == false )
{
alert('You must tick box to continue.');
return false;
}else
return true;
}
// End -->
</script>
{/literal} _ |
| |
| | #2 |
| Administrator phpLD Administrator Supporter Join Date: Jan 2005 Posts: 11,667 | Wow! Thanks for sharing. __________________ Helpful Links: templates supporters forum █ follow me on twitter █ Quality Guidelines for Directories █ Recommended Host |
| |
| | #3 |
| Supporter | Thank you very much for your contribution :lol: and thanks again for your PM :wink: Cheers, Sxperm __________________ Real Estate Directory Online - EstateRound.com Submit your real estate resources for free (with reciprocal) or $19 for listing. Real Estate Listings - 2found.com |
| |
| | #4 | ||
| Quote:
Cracking idea, however it might be a better idea to put a terms of service page online first and to hyperlink this in a pop up box so that the submittor knows the TOS he/she is agreeing to. I'd like to see this working though. Well done on the concept even if it didn't work for me. Not to blow the candle out though all a person has to do is to write a line of text stating... Quote:
Kevin | |||
| |
| | #5 |
| Supporter Join Date: Dec 2005 Posts: 487 | Sorry it didn’t work for you I‘ve just reinstalled it again on an affected and unaffected submit.tpl and it seems to hold the fort. You could do like I did, go to a forum, kindly ask how X is achieved, you may have someone give you a different code to attempt. Then try to incorporate into the relevant areas of submit.tpl. However if it helps it may be a browser incompatibility problem I’m an IE6 user. As for linking to the Terms of Agreement you could make the text a link that opens in a new window to - terms.php i.e. To incorporate the terms into a customized pop up window you may have to use a 'window generator' script. Just search for that as a keyword. Although Plan B works too. Just write it. Peace. |
| |
| | #6 | |
| Quote:
ops: The script worked absolutely fine in internet explorer all versions, opera, firefox and a few others so far.... Was a syntax error not being picked up as a result of inncorrect installation of your description. Still think this is not really needed but is definately an added bonus to any site that wants to make 110% certain the tos has been accepted. No comebacks then.10/10 and my humble apologies for claiming it didn't work for me.... Scriptwriting is not my forte, but intillectual property is :wink: Thanks, Kevin | ||
| |
| | #7 |
| Mentor Join Date: Aug 2005 Location: New Jersey Posts: 334 | Hey, sounds great! Do you have a demo? |
| |
| | #8 | |
| Quote:
| ||
| |
| | #9 | |
| Supporter Join Date: Dec 2005 Posts: 487 | Quote:
Like I said if you're planning to do a separate Terms page you can link to it with the following, it opens it up in a new window. Code: By ticking the box you confirm you are accepting our Terms of Agreement Neticus Last edited by David; 03-06-2008 at 07:30 PM. | |
| |
| | #10 | |
| Quote:
![]() Like I said if you're planning to do a separate Terms page you can link to it with the following, it opens it up in a new window. Code: By ticking the box you confirm you are accepting our Terms of Agreement Neticus[/quote] Thanks, I may be dumb, but not that dumb!! :lol: Kev | ||
| |
| | #11 |
| Supporter Join Date: May 2006 Posts: 1,178 | This mod worked limk a charm! thank you David! |
| |
| | #12 |
| Supporter Join Date: Dec 2005 Posts: 1,247 | Is this working on 3.04? |
| |
| | #13 |
| Supporter Join Date: Dec 2005 Posts: 487 | I haven't tried it with 3.04 yet. However I've just looked at the 3.04 code in submit.tpl, the relevant lines to edit are still there so it should work. |
| |
| | #14 | |
| Supporter Join Date: Mar 2006 Location: USA Posts: 352 | Quote:
__________________ http://linkageplus.com - clean - PR5 - general directory http://webdirectoryforums.com - Add your directory free and advertise in the forums free! http://cardraft.com - car link directory http://www.phplinkdirectory.com/foru...ad.php?t=13493 - Post if you want added to my list of free phpld sites | |
| |
| | #15 | |
| Moderator | Quote:
__________________ If you want to make me happy, send much money with PayPAl to: admin(@)ohneschufaweb.de Mein Spendenkonto ist bei PayPal zu erreichen: admin(@)ohneschufaweb.de http://www.ohneschufaweb.de | |
| |
| | #16 |
| Join Date: Mar 2006 Posts: 258 | works perfect with 3.05 as well |
| |
| | #17 |
| Supporter Join Date: Jun 2006 Posts: 37 | Nice - works great. Now, does anyone have a "Terms and Conditions of Use" that I can use as a starting point? |
| |
| | #18 |
| Join Date: May 2006 Posts: 66 | Thanks for that code! Until I actually write up a separate terms page I am using this to ask the submitter to confirm that they have read and agree to the submission guidelines. I figured that was just about the same as terms. |
| |
| | #19 |
| Mentor Supporter Join Date: May 2006 Location: San Diego, California Posts: 523 | anyone have the mod to add an extra box to the submit page? like next to where they fill everything out? so I can put terms of service and such in that. |
| |
| | #20 |
| Hi, I'd like to use this mod, but I'm wondering if it will work with version 3.1. I can't find the Code: <form method="post" action=""> Here's what I have: Code: <form method="post" action="submit.php"> Joanne __________________ Wannaberichtoo Web Directory http://www.wannaberichtoowebdirectory.info {broken url removed} Wallpaper Downloads http://www.wallpaper-downloads.info | |
| |
![]() |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|