Jump to content

Recommended Posts

Posted

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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...