"; //Needs an unbranded version? Upgrade to a PRO membership for just $19.99/month. Read more here https://help.appointy.com/entries/20165487-Can-you-unbrand-Appointy-for-me- $poweredby = "
Powered by Appointy - Online Appointment Scheduling Software
"; add_action('init', 'appointy_calendar_init'); add_action('widgets_init', 'widget_init_appointy'); add_filter('the_content','appointy_insert'); function appointy_insert($content) { if (preg_match('{APPOINTY}',$content)) { $content = str_replace('{APPOINTY}',appointy(),$content); } //echo $content; return $content; } function appointy() { global $userdata, $table_prefix, $wpdb, $appointy_installed, $poweredby; get_currentuserinfo(); // $user_login = $userdata->user_login; $str=''; if( !appointy_calendar_installed() ) $appointy_installed = appointy_calendar_install(); //echo "-->" . $appointy_installed; if( !$appointy_installed ) { echo "PLUGIN NOT CORRECTLY INSTALLED, PLEASE CHECK ALL INSTALL PROCEDURE!"; return; } $query = " SELECT code AS code FROM ".$table_prefix."appointy_calendar LIMIT 1 "; //echo $query; $code = $wpdb->get_var( $query ); $code .= $poweredby; //} ?> '; if( $code === null ) { $str.= '

You don\'t have appointy Calendar, please set code in Settings menu.

'; } else { $str.='
'; $str.='
'; ?> '; $str.='
'; } ?> '; return $str; } // ************Code to render Appointy button in the sidebar***************** // ************START*********************** function widget_init_appointy() { if (!function_exists('wp_register_sidebar_widget')) return; wp_register_sidebar_widget( '108', // your unique widget id 'Appointy', // widget name 'widget_calendar_appointy', // callback function array( // options 'description' => 'It places a cool schedule now button on the sidebar of your website.' )); } function widget_calendar_appointy($args) { extract($args); echo $before_widget; echo $before_title . 'Schedule Now' . $after_title; echo ''; echo $after_widget; } function appointy_widget_init() { global $table_prefix, $wpdb; if( !appointy_calendar_install() ) { echo "PLUGIN NOT CORRECTLY INSTALLED, PLEASE CHECK ALL INSTALL PROCEDURE!"; return; } $query = " SELECT code AS code FROM ".$table_prefix."appointy_calendar LIMIT 1 "; $code = $wpdb->get_var( $query ); return appointy_get_booking_url($code); } function appointy_get_booking_url($codeURL) { $bookingURL = preg_match("/https?:\/\/(.*).com/", $codeURL, $matches); if ($bookingURL = true) { $bookingURL = htmlentities($matches['0']); } return $bookingURL; } //******************* WIDGET CODE ENDS HERE ************************** function appointy_calendar_init() { global $appointy_calendar_privileges, $table_prefix, $wpdb, $appointy_path, $appointy_default, $appointy_installed; add_action('admin_menu', 'appointy_calendar_config_page'); } function appointy_calendar_config_page() { if ( function_exists('add_submenu_page') ) { add_menu_page('appointy Calendar', 'Appointy Calendar', 8, __FILE__, 'appointy_calendar_main_page'); //add_submenu_page(__FILE__, 'Settings', 'Settings', $appointy_calendar_privileges, 'maintenance', 'appointy_calendar_manage_page'); //add_submenu_page(__FILE__, 'Admin Settings', 'Admin Settings', 8, 'admin_maitenance', 'appointy_calendar_admin_manage_page'); } } function appointy_calendar_main_page() { global $appointy_default, $userdata, $table_prefix, $wpdb, $appointy_installed, $iFrameVal; get_currentuserinfo(); if( !appointy_calendar_installed() ) $appointy_installed = appointy_calendar_install(); if( !$appointy_installed ) { echo "PLUGIN NOT CORRECTLY INSTALLED, PLEASE CHECK ALL INSTALL PROCEDURE!"; return; } ?>
get_var( $queryS ); if( $d1 === null ) { $query =" INSERT INTO ".$table_prefix."appointy_calendar (code) VALUES ('". $iFrameVal ."') "; $wpdb->query( $query ); } else { $query = "SELECT code AS code FROM ".$table_prefix."appointy_calendar LIMIT 1"; $iFrameVal = $wpdb->get_var( $query ); if (strpos($iFrameVal, "http://") !== false) { $newCodeHttps = str_replace("http://","https://",$iFrameVal); $query ="Update ".$table_prefix."appointy_calendar set code = '".$newCodeHttps."'"; $wpdb->query( $query ); $iFrameVal = str_replace("\\", "", $newCodeHttps); } } if( isset($_POST["set"]) AND $_POST["set"] == "Update" ) { if( !appointy_calendar_code( $_POST["code"] ) ) $valid = false; else { // New Code Start $newCode = ''; if( isset($_POST["language-selected"])) { $newCode = change_fpac_lanugae($_POST['language-selected'], $_POST["code"]); } else { $newCode = $_POST["code"]; } // New Code End $query ="Update ".$table_prefix."appointy_calendar set code = '".$newCode."'";// where calendar_id = " & $d1 ->calendar_id; $wpdb->query( $query ); // $iFrameVal = str_replace("\\", "", ($_POST["code"])); $iFrameVal = str_replace("\\", "", $newCode); } } if( isset( $_GET["ui"]) and $_GET["ui"] == "true" ) { global $wpdb; $table = $wpdb->prefix."appointy_calendar"; $wpdb->query("DROP TABLE IF EXISTS $table"); delete_option( 'appointy_calendar_privileges' ); //Removing option from database... $installed = appointy_calendar_installed(); if( !$installed ) { echo "PLUGIN UNINSTALLED. NOW DE-ACTIVATE PLUGIN.
"; echo " CLICK HERE"; return; } else { echo "PROBLEMS WITH UNINSTALL FUNCTION."; } } // Check for language in fullpage code $sel_lang_option_value = getLanguageValue(getLanguageCodeFromFpc($iFrameVal)); ?>

Appointy Calendar



Don't have an account on Appointy?

  Register Now. It's Free »  

" method="POST">

STEP » 1 Enter your Appointy Calendar Code
Don't have appointy username? Click here to register free.
Change "demo.appointy.com" to "{yourusername}.appointy.com"
where {yourusername} is your username on Appointy.com

Select language your customer speak

By default, the calendar would render in the above selected language. Go to settings in Appointy admin area to add multiple languages.

STEP » 2 Create a new page.
Goto "Write" --> "Write Page". Enter a Title e.g. "Schedule an appointment" (This would be shown as a link on your page. So make sure you chose the right title) and in Page Content write {APPOINTY} (including brackets). See preview.

Note: If it overlaps your sidebar then create a new template from your theme without sidebar and use it for Appointy page. Click here to see step by step instructions.

STEP » 3 You are done. Now manage Appointments and clients from admin area easily.
You are all done. Now test your blog. Appointy is easy to use and your clients would love scheduling with you. If you want to change your business hours, block days or times, add staff or service, approve appointment etc then click the link below and login to your powerful admin area on Appointy.

target="_blank" class="button">   Goto Admin Area »  


Uninstall Appointy Plugin: UNINSTALL



1){ $lanValue = $output_array[1]; } return $lanValue; } function change_fpac_lanugae($language, $code) { $newCode = $code; $languageCode = getLanguageCode($language); if(preg_match('(/ChangeLanguage.aspx)', $code)) { $code = preg_replace("/.appointy.com(.*)\&isGadget=1/", ".appointy.com/?isGadget=1", $code); $newCode = $code; } // if language is set to default then do nothing // because code is already reset in previous step if($language != "default"){ $codestr = preg_split('(\.appointy\.com\/\?)', $code); $newCode = $codestr[0].'\.appointy\.com'.$languageCode.'\&'.$codestr[1]; } return $newCode; } function createLanguageSelection($selLang){ // $language['default'] = 'default'; // $temp = getLanguageCodeArray(); // array_push($language, $temp); $language = getLanguageCodeArray(); $str = ''; foreach ($language as $key => $value) { # code... $str .= "'; } return $str; } // New Code End function appointy_calendar_code( $code ) { if( strpos($code, "get_var( $query ); //echo "nemesh-->>" . $install; if( $install === NULL ) return false; else return true; } function appointy_calendar_install() { global $table_prefix, $wpdb; $query = " CREATE TABLE ".$table_prefix."appointy_calendar ( calendar_id INT(11) NOT NULL auto_increment, code TEXT NOT NULL, PRIMARY KEY( calendar_id ) ) "; $wpdb->query( $query ); //Using option for appointy calendar plugin! add_option( "appointy_calendar_privileges", "2" ); if( !appointy_calendar_installed() ) return false; else return true; } ?>