Changeset 1079176
- Timestamp:
- 01/30/2015 07:20:57 PM (11 years ago)
- Location:
- hangouts-cosmoquest/trunk
- Files:
-
- 2 edited
-
readme.txt (modified) (3 diffs)
-
wp_hangouts.php (modified) (8 diffs)
Legend:
- Unmodified
- Added
- Removed
-
hangouts-cosmoquest/trunk/readme.txt
r904882 r1079176 3 3 Donate link: http://cosmoquest.org/x/donate/ 4 4 Tags: hangout, hangouts, cosmoquest, ansr, live 5 Requires at least: 3.96 Tested up to: 3.95 Requires at least: 4.1 6 Tested up to: 4.1 7 7 Stable tag: trunk 8 8 License: GPLv2 … … 22 22 can set your channel Settings, Add/Edit recurring show descriptions, and add an upcoming 23 23 show description or embed code for a live event. Embed the plugin output on a post or page 24 with the code [hangout s] and use the Widget options in your Appearance menu to add to your sidebar.24 with the code [hangout] and use the Widget options in your Appearance menu to add to your sidebar. 25 25 26 26 … … 37 37 38 38 == Changelog == 39 39 = 1.1 = 40 *updated the code to work with most recent versions of wordpress 40 41 = 1.0 = 41 42 *first version 42 43 == Upgrade Notice == 43 44 = 1.1 = 45 upgrade if using 4.0 or higher certain database calls this plugin made stopped working after 3.9 44 46 = 1.0 = 45 47 not an upgrade -
hangouts-cosmoquest/trunk/wp_hangouts.php
r904882 r1079176 155 155 array('%d') 156 156 ); 157 $show_id = mysql_real_escape_string($_POST['show']); 158 $show_description = mysql_real_escape_string($_POST['show_description']); 159 $get_show = $wpdb->get_results("SELECT * FROM $hangout_shows WHERE id = $show_id",ARRAY_A); 157 $show_id = $_POST['show']; 158 $show_description = $_POST['show_description']; 159 $query = $wpdb->prepare("SELECT * FROM $hangout_shows WHERE id = %s",$show_id); 160 $get_show = $wpdb->get_results($query,ARRAY_A); 160 161 if (count($get_show) == 0){ 161 162 echo "Invalid show number"; die(); … … 184 185 }//starting the hangout 185 186 else if ($_POST['task'] == "start") { 186 $orig = $_POST['embed']; 187 $embed = mysql_real_escape_string($orig); 187 $embed = $_POST['embed']; 188 188 // Get the hashtag for twitter 189 $hashtag = mysql_real_escape_string($_POST['tag']);189 $hashtag = $_POST['tag']; 190 190 $results = $wpdb->get_results("SELECT id FROM $hangouts order by id desc limit 1",ARRAY_A); 191 $show_id = mysql_real_escape_string($_POST['show']);191 $show_id = $_POST['show']; 192 192 $wpdb->update( 193 193 $hangouts, … … 321 321 if(isset($_POST['hangout_action'])){ 322 322 if($_POST['hangout_action'] =='add_show'){ 323 $name = mysql_real_escape_string($_POST['show_name']);324 $url = mysql_real_escape_string($_POST['show_url']);325 $description = mysql_real_escape_string($_POST['description']);323 $name = $_POST['show_name']; 324 $url = $_POST['show_url']; 325 $description = $_POST['description']; 326 326 $wpdb->insert( $table_name, 327 327 array( 'name' => $name,'url' => $url,'description' => $description), … … 332 332 } 333 333 else if ($_POST['hangout_action'] =='update_show'){ 334 $description = mysql_real_escape_string($_POST['description']);335 $delete = mysql_real_escape_string($_POST['delete']);336 $name = mysql_real_escape_string($_POST['show_name']);337 $url = mysql_real_escape_string($_POST['show_url']);338 $id = mysql_real_escape_string($_POST['show_id']);334 $description = $_POST['description']; 335 $delete = $_POST['delete']; 336 $name = $_POST['show_name']; 337 $url = $_POST['show_url']; 338 $id = $_POST['show_id']; 339 339 if($delete =="delete"){ 340 340 $wpdb->delete( $table_name, array('id'=>$id), array( '%d' ) ); … … 391 391 if($_POST['hangout_action'] =='link_channel'){ 392 392 $table_name = $wpdb->prefix . "hangout_data"; 393 $youtube_channel_name = mysql_real_escape_string($_POST['youtube_channel_name']);394 $youtube_channel_url = mysql_real_escape_string($_POST['youtube_channel_url']);395 $youtube_channel = mysql_real_escape_string($_POST['youtube_embed']);396 $link_channel = mysql_real_escape_string($_POST['link_channel']);397 $link_text = mysql_real_escape_string($_POST['link_text']);398 $width = mysql_real_escape_string($_POST['width']);393 $youtube_channel_name = $_POST['youtube_channel_name']; 394 $youtube_channel_url = $_POST['youtube_channel_url']; 395 $youtube_channel = $_POST['youtube_embed']; 396 $link_channel = $_POST['link_channel']; 397 $link_text = $_POST['link_text']; 398 $width = $_POST['width']; 399 399 if(is_numeric($width)){ 400 400 if($width < 1 || $width > 5000) … … 402 402 } 403 403 else 404 die("WIDTH IS NOT A NUMBER"); 405 $delete = $wpdb->query("TRUNCATE TABLE '$table_name'"); 406 $wpdb->insert($table_name, 404 die("WIDTH IS NOT A NUMBER"); 405 $wpdb->replace($table_name, 407 406 array( 407 'id' => 1, 408 408 'youtube_channel_name' => $youtube_channel_name, 409 409 'youtube_channel_url' => $youtube_channel_url, … … 413 413 'width' => $width 414 414 ), 415 array('% s','%s','%s','%s','%d','%d')415 array('%d','%s','%s','%s','%s','%d','%d') 416 416 ); 417 417 echo"<script>alert('Information Updated')</script>"; … … 444 444 } 445 445 else{ 446 embed.value = temp.src; 446 embed.value = temp.src; 447 447 document.getElementById("update_settings").submit(); 448 448 }
Note: See TracChangeset
for help on using the changeset viewer.