// $arg[0] = sanitize_Slug($arg[0]); // if ( empty($arg[0]) ) { // $mode = M_ERROR; // } //} $user = []; $meta = []; $config = []; $service = []; $back_url = ""; if ($mode > 0) { // User Mode // $user = node_GetUserBySlug($user_name); $mode = empty($user) ? M_NO_USER : M_USER; if ($mode === M_USER) { $meta = node_GetMetasById($user['id']); } } // If Jammer metadata is set, use it as our configuration // if (isset($meta['tv'])) { $config =& $meta['tv']; } // If services are set // if (isset($meta['twitch'])) { $service['twitch'] =& $meta['twitch']; // <script>document.domain="twitch.tv";</script> // $service['twitch']['embed'] = '<iframe id="tv-player" src="http://player.twitch.tv/?channel='.$service['twitch']['name'].'" frameborder="0" scrolling="no" allowfullscreen></iframe>'; $service['twitch']['embed'] = '<iframe id="tv-player" src="http://www.twitch.tv/' . $service['twitch']['name'] . '/embed" frameborder="0" scrolling="no" allowfullscreen></iframe>'; $service['twitch']['chat'] = '<iframe id="chat" src="http://www.twitch.tv/' . $service['twitch']['name'] . '/chat?popout=" frameborder="0" scrolling="no"></iframe>'; if (!isset($config['default'])) { $config['default'] = 'twitch';
</textarea> <div class="body"></div><?php } ?> <?php if ($this_node['type'] === 'user') { echo "<br />"; echo '<div id="games"><h3>Games:</h3>'; $games = node_GetNodesByAuthorIdAndType($this_node['id'], 'game'); foreach ($games as $game) { echo "<a href=\"/user/" . $this_node['slug'] . "/" . $game['slug'] . "\">" . $game['name'] . "</a><br/>"; } echo '</div>'; echo "<br />"; echo '<div id="metas"><h3>Metadata (' . $this_node['id'] . '):</h3>'; $metas = node_GetMetasById($this_node['id']); function process_meta($meta) { echo "<div class='node'>"; foreach ($meta as $key => $value) { if (is_array($value)) { if (is_string($key)) { $key = "\"" . $key . "\""; } echo "<div class='key'>" . $key . ":</div><br/>"; process_meta($value); } else { if (is_string($key)) { $key = "\"" . $key . "\""; } if (is_string($value)) {