Jump to content






Photo
* * * * * 3 votes

IP.Content 2.1 Dev Update: External Widgets

Posted by bfarber , in IP.Content 26 October 2010 · 6,206 views

developers IP.Content blocks 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.

Posted Image

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

Posted Image

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.

http://www.youtube.com/watch?v=rHhM0a5VPbI

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!

  • surferboy and Eudemon like this



it's crazy, it was THE news i really want to read since some weeks, thanks IPB
Hey, I had the first comment! Grrr!

Anyways, was gonna edit and mention that the idea is awesome. Sort of like an RSS feed but with some style to it. :)
If I understand correctly, I can create widget of new topics and when I paste that code to the some external page on other domain, those topics will be there generated? That's cool, I was looking for that very long time :)
Put simply: anything that can be made into an IP.Content Block can be served as an external widget and external widgets can be embedded in any web page anywhere that you can put in the JavaScript tag it generates :)

This is a big deal in that it allows your community content to "break out" of the box of our software and be syndicated/embedded anywhere you like.
    • Jimi Wikman, The Old Man, Ikadon and 1 other like this
Oh dear... This is GREAT!

In terms of security:
Is it possible to limit widgets per domain. As I wouldn't want all my blocks to be accessable externally via some URL manipulation or due to some leak.
    • Ikadon likes this
OMG THIS IS ALL SO AMAZING... IT'S LIKE CHRISTMAS TWO MONTHS EARLY...

And yes the CAPS were 100% needed.
    • Amged Osman likes this

Oh dear... This is GREAT!

In terms of security:
Is it possible to limit widgets per domain. As I wouldn't want all my blocks to be accessable externally via some URL manipulation or due to some leak.


We thought about this but could not yet come up with a 100% way to do this. We could add JavaScript to detect domain and report it but it would be trivial for someone to just put in extra JavaScript code to fake the domain-reporting. We are continuing to research methods to bind it to a domain and if we come up with a reliable way we will certainly update IP.Content with that feature.

Oh dear... This is GREAT!

In terms of security:
Is it possible to limit widgets per domain. As I wouldn't want all my blocks to be accessable externally via some URL manipulation or due to some leak.


We have thought about this a little, and put simply - it's not very easy to do. Once you put any code into an HTML page, a "hacker" need only copy that code and embed into his page. You can't easily verify the domain of the request in a reliable manner (you would have to use the "referrer" HTTP header, which users can disable and modify at will), and javascript implementations obviously can be tinkered with. We will evaluate the need and possibilities moving forward for securing blocks to only work on specified domains, but wanted to get the functionality out there for you to begin using now.

Put simply: anything that can be made into an IP.Content Block can be served as an external widget and external widgets can be embedded in any web page anywhere that you can put in the JavaScript tag it generates :)

So like adding a widget on a personalized Google page or in an instant messenger service, for instance?

So like adding a widget on a personalized Google page or in an instant messenger service, for instance?


If you can embed JavaScript then it should work yes.
Would this work on something like Facebook? i.e when you set up a page for your company etc in Facebook, could we have IP.Board boxes on that page?

Would this work on something like Facebook? i.e when you set up a page for your company etc in Facebook, could we have IP.Board boxes on that page?


Does Facebook allow for external JavaScript to be inserted? I kind of doubt it but I'm sure you could try it :)
This could actually be a big plus.

It would allow people to use IP.Content to create blocks, but nothing more. They could then use their Wordpress blogs 'integrated' with IPB.

If done right, would I be right in thinking that you could use a raw PHP block as this as well (including the external.php file rather than scripting it in), and then create a integration module between systems..... This could be interested.
Is there a way to create membership block that will allow members to connect using forum account?
I know there's IP.Converge but I'm looking for something more easy to connect with.
Something like Facebook Connect or Twitter oAuth.

Is it possible?
Whats differemce using this tool than parse module? :ninja:

Is there a way to create membership block that will allow members to connect using forum account?
I know there's IP.Converge but I'm looking for something more easy to connect with.
Something like Facebook Connect or Twitter oAuth.

Is it possible?


Yes and no. This integration is not going to suddenly provide you with a fully-featured membership system, however you can use the blocks to integrate member-specific data (such as a mini-profile block, or a "your watched topics" block, etc.) for users.

A membership system encompasses so much more than a few blocks on the page, however you can build something that will, on the surface, represent your member data external to your forums.

Whats differemce using this tool than parse module? :ninja:


If I make a .html page and add {parse module=''} to it, that won't do anything. You can only use parse tags within IPB. This new feature is meant to allow you to show blocks OUTSIDE IPB (as in, anywhere on the internet that you can insert a javascript tag to).
Thank you for this.

Excellent news :)
If i understand correctly,

I do not use IP.Content currently for pages. But if i wanted to add a "login" box to my joomla site, this would fit the bill? Without using IP.Content for anything else?
This is fantastic many thanks
could you make it smart enough auto add to clipboard? save a few extra steps :)

July 2014

S M T W T F S
  12345
6789101112
13141516171819
20212223242526
2728 29 3031  

Recent Entries

Latest Visitors

  • Photo
    Morpheus NS
    6 minutes ago
  • Photo
    Gauravk
    30 minutes ago
  • Photo
    4bdul
    35 minutes ago
  • Photo
    aculict
    55 minutes ago
  • Photo
    Hobbe
    Today, 04:23 AM
  • Photo
    Creaky
    Today, 04:20 AM
  • Photo
    GreenLinks
    Today, 04:02 AM
  • Photo
    Stex299
    Today, 03:55 AM
  • Photo
    ASTRAPI
    Today, 03:44 AM
  • Photo
    Yaffa Sassoon_77484
    Today, 03:37 AM

Recent Comments

Search My Blog