Advertising plugin

I am looking for an advertising plugin for the latest version of elgg (2.3) I don't want to advertise with adsense but rather post my own customized ads. Basically something similar to facebook, an image(logo) with a web address above it and a short (140-250 character) description below. It should appear in the right side as with FB and should be clickable.

  • I even tried;

    $ad = elgg_view("ads/ad/image.jpg");

    echo $ad;

    Just to see if the Image would show up but nothing....

  • Did you flush the cashes? Image would show up raw.
    Try also registering a simple cache view, though I don't think it's necessary. elgg_register_simplecache_view('ads/and/1.html'); in plugin init.

  • I did flush the caches. I tried the elgg_register_simplecache_view but got no result. not even the text of the html doc showed up.


  • $ad = '';
    while(!$ad) {
        $index = rand(0, 999);
        $ad = elgg_view("ads/ad/$index.html");
    echo $ad;

    It's two single quotation marks and not one double quotaion in the first line. Maybe that's the error. If not it might help to do the line breaks in a clean way to figure out what your program is complaining about.

    If nothing shows up it's maybe due to the html/jpg files not being at the right place. Where have you saved them relative to the mod folder of your plugin?

  • Thank you all for your replies, I did manage to get the HTML image to show up on the page, as usual it was not the programs fault but the user!!!!! ME

    The rotator code seems to be fine. (I am sure that the previous problem was me also) But when I upload it to the site I get a 502 bad gateway error from the site? So still no success.


Beginning Developers

Beginning Developers

This space is for newcomers, who wish to build a new plugin or to customize an existing one to their liking