Forums

Home » Liferay Portal » English » 3. Development

Combination View Flat View Tree View
Threads [ Previous | Next ]
toggle
zahid khan
Problem in displaying ads in liferay
September 7, 2009 11:07 PM
Answer

zahid khan

Rank: Regular Member

Posts: 116

Join Date: July 30, 2008

Recent Posts

Hi all,

i have developed a website where there will be many ads displayed in all the pages ,

what i am doing for this is that i am getting the ads code(html and javascript) from my client and pasting the code into the web content display portlet, all was working fine, but one of my clients code's for which ever ads(an image with a link, or a flash file) i place, it is not getting displayed on the liferay server but if i use the same code on a normal html page the ads are coming as expected .

I dont know what is missing here, and the client wants these ads to be displayed at any cost as that code provider is big client for him.

waiting for a reply.

Thanks in Advance

Zahid khan
Olaf Kock
RE: Problem in displaying ads in liferay
September 7, 2009 11:54 PM
Answer

Olaf Kock

LIFERAY STAFF

Rank: Liferay Legend

Posts: 1643

Join Date: September 23, 2008

Recent Posts

From the information you give there might be a naming conflict within either the javascript code or the html ids. If this is the case you have several options:

  • give your clients a namespace that they have to use - e.g. don't let them create a generic function named "display", but make it "yourcompany_ad_display". Do the same with id attributes in HTML
  • use iframes instead of inline code for ads
  • create an ad portlet yourself and make it contain the javascript code so that you control the content of the page
  • find the naming conflict and change liferay to work around so that your clients don't have to. Do so again with the next problem. And the one after that.


There are more options, but these might start to get you thinking about the problem
vaseem bari
RE: Problem in displaying ads in liferay
September 8, 2009 12:08 AM
Answer

vaseem bari

Rank: Junior Member

Posts: 79

Join Date: March 26, 2008

Recent Posts

Hai,

I also faced same problem, i used simple jsp portlet for this, it worked fine..
zahid khan
RE: Problem in displaying ads in liferay
September 10, 2009 11:06 PM
Answer

zahid khan

Rank: Regular Member

Posts: 116

Join Date: July 30, 2008

Recent Posts

Hi Olaf Kock, and vaseem

thanks for ur reply, i tried al the possiblities that u have mentioned above , iframe portlet, simple html iframe tag , my custom ad(jsp) portlet, i tried putting these ads seperately so that the id or the function names should not conflict, but i cant change the names as that is what the client has mentioned in the aggrement not to modify there code.

But still no results .

If a use a html page and add all these ads , they are visible , but if i call the same html page in my iframe(portlet or tag) ads are not visible but they are there(i mean if i inspect that palce the images nad the flash file is present but they are just not visible).

Is there some thing else that i can do .

Thanks for ur time once again

Zahid khan