Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie
Hi there,
There is an issue with role permissions that is being worked on at the moment.
If you are having trouble with access or permissions on regional forums please post here to get access: https://www.boards.ie/discussion/2058365403/you-do-not-have-permission-for-that#latest

Classified ads app

  • 20-08-2005 9:53pm
    #1
    Closed Accounts Posts: 2,027 ✭✭✭


    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/webclassifieds/demo/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.


Comments

  • Registered Users, Registered Users 2 Posts: 1,423 ✭✭✭Merrion


    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?


  • Registered Users, Registered Users 2 Posts: 15,995 ✭✭✭✭blorg


    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.


  • Closed Accounts Posts: 2,027 ✭✭✭alleepally


    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.


Advertisement