Introduction
Cooma is a social trading platform connected to brokers worldwide, who offer trading in the financial markets.
Plug-in Installation
The Panda Forex plugin should be installed to implement the Social plug-in. Your delivery manager will provide the archive with the plugin.
Plugin name: Panda Forex
Plugin directory: panda-forex
Dom Integration
To integrate the Social plug-in, add the following HTML tags to your page
Social switch tag
This switch button will toggle the Trade-room/Social platform
<?php echo do_shortcode('[forex-social-switch]'); ?>Social platform tag
In this example, we split the trading platform and the social into two divs to show/hide each of them
<div id="tradingPlatform">
<!-- trading platform -->
<?php echo do_shortcode('[forex-trading-platform]'); ?>
</div>
<div id="socialPlatform">
<!-- social platform -->
<?php echo do_shortcode('[social-platform]'); ?>
</div>Callbacks
Add the following functions to your scripts
function platformHide() {
console.log('Trading platform is hidden');
$('#tradingPlatform').fadeOut(250);
}
function platformShow() {
console.log('Trading platform is shown');
$('#socialPlatform').fadeIn(500);
}Find the forexEvents object in your script files, and add the following properties:
platformHide: platformHide,
platformShow: platformShow