Installing Rebel Discovery In Any Custom CMS

To use the RebelMouse integration in any CMS, you can embed the following iframe code:

Parameters:

  • Domain*: the domain of your site.
  • URL*:  the permalink url after publish.
  • External_post_id*: a unique identification for your current post, usually the PostID or EntryID in most CMS systems
  • Referrer*: permalink of post
  • Type*: “iframe”
  • Status*: status accept two values “published” or “draft”. Where “draft” mean every state where the content is inaccessible from internet.
  • Tags: list comma separated of Discovery tags, that will be used as search team to find the right audience.
  • Image:  An image URL which should represent your content.

* Required


 

Source Code

<iframe id="rebelmouse-discovery-bookmarklet-iframe"
src="'//www.rebeldiscovery.com/core/discovery/true_bookmarklet_iframe?domain=$DOMAIN&url=$URL&external_post_id=$YOUR_POST_IDENTIFICATION&referrer=$REFERRER&type=$TYPE&status=$STATUS&tags=$TAGS&image=$IMAGE"
class="rebelmouse-discovery-bookmarklet-iframe" height="700px" width="100%" scrolling="no" allowtransparency="true" seamless="seamless" frameborder="0" style="position: static; height: 700px; width: 100%; -webkit-box-shadow: none; box-shadow: none; -webkit-transition: none; transition:none">
</iframe>

If the post is already accessible, our system will try to automatically source your post title, tags, and image to share and find the right audience for your content.
 


 

Communication between Rebel Discovery and your CMS:

For the communication your CMS should implement the following code, in the example we assume we have jQuery but is not required:

1) In your editor you need to include this javascript:

<script type='text/javascript' src=//static.rbl.ms/static/js/libs/iframe-api/iframe-api.js'></script>

 

2) Then in your custom javascript you can interact with the Rebel Discovery embed using these methods:


  2a) Talk from your CMS to Discovery:

  • discoveryApi.set_title( title ): allows you to update the title inside Rebel Discovery.
  • discoveryApi.set_tags( tags ): let you update the title inside Rebel Discovery.  The tags parameter, is a list of comma separated tags inside brackets.  i.e. [‘architecture’, ‘building’, ‘houses’]
  • discoveryApi.set_image( image_url ): let you update the image inside Rebel Discovery.

 
  2b) Listen to Rebel Discovery on your CMS:

  • add_parent_tag( discovery_tag ): Triggered inside Rebel Discovery, sending the new Discovery Tag added inside the embed.

Example:  

window.iFrameApiParent = true;


(function( $ ) {
    $(document).ready( function() {


var discoveryApi = null,
       // parentMethods are triggered from inside Rebel Discovery to communicate
      // with your cms
       parentMethods = {
        version: ‘0.1.0’,
             add_parent_tag: function ( discovery_tag ) {
        // this method is triggered when inside Discovery
        // is added one new discovery tag
        // if you want to add this tag to your own CMS
// here is where you can do it.
}
       };


    // Discovery Api initialization.
iframeApi(parentMethods).then( function (api) {discoveyApi = api;


    // your first communication with the server could happen here.
});


    // methods to send information to Rebel Discovery.

    $(‘.your_cms_title’).keyup( function ( e ) ) {
    // set_title, will let you update the title inside Rebel Discovery.
    // @param title, String, the title.
    discoveryApi && discoveryApi.set_title( e.target.value );
}


    // set_image, will let you update the image inside Rebel Discovery.
    // @param image_url: string, image URL.
    discoveryApi && discoveryApi.set_image( image_url )


    // set_tags, will let you update the title inside Rebel Discovery.


    // @param tags: Strings, ie: “[‘architecture news’, ‘building’, ‘houses’]”
    discoveryApi && discoveryApi.set_tags( tags );


     });
}( jQuery ));
Reply Oldest first
  • Oldest first
  • Newest first
  • Active threads
  • Popular
reply to topic
Like Follow
  • 1 yr agoLast active
  • 233Views
  • 1 Following