Gossamer Forum
Home : Products : DBMan : Customization :

validate mod and keywords

Quote Reply
validate mod and keywords
I have the validate mod installed. Ordinary searches and List All work as expected, but if I do a wildcard keyword search I get the unvalidated records as well as the validated ones. Is this a bug or my error somewhere?


In my db.cgi file in sub view_records

I have checked that I already have the following line:

(!$per_admin) and ($in{'Validated'} = "Yes"); ### validation

before this line:

my ($status, @hits) = &query("view");



and in sub html_search_options

I have added the following line:

<INPUT TYPE=HIDDEN NAME="Validated" VALUE="Yes">



But it doesn't work. Perhaps someone can help me to solve this problem?



thankx in advance

Last edited by:

uhrwerk: Oct 20, 2003, 6:40 AM
Quote Reply
Re: [uhrwerk] validate mod and keywords In reply to
Do you have the line:
<INPUT TYPE=HIDDEN NAME="Validated" VALUE="Yes">

in your sub html_view_search also?

Unoffical DBMan FAQ

http://creativecomputingweb.com/dbman/index.shtml/
Quote Reply
Re: [LoisC] validate mod and keywords In reply to
Thank you for your reply.



Yes, I have this line in my html.pl file in sub html_view_search

Here are my files:

http://www.vielfrass24.de/db.txt

http://www.vielfrass24.de/html.txt

http://www.vielfrass24.de/default.txt

I don't really know why it doesn't work.
Quote Reply
Re: [uhrwerk] validate mod and keywords In reply to
I'm not sure if this will help but I found that if I used the $db_validated_field in the sub html_record_form I had problems. So within that sub I use the actual field name "Validated".

Other than that I can see why it's not working with your keyword searches. I know this sounds like a stupid question but are you logged in as other than admin while testing this? It will show all the records for admin.

Unoffical DBMan FAQ

http://creativecomputingweb.com/dbman/index.shtml/
Quote Reply
Re: [LoisC] validate mod and keywords In reply to
Of course I test it under normal user mode (not under admin mode).

I have changed this lines in sub html_record_form :

if ($per_admin) {
print qq|<tr><td align=right>Validated:</td>
<td> |; print &build_radio_field($db_validated_field,$rec{$db_validated_field});
print "</td></tr>";
}
else {
print qq|<input type="hidden" name="$db_validated_field" value="$rec{$db_validated_field}">|;
}




to this:

if ($per_admin) {
print qq|<tr><td align=right>Validated:</td>
<td> |; print &build_radio_field('Validated',$rec{'Validated'});
print "</td></tr>";
}
else {
print qq|<input type="hidden" name="Validated" value="$rec{Validated}">|;
}



unfortunately it did not help me.



Do you know how I can change the layout of not validated records? For example:

If I , as a normal user, find a not validated record, I see that this record isn't validated. ->>

Before the record should stand now following :

"This record is not validated. " or something else.



thanx in advance.....
Quote Reply
Re: [uhrwerk] validate mod and keywords In reply to
It's very confusing looking at your files as you have 3 different input forms and views setup???

I'm wondering if the problem lies in the html coding in one of these sections. I noticed in your html_record_form there are many instances where you have <$font> tags without any closing </font> tags.

To answer your question you could try using this for before your page formatting for your html_record_long:

if ($rec{'Validated'} eq "Yes") {
[page text here]
}

Or check out this thread:

Thread: http://gossamer-threads.com/p/002894
Topic: ...hiding complete records...
ilferlo posted May 08, 2000

But I am wondering if the problem could be due to having various output views??

Unoffical DBMan FAQ

http://creativecomputingweb.com/dbman/index.shtml/
Quote Reply
Re: [LoisC] validate mod and keywords In reply to
I use some outputs for dispaying "All hits on one page", etc. You can check it here : http://www.vielfrass24.de/ebg/index_en.htm

user/pass: meta/123456

I do not think that having of many outputs can cause this error. But it could be.



I have added the lines

if ($rec{'Validated'} eq "No") {
['This record is not validated']
}

which you wrote me in the last message. But I dont's see some changes.

Also I have tried to add thisunless ($per_admin) {
$in{'Validated'} = 'No';
}

lines from this http://gossamer-threads.com/...;guest=5868686#16491 forum to my file. But it didn't help me as well.

Do I make something wrong?

Last edited by:

uhrwerk: Oct 23, 2003, 6:55 AM
Quote Reply
Re: [uhrwerk] validate mod and keywords In reply to
For this section of coding :

f ($rec{'Validated'} eq "Yes") {
print qq|

|;
}

You would need to surround the coding around the text you want to appear if the record is validated.

I'm still wondering if your problem is due to html coding. I think trying to find out what else could be causing the problem rather than bypassing it with other fixes should be the main objective.

I noticed while viewing the source code of your add form you have:

<TD VALIGN="TOP">&nbsp;<Font face="Verdana, Arial, Helvetica" Size=2 Color=#6F6F6F><INPUT TYPE="TEXT" NAME="URL" VALUE="http://" SIZE="97" MAXLENGTH="300"</font>></TD></TR>

The error in this portion could be causing problems:

MAXLENGTH="300"</font>>

which should be:

MAXLENGTH="300"></font>

Something like that could cause unexpected problems. Perhaps checking over all your html coding would be a good idea while trying to locate what is causing the problem with the validation field.

You may also want to put the line:

<input type="hidden" name="Validated" value="Yes">

within table cell coding since it is within a table.

<TR><TD colpan=2><input type="hidden" name="Validated" value="Yes"></TD></TR>

Unoffical DBMan FAQ

http://creativecomputingweb.com/dbman/index.shtml/
Quote Reply
Re: [LoisC] validate mod and keywords In reply to
You are right! the best way to solve it is checking the html code.

Thank you for your help!!!!!!!!!!!!!!!!!!!!!!!!!!!!

Alone I would not solve this problem!
Quote Reply
Re: [uhrwerk] validate mod and keywords In reply to
Do you have it all working now? If so, that is great!!

Unoffical DBMan FAQ

http://creativecomputingweb.com/dbman/index.shtml/
Quote Reply
Re: [LoisC] validate mod and keywords In reply to
It doesn't work yet. But I am sure now that small errors in html code could be a reason for it. I examine the code for the errors now.