Boards.ie uses cookies. By continuing to browse this site you are agreeing to our use of cookies. Click here to find out more x
Post Reply  
 
Thread Tools Search this Thread
20-08-2005, 22:53   #1
alleepally
Registered User
 
alleepally's Avatar
 
Join Date: Dec 2003
Posts: 2,006
Classified ads app

Hi all,

I bought a package called webscribble and I'm using it to put classified ads on my website (wicklow.com)

I've managed to make a few mods to the software to display a hit counter for each ad and also a website link for each ad but if you take a look at the webscribble site

http://www.webscribble.com/products/...o/browse.shtml

The ad description is all one long string of text. When you enter an ad, you can press return for a line break but this is not displayed. I think this is to do with stripslashes but can anyone tell me is there a way to allow the ad description to have some simple html in there to make the ads a bit less cramped...

Here are the lines from the source code that display the ad description

$ad_description = censorBadWords(stripslashes($fAd[description]));
$ad_description = wordwrap($ad_description, 70, "<br>\n", 1);

Thanks

Al.
alleepally is offline  
Advertisement
21-08-2005, 11:29   #2
Merrion
Registered User
 
Join Date: Nov 2002
Location: Dublin, Ireland
Posts: 1,052
I think that unless the resulting code is going in to a <PRE> block carriage returns are just considered whitespace. Can you explicitly put a <BR> in the advert text?
Merrion is offline  
21-08-2005, 11:40   #3
blorg
Registered User
 
blorg's Avatar
 
Join Date: Apr 2003
Location: Cambodia
Posts: 15,930
You need to replace carriage returns/line feeds (ASCII 13/10 respectively) with <BR> when doing the output. As Merrion says, carriage returns are ignored whitespace in HTML.
blorg is offline  
21-08-2005, 13:15   #4
alleepally
Registered User
 
alleepally's Avatar
 
Join Date: Dec 2003
Posts: 2,006
I tried putting <BR> when I enter the ad text but it's the same.

I don't have enough knowledge to do much more, I thought it might something simple I could just change on those two lines.

Thanks anyway guys.
alleepally is offline  
Post Reply

Quick Reply
Message:
Remove Text Formatting
Bold
Italic
Underline

Insert Image
Wrap [QUOTE] tags around selected text
 
Decrease Size
Increase Size
Please sign up or log in to join the discussion

Thread Tools Search this Thread
Search this Thread:

Advanced Search