Jump to content
bfarber

IP.Content 2.1 Dev Update: External Widgets

IP.Content is a powerful toolset that allows you to create dynamic pages and content on your site, utilizing all of the APIs IP.Board provides. Using these tools, you can create pages, templates and blocks that retrieve, transform, and output data in your IP.Board and addon application databases. IP.Content can even allow you to take blocks you have created and integrate them into any page in IP.Board itself, so you can create dynamic content-driven blocks on any page of your IP.Board installation with ease.

While the integration possibilities are quite robust within IP.Board, we wanted to take this a step further and allow you to implement blocks created in IP.Content anywhere! Imagine if you could create a feed of the latest topics on your forum, and integrate that into your Wordpress blog? Or imagine creating a feed of your latest Gallery images to show on your website homepage, simply by inserting a little tag into your homepage HTML file? With IP.Content 2.1, you will be able to do exactly that.


A new "external.php" file will be included in the Tools folder of your IP.Content download. You will first need to upload this to your IP.Board root directory.

Then, in the ACP Block Management page, you will see a new icon next to every IP.Content block.



When you click this icon, you will be presented with a small modal box that includes the exact HTML (a javascript tag) that you need to include where-ever you want the block to show up



You simply copy this javascript tag, and paste it into your page where-ever you would like for the block to show. It really is that simple! Additionally, while this is not the "preferred" method of integrating blocks into your IP.Content pages themselves, there is nothing stopping you from doing so if you find this method to be the easiest way to include your blocks in your pages.

I have created a short video to demonstrate how this works. Hopefully you will be able to see just how easy this new feature is to use in IP.Content through a short tutorial example.



As you can see, there is really nothing to it - you simply copy a tag into your HTML page and the block shows up. Additionally, because the block is loading off of your forum domain and utilizing the IP.Board framework, all member data is available to the block. You can create user profile blocks, for instance, and show them on your external site, providing an easy way to integrate "member" functionality into your site without having to create your own membership system, or tie your site into your IP.Board installation through backend PHP code.


Some Boring Techy Details, if you are interested

The block is implemented via a javascript tag, which then renders an iframe into the page. The iframe will size dynamically so that all of the block content is displayed, and scrollbars are not. You can override this on a per-block basis, simply by changing the URL in the script tag to include "&w=xx&h=xx" parameters (you can provide either parameter, or both parameters) if you wish to set a static width and/or height (if you do so, the iframe will automatically show scrollbars as one would expect).


We hope you like this new feature in IP.Content 2.1, and that it will help you expand your website in easy and fun ways. Let us know what you think in the comments!

×
×
  • Create New...