Gossamer Forum
Home : Products : DBMan : Customization :

Thanks

Quote Reply
Thanks
I just wanted to thank you for a great script. I am making a database for a health related support group that holds their personal information, as well as home page, email, and ICQ listings.

Could you please point me in a direction to do the following:

1. Show me how to easily add Referenced Links. If the user provides a email address or a home page, i would like the link to be clickable.

2. Are there tutorials or just the ReadMe file to explain manipulating the html.pl file. I want to customize it to match the scheme of my website, but the code in that file frightens me. The subs are broken down nicely, but there is repetion throughout the file and I wish to make it more readable as well as maybe import my look and feel into the html templates.
Quote Reply
Re: Thanks In reply to
You will need to define your own html_record subroutine instead of using the autogenerate feature.

Let's say you have the following fields in your database:
URL
WebsiteName
Email
Name

You would like to have the website name appear as a clickable link to the URL of the website and you would like to have the person's name as a clickable "mailto" link.

In the html_record subroutine, you will probably have some sort of a table. Include the following rows:

Code:
<tr><td>Website:</td>
<td><a href="$rec{'URL'}">$rec{'WebsiteName'}</a></td></tr>
<tr><td>Email:</td>
<td><a href="mailto:$rec{'Email'}">$rec{'Name'}</td></tr>

Use this as a pattern for however you want your links to appear. Substitute your fieldnames exactly as they are defined in the default.cfg file. Case counts!!!!

As for editing the html.pl file, some people have found the "user-friendly html.pl" mod I wrote to be helpful. You can pick it up at
http://www.jpdeni.com/dbman/html_pl.txt




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





Quote Reply
Re: Thanks In reply to
LOL!!!!!!!!!

Thank you much for proofreading. I'm always making mistakes like that. I just uploaded a database for a client and couldn't figure out why it wouldn't work -- until I realized I had skipped a number in my field definitions.

Please keep an eye on me. I often forget the details when I'm looking at the "big picture."


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





Quote Reply
Re: Thanks In reply to
I apologize for stepping in - the code that JPD provided in the previous post was missing a closing "</a>" in the mailto tag. Here is the code with the tag:

code:
--------------------------------------------------------------------------------

<tr><td>Website:</td> <td><a href="$rec{'URL'}">$rec{'WebsiteName'}</a></td></tr><tr><td>Email:</td> <td><a href="mailto:$rec{'Email'}">$rec{'Name'}</a></td></tr>

--------------------------------------------------------------------------------

Just trying to help - my intention is not to point out mistakes.

-------------------------
Donm
Quote Reply
Re: Thanks In reply to
Ha!

Call yerself a moderator JPD?

Sack her!

Smile

adam
Quote Reply
Re: Thanks In reply to
....and all this time I really thought JDP "WAS" perfect !!! :-)

Well if not perfect - she sure is close when it comes to DBman !!!

--------
Donm