Is it possible to create an ad with BOTH text and image?

Creating a TEXT type ad I can insert an image along with text, but the ad just displays it all as HTML.

Creating an IMAGE type ad there is nowhere to add any text.

Am I missing something or is there a setting or patch I can apply to make TEXT type ads render the HTML?

Thank you!!

Comments

jeremy’s picture

This is not currently possible. The goal with the ad_text module was to make it _very_ simple, and this is what I have done. In order to minimize display bugs, I convert everything entered into the text block to be properly displayed by javascript, unfortunately for you this also means that html tags are converted.

Patches so that html can be included in text ads would be reviewed and likely merged. I don't need (or even want) this functionality personally, but if done correctly and cleanly it would go in.

colorado’s picture

Thanks Jeremy,

I've got text_ad displaying the HTML in the node by removing the function ad_text_display_prepare from the adbody in ad_text_display_ad.

But, for some reason ads are not displaying in the blocks. Any ideas why this would be?

jeremy’s picture

Category: support » feature

The whole purpose of ad_text_display_prepare() is to sanitize the text so it can be displayed with javascript. When you remove the calls to that function, you are skipping this sanitization step, and thus your javascript ends up with invalid characters and the ad is not displayed. If you enable something like FireFox's FireBug extension you will see the javascript error. Instead, to get what you want you need to enhance the ad_text_display_prepare() function, not remove it.

stinky’s picture

Hey colorado,

Did you ever figure out how to include html in your text ads?

colorado’s picture

No stinky, but I haven't spent anymore time on it either.

jeremy’s picture

Status: Active » Fixed

There is now an ad_html module included in the development version of the module. It should provide what you're looking for.

colorado’s picture

Whoah great - thanks Jeremy!!

Anonymous’s picture

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.