Plugin Directory

Changeset 1559112


Ignore:
Timestamp:
12/21/2016 04:03:45 PM (9 years ago)
Author:
tradepips
Message:

Version 1.3 with updates to widget classes, detailed in the changelog

Location:
wp-tradingview/tags/1.3
Files:
7 edited
2 copied

Legend:

Unmodified
Added
Removed
  • wp-tradingview/tags/1.3/inc/admin_page.php

    r1557281 r1559112  
    695695
    696696    add_settings_field(
     697      'tv_chat_op_5',
     698      __('Autosize - Stretch 100% width and height of containing element.
     699      (overrides width/height values below)', 'tv'),
     700      'tv_op_checkbox_cb',
     701      'tv_chat',
     702      'tv-chat',
     703      [ 'label_for' => 'tv_chat_op_5',
     704        'class'     => 'checkbox',
     705        'name'        => 'autosize',
     706        'value'       => esc_attr($chat_data['autosize']),
     707        'option_name' => $chat_option_name
     708      ]
     709    );
     710
     711    add_settings_field(
    697712      'tv_chat_op_2',
    698713      __('Width', 'tv'),
     
    701716      'tv-chat',
    702717      [ 'label_for' => 'tv_chat_op_2',
    703         'class'     => 'prepop',
     718        //'class'     => 'prepop',
    704719        'name'        => 'width',
    705720        'value'       => esc_attr( $chat_data['width'] ),
     
    708723      ]
    709724    );
    710     add_settings_field(
     725    /**add_settings_field(
    711726      'tv_chat_op_2_1',
    712727      __('', 'tv'),
     
    720735        'option_name' => $chat_option_name
    721736      ]
    722     );
     737    );**/
    723738
    724739    add_settings_field(
     
    729744      'tv-chat',
    730745      [ 'label_for' => 'tv_chat_op_3',
    731         'class'     => 'prepop',
     746        //'class'     => 'prepop',
    732747        'name'        => 'height',
    733748        'value'       => esc_attr( $chat_data['height'] ),
     
    735750      ]
    736751    );
    737     add_settings_field(
     752    /**add_settings_field(
    738753      'tv_chat_op_3_1',
    739754      __('', 'tv'),
     
    747762        'option_name' => $chat_option_name
    748763      ]
    749     );
    750 
    751 
    752 
    753 
     764    );**/
    754765
    755766    add_settings_field(
     
    14411452
    14421453            if($username != ''):
    1443               if($widthpop==2) $width = $width.'%';
    1444               if($heightpop==2) $height = $height.'%';
    1445 
     1454              if($widthpop==2) $width = "'".$width."%'";
     1455              if($heightpop==2) $height = "'".$height."%'";
    14461456              ?>
    1447             <p><strong>Shortcode:</strong><br/>
     1457            <p style="width:70%;"><strong>Shortcode:</strong><br/>
    14481458                <code>
    14491459                    <?php
     
    14831493
    14841494
    1485             if($username != '' || $symbol != ''):
     1495            //if($username != '' || $symbol != ''):
    14861496              if($widthpop==2) $width = $width.'%';
    14871497              if($heightpop==2) $height = $height.'%';
    14881498
    14891499              ?>
    1490             <p><strong>Shortcode:</strong><br/>
     1500            <p style="width:70%;"><strong>Shortcode:</strong><br/>
    14911501                <code>
    14921502                  <?php
     
    14961506                </code>
    14971507            </p>
    1498             <?php endif;
     1508            <?php
     1509          //endif;
    14991510            settings_fields('tv_ideastream_op_group');
    15001511            do_settings_sections('tv_ideastream');
     
    15111522            $locale = $ideaview_data['locale'];
    15121523
    1513             if($idea != ''):
    1514               if($widthpop==2) $width = $width.'%';
    1515               if($heightpop==2) $height = $height.'%';
     1524            //if($idea != ''):
     1525            if($widthpop==2) $width = "\'".$width."%\'";
     1526            if($heightpop==2) $height = "\'".$height."%\'";
    15161527
    15171528              ?>
    1518             <p><strong>Shortcode:</strong><br/>
     1529            <p style="width:70%;"><strong>Shortcode:</strong><br/>
    15191530                <code>
    15201531                    <?php
     
    15251536                </code>
    15261537            </p>
    1527             <?php endif;
     1538            <?php
     1539          //endif;
    15281540
    15291541            settings_fields('tv_ideaview_op_group');
     
    15351547
    15361548            $room = $chat_data['room'];
     1549            $autosize = $chat_data['autosize'];
    15371550            $width = $chat_data['width'];
    15381551            $widthpop = $chat_data['widthpop'];
     
    15411554            $locale = $chat_data['locale'];
    15421555
    1543             if($room != ''):
     1556            //if($room != ''):
    15441557              if($widthpop==2) $width = $width.'%';
    15451558              if($heightpop==2) $height = $height.'%';
    15461559
    15471560              ?>
    1548             <p><strong>Shortcode:</strong><br/>
     1561            <p style="width:70%;"><strong>Shortcode:</strong><br/>
    15491562
    15501563                <code>
    15511564                    <?php
    1552                     printf('[tv-chat room="%1$s" width="%2$s" height="%3$s" language="%4$s"]',
    1553                     $room, $width, $height, $locale);
     1565                    $widthstr = 'width="'.$width.'" height="'.$height.'"';
     1566                    if($autosize=='1') $widthstr = 'autosize="1"';
     1567                    printf('[tv-chat room="%1$s" %2$s language="%3$s"]',
     1568                    $room, $widthstr, $locale);
    15541569                    ?>
    15551570
     
    15571572            </p>
    15581573            <?php
    1559            endif;
     1574           //endif;
    15601575
    15611576            settings_fields('tv_chat_op_group');
  • wp-tradingview/tags/1.3/inc/class_chart.php

    r1557952 r1559112  
    367367    public static function display_TradingView($symbol,$interval,$timezone,$autosize,$width,$height,$theme,$style,$locale,$toolbar_bg,$enable_publishing,$allow_symbol_change,$hide_top_toolbar,$withdateranges,$hide_side_toolbar,$save_image,$details,$stocktwits,$headlines,$hotlist,$calendar,$hideideas,$hideideasbutton,$referral_id){
    368368        $data = "";
    369        
     369
    370370    $data .= "<script type='text/javascript'>
    371371    new TradingView.widget({";
  • wp-tradingview/tags/1.3/inc/class_chat.php

    r1555578 r1559112  
    9999
    100100<p>
     101<input type="checkbox" class="checkbox"
     102  id="<?php echo $this->get_field_id('autosize');?>"
     103  name="<?php echo $this->get_field_name('autosize');?>"
     104  value="1" <?php echo ($autosize != '') ? checked (true,$autosize,false): checked (true,$chart_data['autosize'],false); ?>/>
     105  <label for="<?php echo $this->get_field_id('autosize');?>">Autosize</label>
     106</p>
     107
     108<p>
    101109    <label for="<?php echo $this->get_field_id('width');?>">Width: </label>
    102110    <input
     
    104112    id="<?php echo $this->get_field_id('width');?>"
    105113      name="<?php echo $this->get_field_name('width');?>"
    106         value="<?php echo !empty($width) ? $width : $chat_data['width']; ?>" /><input
    107     type="radio"
    108     class="widefat"
    109     name="<?php echo $this->get_field_name('widthpop');?>"
    110         value="1" <?php echo ($widthpop != 0) ? checked (1,$widthpop,false): checked (1,$chat_data['widthpop'],false); ?>/>px &nbsp;&nbsp;<input
    111     type="radio"
    112     class="widefat"
    113     name="<?php echo $this->get_field_name('widthpop');?>"
    114         value="2" <?php echo ($widthpop != 0) ? checked (2,$widthpop,false): checked (2,$chat_data['widthpop'],false); ?>/>%
     114        value="<?php echo !empty($width) ? $width : $chat_data['width']; ?>" />
    115115
    116116</p>
     
    121121    id="<?php echo $this->get_field_id('height');?>"
    122122      name="<?php echo $this->get_field_name('height');?>"
    123         value="<?php echo !empty($height) ? $height : $chat_data['height']; ?>" /><input
    124     type="radio"
    125     class="widefat"
    126     name="<?php echo $this->get_field_name('heightpop');?>"
    127         value="1" <?php echo ($heightpop != 0) ? checked (1,$heightpop,false): checked (1,$chat_data['heightpop'],false); ?>/>px &nbsp;&nbsp;<input
    128     type="radio"
    129     class="widefat"
    130     name="<?php echo $this->get_field_name('heightpop');?>"
    131         value="2" <?php echo ($heightpop != 0) ? checked (2,$heightpop,false): checked (2,$chat_data['heightpop'],false); ?>/>%
     123        value="<?php echo !empty($height) ? $height : $chat_data['height']; ?>" />
    132124
    133125</p>
     
    159151<?php
    160152//if($room != ''):
    161   if($widthpop==2) $width = $width.'%';
    162   if($heightpop==2) $height = $height.'%';
     153  //if($widthpop==2) $width = $width.'%';
     154  //if($heightpop==2) $height = $height.'%';
    163155
    164156  ?>
    165157<p><strong>Shortcode:</strong><br/>
    166158    <code>
    167         [tv-chat chatroom="<?php echo $room; ?>" width="<?php echo $width; ?>" height="<?php echo $height; ?>" language="<?php echo $locale; ?>"]
     159      <?php
     160      $widthstr = 'width="'.$width.'" height="'.$height.'"';
     161      if($autosize=='1') $widthstr = 'autosize="1"';
     162      printf('[tv-chat room="%1$s" %2$s language="%3$s"]',
     163      $room, $widthstr, $locale);
     164      ?>
     165
    168166    </code>
    169167</p>
     
    179177        if(empty($title)) $title = "TradingView member Profile";
    180178        if(empty($room )) $room  = $chat_data['room'];
     179        if(empty($autosize )) $autosize  = $chat_data['autosize'];
    181180        if(empty($width )) $width  = $chat_data['width'];
    182         if(empty($widthpop)) $widthpop = $chat_data['widthpop'];
     181        //if(empty($widthpop)) $widthpop = $chat_data['widthpop'];
    183182        if(empty($height )) $height  = $chat_data['height'];
    184         if(empty($heightpop)) $heightpop = $chat_data['heightpop'];
     183        //if(empty($heightpop)) $heightpop = $chat_data['heightpop'];
    185184        if(empty($locale)) $locale = $chat_data['locale'];
    186         $data = $this->display_TradingView($room,$width,$widthpop,$height,$heightpop,$locale);
     185        $data = $this->display_TradingView($room,$autosize,$width,$height,$locale);
    187186        echo $before_widget;
    188187        echo $before_title . $title . $after_title;
     
    190189        echo $after_widget;
    191190    }
    192     public static function display_TradingView($room,$width,$widthpop,$height,$heightpop,$locale){
     191    public static function display_TradingView($room,$autosize,$width,$height,$locale){
    193192        $data = "";
    194193        $x='0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';
    195194        //$rand = 'id="tv-ideas-stream-'.substr(str_shuffle(str_repeat($x, ceil(5/strlen($x)) )),1,5).'"';
    196195        $rand = 'tv-chat-widget-'.substr(str_shuffle(str_repeat($x, ceil(5/strlen($x)) )),1,5);
    197     if($widthpop==2) $width = "'".$width."%'";
    198     if($heightpop==2) $height = "'".$height."%'";
     196    //if($widthpop==2) $width = "'".$width."%'";
     197    //if($heightpop==2) $height = "'".$height."%'";
     198    if(empty($room)) $room = 'general';
    199199        $data .= "<div id=".$rand."></div>
    200     <script type='text/javascript' src='https://d33t3vvu2t2yu5.cloudfront.net/tv.js'></script>
    201200    <script type='text/javascript'>
    202201    new TradingView.ChatWidgetEmbed({
    203202      'container_id': '".$rand."',
    204       'username': '".$username."',
    205       'width': ".$width.",
    206       'height': ".$height.",
     203      'room': '".$room."',";
     204      if($autosize=='1') $data .= "
     205      'autosize': 'true'";
     206      else $data .= "
     207      'width': '".$width."',
     208      'height': '".$height."',";
     209      $data .= "
    207210      'locale': '".$locale."'
    208211    });
    209     </script>
    210 
    211     <div id='support_author' style='font-size: 8px; font-weight: normal;><a href='http://tradepips.com/' title='Visit the website' target='_blank'>Weekly forecasts</a></div>";
     212    </script>";
    212213        return $data;
    213214    }
  • wp-tradingview/tags/1.3/inc/class_ideastream.php

    r1555578 r1559112  
    211211
    212212<?php if($username != ''):
    213   if($widthpop==2) $width = $width.'%';
    214   if($heightpop==2) $height = $height.'%';
     213  if($widthpop==2) $width = "'".$width."%'";
     214  if($heightpop==2) $height = "'".$height."%'";
    215215
    216216  ?>
     
    247247        if(empty($symbol)) $symbol = $ideastream_data['symbol'];
    248248
    249 
    250 
    251         $data = $this->display_TradingView($startingCount,$width,$widthpop,$height,$heightpop,$bgColor,$headerColor,$borderColor,$locale,$sort,$time,$interval,$stream,$symbol,$username);
     249        if($widthpop==2) $width = "'".$width."%'";
     250        if($heightpop==2) $height = "'".$height."%'";
     251
     252        $data = $this->display_TradingView($startingCount,$width,$height,$bgColor,$headerColor,$borderColor,$locale,$sort,$time,$interval,$stream,$symbol,$username);
    252253        echo $before_widget;
    253254        echo $before_title . $title . $after_title;
     
    255256        echo $after_widget;
    256257    }
    257     public static function display_TradingView($startingCount,$width,$widthpop,$height,$heightpop,$bgColor,$headerColor,$borderColor,$locale,$sort,$time,$interval,$stream,$symbol,$username){
     258    public static function display_TradingView($startingCount,$width,$height,$bgColor,$headerColor,$borderColor,$locale,$sort,$time,$interval,$stream,$symbol,$username){
    258259        $data = "";
    259260        $x='0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';
    260261        //$rand = 'id="tv-ideas-stream-'.substr(str_shuffle(str_repeat($x, ceil(5/strlen($x)) )),1,5).'"';
    261262        $rand = 'tv-ideastream-'.substr(str_shuffle(str_repeat($x, ceil(5/strlen($x)) )),1,5);
    262     if($widthpop==2) $width = "'".$width."%'";
    263     if($heightpop==2) $height = "'".$height."%'";
     263
    264264        $data .= "<div id=".$rand."></div>
    265     <script type='text/javascript' src='https://d33t3vvu2t2yu5.cloudfront.net/tv.js'></script>
    266265    <script type='text/javascript'>
    267266    new TradingView.IdeasStreamWidget({
    268267      'container_id': '".$rand."',
    269268      'startingCount': '".$startingCount."',
    270       'width': ".$width.",
    271       'height': ".$height.",
     269      'width': '".$width."',
     270      'height': '".$height."',
    272271      'mode': 'integrate',
    273272      'bgColor': '".$bgColor."',
     
    280279      'stream': '".$stream."',
    281280      'symbol': '".$symbol."',
    282       'username': '".$username."',
     281      'username': '".$username."'
    283282    });
    284     </script>
    285 
    286     <div id='support_author' style='font-size: 8px; font-weight: normal;><a href='http://tradepips.com/' title='Visit the website' target='_blank'>Weekly forecasts</a></div>";
    287        
     283    </script>";
     284
    288285        return $data;
    289286    }
  • wp-tradingview/tags/1.3/inc/class_ideaview.php

    r1555578 r1559112  
    103103</p>
    104104<?php if($idea != ''):
    105   if($widthpop==2) $width = $width.'%';
    106   if($heightpop==2) $height = $height.'%';
     105  if($widthpop==2) $width = "'".$width."%'";
     106  if($heightpop==2) $height = "'".$height."%'";
    107107
    108108  ?>
     
    127127        if(empty($heightpop)) $heightpop = $ideaview_data['heightpop'];
    128128        if(empty($locale)) $locale = $ideaview_data['locale'];
    129         $data = $this->display_TradingView($idea,$width,$widthpop,$height,$heightpop,$locale);
     129        if($widthpop==2) $width = "'".$width."%'";
     130        if($heightpop==2) $height = "'".$height."%'";
     131        $data = $this->display_TradingView($idea,$width,$height,$locale);
    130132        echo $before_widget;
    131133        echo $before_title . $title . $after_title;
     
    133135        echo $after_widget;
    134136    }
    135     public static function display_TradingView($username,$width,$widthpop,$height,$heightpop,$locale){
     137    public static function display_TradingView($idea,$width,$height,$locale){
    136138        $data = "";
    137139        $x='0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';
    138140        //$rand = 'id="tv-ideas-stream-'.substr(str_shuffle(str_repeat($x, ceil(5/strlen($x)) )),1,5).'"';
    139141        $rand = 'tv-ideas-preview-'.substr(str_shuffle(str_repeat($x, ceil(5/strlen($x)) )),1,5);
    140     if($widthpop==2) $width = "'".$width."%'";
    141     if($heightpop==2) $height = "'".$height."%'";
    142         $data .= "<div id=".$rand."></div>
    143     <script type='text/javascript' src='https://d33t3vvu2t2yu5.cloudfront.net/tv.js'></script>
     142    $data .= "<div id=".$rand."></div>
    144143    <script type='text/javascript'>
    145     new TradingView..IdeaWidget({
     144    new TradingView.IdeaWidget({
    146145      'container_id': '".$rand."',
    147       'width': ".$width.",
    148       'height': ".$height.",
     146      'width': '".$width."',
     147      'height': '".$height."',
    149148      'idea': '".$idea."',
    150149      'locale': '".$locale."'
    151150    });
    152     </script>
    153 
    154     <div id='support_author' style='font-size: 8px; font-weight: normal;><a href='http://tradepips.com/' title='Visit the website' target='_blank'>Weekly forecasts</a></div>";
     151    </script>";
    155152        return $data;
    156153    }
  • wp-tradingview/tags/1.3/inc/class_profile.php

    r1555578 r1559112  
    112112</p>
    113113<?php if($username != ''):
    114   if($widthpop==2) $width = $width.'%';
    115   if($heightpop==2) $height = $height.'%';
     114  if($widthpop==2) $width = "'".$width."%'";
     115  if($heightpop==2) $height = "'".$height."%'";
    116116
    117117  ?>
     
    145145        if(empty($locale)) $locale = $profile_data['locale'];
    146146
    147         $data = $this->display_TradingView($username,$width,$widthpop,$height,$heightpop,$locale);
     147        if($widthpop==2) $width = "'".$width."%'";
     148        if($heightpop==2) $height = "'".$height."%'";
     149
     150        $data = $this->display_TradingView($username,$width,$height,$locale);
    148151        echo $before_widget;
    149152        echo $before_title . $title . $after_title;
     
    151154        echo $after_widget;
    152155    }
    153     public static function display_TradingView($username,$width,$widthpop,$height,$heightpop,$locale){
     156    public static function display_TradingView($username,$width,$height,$locale){
    154157
    155158        $data = "";
     
    157160        //$rand = 'id="tv-ideas-stream-'.substr(str_shuffle(str_repeat($x, ceil(5/strlen($x)) )),1,5).'"';
    158161        $rand = 'tv-user-info-'.substr(str_shuffle(str_repeat($x, ceil(5/strlen($x)) )),1,5);
    159     if($widthpop==2) $width = "'".$width."%'";
    160     if($heightpop==2) $height = "'".$height."%'";
     162
    161163        $data .= "<div id=".$rand."></div>
    162164    <script type='text/javascript'>
     
    164166      'container_id': '".$rand."',
    165167      'username': '".$username."',
    166       'width': ".$width.",
    167       'height': ".$height.",
     168      'width': '".$width."',
     169      'height': '".$height."',
    168170      'locale': '".$locale."'
    169171    });
    170172    </script>";
    171        
     173
    172174        return $data;
    173175    }
  • wp-tradingview/tags/1.3/readme.txt

    r1557953 r1559112  
    55Requires at least: 3.5
    66Tested up to: 4.7
    7 Stable tag: 1.2
     7Stable tag: 1.3
    88License: GPLv3 or later
    99License URI: http://www.gnu.org/licenses/gpl-3.0.html
     
    4949== Changelog ==
    5050
     51= 1.3 =
     52* Bug fixes:
     53* Profile widget embed code width/height value errors fixed
     54* Width/height type (px or %) selection bypassed from the display function
     55* Removed an erroneous links from embed commodities
     56* Updated the tv.js url to the s3.tradingview.com/tv.js
     57
    5158= 1.2 =
    5259* Wrong value retrieved for height parameter bug fixed.
  • wp-tradingview/tags/1.3/tradingview.php

    r1557952 r1559112  
    44Plugin URI: http://tradepips.com
    55Description: WP Trading View - Display TradingView Profile, TradingView ideas, chat widget or forex / stock charts.
    6 Version: 1.2
     6Version: 1.3
    77Author: Trade Pips
    88Author URI: http://tradepips.com
     
    1212
    1313function tv_scripts() {
    14     wp_register_script('tv-common-js', 'https://d33t3vvu2t2yu5.cloudfront.net/tv.js','','',false);
     14    wp_register_script('tv-common-js', 'https://s3.tradingview.com/tv.js','','',false);
    1515    wp_enqueue_script('tv-common-js');
    1616}
     
    3434    $atts = shortcode_atts(array(
    3535                    'username' => 'fxmillions',
    36                 'width' => '300',
     36                'width' => '100',
    3737                'widthpop' => '',
    3838                'height' => '400',
    3939                'heightpop' => '',
    40                 'language' => 'en'
     40                'locale' => 'en'
    4141    ), $atts);
    4242    extract($atts);
    43         if(!empty($username)){
    44             $data = widget_TradingView_profile::display_TradingView($username,$width,$widthpop,$height,$heightpop,$locale);
    45         } else{
    46             $data = "Tradingview username is required to display the profile shortcode";
    47         }
     43        if(empty($username)) $username = 'fxmillions';
     44        if($widthpop==2) $width = "'".$width."%'";
     45        if($heightpop==2) $height = "'".$height."%'";
     46            $data = widget_TradingView_profile::display_TradingView($username,$width,$height,$locale);
     47        //} else{
     48          //  $data = "Tradingview username is required to display the profile shortcode";
     49        //}
    4850        return $data;
    4951 }
     
    7173    ), $atts);
    7274    extract($atts);
    73          if(!empty($symbol)){
    74              $data = widget_TradingView_ideastream::display_TradingView($startingCount,$width,$widthpop,$height,$heightpop,$bgColor,$headerColor,$borderColor,$locale,$sort,$time,$interval,$stream,$symbol,$username);
    75          } else{
    76              $data = "A symbol is required to display an idea stream";
    77          }
    78          return $data;
     75    if($widthpop==2) $width = "'".$width."%'";
     76    if($heightpop==2) $height = "'".$height."%'";
     77        $data = widget_TradingView_ideastream::display_TradingView($startingCount,$width,$height,$bgColor,$headerColor,$borderColor,$locale,$sort,$time,$interval,$stream,$symbol,$username);
     78
     79        return $data;
    7980  }
    8081
     
    8485      'idea' => 'WDO3BAZT',
    8586      'width'  => '100',
    86       'widthpop' => 1,
     87      'widthpop' => '',
    8788      'height'   => '410',
    88       'heightpop'=> 1,
     89      'heightpop'=> '',
    8990      'locale'   => 'en'
    9091    ), $atts);
    9192    extract($atts);
     93    if($widthpop==2) $width = "'".$width."%'";
     94    if($heightpop==2) $height = "'".$height."%'";
    9295          if(!empty($idea)){
    93               $data = widget_TradingView_ideaview::display_TradingView($idea,$width,$widthpop,$height,$heightpop,$locale);
     96              $data = widget_TradingView_ideaview::display_TradingView($idea,$width,$height,$locale);
    9497          } else{
    9598              $data = "Unique ID is required to display the idea preview";
     
    102105        $atts = shortcode_atts(array(
    103106        'room' => 'general',
     107        'autosize' => '',
    104108        'width'  => '100',
    105         'widthpop' => 2,
     109        //'widthpop' => 2,
    106110        'height'   => '410',
    107         'heightpop'=> 1,
     111        //'heightpop'=> 1,
    108112        'locale'   => 'en'
    109113        ), $atts);
    110114        extract($atts);
    111            if(!empty($room)){
    112                $data = widget_TradingView_chat::display_TradingView($room,$width,$widthpop,$height,$heightpop,$locale);
    113            } else{
    114                $data = "Specify a chat room to display the chat widget";
    115            }
     115           if(empty($room)) $room = 'general';
     116               $data = widget_TradingView_chat::display_TradingView($room,$autosize,$width,$height,$locale);
     117           //} else{
     118            //   $data = "Specify a chat room to display the chat widget";
     119           //}
    116120           return $data;
    117121    }
     
    152156                $data = widget_TradingView_chart::display_TradingView($symbol,$interval,$timezone,$autosize,$width,$height,$theme,$style,$locale,$toolbar_bg,$enable_publishing,$allow_symbol_change,$hide_top_toolbar,$withdateranges,$hide_side_toolbar,$save_image,$details,$stocktwits,$headlines,$hotlist,$calendar,$hideideas,$hideideasbutton,$referral_id);
    153157            } else{
    154                 $data = "Specify a chart";
     158                $data = "Please specify a symbol";
    155159            }
    156160            return $data;
Note: See TracChangeset for help on using the changeset viewer.