Gossamer Forum
Home : Products : Links 2.0 : Customization :

Auto Submission Blocker single line error message

Quote Reply
Auto Submission Blocker single line error message
Hi, just installed the auto Submission Blocker mod, first problem was it just listed lots of stuff and told me it couldnt create a tmp file, so after a bit of searching the forums for that answer I made the directory writable and now I have quite a lot of temp text files, so that side of it is working, the problem im having is when I goto my add.cgi to see the mod in action, I get this error message

Unkown Tag: rand_pass

Ive redone the mod 3 times now, from start to finish, and it just wont have it, im out of ideas, and I cant seem to find another thread with the same problem, If anyone can help, it will be greatly appreciated :))



Cheers

Nick.
Quote Reply
Re: [keyper] Auto Submission Blocker single line error message In reply to
Hi there, basically an unknown tag error, is where you have a statement in your templates but it has no defination.

I.e somewhere in your templates you must have <%rand_pass%>

I currently have this mod installed on my site, and looking at Pauls Readme it looks like you forgot to do this part of the mod

Code:
Next in site_html_templates.pl in sub site_html_add_form, remove &html_print_headers;
and add the following to the tag list:

rand_pass => $rand,

Do exactly the same in sub site_html_add_failure.

e.g (I have a few other mods installed, so your sub may look different)

sub site_html_add_form {
# --------------------------------------------------------
# This routine determines how the add form page will look like.
#

&html_print_headers;
my $language = shift;
$language ?
($language = qq~$language <input type=hidden name="Language" value="$language">~) :
($language = &build_checkbox_field ("Language", "$in{'Language'}"));
my $category = shift;
if ($category) {
($category =
qq~$category<input type=hidden name="Category" value="$category">~);
}
else {
if (!@exclude_categories) {
($category = &build_select_field ("Category"));
}
else {
($category = &get_cat_select_list);
}
}

print &load_template ('add.html', {
Category => $category,
flag => $language,
rand_pass => $rand,
%globals
});
}


Do exactly the same in sub site_html_add_failure.

Last edited by:

stu2000: Sep 30, 2002, 10:34 AM
Quote Reply
Re: [stu2000] Auto Submission Blocker single line error message In reply to
Thanks Stu2000, got it working, there were a couple of changes I made, I had all the info in there already, but noticed that some of yours were very slightly different.

on the add.html I made sure that the <%rand_pass%> was on its own line, before it was after a <td><b> statement.

then I changed the site_html_templates.pl file, before where I deleted/ommited the &html_print_headers; and replaced it with the rand_pass => $rand, I noticed that on your script it was after Category and before %globals (shown below)

print &load_template ('add.html', {
Category => $category,
flag => $language,
rand_pass => $rand,
%globals




As soon as I made these changes it worked great.........

Thanks stu2000 :))) sorry it took so long to reply to you, I have been working away for a few weeks.

ur a star....



Quote Reply
Re: [keyper] Auto Submission Blocker single line error message In reply to
I am putting in the same code modifications, and got that same tag error message, it was because I did not add the code to the "tag list".. which I had to guess was the %globals in the site_html_templates.pl:

%globals = (

date => &get_date,

time => &get_time,

db_cgi_url => $db_cgi_url,

build_root_url => $build_root_url,



site_title => $build_site_title,

color1 => $color1,

color2 => $color2,

color3 => $color3,

color4 => $color4,

color5 => $color5,

color6 => $color6,

color7 => $color7,



special1 => $special1,

special2 => $special2,

special3 => $special3,

special4 => $special4,

special_url1 => $special_url1,

special_url2 => $special_url2,

special_url3 => $special_url3,

special_url4 => $special_url4,



logob => $logob,

logos => $logos,



event => $event,

event_url => $event_url,

event_desc => $event_desc,



copyright => $copyright,



feature1 => $feature1,

feature2 => $feature2,

feature3 => $feature3,

feature4 => $feature4,

feature_desc1 => $feature_desc1,

feature_desc2 => $feature_desc2,

feature_desc3 => $feature_desc3,

feature_desc4 => $feature_desc4,

feature_url1 => $feature_url1,

feature_url2 => $feature_url2,

feature_url3 => $feature_url3,

feature_url4 => $feature_url4,

feature_more => $feature_more,

feature_more_url => $feature_more_url,



news1 => $news1,

news2 => $news2,

news3 => $news3,

news4 => $news4,

news_url1 => $news_url1,

news_url2 => $news_url2,

news_url3 => $news_url3,

news_url4 => $news_url4,

news_more => $news_more,

news_more_url => $news_more_url,



highlight1 => $highlight1,

highlight2 => $highlight2,

highlight_url1 => $highlight_url1,

highlight_url2 => $highlight_url2,

highlight_desc1=> $highlight_desc1,

highlight_desc2=> $highlight_desc2,


rand_pass => $rand,



css => $build_css_url

);



==========

BUT, now everything works but he random code tag <%rand_pass%> does not display, so I don't know what I messed up there....
Quote Reply
Re: [pflyz] Auto Submission Blocker single line error message In reply to
ok, as per the instructions given to add the mod, you have to remove the &html_print_headers; from the sub site_html_add_form and the sub site_html_add_failure in the site_html_templates.pl and then add rand_pass => $rand, which I did, but further down the script after Category=> $category and before the %globals statement. see below

print &load_template ('add.html', {
Category => $category,
flag => $language,
rand_pass => $rand,
%globals

I didnt change anything else in this section. I didnt add anything to the

# You can put variables here that you would like to use in any
# of your templates.

%globals = (
date => &get_date,
time => &get_time,
db_cgi_url => $db_cgi_url,
build_root_url => $build_root_url,
site_title => $build_site_title,
css => $build_css_url,
banner => ''

which is shown towards the top part of site_html_templates.pl

on the add.html I made sure that the <%rand_pass%> was on its own line, I think this was the key to the success of it working, but I wouldnt swear to that. Ive copied the section of code from my add.html which prints the rand_pass. Its at the end of my form, and before the submit button.



<tr><td align="right"><font face="Verdana, Arial, Tahoma" size="2"><b>Random Pass Code:</b></td>
<td><b>
<%rand_pass%>
<b></td></tr>
<tr><td align="right"><b>Random Pass Code:</b></td>
<td><input type="text" name="rand" size="20"></td></tr>


<tr bgcolor="#000000" VALIGN="MIDDLE">
<td width="240" align="right"><FONT COLOR="#FFFFFF">&nbsp;</FONT></td>
<td width="363" height="33"> <font color="#000000">
<input type="SUBMIT" value="Press Only ONCE to Submit " name="SUBMIT">
</font></td>
</tr>

hope this helps you sort it out, this is what I changed when I got my errors, and now it works really well. I was getting over 200 junk submissions a day from a tw#t in spain, who wouldnt stop, no matter what I asked, now I dont get a single junker from him, or anyone come to that. This script works so well, I wished I had installed it a year ago.
Quote Reply
Re: [keyper] Auto Submission Blocker single line error message In reply to
Got it working! Thanks, I think I had the same clown from spain jammin his sites into my database! This will be a relief!



Thanks to Paul for the script!! WooWhoo!