Changeset 3096505
- Timestamp:
- 06/03/2024 04:39:12 AM (6 weeks ago)
- Location:
- social-bot
- Files:
-
- 22 edited
- 1 copied
Legend:
- Unmodified
- Added
- Removed
-
social-bot/tags/1.8.1/include/bot-class.php
r2921300 r3096505 181 181 182 182 public function getResponseString() { 183 return json_encode($this->getResponse());183 return json_encode($this->getResponse()); 184 184 } 185 185 186 186 public function getResponseForceString($user, $message) { 187 187 $this->sender = $user; 188 return json_encode($this->getResponse($message));188 return json_encode($this->getResponse($message)); 189 189 } 190 190 -
social-bot/tags/1.8.1/include/messenger-news-type.php
r2921300 r3096505 54 54 add_action( 'save_post', 'scb_messengerbotnews_meta_save' ); 55 55 56 /* Save function for the entered data */57 56 function scb_messengerbotnews_meta_save( $post_id ) { 57 58 59 58 60 59 $list_post = scb_utilities::sanitizePostInput($_POST['messenger_post']) ; 60 $messenge = scb_utilities::sanitizePostInput($_POST['scb_news_message']) ; 61 62 update_post_meta($post_id,'scb_messenger_post',$list_post); 63 update_post_meta($post_id,'scb_news_message',$messenge); 61 if ( ! isset( $_POST['scb_messengerbotnews_nonce'] ) || ! wp_verify_nonce( $_POST['scb_messengerbotnews_nonce'], 'scb_messengerbotnews_save' ) ) { 62 return; 63 } 64 65 if ( isset( $_POST['messenger_post'] ) && isset( $_POST['scb_news_message'] ) ) { 66 $list_post = scb_utilities::sanitizePostInput( $_POST['messenger_post'] ); 67 $messenge = scb_utilities::sanitizePostInput( $_POST['scb_news_message'] ); 68 69 update_post_meta( $post_id, 'scb_messenger_post', $list_post ); 70 update_post_meta( $post_id, 'scb_news_message', $messenge ); 71 } 64 72 } 65 73 ?> -
social-bot/tags/1.8.1/include/messenger-post-type.php
r2968070 r3096505 197 197 $command = sanitize_text_field( $_POST['command'] ); 198 198 echo '<div class="scb_box row-command output_text_sender"> 199 Command:<input type="text" name="messengerbotDetails['. $c.'][command]" value="'.$command.'" />199 Command:<input type="text" name="messengerbotDetails['..'" /> 200 200 Type:'.scb_getOptionType(false, false, esc_attr($c)).'<span class="textBlock"> 201 Response:</span> <textarea name="messengerbotDetails['. $c.'][response]" rows="4" cols="50" class="textBlock" ></textarea>202 <span class="categoryBlock">Categoty:</span>'.scb_getOptionCategory(false, false, esc_attr($c)).'203 <span class="tagBlock">Tag:</span>'.scb_getOptionTag(false, false, esc_attr($c)).'201 Response:</span> <textarea name="messengerbotDetails['..'][response]" rows="4" cols="50" class="textBlock" ></textarea> 202 <span class="categoryBlock">Categoty:</span>'.scb_getOptionCategory(false, false, ).' 203 <span class="tagBlock">Tag:</span>'.scb_getOptionTag(false, false, ).' 204 204 <p></p><a href="#" class="remove-package">Remove</a></div>'; 205 205 -
social-bot/tags/1.8.1/include/post-type.php
r2927613 r3096505 51 51 public function createLabel () { 52 52 $labels = array( 53 'name' => __( $this->getName(), 'social-bot'),54 'singular_name' => __( $this->getName(), 'social-bot'),53 'name' => ), 54 'singular_name' => ), 55 55 'add_new' => __( 'Add New', 'social-bot' ), 56 56 'add_new_item' => sprintf( 57 57 58 __( 'Add New %s', 'social-bot' ), 58 59 $this->getName() 59 60 ), 60 61 'edit_item' => sprintf( 62 61 63 __( 'Edit %s', 'social-bot' ), 62 64 $this->getName() 63 65 ), 64 66 'new_item' => sprintf( 67 65 68 __( 'New %s', 'social-bot' ), 66 69 $this->getName() 67 70 ), 68 71 'all_items' => sprintf( 72 69 73 __( 'All %s', 'social-bot' ), 70 74 $this->getName() 71 75 ), 72 76 'view_item' => sprintf( 77 73 78 __( 'View %s', 'social-bot' ), 74 79 $this->getName() 75 80 ), 76 81 'search_items' => sprintf( 82 77 83 __( 'Search %s', 'social-bot' ), 78 84 $this->getName() 79 85 ), 80 86 'not_found' => sprintf( 87 81 88 __( 'No %s found', 'social-bot' ), 82 89 $this->getName() 83 90 ), 84 91 'not_found_in_trash' => sprintf( 92 85 93 __( 'No %s found in the Trash', 'social-bot' ), 86 94 $this->getName() … … 103 111 'labels' => $this->getLabel(), 104 112 'description' => sprintf( 113 105 114 __( 'Displays %s and their ratings', 'social-bot' ), 106 115 $this->getName() -
social-bot/tags/1.8.1/include/settings-page.php
r2920353 r3096505 3 3 // Contenuto della pagina di configurazione 4 4 echo '<div class="wrap">'; 5 echo '<h1>'. __('Social Bot settings', 'social-bot').'</h1>';5 echo '<h1>'.__('Social Bot settings', 'social-bot').'</h1>'; 6 6 7 7 // Output del form di configurazione … … 17 17 18 18 function social_bot_add_settings_page() { 19 add_options_page(__('Social Bot settings' ), __('Social Bot configuration'), 'manage_options', 'social_bot', 'social_bot_settings_page');19 add_options_page(__('Social Bot settings''), 'manage_options', 'social_bot', 'social_bot_settings_page'); 20 20 } 21 21 add_action('admin_menu', 'social_bot_add_settings_page'); … … 68 68 // Callback per la sezione di configurazione 69 69 function social_bot_section_messenger_callback() { 70 echo __('By clicking on "Enable Facebook Messenger Bot", there will be additional options.', 'social-bot');70 echo __('By clicking on "Enable Facebook Messenger Bot", there will be additional options.', 'social-bot'); 71 71 } 72 72 … … 85 85 // Callback per la sezione di configurazione 86 86 function social_bot_section_telegram_callback() { 87 echo __('By clicking on "Enable Telegram Bot", there will be additional options.', 'social-bot');87 echo __('By clicking on "Enable Telegram Bot", there will be additional options.', 'social-bot'); 88 88 } 89 89 … … 102 102 // Callback per la sezione di configurazione 103 103 function social_bot_dev_section_callback() { 104 echo __('Select this option if you want to perform tests using var_dump. Useful if you use tools like Postman.', 'social-bot');104 echo __('Select this option if you want to perform tests using var_dump. Useful if you use tools like Postman.', 'social-bot'); 105 105 } 106 106 -
social-bot/tags/1.8.1/part/form.php
r2831393 r3096505 59 59 </p> 60 60 <p class="meta-options scb_field"> 61 <label for="scb_error_msg"><?php echo __('Error message', 'social-bot'); ?></label>61 <label for="scb_error_msg"><?php echo __('Error message', 'social-bot'); ?></label> 62 62 <input id="scb_error_msg" 63 63 type="text" … … 66 66 </p> 67 67 <p class="meta-options scb_field"> 68 <label for="scb_delete_user_msg"><?php echo __('Message that subscribers can use to unsubscribe', 'social-bot'); ?></label>68 <label for="scb_delete_user_msg"><?php echo __('Message that subscribers can use to unsubscribe', 'social-bot'); ?></label> 69 69 <input id="scb_delete_user_msg" 70 70 type="text" … … 73 73 </p> 74 74 </div> 75 <span class="helper"><?php echo __('To create your own Facebook Messenger Bot you can do it on <a href="https://developers.facebook.com/apps/create/" target="_blank">the official Developer Facebook page', 'social-bot'); ?></a></span>75 <span class="helper"><?php echo __('To create your own Facebook Messenger Bot you can do it on <a href="https://developers.facebook.com/apps/create/" target="_blank">the official Developer Facebook page', 'social-bot'); ?></a></span> 76 76 <script> 77 77 function changetype(event) { -
social-bot/tags/1.8.1/part/form_choice_messenger_bot.php
r2826719 r3096505 12 12 if($post->ID==get_post_meta($postID, 'scb_messenger_post', true)) $select ="selected"; 13 13 ?> 14 <option value="<?php the_ID(); ?>" <?php echo $select; ?>><?php echo the_title_attribute( 'echo=0' ); ?></option>14 <option value="<?php the_ID(); ?>" <?php echo ; ?>><?php echo the_title_attribute( 'echo=0' ); ?></option> 15 15 <?php endwhile; ?> 16 16 </select> -
social-bot/tags/1.8.1/part/form_manage_error.php
r2831393 r3096505 33 33 foreach($message_fail_list as $single_error) { 34 34 if(trim($single_error)) 35 echo '<div class="single_error" data-command="'. $single_error.'">36 <p class=" "><span>'. $single_error.'</span></p>35 echo '<div class="single_error" data-command="'..'"> 36 <p class=" "><span>'..'</span></p> 37 37 <ul class="btn-list"> 38 38 <li class="add_package button" onclick="addFailMessage(event)"> 39 '. __( 'Add Command', 'social-bot' ).'39 '. __( 'Add Command', 'social-bot' ).' 40 40 </li> 41 41 <li class="add_package button" onclick="removeFailMessage(event)"> 42 '. __( 'Remove Command', 'social-bot' ).'42 '. __( 'Remove Command', 'social-bot' ).' 43 43 </li> 44 44 </ul> -
social-bot/tags/1.8.1/part/messengerbot_meta_item.php
r2919317 r3096505 21 21 Type: '.scb_getOptionType(true, $messengerbotDetail['response_type']).' 22 22 <span class="textBlock">Response:</span><textarea name="messengerbotDetails[%1$s][response]" class="textBlock" rows="4" cols="50" >%4$s</textarea> 23 <span class="categoryBlock">'. __('Category').':</span>'.scb_getOptionCategory(true, $response_cat).'24 <span class="tagBlock">'. __('Tag').':</span>'.scb_getOptionTag(true, $response_tag).'25 <p></p> <a href="#" class="remove-package">%5$s</a></div>', $c, $messengerbotDetail['command'], $messengerbotDetail['response_type'], $messengerbotDetail['response'], 'Remove' );23 <span class="categoryBlock">'.').':</span>'.scb_getOptionCategory(true, $response_cat).' 24 <span class="tagBlock">'.').':</span>'.scb_getOptionTag(true, $response_tag).' 25 <p></p> <a href="#" class="remove-package">%5$s</a></div>', , 'Remove' ); 26 26 $c = $c +1; 27 27 } … … 31 31 ?> 32 32 <span id="output-package"></span> 33 <a href="#" class="add_package button add_command"><?php __('Add Messenger Bot'); ?></a>33 <a href="#" class="add_package button add_command"><?php ot'); ?></a> 34 34 <script> 35 35 var $ =jQuery.noConflict(); -
social-bot/tags/1.8.1/readme.txt
r3089055 r3096505 6 6 Requires at least: 5.0 7 7 Tested up to: 6.5.3 8 Stable tag: 1.8 8 Stable tag: 1.8 9 9 License: GPLv2 or later 10 10 -
social-bot/tags/1.8.1/social-bot.php
r3089055 r3096505 3 3 Plugin Name: Social Bot 4 4 description: A plugin to create response for Facebook Messenger bot 5 Version: 1.8 5 Version: 1.8 6 6 Author: Matteo Enna 7 7 Author URI: https://matteoenna.it/it/wordpress-work/ -
social-bot/trunk/include/bot-class.php
r2921300 r3096505 181 181 182 182 public function getResponseString() { 183 return json_encode($this->getResponse());183 return json_encode($this->getResponse()); 184 184 } 185 185 186 186 public function getResponseForceString($user, $message) { 187 187 $this->sender = $user; 188 return json_encode($this->getResponse($message));188 return json_encode($this->getResponse($message)); 189 189 } 190 190 -
social-bot/trunk/include/messenger-news-type.php
r2921300 r3096505 54 54 add_action( 'save_post', 'scb_messengerbotnews_meta_save' ); 55 55 56 /* Save function for the entered data */57 56 function scb_messengerbotnews_meta_save( $post_id ) { 57 58 59 58 60 59 $list_post = scb_utilities::sanitizePostInput($_POST['messenger_post']) ; 60 $messenge = scb_utilities::sanitizePostInput($_POST['scb_news_message']) ; 61 62 update_post_meta($post_id,'scb_messenger_post',$list_post); 63 update_post_meta($post_id,'scb_news_message',$messenge); 61 if ( ! isset( $_POST['scb_messengerbotnews_nonce'] ) || ! wp_verify_nonce( $_POST['scb_messengerbotnews_nonce'], 'scb_messengerbotnews_save' ) ) { 62 return; 63 } 64 65 if ( isset( $_POST['messenger_post'] ) && isset( $_POST['scb_news_message'] ) ) { 66 $list_post = scb_utilities::sanitizePostInput( $_POST['messenger_post'] ); 67 $messenge = scb_utilities::sanitizePostInput( $_POST['scb_news_message'] ); 68 69 update_post_meta( $post_id, 'scb_messenger_post', $list_post ); 70 update_post_meta( $post_id, 'scb_news_message', $messenge ); 71 } 64 72 } 65 73 ?> -
social-bot/trunk/include/messenger-post-type.php
r2968070 r3096505 197 197 $command = sanitize_text_field( $_POST['command'] ); 198 198 echo '<div class="scb_box row-command output_text_sender"> 199 Command:<input type="text" name="messengerbotDetails['. $c.'][command]" value="'.$command.'" />199 Command:<input type="text" name="messengerbotDetails['..'" /> 200 200 Type:'.scb_getOptionType(false, false, esc_attr($c)).'<span class="textBlock"> 201 Response:</span> <textarea name="messengerbotDetails['. $c.'][response]" rows="4" cols="50" class="textBlock" ></textarea>202 <span class="categoryBlock">Categoty:</span>'.scb_getOptionCategory(false, false, esc_attr($c)).'203 <span class="tagBlock">Tag:</span>'.scb_getOptionTag(false, false, esc_attr($c)).'201 Response:</span> <textarea name="messengerbotDetails['..'][response]" rows="4" cols="50" class="textBlock" ></textarea> 202 <span class="categoryBlock">Categoty:</span>'.scb_getOptionCategory(false, false, ).' 203 <span class="tagBlock">Tag:</span>'.scb_getOptionTag(false, false, ).' 204 204 <p></p><a href="#" class="remove-package">Remove</a></div>'; 205 205 -
social-bot/trunk/include/post-type.php
r2927613 r3096505 51 51 public function createLabel () { 52 52 $labels = array( 53 'name' => __( $this->getName(), 'social-bot'),54 'singular_name' => __( $this->getName(), 'social-bot'),53 'name' => ), 54 'singular_name' => ), 55 55 'add_new' => __( 'Add New', 'social-bot' ), 56 56 'add_new_item' => sprintf( 57 57 58 __( 'Add New %s', 'social-bot' ), 58 59 $this->getName() 59 60 ), 60 61 'edit_item' => sprintf( 62 61 63 __( 'Edit %s', 'social-bot' ), 62 64 $this->getName() 63 65 ), 64 66 'new_item' => sprintf( 67 65 68 __( 'New %s', 'social-bot' ), 66 69 $this->getName() 67 70 ), 68 71 'all_items' => sprintf( 72 69 73 __( 'All %s', 'social-bot' ), 70 74 $this->getName() 71 75 ), 72 76 'view_item' => sprintf( 77 73 78 __( 'View %s', 'social-bot' ), 74 79 $this->getName() 75 80 ), 76 81 'search_items' => sprintf( 82 77 83 __( 'Search %s', 'social-bot' ), 78 84 $this->getName() 79 85 ), 80 86 'not_found' => sprintf( 87 81 88 __( 'No %s found', 'social-bot' ), 82 89 $this->getName() 83 90 ), 84 91 'not_found_in_trash' => sprintf( 92 85 93 __( 'No %s found in the Trash', 'social-bot' ), 86 94 $this->getName() … … 103 111 'labels' => $this->getLabel(), 104 112 'description' => sprintf( 113 105 114 __( 'Displays %s and their ratings', 'social-bot' ), 106 115 $this->getName() -
social-bot/trunk/include/settings-page.php
r2920353 r3096505 3 3 // Contenuto della pagina di configurazione 4 4 echo '<div class="wrap">'; 5 echo '<h1>'. __('Social Bot settings', 'social-bot').'</h1>';5 echo '<h1>'.__('Social Bot settings', 'social-bot').'</h1>'; 6 6 7 7 // Output del form di configurazione … … 17 17 18 18 function social_bot_add_settings_page() { 19 add_options_page(__('Social Bot settings' ), __('Social Bot configuration'), 'manage_options', 'social_bot', 'social_bot_settings_page');19 add_options_page(__('Social Bot settings''), 'manage_options', 'social_bot', 'social_bot_settings_page'); 20 20 } 21 21 add_action('admin_menu', 'social_bot_add_settings_page'); … … 68 68 // Callback per la sezione di configurazione 69 69 function social_bot_section_messenger_callback() { 70 echo __('By clicking on "Enable Facebook Messenger Bot", there will be additional options.', 'social-bot');70 echo __('By clicking on "Enable Facebook Messenger Bot", there will be additional options.', 'social-bot'); 71 71 } 72 72 … … 85 85 // Callback per la sezione di configurazione 86 86 function social_bot_section_telegram_callback() { 87 echo __('By clicking on "Enable Telegram Bot", there will be additional options.', 'social-bot');87 echo __('By clicking on "Enable Telegram Bot", there will be additional options.', 'social-bot'); 88 88 } 89 89 … … 102 102 // Callback per la sezione di configurazione 103 103 function social_bot_dev_section_callback() { 104 echo __('Select this option if you want to perform tests using var_dump. Useful if you use tools like Postman.', 'social-bot');104 echo __('Select this option if you want to perform tests using var_dump. Useful if you use tools like Postman.', 'social-bot'); 105 105 } 106 106 -
social-bot/trunk/part/form.php
r2831393 r3096505 59 59 </p> 60 60 <p class="meta-options scb_field"> 61 <label for="scb_error_msg"><?php echo __('Error message', 'social-bot'); ?></label>61 <label for="scb_error_msg"><?php echo __('Error message', 'social-bot'); ?></label> 62 62 <input id="scb_error_msg" 63 63 type="text" … … 66 66 </p> 67 67 <p class="meta-options scb_field"> 68 <label for="scb_delete_user_msg"><?php echo __('Message that subscribers can use to unsubscribe', 'social-bot'); ?></label>68 <label for="scb_delete_user_msg"><?php echo __('Message that subscribers can use to unsubscribe', 'social-bot'); ?></label> 69 69 <input id="scb_delete_user_msg" 70 70 type="text" … … 73 73 </p> 74 74 </div> 75 <span class="helper"><?php echo __('To create your own Facebook Messenger Bot you can do it on <a href="https://developers.facebook.com/apps/create/" target="_blank">the official Developer Facebook page', 'social-bot'); ?></a></span>75 <span class="helper"><?php echo __('To create your own Facebook Messenger Bot you can do it on <a href="https://developers.facebook.com/apps/create/" target="_blank">the official Developer Facebook page', 'social-bot'); ?></a></span> 76 76 <script> 77 77 function changetype(event) { -
social-bot/trunk/part/form_choice_messenger_bot.php
r2826719 r3096505 12 12 if($post->ID==get_post_meta($postID, 'scb_messenger_post', true)) $select ="selected"; 13 13 ?> 14 <option value="<?php the_ID(); ?>" <?php echo $select; ?>><?php echo the_title_attribute( 'echo=0' ); ?></option>14 <option value="<?php the_ID(); ?>" <?php echo ; ?>><?php echo the_title_attribute( 'echo=0' ); ?></option> 15 15 <?php endwhile; ?> 16 16 </select> -
social-bot/trunk/part/form_manage_error.php
r2831393 r3096505 33 33 foreach($message_fail_list as $single_error) { 34 34 if(trim($single_error)) 35 echo '<div class="single_error" data-command="'. $single_error.'">36 <p class=" "><span>'. $single_error.'</span></p>35 echo '<div class="single_error" data-command="'..'"> 36 <p class=" "><span>'..'</span></p> 37 37 <ul class="btn-list"> 38 38 <li class="add_package button" onclick="addFailMessage(event)"> 39 '. __( 'Add Command', 'social-bot' ).'39 '. __( 'Add Command', 'social-bot' ).' 40 40 </li> 41 41 <li class="add_package button" onclick="removeFailMessage(event)"> 42 '. __( 'Remove Command', 'social-bot' ).'42 '. __( 'Remove Command', 'social-bot' ).' 43 43 </li> 44 44 </ul> -
social-bot/trunk/part/messengerbot_meta_item.php
r2919317 r3096505 21 21 Type: '.scb_getOptionType(true, $messengerbotDetail['response_type']).' 22 22 <span class="textBlock">Response:</span><textarea name="messengerbotDetails[%1$s][response]" class="textBlock" rows="4" cols="50" >%4$s</textarea> 23 <span class="categoryBlock">'. __('Category').':</span>'.scb_getOptionCategory(true, $response_cat).'24 <span class="tagBlock">'. __('Tag').':</span>'.scb_getOptionTag(true, $response_tag).'25 <p></p> <a href="#" class="remove-package">%5$s</a></div>', $c, $messengerbotDetail['command'], $messengerbotDetail['response_type'], $messengerbotDetail['response'], 'Remove' );23 <span class="categoryBlock">'.').':</span>'.scb_getOptionCategory(true, $response_cat).' 24 <span class="tagBlock">'.').':</span>'.scb_getOptionTag(true, $response_tag).' 25 <p></p> <a href="#" class="remove-package">%5$s</a></div>', , 'Remove' ); 26 26 $c = $c +1; 27 27 } … … 31 31 ?> 32 32 <span id="output-package"></span> 33 <a href="#" class="add_package button add_command"><?php __('Add Messenger Bot'); ?></a>33 <a href="#" class="add_package button add_command"><?php ot'); ?></a> 34 34 <script> 35 35 var $ =jQuery.noConflict(); -
social-bot/trunk/readme.txt
r3089055 r3096505 6 6 Requires at least: 5.0 7 7 Tested up to: 6.5.3 8 Stable tag: 1.8 8 Stable tag: 1.8 9 9 License: GPLv2 or later 10 10 -
social-bot/trunk/social-bot.php
r3089055 r3096505 3 3 Plugin Name: Social Bot 4 4 description: A plugin to create response for Facebook Messenger bot 5 Version: 1.8 5 Version: 1.8 6 6 Author: Matteo Enna 7 7 Author URI: https://matteoenna.it/it/wordpress-work/
Note: See TracChangeset
for help on using the changeset viewer.