PDA

View Full Version : Is there a way to add an article to each listing?


MyWebSearches
09-08-2007, 07:21 PM
As of now you can only add articles to categories, but I would like to do is to add an article to each listing detail page. Something like an About Us info for each listing. I find this info will be very helpful for my visitors since it will create a sense of trust before doing any business with that company.

Anyone with suggestions?

dargre
09-08-2007, 07:48 PM
Content visible to registered users only.
But you already have DESCRIPTION field....
Really need one more?
Must create new field in PLD_LINK table, then add it to link table definitions in 'tables.php' and last - add new textarea on submit page if you want link owner to fill it.
Additionally new validation for chars limit can be added.

MyWebSearches
09-08-2007, 07:53 PM
Description field is not enough as I would like to add an article with a short history about each company. This is for my niche directory.

bruleo
09-08-2007, 08:20 PM
In the latest 3.2 there is an "OTHER_INFO" field already inserted into the PLD_LINK table in the database.

I use this on A Way Away for various extra information on the details pages (Further company info, search boxes etc). I directly enter any extra content into this field via phpMyAdmin and assign $OTHER_INFO to the detail.php by adding Content visible to registered users only.

Then in your detail.tpl, add "{$OTHER_INFO}" wherever you want it to be displayed.

The thing I have found with this field is that it seems to accept and display any code, including javascript, without the need to add anything else to the templates.

See http://www.awayaway.com/detail/link-139.html & http://www.awayaway.com/detail/link-100.html for examples (might not display quite right in FF)

If you want users to insert into this field, then you would have to make other changes, but it's a goood place to start!

It is possible that this field might have a planned use for future releases of phpLD, but I suppose only the developers can confirm that!.

Bruce.

James
09-08-2007, 08:27 PM
Well I usually just create a new one because even I do not know what is planned totally for future.
The reason it takes anything is the fact you enter it into phpmyadmin manually ;)

see ALL posts to the database that goes thru the script is cleaned auto to preven xss and inserts etc etc to try and be proactive on exploits that many other scripts fall victim too :)

MyWebSearches
09-08-2007, 08:51 PM
Well since the article feature is already in phpld 3.2 I just wanted to find a way to use this feature to add articles to detail pages.

But the other options are good too!!

Freewebspace
09-12-2007, 08:06 AM
I have done this before ,I will search for the files in my computer and then reply here.

EDIT:I have found it

Article Submission