# This example does an AJAX lookup and is in CoffeeScript
$('.typeahead').typeahead(
# source can be a function
source: (typeahead, query) ->
# this function receives the typeahead object and the query string
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| namespace Forms; | |
| /** | |
| * This file is supposed to give a good way of generating forms programmatically with PHP. | |
| */ | |
| /* | |
| * WARNING! WARNING! WARNING! WARNING! WARNING! WARNING! WARNING! WARNING! WARNING! WARNING! WARNING! WARNING! | |
| * ----------------------------------------------------------------------------------------------------------- | |
| * None of the strings you see in the following classes are escaped/secured against any kind of |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| $fileName = $_FILES['afile']['name']; | |
| $fileType = $_FILES['afile']['type']; | |
| $fileContent = file_get_contents($_FILES['afile']['tmp_name']); | |
| $dataUrl = 'data:' . $fileType . ';base64,' . base64_encode($fileContent); | |
| $json = json_encode(array( | |
| 'name' => $fileName, | |
| 'type' => $fileType, | |
| 'dataUrl' => $dataUrl, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Upload a File | |
| $uid = "[your IDrive user name]"; | |
| $pwd = "[your IDrive user password]"; | |
| $localFile = "[path to your local file just uploaded or otherwise]"; | |
| $crtpath = "[path to your local cert]"; | |
| // file | |
| $PostFields = array( | |
| 'file' => '@' . $localFile . '', | |
| 'uid' => $uid, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| curl_setopt($ch, CURLOPT_URL, '<IDRIVE SERVER LOCATION>/evs/downloadEvent'); | |
| curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); | |
| curl_setopt($ch, CURLOPT_POST, true); | |
| $body = 'uid=' . '<IDRIVE USER ID>'. '&pwd=' . '<IDRIVE USER PASSWORD>'. '&month=' . '<MONTH OF EVENTS>'. '&year=' . '<YEAR OF EVENTS>'. '&eventid=' . '<ID OF EVENT>'; | |
| curl_setopt($ch, CURLOPT_POSTFIELDS, $body); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| curl_setopt($ch, CURLOPT_URL, '<IDRIVE SERVER LOCATION>/evs/browseFolder'); | |
| curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); | |
| curl_setopt($ch, CURLOPT_POST, true); | |
| $body = 'uid=' . '<IDRIVE USER ID>'. '&pwd=' . '<IDRIVE USER PASSWORD>'. '&p=' . '<PATH TO FOLDER ON THE IDRIVE SERVER TO BROWSE>'; | |
| curl_setopt($ch, CURLOPT_POSTFIELDS, $body); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /** | |
| * This code should be added to functions.php of your theme | |
| **/ | |
| add_filter('woocommerce_empty_price_html', 'custom_call_for_price'); | |
| function custom_call_for_price() { | |
| return 'Call for price'; | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| /* Last updated with phpFlickr 3.1 | |
| * | |
| * Edit these variables to reflect the values you need. $default_redirect | |
| * and $permissions are only important if you are linking here instead of | |
| * using phpFlickr::auth() from another page or if you set the remember_uri | |
| * argument to false. | |
| */ | |
| // Include configuration file |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* | |
| You can now create a spinner using any of the variants below: | |
| $("#el").spin(); // Produces default Spinner using the text color of #el. | |
| $("#el").spin("small"); // Produces a 'small' Spinner using the text color of #el. | |
| $("#el").spin("large", "white"); // Produces a 'large' Spinner in white (or any valid CSS color). | |
| $("#el").spin({ ... }); // Produces a Spinner using your custom settings. | |
| $("#el").spin(false); // Kills the spinner. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| /* For AJAX, if frustrated, try the following (see http://www.php.net/manual/en/function.flush.php#91556): | |
| @apache_setenv('no-gzip', 1); | |
| @ini_set('zlib.output_compression', 0); | |
| */ | |
| ob_start(); | |
| set_time_limit(0); // for scripts that run really long | |
| function force_flush ($add_whitespace = TRUE) { |