onboarding
3 weeks ago
preview
3 weeks ago
screens
3 weeks ago
sections
3 weeks ago
builder.php
3 weeks ago
form-data-examples.html
3 weeks ago
index.php
3 weeks ago
oembed-examples.html
3 weeks ago
oembed.php
3 weeks ago
wizard.php
3 weeks ago
form-data-examples.html
147 lines
| 1 | <!-- |
| 2 | Tool to help understand how sending and retrieving feed related info from the database works. |
| 3 | --> |
| 4 | <div style="clear: left;"> |
| 5 | |
| 6 | <p>Create/update source</p> |
| 7 | |
| 8 | <p>Retrieve pages/groups (will store available ones in cff_builder if successful)</p> |
| 9 | <a href="" id="cff_page_link">Retrieve Pages</a><br> |
| 10 | <a href="" id="cff_group_link">Retrieve Groups</a> |
| 11 | |
| 12 | <p>Manual account adding</p> |
| 13 | |
| 14 | <form id="cff_add_source_form" method="post" action=""> |
| 15 | <label for="cff_access_token">Access Token:</label><input id="cff_access_token" type="text" name="access_token" value=""><br> |
| 16 | <label for="cff_page_name">Page Name (not required):</label><input id="cff_page_name" type="text" name="name" value=""><br> |
| 17 | <label for="cff_page_id">Page ID:</label><input id="cff_page_id" type="text" name="id" value=""><br> |
| 18 | <label for="cff_type">Type:</label><input id="cff_type" type="text" name="type" value="page"><br> |
| 19 | <label for="cff_privilege">Privilege (events or leave blank):</label><input id="cff_privilege" type="text" name="privilege" value="events"><br> |
| 20 | |
| 21 | <input type="hidden" name="action" value="cff_source_builder_update"/> |
| 22 | <input class="button-primary" type="submit" value="Submit"/> |
| 23 | </form> |
| 24 | |
| 25 | <p>Create/update feed and settings</p> |
| 26 | <form id="cff_save_settings_form" method="post" action=""> |
| 27 | <label for="cff_feed_id">Feed ID: (leave blank for new)</label><input id="cff_feed_id" type="text" name="feed_id" value=""><br> |
| 28 | <label for="cff_feed_title">Feed Title:</label><input id="cff_feed_title" type="text" name="feed_title" value=""><br> |
| 29 | <label for="cff_feed_status">Feed Status (publish or draft):</label><input id="cff_feed_status" type="text" name="status" value="publish"><br> |
| 30 | <label for="cff_src_1">Source 1 (must be the account/page ID):</label><input id="cff_src_1" type="text" name="sources[]" value=""><br> |
| 31 | <label for="cff_src_1">Source 2 (must be the account/page ID):</label><input id="cff_src_2" type="text" name="sources[]" value=""><br> |
| 32 | <label for="cff_num">Number:</label><input id="cff_num" type="text" name="num" value="10"><br> |
| 33 | <label for="cff_settings_include_post_set1">Include Posts in Return:</label><input id="cff_settings_include_post_set1" type="checkbox" name="include_post_set" value="1"/> |
| 34 | <br><label for="cff_settings_include_header1">Include Header in Return:</label><input id="cff_settings_include_header1" type="checkbox" name="include_header" value="1"/> |
| 35 | |
| 36 | <input type="hidden" name="action" value="cff_feed_saver_manager_builder_update"/> |
| 37 | <input class="button-primary" type="submit" value="Submit"/> |
| 38 | </form> |
| 39 | |
| 40 | <p>Get feed settings/posts by ID</p> |
| 41 | <form id="cff_get_settings_form" method="post" action=""> |
| 42 | <label for="cff_settings_feed_id">Feed ID:</label><input id="cff_settings_feed_id" type="text" name="feed_id" value="1"><br> |
| 43 | <label for="cff_settings_include_post_set">Include Posts:</label><input id="cff_settings_include_post_set" type="checkbox" name="include_post_set" value="1"/> |
| 44 | <br><label for="cff_settings_include_header">Include Header:</label><input id="cff_settings_include_header" type="checkbox" name="include_header" value="1"/> |
| 45 | |
| 46 | <input type="hidden" name="action" value="cff_feed_saver_manager_get_feed_settings"/> |
| 47 | <input class="button-primary" type="submit" value="Submit"/> |
| 48 | </form> |
| 49 | |
| 50 | <p>Pages of things</p> |
| 51 | <form id="cff_get_source_page" method="post" action=""> |
| 52 | <label for="cff_settings_source_page">Source Page:</label><input id="cff_settings_source_page" type="text" name="page" value="2"><br> |
| 53 | <input type="hidden" name="action" value="cff_source_get_page"/> |
| 54 | <input class="button-primary" type="submit" value="Submit"/> |
| 55 | </form> |
| 56 | |
| 57 | <form id="cff_get_feed_page" method="post" action=""> |
| 58 | <label for="cff_settings_feed_page">Feed Page:</label><input id="cff_settings_feed_page" type="text" name="page" value="2"><br> |
| 59 | <input type="hidden" name="action" value="cff_feed_saver_manager_get_feed_list_page"/> |
| 60 | <input class="button-primary" type="submit" value="Submit"/> |
| 61 | </form> |
| 62 | |
| 63 | <p>Locations page by feed ID</p> |
| 64 | |
| 65 | <form id="cff_get_locations_page" method="post" action=""> |
| 66 | <label for="cff_settings_locations_feed_id">Feed ID:</label><input id="cff_settings_locations_feed_id" type="text" name="feed_id" value="1"><br> |
| 67 | <label for="cff_settings_locations_page">Locations Page:</label><input id="cff_settings_locations_page" type="text" name="page" value="2"><br> |
| 68 | <br><label for="cff_settings_is_legacy">This is a legacy feed:</label><input id="cff_settings_is_legacy" type="checkbox" name="is_legacy" value="1"/> |
| 69 | <input type="hidden" name="action" value="cff_feed_saver_manager_get_locations_page"/> |
| 70 | <input class="button-primary" type="submit" value="Submit"/> |
| 71 | </form> |
| 72 | |
| 73 | <p>Dismiss Onboarding</p> |
| 74 | <form id="cff_dismiss_onboarding" method="post" action=""> |
| 75 | <input type="hidden" name="action" value="cff_dismiss_onboarding"/> |
| 76 | <input class="button-primary" type="submit" value="Dismiss"/> |
| 77 | </form> |
| 78 | |
| 79 | <p>Featured Post Preview</p> |
| 80 | <form id="cff_source_get_featured_post_preview" method="post" action=""> |
| 81 | <input type="hidden" name="action" value="cff_source_get_featured_post_preview"/> |
| 82 | <label for="cff_source_get_featured_post_preview_thing">URL or Post ID:</label><input id="cff_source_get_featured_post_preview_thing" type="text" name="url_or_id" value="https://www.facebook.com/facebook/videos/10153231379946729/"><br> |
| 83 | <label for="cff_src_id">Source ID:</label><input id="cff_src_id" type="text" name="source_id" value=""><br> |
| 84 | |
| 85 | <input class="button-primary" type="submit" value="Submit"/> |
| 86 | </form> |
| 87 | |
| 88 | <p>Video Playlist Preview</p> |
| 89 | <form id="cff_source_get_playlist_post_preview" method="post" action=""> |
| 90 | <input type="hidden" name="action" value="cff_source_get_playlist_post_preview"/> |
| 91 | <label for="cff_source_get_playlist_post_preview_thing">URL or Post ID:</label><input id="cff_source_get_playlist_post_preview_thing" type="text" name="url_or_id" value="https://www.facebook.com/watch/539051002877739/1979731855647067"><br> |
| 92 | <label for="cff_src_id_vid">Source ID:</label><input id="cff_src_id_vid" type="text" name="source_id" value=""><br> |
| 93 | |
| 94 | <input class="button-primary" type="submit" value="Submit"/> |
| 95 | </form> |
| 96 | |
| 97 | <p>Import/Export</p> |
| 98 | <form id="cff_import" method="post" action=""> |
| 99 | <input type="hidden" name="action" value="cff_feed_saver_manager_importer"/> |
| 100 | <label for="cff_import_field">Import JSON</label><br> |
| 101 | <textarea id="cff_import_field" name="feed_json"></textarea> |
| 102 | |
| 103 | <input class="button-primary" type="submit" value="Submit"/> |
| 104 | </form> |
| 105 | |
| 106 | <p>Get feed comments</p> |
| 107 | <form id="cff_get_comments" method="post" action=""> |
| 108 | <label for="cff_get_comments_feed_id">Feed ID:</label><input id="cff_get_comments_feed_id" type="text" name="feed_id" value="1"><br> |
| 109 | |
| 110 | <input type="hidden" name="action" value="cff_feed_saver_manager_retrieve_comments"/> |
| 111 | <input class="button-primary" type="submit" value="Submit"/> |
| 112 | </form> |
| 113 | |
| 114 | <p>Clear single feed cache</p> |
| 115 | <form id="cff_clear_single_feed_cache" method="post" action=""> |
| 116 | <label for="cff_cc_feed_id">Feed ID:</label><input id="cff_cc_feed_id" type="text" name="feed_id" value="1"><br> |
| 117 | |
| 118 | <input type="hidden" name="action" value="cff_feed_saver_manager_clear_single_feed_cache"/> |
| 119 | <input class="button-primary" type="submit" value="Submit"/> |
| 120 | </form> |
| 121 | |
| 122 | </div> |
| 123 | <script> |
| 124 | jQuery(document).ready(function($) { |
| 125 | $('#cff_page_link').attr('href',cff_builder.sourceConnectionURLs.page); |
| 126 | $('#cff_group_link').attr('href',cff_builder.sourceConnectionURLs.group); |
| 127 | |
| 128 | $('#cff_source_get_playlist_post_preview, #cff_clear_single_feed_cache, #cff_get_comments, #cff_add_source_form, #cff_save_settings_form, #cff_get_settings_form, #cff_get_source_page, #cff_get_feed_page, #cff_get_locations_page, #cff_dismiss_onboarding, #cff_source_get_featured_post_preview, #cff_import').submit(function(event) { |
| 129 | |
| 130 | event.preventDefault(); |
| 131 | |
| 132 | var thisData = $(this).serializeArray(); |
| 133 | $.ajax({ |
| 134 | url: cff_builder.ajax_handler, |
| 135 | type: 'post', |
| 136 | data: thisData, |
| 137 | success: function (data) { |
| 138 | if (data.indexOf('{') === 0) { |
| 139 | data = JSON.parse(data); |
| 140 | } |
| 141 | |
| 142 | } |
| 143 | }); |
| 144 | }); |
| 145 | }); |
| 146 | </script> |
| 147 |