Gossamer Forum
Home : Products : DBMan : Customization :

how to diplay html in 'Description' or 'Comments' field?

Quote Reply
how to diplay html in 'Description' or 'Comments' field?
I have a field called 'Comments' (I renamed the 'Description' field), in which users add a paragraph or two describing their company. Does anyone know of a mod which will allow html to be entered in such a field and then be displayed in the search results? For example; if a user were to enter 'http://www.alltheweb.com' or 'mailto:me@here.com' in the field it would be displayed as a clickable link. I'd certainly settle for that capability, but if they could also enter html tags that would really be too cool. To complicate the issue, I am using jpd's Send Record mod, so I would imagine that the html would have to be stripped before it is processed by the sub forward_email routine in db.cgi. Any ideas?

------------------
-------------
Chris
Quote Reply
Re: how to diplay html in 'Description' or 'Comments' field? In reply to
This would be a bit complicated to say the least. There are Perl codes and C++ codes that will allow you to type in text and if the text is in http:// or mailto:, then the text will be linked. There are a couple forum software programs that do this (e.g., Caucus - www.caucus.com).

I think it could be done. It would be an interesting Mod. I will play around with it in the next few weeks.

In terms of the Send Record Mod, the codes would not affect the record. The codes I am thinking of would take information from the database file and then print link codes in the Description field. So, you would not have to worry about the Send Record Mod.

Regards,




------------------
Eliot Lee
Anthro TECH,L.L.C
www.anthrotech.com
----------------------



Quote Reply
Re: how to diplay html in 'Description' or 'Comments' field? In reply to
CNOBLIT (and Eliot),

I am already doing this on my site, but with sending html emails using the send record mod. It works EXCELLENT. Maybe with some modification, it will work with what you are trying to do Smile.

Check out this thread:

http://www.gossamer-threads.com/...m12/HTML/001517.html

Hope it helps!

Brian
Quote Reply
Re: how to diplay html in 'Description' or 'Comments' field? In reply to
Eliot, Brian - thank you for your response. I took a moment to enter some html tags in my current description field and the modified record displayed the html PERFECTLY. You can see the results here...

http://www.avatar-moving.com/mc/memdir/db.cgi?db=default&uid=default&Sponsor=&DateCreated=&ID=&Userid=&CompanyName=testco&Category=---&Addre ss1=&Address2=&CityStateZip=&VanLine=&PhoneNumber=&FaxNumber=&OtherNumber=&WebSite=&EmailAddress=&ContactName=&Comments=&keyword=&mh=10&sb=- --&so=ascend&view_records=Find+Listings

It does work like a charm with my current DBMan configuration!

HOWEVER, when you email the record using jpd's Send Record Mod, the actual HTML is sent as below...

<B>This is bold text!</B> <EM>This is empahsis</EM>. Here is a bullet list...
<UL>
<LI>Item 1
<LI>Item 2
<LI>Item 3
</UL>

So, it while is does work in the display, the html would need to be stripped out before the field is sent to sub html_forward_email_form for procssesing. Though this is way beyond my talents, someone should do this...'cause it would be a major cool feature.
Quote Reply
Re: how to diplay html in 'Description' or 'Comments' field? In reply to
P.S.: OPPS! When I was done composing my reply I deleted the 'Testco" record from my database, sorry. Try html on any of your records though...it works great, but is subject to the email problem I previously mentioned.