HTML Logo by World Wide Web Consortium ( Click to learn more about our commitment to accessibility and standards.

Moving forward with Composr

ocPortal has been relaunched as Composr CMS. ocPortal 9 is superseded by Composr 10.

Head over to for our new site, and to our migration roadmap. Existing ocPortal member accounts have been mirrored.

4.2 - Banner Script Url

Login / Search

 [ Join | More ]
 Add topic 
#55338 (In Topic #12046)

Honoured member

I have had additional banners past the default showing, they show fine with an image in it...but I was wanting to run Project wonderful ads with a script in the spots.


Following instruction on this:


If you specify a URL to a script (such as the URL to another ocPortal installation's banner.php) instead of an image, then that script will be loaded in a frame, and is assumed to provide its own rotation inside that space. Because of this, only the script URL is required in place of the image URL, and the actual 'URL' field may be left blank and will be ignored (as the linked rotation provides these itself).

Linking to non-image URLs instead of images is handy in a number of situations, including:
  • if you want to chain banner networks together
  • if you want to link to a textual banner
  • if you want to make a page that displays a randomised banner based on some kind of algorithm (such as choosing randomly from a folder of pictures)
and the other tutorial and stuff, I uploaded the script with a txt extension, and it displays just the txt. i tried it as .php and in preview it shows the banner correctly, but when you hit submit, it says

An error has occurred

The URL,, was not found
if you try it as just the file name without the http://etc, it tells you you are hacking the site.

Love to get the banners running I'm almost ready to call the site "live"...

Back to the top

This will fix the bug:
» Download: banners2.php (16 Kb, 137 downloads so far)

Except that the error you posted is because you had a space on the end of the URL. I suspect you tried different combination, making that mistake after finding the bug.

Become a fan of Composr on Facebook or add me as a friend. Add me on on Twitter. Support me on Patreon
Was I helpful?
  • If not, please let us know how we can do better (please try and propose any bigger ideas in such a way that they are fundable and scalable).
  • If so, please let others know about Composr whenever you see the opportunity or support me on Patreon.
  • If my reply is too Vulcan or expressed too much in business-strategy terms, and not particularly personal, I apologise. As a company & project maintainer, time is very limited to me, so usually when I write a reply I try and make it generic advice to all readers. I'm also naturally a joined-up thinker, so I always express my thoughts in combined business and technical terms. I recognise not everyone likes that, don't let my Vulcan-thinking stop you enjoying Composr on fun personal projects.
  • If my response can inspire a community tutorial, that's a great way of giving back to the project as a user.
Back to the top

Honoured member

well, at least it was found and fixed! I can report the banners are working perfectly with Project Wonderful ads in them right now.
Back to the top
There are too many online users to list.
Control functions:

Quick reply   Contract

Your name:
Your message: