Jump to content


* * * * *
Photo

Advertisements: External Access


You can include advertisements in other areas of your skin, in IP.Content blocks and even in external pages and applications outside of IP.Board.


To place an advertisement in a template or IP.Content block, you can simply use the tag:
{parse advertisement="1"}
The tag can take either the ID number for the advertisement to display, or the key for the location, which will use IP.Nexus' normal logic for fetching the advertisement. For example, using this tag:
{parse advertisement="ad_code_board_index_header"}
Would display whatever advertisement is configured to show in the board index header - if more than one is configured, Nexus will either pick a random one, or the most recent one (as per the circulation setting described above).


To place an advertisement on an external site, you can call a REST API which will out put the contents - the file is located at:
http://www.yoursite.com/interface/advertisements.php
You simply need to pass a single variable in the query string which is the same as the parse tag above (ID number or location key).

For example, you might use something like this to add your advertisement to a website outside of IP.Board:
<?php echo file_get_contents( "http://localhost/ipbdev/interface/advertisements.php?ad_code_global_header" );



Default Location Keys

  • Global Header: ad_code_global_header
  • Global Footer: ad_code_global_footer
  • Board Index: Header: ad_code_board_index_header
  • Board Index: Footer: ad_code_board_index_footer
  • Board Index: Sidebar: ad_code_board_sidebar
  • Forum View: Header: ad_code_forum_view_header
  • Forum View: Footer: ad_code_forum_view_footer
  • Forum View: After first topic: ad_code_forum_view_topic_code
  • Topic View: Header: ad_code_topic_view_header
  • Topic View: Footer: ad_code_topic_view_footer
  • Topic View: After first post: ad_code_topic_view_code
  • Grant B, Rhett, valendono and 1 other like this



8 Comments

What about in the side bar site wide, rather than just on board index? I assume you would add this in the global template, but where?

What about in the side bar site wide, rather than just on board index? I assume you would add this in the global template, but where?

There isn't a global sidebar. :)

Photo
CheersnGears
Feb 28 2013 01:21 PM

Needs to be a way to embed ad-code, easily, in articles or blog posts.

I've been using a Javascript to randomly rotate banner ads in my Global Header for several years but would like to bring that functionaility into Nexus.

 

The first post gives me a start, but my coding skills are minimal at best. Is there tutorial somewhere that would give more detail on setting up my random banners in Nexus.

 

For one thing, I am unclear where the banner ads should be stored for Nexus as well as in how to set-up the click-through destinations.

 

Alternatively, if there's someone who could help with this for a few bucks, please contact me at greg@slotblog.net.

This does work and I am able to see the code to display the header, but what is the proper why to help update its impressions?

Clearly I am doing some thing wrong. When place the ad it is displaying site wide.  I would like to place specific ads in specific locations.

 

Example: ad1) Category 1, Forum header

                ad2) Category 2 Forum header

                                Or

                ad3 Category 3 Topic header

                ad4 Category 1 Topic header

 

I am assuming this is what custom locations is for but I can not get it to work.

From the only post I can find discussing this:

 

"To place an advertisement in a template or IP.Content block, you can simply use the tag:

{parse advertisement="1"}

 

The tag can take either the ID number for the advertisement to display..."

 

Where is the "ID number" found and does the tag format use the curly brackets? I know where to put this tag, but can't get it to work, I assume due to a formatting issue.

 

Can anyone help here?

Photo
NewToAllThis
May 23 2014 11:06 AM

This would be incredibly valuable if it could be placed on the Board Index, but at the subforum level.  I provide certain sponsors with their own subforums and it would be invaluable if their banner could be viewed directly while someone is looking through the Board Index.

 

Does anyone how what code I would use for this "Custom Locations" within the ACP?


Developer Docs · Error Codes