Gossamer Forum
Home : Products : DBMan : Installation :

Links to photo pages

Quote Reply
Links to photo pages
I have just installed Dbman on my pc and I am using Xitami as my web server and all is working well. I now want to use DbMan to develop my web pages.
I am using DBman to store property details of properties for sale. I would like a user to be presented with a selection screen where he/she could specify price, location, etc. These details would then be retireved from Dbman, and the screen displaying the selected properties be constructed, showing the pictures, address and price, be built.

My questions are:
1) How do I flow my query from my initial selection screen, straight to the dbman database base search (I know how to get past the menu screen by changing the authority)?
2) How do I flow my data back from dbman and built my "viewing" screen.
3) Where is the best place to put my jpeg images....in Dbman, in a directory structure referenced by an URL stored in dbMan, or somewhere??? else?

Thanks in advance for any help,
Patrick
Quote Reply
Re: Links to photo pages In reply to
In terms of "data flow" between the search and result pages, your best bet is to install the Short/Long Display Mod.

In terms of putting images with records, it sounds like you may want to consider using the File Upload Mod that will associate pictures with particular records.

These mods are located at the following web page:

www.jpdeni.com/dbman/mods.html

In terms of linking back between the result pages and viewing/search screen, you can use the sub html_footer routine in the html.pl file to create text or graphic links between screens within DBMAN.

Hope this helps.

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: Links to photo pages In reply to
I should have looked thru the forunm a bit. I see that I can reference the location of the photo using the image tag. So that answers where to store the images (in a directory) and how to reference them in the html.
However does anyone know where the generated html is stored and how I can reference it (the html file given with dbamn seems to remain static). I have auto generate set, but don't know where the generated html is?

Thanks
Patrick
Quote Reply
Re: Links to photo pages In reply to
The generated HTML comes from the sub-routines within the html.pl file.

Refer to the sub html_footer. Look at the the links. You will see variables in the URL that you can use to create links in other sub-routines within the html.pl.

I hope this answers your question. Your last inquiry is a bit confusing. Smile

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: Links to photo pages In reply to
Eliot
Unfortunately I didn't explain myself very clearly about "flow".
What I want to do is have a custom front end to DbMan, where the user can select to search (I would like this to be a customisation of the "view" screen). Only a few of the database fields will be presented such as "Property Location" "Price range" and "Number of Bedrooms". The user will then submit this query and the details (with picures will be displayed.
I understand (thanks to you) how to customise the results screen but can I customise the selection screen and how do I avoid calling the "Main Menu" screen (as I just want to incorporate the "view" screen - modified - into my web page).

Thanks is advance


------------------
Quote Reply
Re: Links to photo pages In reply to
If you go to the sub html_home, you will see Main Menu. Delete Main Menu and replace it with whatever you want to put there. If you want to use a search form with a few fields on the "main page", then I would suggest doing the following:

1) Create a sub routine called html short_search_form in your html.pl file, like the following:

Code:
sub html_search_form {
# --------------------------------------------------------
# The form fields that will be displayed each time a record is
# edited (including searching). You don't want to put the
# <FORM> and </FORM tags, merely the <INPUT> tags for each field.
# The values to be displayed are in %rec and should be incorporated
# into your form. You can use &build_select_field, &build_checkbox_field
# and &build_radio_field to generate the respective input boxes. Text and
# Textarea inputs can be inserted as is. If you turn on form auto
# generation, the program will build the forms for you (all though they may
# not be as nice). See the README for more info.

my (%rec) = @_;
($db_auto_generate and print &build_html_record_form(%rec) and return);

print qq|
<form action="$db_script_url" method="GET">
<input type=hidden name="db" value="$db_setup">
<input type=hidden name="uid" value="$db_uid">
<input type=hidden name="sb" value="0">
<input type=hidden name="so" value="ascend">
<div align="center"><center>
<table border=1 cellpadding=2 cellspacing=0 width=600>
<tr>
<td width=300 valign=top bgcolor="ffffcc">
<$font>
<STRONG>Property Location:</STRONG></font><br>
<$smfont>(Enter Course Number in the Blank)</font>
</font></td>
<td width=300 valign=top bgcolor="ffffff">
|; print &build_select_field("Property",$rec{'Property'}); print qq|
</td></tr>
<tr>
<td width=300 valign=top bgcolor="ffffcc">
<$font>
<STRONG>Price Range:</STRONG></font>
</td>
<td width=300 valign=top bgcolor="ffffff">
|; print &build_select_field("Price",$rec{'Price'}); print qq|
</font>
</td></tr>
<tr>
<td width=300 valign=top bgcolor="ffffcc">
<$font>
<STRONG>Number of Bedrooms:</STRONG></font>
</td>
<td width=300 valign=top bgcolor="ffffff">
|; print &build_select_field("Rooms",$rec{'Rooms'}); print qq|
</font>
</td></tr>
<tr>
<td colspan="2" valign=top bgcolor="000000">
<font face="Arial" size="2">
<CENTER>
<INPUT TYPE="SUBMIT" NAME="view_records" VALUE="Search">
<INPUT TYPE="RESET" VALUE="Reset Form">
</CENTER>
</font>
</table>
</div></center>
</form>
|;
}

You can replace the Field Names and also the type of field (like if you have TEXT fields for the field names, then you would have to use the following codes:

Code:
<INPUT TYPE="TEXT" NAME="Property" SIZE="40" MAXLENGTH="255">

2) Add the following codes to your sub html_home routine where you want the search form:

Code:

HTML CODES
|;
&html_search_form;
print qq|
HTML CODES

That should do it.

Hope this helps.

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: Links to photo pages In reply to
Thanks for the help, Eliot.

Patrick
Quote Reply
Re: Links to photo pages In reply to
You're welcome.

Glad it worked.

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