Title: ole1986's Replies | WordPress.org

---

# ole1986

  [  ](https://wordpress.org/support/users/ole1986/)

 *   [Profile](https://wordpress.org/support/users/ole1986/)
 *   [Topics Started](https://wordpress.org/support/users/ole1986/topics/)
 *   [Replies Created](https://wordpress.org/support/users/ole1986/replies/)
 *   [Reviews Written](https://wordpress.org/support/users/ole1986/reviews/)
 *   [Topics Replied To](https://wordpress.org/support/users/ole1986/replied-to/)
 *   [Engagements](https://wordpress.org/support/users/ole1986/engagements/)
 *   [Favorites](https://wordpress.org/support/users/ole1986/favorites/)

 Search replies:

## Forum Replies Created

Viewing 15 replies - 1 through 15 (of 55 total)

1 [2](https://wordpress.org/support/users/ole1986/replies/page/2/?output_format=md)
[3](https://wordpress.org/support/users/ole1986/replies/page/3/?output_format=md)
[4](https://wordpress.org/support/users/ole1986/replies/page/4/?output_format=md)
[→](https://wordpress.org/support/users/ole1986/replies/page/2/?output_format=md)

 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Appointment Hour Booking - Booking Calendar] Appointment Hour Booking Extended](https://wordpress.org/support/topic/appointment-hour-booking-extended/)
 *  Thread Starter [ole1986](https://wordpress.org/support/users/ole1986/)
 * (@ole1986)
 * [5 years ago](https://wordpress.org/support/topic/appointment-hour-booking-extended/#post-14416389)
 * Unfortunately the given database structure does not allow me to do proper search
   filter requests based on the post data (the given slots/time) from inside the
   booking.
 * That is why I took the notify email (the email a user is entering) to figure 
   out the amount of registrations.
 * Doing some advanced request without a proper filter option in the database may
   slow it down.
    Especially when you have stored alot slots.
 * I have requested a DB change here already:
    [https://wordpress.org/support/topic/database-improvements/](https://wordpress.org/support/topic/database-improvements/)
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Appointment Hour Booking - Booking Calendar] Appointment Hour Booking Extended](https://wordpress.org/support/topic/appointment-hour-booking-extended/)
 *  Thread Starter [ole1986](https://wordpress.org/support/users/ole1986/)
 * (@ole1986)
 * [5 years ago](https://wordpress.org/support/topic/appointment-hour-booking-extended/#post-14410313)
 * [@centenarypark](https://wordpress.org/support/users/centenarypark/)
 * At the moment it is only available on GitHub and working for the free appointment
   hour booking as well as for the WP Time Slot Booking Plugin.
 * I did not had the chance to make it available on
    The WP plugin repository..
 * But I can arrange it asap. So updates will be available as expected.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Appointment Hour Booking - Booking Calendar] Allow 1 Booking per user](https://wordpress.org/support/topic/allow-1-booking-per-user/)
 *  [ole1986](https://wordpress.org/support/users/ole1986/)
 * (@ole1986)
 * [5 years ago](https://wordpress.org/support/topic/allow-1-booking-per-user/#post-14394120)
 * [@tayyabirfan7272](https://wordpress.org/support/users/tayyabirfan7272/) Or you
   can block them by email **per day** by using my extension plugin for it
 * Check out this:
    [https://wordpress.org/support/topic/appointment-hour-booking-extended/](https://wordpress.org/support/topic/appointment-hour-booking-extended/)
   Or [https://github.com/ole1986/wp-time-slots-extended/releases](https://github.com/ole1986/wp-time-slots-extended/releases)
 *   Forum: [Reviews](https://wordpress.org/support/forum/reviews/)
    In reply to:
   [[Appointment Hour Booking - Booking Calendar] First impression looked good, but with real data full of bugs](https://wordpress.org/support/topic/first-impression-looked-good-but-with-real-data-full-of-bugs/)
 *  Thread Starter [ole1986](https://wordpress.org/support/users/ole1986/)
 * (@ole1986)
 * [5 years ago](https://wordpress.org/support/topic/first-impression-looked-good-but-with-real-data-full-of-bugs/#post-14393944)
 * Thanks for the update!
 * But its still buggy.
 * For example when I book a slot in frontend, the *first slot* gets subtracted (
   as expected). But when I try to book another the capacity does not change (visually–
   JS).
 * In the previous version it even fully reset to the service capacity (even if 
   therewere several bookings)
 * The reason I assume is the `htmlSlots.sort` call inside `getCurrentSlots` and
   common misuse of the sort method
 * **Also I think the method `getCurrentSlots` is called to often causing unexpected
   performance issues.**
 * For those who are interessted in the solution, feel free create a new file named
 * `36_fbuilder.fapp.getCurrentSlots.js`
 * into the plugin directory `js/fields-public/`
    and insert the following code (
   plugin will automatically load it).
 *     ```
       /* ### Amended "getCurrentSlots" method for version 1.3.01 ### */
       $.fbuilder.controls['fapp'].prototype.getCurrentSlots = function (arr, d, s) {
       	var me = this;
       	var duration = parseFloat(me.services[s].duration);
       	var html = "";
       	var htmlSlots = new Array();
       	var pb = 0;
       	var pa = 0;
       	var v = false;
       	var capacity_service = me.services[s].capacity;
       	if (true) {
       		var compactUsedSlots = me.getCompatSlots(me.htmlUsedSlots[d])
       		for (var i = 0; i < compactUsedSlots.length; i++) {
       			//if (compactUsedSlots[i].quantity>=capacity_service && compactUsedSlots[i].serviceindex==s)
       			if (compactUsedSlots[i].serviceindex == s) {
       				compactUsedSlots[i].st = compactUsedSlots[i].h1 * 60 + compactUsedSlots[i].m1;
       				compactUsedSlots[i].t = $.datepicker.parseDate("yy-mm-dd", compactUsedSlots[i].d).getTime() + compactUsedSlots[i].st * 60 * 1000;
       				compactUsedSlots[i].html = "";
       				var v = false;
       				if (me.minDate !== "" && me.getMinDate != "") //check with the min date
       				{
       					var current = me.getMinDate;
       					var currenttime = current.getTime() - me.tz * 60 * 60 * 1000;
       					if (compactUsedSlots[i].t > currenttime) {
       						v = true;
       					}
       				}
       				else
       					v = true;
       				if (v) {
       					if (compactUsedSlots[i].quantity >= capacity_service || compactUsedSlots[i].currentSelection)
       						compactUsedSlots[i].html = '<div s="' + s + '" h1="' + compactUsedSlots[i].h1 + '" m1="' + compactUsedSlots[i].m1 + '" h2="' + compactUsedSlots[i].h2 + '" m2="' + compactUsedSlots[i].m2 + '" style="' + (!me.usedSlotsCheckbox ? "display:none" : "") + '" class="htmlUsed  ' + ((typeof compactUsedSlots[i].s !== 'undefined') ? compactUsedSlots[i].s.replace(/ /g, "").toLowerCase() + " old" : " choosen") + '"><a>' + me.formatString(compactUsedSlots[i], false, me.tz) + '</a>' + ((typeof compactUsedSlots[i].e !== 'undefined') ? "<div class=\"ahbmoreinfo\">" + compactUsedSlots[i].e + "</div>" : "") + '</div>';
       					compactUsedSlots[i].availableslot = false;
       					htmlSlots[htmlSlots.length] = compactUsedSlots[i];
       				}
       			}
       		}
       	}
   
       	if ((typeof specialPadding === 'undefined')) {
       		pb = me.pb;
       		pa = me.pa;
       	}
       	for (var i = 0; i < arr.length; i++) {
       		st = arr[i].t1 || (arr[i].h1 * 60 + arr[i].m1 * 1);
       		et = arr[i].t2 || (arr[i].h2 * 60 + arr[i].m2 * 1);
       		if (st >= et)
       			et += 24 * 60;
       		st += me.pb;
       		while (st + duration + me.pa <= et && st < 24 * 60) {
       			html = "<div class=\"availableslot\"><a href="">" + me.formatString({ st: st, et: st + duration }, false, me.tz) + ((typeof cp_hourbk_cmpublic !== 'undefined') ? "<span class=\"ahb_slot_availability\"><span class=\"p\">ahbslotavailabilityP</span><span class=\"t\">ahbslotavailabilityT</span></span>" : "") + "</a></div>";
       			htmlSlots[htmlSlots.length] = { availableslot: true, st: st, serviceindex: s, h1: Math.floor((st) / 60), m1: ((st) % 60), h2: Math.floor((st + duration) / 60), m2: ((st + duration) % 60), html: html, t: $.datepicker.parseDate("yy-mm-dd", arr[i].day).getTime() + st * 60 * 1000 };
       			if (!me.bSlotsCheckbox)
       				st += me.bduration;
       			else
       				st += me.bduration + pa + pb;
       		}
       	}
   
       	htmlSlots.sort(function (a, b) {
       		return a.t - b.t;
       	});
   
       	var slotQty = {};
       	htmlSlots.filter(function (i) {
       		return !i.availableslot;
       	}).forEach(function (s) {
       		if (!slotQty.hasOwnProperty(s.t)) {
       			slotQty[s.t] = 0;
       		}
       		slotQty[s.t] += s.quantity;
       	});
   
       	htmlSlots.filter(function (i) {
       		return i.availableslot;
       	}).forEach(function (x) {
       		x.html = x.html.replace("ahbslotavailabilityP", (capacity_service - (slotQty[x.t] ?? 0)));
       	});
   
       	//remove duplicates
       	htmlSlots = htmlSlots.reduce(function (field, e1) {
       		var matches = field.filter(function (e2) { return e1.html == e2.html });
       		if (matches.length == 0) {
       			field.push(e1);
       		} return field;
       	}, []);
       	htmlSlots = htmlSlots.reduce(function (field, e1) {
       		var matches = field.filter(function (e2) { return e1.t == e2.t });
       		if (matches.length == 0) {
       			field.push(e1);
       		}
       		else {
       			for (var i = 0; i < field.length; i++)
       				if (field[i].t == e1.t && !field[i].availableslot && e1.availableslot) {
       					field[i] = e1;
       					break;
       				}
       		}
       		return field;
       	}, []);
       	me.usedSlots[d] = me.usedSlots[d] || [];
       	if (me.usedSlots[d].length > 0 && htmlSlots.length > 0)
       		for (var i = 0; i < me.usedSlots[d].length; i++)
       			for (var j = 0; j < htmlSlots.length; j++)
       				if (htmlSlots[j].serviceindex == me.usedSlots[d][i].serviceindex && htmlSlots[j].h1 == me.usedSlots[d][i].h1 && htmlSlots[j].m1 == me.usedSlots[d][i].m1 && htmlSlots[j].h2 == me.usedSlots[d][i].h2 && htmlSlots[j].m2 == me.usedSlots[d][i].m2) {
       					if (htmlSlots[j].html.indexOf("currentSelection") == -1) htmlSlots[j].html = htmlSlots[j].html.replace("htmlUsed", "htmlUsed currentSelection");
       					if (htmlSlots[j].html.indexOf("currentSelection") == -1) htmlSlots[j].html = htmlSlots[j].html.replace("availableslot", "availableslot currentSelection");
       				}
       	return htmlSlots;
       }
       ```
   
    -  This reply was modified 5 years ago by [ole1986](https://wordpress.org/support/users/ole1986/).
    -  This reply was modified 5 years ago by [t-p](https://wordpress.org/support/users/t-p/).
 *   Forum: [Reviews](https://wordpress.org/support/forum/reviews/)
    In reply to:
   [[Appointment Hour Booking - Booking Calendar] First impression looked good, but with real data full of bugs](https://wordpress.org/support/topic/first-impression-looked-good-but-with-real-data-full-of-bugs/)
 *  Thread Starter [ole1986](https://wordpress.org/support/users/ole1986/)
 * (@ole1986)
 * [5 years ago](https://wordpress.org/support/topic/first-impression-looked-good-but-with-real-data-full-of-bugs/#post-14389842)
 * Also, the paddings are not correctly visualized in the backend
    [See this image](https://ibb.co/gF4nzh1)
 * At least it is showing correctly at frontend.
    BUT AS already mentioned for some
   unknow reason and at some unknown time the slot times just become a fulle different
   from what the days actually planed for without booking some in meanwhile or reconfiguring
   things. It just appears wrong and ppl. book on the rong slot time
 *   Forum: [Reviews](https://wordpress.org/support/forum/reviews/)
    In reply to:
   [[Appointment Hour Booking - Booking Calendar] First impression looked good, but with real data full of bugs](https://wordpress.org/support/topic/first-impression-looked-good-but-with-real-data-full-of-bugs/)
 *  Thread Starter [ole1986](https://wordpress.org/support/users/ole1986/)
 * (@ole1986)
 * [5 years ago](https://wordpress.org/support/topic/first-impression-looked-good-but-with-real-data-full-of-bugs/#post-14388975)
 * **In addition to this the database and how the information are stores makes it
   difficult to extend the plugins since all relevant and important data are stored
   as php serialized data**
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Appointment Hour Booking - Booking Calendar] Getting “ahbslotavailabilityP” instead of the number for available slots](https://wordpress.org/support/topic/getting-ahbslotavailabilityp-instead-of-the-number-for-available-slots/)
 *  Thread Starter [ole1986](https://wordpress.org/support/users/ole1986/)
 * (@ole1986)
 * [5 years, 1 month ago](https://wordpress.org/support/topic/getting-ahbslotavailabilityp-instead-of-the-number-for-available-slots/#post-14318751)
 * In addition to this I have found out when I do the hacky thing of add the following
   JS into wp_head
 * `var cp_hourbk_cmpublic = true;`
 * it does display the number of available slots, BUT it does not decrease it correctly
   when “Show end time [help?]” flag is hooked
 * **UPDATE: Possible reason for the incorrect decrease of availability is the padding
   option. Noted this when choosing a “padding of 30 minutes after”**
    -  This reply was modified 5 years, 1 month ago by [ole1986](https://wordpress.org/support/users/ole1986/).
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[WP Time Slots Booking Form] WP Time Slots Extended / Notifications on Status change](https://wordpress.org/support/topic/wp-time-slots-extended-notifications-on-status-change/)
 *  Thread Starter [ole1986](https://wordpress.org/support/users/ole1986/)
 * (@ole1986)
 * [5 years, 1 month ago](https://wordpress.org/support/topic/wp-time-slots-extended-notifications-on-status-change/#post-14284660)
 * **UPDATE**
 * I just updated the plugin to support both plugins with version 1.0.2
 *  “WP Time Slots Booking Form” AND “Appointment Hour Booking”
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Appointment Hour Booking - Booking Calendar] Show used slots does not seem to work as expected](https://wordpress.org/support/topic/show-used-slots-does-not-seem-to-work-as-expected/)
 *  Thread Starter [ole1986](https://wordpress.org/support/users/ole1986/)
 * (@ole1986)
 * [5 years, 1 month ago](https://wordpress.org/support/topic/show-used-slots-does-not-seem-to-work-as-expected/#post-14281372)
 * Hi,
    thank you for your answer
 * I think its only a visual thing.
    Since I choose the last available slot, the
   selected time completely disappered. But once I submit the data and reopen the
   page, the “unused slots” are shown.
 * Unfortunately the used time does not seem show “available capacity” also (which
   should be zero than)
 * You can checkout my example page below:
    [https://test.cloud86.de/slot-buchung/](https://test.cloud86.de/slot-buchung/)
   with date “2021-04-07” and time “17:15 – 19:15”
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[WP Time Slots Booking Form] WP Time Slots Extended / Notifications on Status change](https://wordpress.org/support/topic/wp-time-slots-extended-notifications-on-status-change/)
 *  Thread Starter [ole1986](https://wordpress.org/support/users/ole1986/)
 * (@ole1986)
 * [5 years, 1 month ago](https://wordpress.org/support/topic/wp-time-slots-extended-notifications-on-status-change/#post-14281310)
 * Hi codepeople,
 * thank you. I have also noticed that.
    I think I can make it work for both in 
   future.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[WP Time Slots Booking Form] WP Time Slots Extended / Notifications on Status change](https://wordpress.org/support/topic/wp-time-slots-extended-notifications-on-status-change/)
 *  Thread Starter [ole1986](https://wordpress.org/support/users/ole1986/)
 * (@ole1986)
 * [5 years, 1 month ago](https://wordpress.org/support/topic/wp-time-slots-extended-notifications-on-status-change/#post-14279286)
 * Sorry, but I had to correct that the last changes on my given plugin “WP Time
   Slot Extended” are now focused on the other plugin made by you.
 * Since [https://de.wordpress.org/plugins/appointment-hour-booking/](https://de.wordpress.org/plugins/appointment-hour-booking/)
   is more famous I thought that makes more sense to do it for such plugin
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[WC Recurring Invoice] Several Updates needed to be usable](https://wordpress.org/support/topic/several-updates-needed-to-be-usable/)
 *  Plugin Author [ole1986](https://wordpress.org/support/users/ole1986/)
 * (@ole1986)
 * [6 years, 6 months ago](https://wordpress.org/support/topic/several-updates-needed-to-be-usable/#post-12143275)
 * Hi,
 * I am sorry for the delay. Best way to trigger an issue is on github.com
    [https://github.com/ole1986/wc-invoice-pdf](https://github.com/ole1986/wc-invoice-pdf).
 * To quickly answer your questions:
 * – Vat is not correct – This could be. I will double check the settings to fetch
   properly from the VAT database used in Woocomerce. [https://github.com/ole1986/wc-invoice-pdf/issues/12](https://github.com/ole1986/wc-invoice-pdf/issues/12)
 * – Legally complient compability (extra fields) – Please raise an issue on the
   above mentioned github project page
 * – Logo image size – You can either try to change dimension of the image to better
   fit your needs your raise a issue on the github project page.
 * – The date is being displayed in US – This issue has been fixed in version 1.5.1
 * – Two addresses – Please again raise this as an issue on the project page
 * Thank you for reporting. And again sorry for the delay. But as already mentioned
   in the first post only github.com project issue get higher attention.
 * Regards
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[WP-ISPConfig 3] Email Confirmation](https://wordpress.org/support/topic/email-confirmation-20/)
 *  Plugin Author [ole1986](https://wordpress.org/support/users/ole1986/)
 * (@ole1986)
 * [7 years, 3 months ago](https://wordpress.org/support/topic/email-confirmation-20/#post-11213715)
 * Thank you very much for your reply.
 * It really sounds like you had the chance to customize several things related 
   to this plug-in.
 * What if you take part of this project on GitHub.com?
 * I can also add you as contributor, so you can change the code directly and we
   can deploy new versions quicker.
 * I do have many other projects and would be happy about having another developer
   in my team.
 * PS: if you have code related issues I prefer to have such requests on GitHub 
   instead: [https://github.com/ole1986/wp-ispconfig3/issues](https://github.com/ole1986/wp-ispconfig3/issues)
 * PPS: I fully agree with the change from mail to wp_mail especially for security
   reasons.
 * Regards
    Ole
 *   Forum: [Reviews](https://wordpress.org/support/forum/reviews/)
    In reply to:
   [[WP-ISPConfig 3] Activation of WP-ISPCONFIG](https://wordpress.org/support/topic/activation-of-wp-ispconfig/)
 *  Plugin Author [ole1986](https://wordpress.org/support/users/ole1986/)
 * (@ole1986)
 * [7 years, 4 months ago](https://wordpress.org/support/topic/activation-of-wp-ispconfig/#post-11059467)
 * Hi ipstream,
 * Can you please provide me with some more details about your environment?
 * * PHP version
    * wp_ispconfig3 version (just to be sure) * woocommerce version
 * Thank you in advanced
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Posts From Category] [FEATURE REQUEST] Show hidden categories / hierachically](https://wordpress.org/support/topic/feature-request-652/)
 *  Thread Starter [ole1986](https://wordpress.org/support/users/ole1986/)
 * (@ole1986)
 * [7 years, 7 months ago](https://wordpress.org/support/topic/feature-request-652/#post-10801385)
 * Hi, I am just asking for the status again?!

Viewing 15 replies - 1 through 15 (of 55 total)

1 [2](https://wordpress.org/support/users/ole1986/replies/page/2/?output_format=md)
[3](https://wordpress.org/support/users/ole1986/replies/page/3/?output_format=md)
[4](https://wordpress.org/support/users/ole1986/replies/page/4/?output_format=md)
[→](https://wordpress.org/support/users/ole1986/replies/page/2/?output_format=md)