public function reply_box($level = 0, $message_from = array()) { if ($this->twitter_account && $this->social_twitter_message_id && (int) $this->get('social_twitter_id') > 0 && $this->get('social_twitter_id') == $this->twitter_account->get('social_twitter_id')) { // who are we replying to? $account_data = @json_decode($this->twitter_account->get('twitter_data'), true); ?> <div class="twitter_comment twitter_comment_reply_box twitter_comment_reply_box_level<?php echo $level; ?> "> <div class="twitter_comment_picture"> <?php if ($account_data && isset($account_data['id_str'])) { $pic = array('screen_name' => isset($account_data['screen_name']) ? $account_data['screen_name'] : '', 'image' => isset($account_data['profile_image_url_https']) ? $account_data['profile_image_url_https'] : ''); } else { $pic = false; } if ($pic) { ?> <img src="<?php echo $pic['image']; ?> "> <?php } ?> </div> <div class="twitter_comment_header"> <?php echo ucm_twitter::format_person($account_data); ?> </div> <div class="twitter_comment_reply"> <textarea placeholder="Write a reply..." class="twitter_compose_message"><?php if ($message_from && isset($message_from['screen_name']) && $this->get('type') != _TWITTER_MESSAGE_TYPE_DIRECT) { echo '@' . htmlspecialchars($message_from['screen_name']) . ' '; } ?> </textarea> <button data-id="<?php echo (int) $this->social_twitter_message_id; ?> " data-account-id="<?php echo (int) $this->get('social_twitter_id'); ?> "><?php _e('Send'); ?> </button> <div style="clear:both;"> <span class="twitter_characters_remain"><span>140</span> characters remaining.</span> <br/> (debug) <input type="checkbox" name="debug" class="reply-debug" value="1"> </div> </div> <div class="twitter_comment_actions"></div> </div> <?php } else { ?> <div class="twitter_comment twitter_comment_reply_box"> (incorrect settings, please report this bug) </div> <?php } }