Ok, I'll give this a go when I get home from work! Thanks for the info!![]()


Ok, did step 1, I went to the submit_step_2.tpl and pasted that directly into the first line at the very top of the code.
Did step 2, put what you wrote in the very bottom of the same page (submit_step_2.tpl).
I then tried testing it with just using news.com (as a test) and it still went through and didn't show a warning about not accepting it. After that, I thought perhaps it's because I was the admin it was possibly bypassing it for me, so I created a mock general user account and it still went through for that too.
I'm wondering if I'm missing something very simple? I'm still using the wistie template, and I put the modifications in the ../templates/wistie/submit_step_2.tpl
edit: I just bought the shredit template, and tried it there. Still isn't working. I'm still thinking it's probably something I'm overlooking.
Well I finished the site basically, re-skinned the shredit template a bit, but this issue is the last thing remaining.
I tried adding the codes that were mentioned on this thread for submit 2 tpl, but it's still not working. I tried entering a variety of websites (news.com, gamespot.com, etc) to see if it's working, but it still isn't. Am I missing something?
I can't really let this go live until it's fixed because it's site specific and I believe the people who would use it would feel it's a really big turn off to see other websites listed. Any help is appreciated!
I think I've solved this for you. Try this.
This example will only allow you to submit urls from Pligg.com
Open submit_step_1.tpl
Find
After it add the followingCode:{checkActionsTpl location="tpl_pligg_submit_step1_middle"}
Now find the following line in the same template file.Code:{if $pagename eq "submit"} {literal} <script type="text/javascript"> function validate_url(field,alerttxt) { with (field) { apos=value.indexOf("pligg.com"); dotpos=value.lastIndexOf("."); if (apos<1||dotpos-apos<2) {alert(alerttxt);return false;} else {return true;} } } function validate_form(thisform) { with (thisform) { if (validate_url(url,"Not a valid url!")==false) {url.focus();return false;} } } </script> {/literal} {/if}
Change toCode:<form action="{$URL_submit}" method="post" id="thisform">
Code:<form action="{$URL_submit}" method="post" id="thisform" onsubmit="return validate_form(this);">
the above method is great, although flawed. To bypass it, all the user has to do is turn off the javasript in their browser.
this worked for me:
open Submit_Step_2.tpl and enter the following above everything else
at the end of the page, after everything else, add:Code:{if $url_short eq "http://replacethiswiththeurl.com"}
then after {/if} add whatever text you like or the link submit form to show only to the users that submit a bad url.Code:{/if}
To add multiple urls, just keep adding more lines like so:
this way the beginning code would look something like this:Code:|| $url_short eq "http://www.2ndurl.com"
Code:{if $url_short eq "http://replacethiswiththeurl.com" || $url_short eq "http://www.2ndurl.com" || $url_short eq "http://www3rdurl.com"}