Gossamer Forum
Home : Products : DBMan : Customization :

Hiding stuff on the footer from default users

Quote Reply
Hiding stuff on the footer from default users
Hi all, and Hello to you Deni(in case you see this message)
How can I hide the link on the footer from default users(the ones that didn't log in)

Another question I have is, on my .pl file I have the following code to print out URLs

<TR><TD><$font_color>View Now:</FONT> <$font><A HREF="$rec{'URL'}">$rec{'URL'}</A></Font></TD></TR>

How do I target it to be on "_top" when using it in a frame???
Thanks in advance for your help.

Jay

[This message has been edited by JayR (edited August 31, 1999).]
Quote Reply
Re: Hiding stuff on the footer from default users In reply to
Hi JayR, I'm not very good with perl, but I did manage to do this one.
Try this to kill the links for default users.
Enclose sub html_footer with,
unless ($db_userid eq "default"){
all html_foter stuff here....
}
I hope that helps, It works fine for me.
Carn't help with the other problem though.
Bob
Quote Reply
Re: Hiding stuff on the footer from default users In reply to
Bob gave you a good answer to your first question. That's exactly right.

The answer to your second question isn't hard either. Use

Code:
<A HREF="$rec{'URL'}" target="_top">

just like you would on a regular html page. Smile


------------------
JPD





Quote Reply
Re: Hiding stuff on the footer from default users In reply to
Thank you guys..
That worked fine for hiding links and top targeting!!!
Smile)
Jay
Quote Reply
Re: Hiding stuff on the footer from default users In reply to
My next question is:
How do I get rid of(or hide from default users) the search options except for keyword search and sort by??? Once again, Thanks in advance.

Jay
Quote Reply
Re: Hiding stuff on the footer from default users In reply to
Actually, you don't even want sortby, do you? Didn't we discuss that earlier?

I think the easiest way to do this would be

Code:
sub html_search_options {
# --------------------------------------------------------
# Search options to be displayed at the bottom of search forms.
#
unless ($db_userid eq "default") {
print qq~
<P>
<STRONG>Search Options:</STRONG> <br>
<INPUT TYPE="CHECKBOX" NAME="cs"> Match Case
<INPUT TYPE="CHECKBOX" NAME="ww"> Whole Words
<INPUT TYPE="CHECKBOX" NAME="re"> Reg. Expression<BR>
<INPUT TYPE="TEXT" NAME="keyword" SIZE=15 MAXLENGTH=255> Keyword Search <FONT SIZE=-1> (will match against all fields)</FONT><BR>
<INPUT TYPE="TEXT" NAME="mh" VALUE="$db_max_hits" SIZE=3 MAXLENGTH=3> Max. Returned Hits<BR>
Sort By:
<SELECT NAME="sb">
<OPTION>---
~; for (my $i =0; $i <= $#db_cols; $i++) { print qq~<OPTION VALUE="$i">$db_cols[$i]</OPTION>\n~ if ($db_form_len{$db_cols[$i]} >= 0); } print qq~
</SELECT>
Sort Order:
<SELECT NAME="so">
<OPTION VALUE="ascend">Ascending
<OPTION VALUE="descend">Descending
</SELECT><br><br>
<strong>Search Tips:</strong><br>
    - use '*' to match everything in a field)<BR>
    - put a '>' or '<' at the beginning to to do range searches.<BR>
~;
}
else {
print qq~
<INPUT TYPE="TEXT" NAME="keyword" SIZE=15 MAXLENGTH=255> Keyword Search <FONT SIZE=-1> (will match against all fields)</FONT>
<input type="hidden" name="sb" value="the number of your Store Name field">
~;
}
}

I also took out the "Match Any" option, since you have that as a hidden field in html_view_search.



------------------
JPD







[This message has been edited by JPDeni (edited August 31, 1999).]
Quote Reply
Re: Hiding stuff on the footer from default users In reply to
That worked out fine.
How do I cahge the font type on the "keyword(will match...)" from Times to Verdana, Arial, Helvetica???
Thanks in advance,
Jay
Quote Reply
Re: Hiding stuff on the footer from default users In reply to
Add

<$font>

before

Keyword Search

and add another

</font>

tag to the end of the line.

------------------
JPD







[This message has been edited by JPDeni (edited August 31, 1999).]
Quote Reply
Re: Hiding stuff on the footer from default users In reply to
Deni.
Small Problem. When I do a keyword search, I get an error

Error: Unknown Action

The database program received a command that it did not understand

How can I fix it???
Jay
Quote Reply
Re: Hiding stuff on the footer from default users In reply to
It's probably that you are hitting the "Enter" key after you type in the keyword, rather than clicking the "Submit" button.

In sub html_view_search, add another hidden field:

<input type="hidden" name="view_records" value="1>

That will allow you to use the Enter key after you type in a keyword search term.


------------------
JPD





Quote Reply
Re: Hiding stuff on the footer from default users In reply to
Deni.
I did that and now I don't see the "keyword (will searchagainst...)"
But it worked.

Second question;
on descriptions to the check boxes, how can I incorporate "something & something" is there a way I can add an "&" symbol??

thanks again.

Jay
Quote Reply
Re: Hiding stuff on the footer from default users In reply to
You should be able to use an & in your checkbox definitions.

As for the text, you need to move the hidden field up so that it's just below the other hidden input fields on the form. Put it below

<input type=hidden name="ma" value="1">

within sub html_view_search.

That should fix your problem.



------------------
JPD





Quote Reply
Re: Hiding stuff on the footer from default users In reply to
Deni.
In regards to the hidden field, that's exactly what I did. And incase you wanna review my .pl file its here

http://www.styleforliving.com/dbman/html_pl.txt

Please let me know, its my last day. Thanks

Jay
Quote Reply
Re: Hiding stuff on the footer from default users In reply to
Sorry. I had made a typo that I didn't catch. The hidden field should be

<input type="hidden" name="view_records" value="1">

Just stick another quotation mark in there.


------------------
JPD





Quote Reply
Re: Hiding stuff on the footer from default users In reply to
Deni.
I found it! I was missing a " after the value
I see you already responded to me b4 I even finished this post Smile Thanks
Quote Reply
Re: Hiding stuff on the footer from default users In reply to
Deni.
Do you have a form processing cgi that will collect data from users and send it via email(send mail) as I don't have SMTP with my ISP???

Jay
Quote Reply
Re: Hiding stuff on the footer from default users In reply to
There are instructions for creating email processes with DBMAN data via SENDMAIL in this forum and I believe that Carol (JPDeni) has some mods for emailing records.

Regards,

------------------
Eliot Lee
Founder and Editor
Anthro TECH, L.L.C
http://www.anthrotech.com/
info@anthrotech.com
==========================
Coconino Community College
http://www.coco.cc.az.us/
Web Technology
Coordinator
elee@coco.cc.az.us
Quote Reply
Re: Hiding stuff on the footer from default users In reply to
Thanks for the info Eliot. Smile

Jay
Quote Reply
Re: Hiding stuff on the footer from default users In reply to
You're welcome.

Regards,

------------------
Eliot Lee
Founder and Editor
Anthro TECH, L.L.C
http://www.anthrotech.com/
info@anthrotech.com
==========================
Coconino Community College
http://www.coco.cc.az.us/
Web Technology
Coordinator
elee@coco.cc.az.us