tnomi
Forum Replies Created
-
Forum: Plugins
In reply to: [Online Lesson Booking] 'Parameter is insufficient'Hello,
Thank you for trying my plug-in.I do not see the option ‘open’ but just a ‘-‘.
First , the “Teacher” user must edit their schedule .
“Scheduler” page:
https://olbsys.com/en/setup/special-pages/#edit_scheduleHis schedule is displayed as “Open” on the following pages .
1) “Daily schedule” page:
https://olbsys.com/en/setup/teachers/#daily_schedule2) “Weekly schedule” on the post “Teacher information”:
https://olbsys.com/en/setup/teachers/#teacher_profile_page“Reservation” page is accessed with the URL parameter from links (“Open”) in these pages .
when I go to the ‘reservation’ page as a logged in member, I get the error saying ‘Parameter is insuffcient’.
“Reservation” page should not be accessed directly.
Because parameter will be insufficient.Forum: Plugins
In reply to: [Online Lesson Booking] Parameter is insufficient.Version 0.7.5 was released.
Forum: Plugins
In reply to: [Online Lesson Booking] Parameter is insufficient.Thank you for your feedback.
I will correct it in the next version.Forum: Plugins
In reply to: [Attendance Manager] Question see total wokring hours a daySorry. No can do.
Forum: Plugins
In reply to: [Attendance Manager] Question see total wokring hours a dayInsert this script into the “<head>” of your theme.
Or , you may insert it into the page there is a short code “[attmgr_weekly_all]”.
For example,<script> ... </script> [attmgr_weekly_all]
Forum: Plugins
In reply to: [Attendance Manager] Question see total wokring hours a daySorry. No can do.
Forum: Plugins
In reply to: [Attendance Manager] Question see total wokring hours a dayTry to insert the following code to the “<head>” of your theme.
<script> jQuery( document ).ready( function($) { $('table.attmgr_weekly_all td.working').each( function(){ var work = $( this ).text().split(' ~ '); var start = work[0].split(':'); var end = work[1].split(':'); var stime = Number(start[0])*60 + Number(start[1]); var etime = Number(end[0])*60 + Number(end[1]); var total = ( etime - stime )/60; $( this ).append('<br>'+total.toFixed(1)+' hours'); }) }) </script>
Forum: Plugins
In reply to: [Attendance Manager] How to add usersI’m sorry.
“backticks” was included in the cord.
It was corrected.... $query = "INSERT INTO $table " ."( staff_id, date, starttime, endtime ) " ...
Forum: Plugins
In reply to: [Attendance Manager] How to add users1. Your plugin already has a function/database for scheduling service?
Nothing.
2. You have a plan to add that service in this plugin near future?
I haven’t thought about that yet.
3. You have any advice about the service I am looking for?
May the following cord be useful for anything?
This code is the way to insert the schedule in a lump into DB.Insert this cord in “functions.php” of the theme you use.
Maybe this function does not always have to be used.
If you don’t update the schedule, do comment out this “add_action()”.add_action( 'init', 'set_pre_defined_schedule' ); function set_pre_defined_schedule() { global $wpdb; $pre_defined_schedule = array( // staff_id => array( // 'date starttime endtime', // 'date', <- If 'starttime' and 'endtime' were omitted, it will be deleted. // ... // ), 2 => array( '2015-12-19 08:30 17:30', '2015-12-20', // It will be deleted. ), 3 => array( '2015-12-19 09:00 14:00', '2015-12-20 14:00 20:00', ) ); $table = apply_filters( 'attmgr_schedule_table_name', $table ); $query = "INSERT INTO $table " ."( <code>staff_id</code>, <code>date</code>, <code>starttime</code>, <code>endtime</code> ) " ."VALUES " ."%VALUES% " ."ON DUPLICATE KEY UPDATE " ."starttime = VALUES( starttime ), endtime = VALUES( endtime ) "; foreach ( $pre_defined_schedule as $staff_id => $schedule ) { $values = array(); foreach ( $schedule as $string ) { list( $date, $starttime, $endtime ) = explode( ' ', $string ); if ( empty( $starttime ) || empty( $endtime ) ) { $ret = $wpdb->query( $wpdb->prepare( "DELETE FROM $table WHERE staff_id=%d AND date=%s", array( $staff_id, $date ) ) ); } else { $values[] = $wpdb->prepare( "( %d, %s, %s, %s )", array( $staff_id, $date, $starttime, $endtime ) ); } } $sql = str_replace( '%VALUES%', implode( ',', $values ), $query ); $ret = $wpdb->query( $sql ); } }
Forum: Plugins
In reply to: [Attendance Manager] How to add usersIs it possible for me to add such functions without DB modification?
“without DB modification”…?
I am not good at English.
Does it mean that “without inserting schedule data into DB” ?Or, “without changing the structure of DB”, the way to insert the pre-defined schedule in a lump into DB?
Forum: Plugins
In reply to: [Attendance Manager] Multisite (network) supportThank you, too.
Forum: Plugins
In reply to: [Attendance Manager] Multisite (network) supportOkay.
I would add a filter hook “attmgr_schedule_table_name” in the next version.
When it is so, you can rewrite that in “functions.php” of the theme you use.
For example,if ( class_exists( 'ATTMGR' ) ) { remove_filter( 'attmgr_schedule_table_name', array( 'ATTMGR_Activation', 'schedule_table' ) ); add_filter( 'attmgr_schedule_table_name', 'your_schedule_table' ); } function your_schedule_table( $table ) { global $wpdb; return $wpdb->base_prefix.'attmgr_schedule'; }
And, I would not change a short cord “[attmgr_weekly]”.
Because you can rewrite that freely.
For example,remove_shortcode( 'attmgr_weekly', array( 'ATTMGR_Shortcode', 'weekly' ) ); add_shortcode( 'attmgr_weekly', 'your_weekly' ); function your_weekly( ... ) { ... }
And, I would not also change a function “save_staff_url”.
Because you can also rewrite that freely.
For example,remove_action( 'publish_post', array( 'ATTMGR_User', 'save_staff_url' ) ); add_action( 'publish_post', 'your_save_staff_url' ); function your_save_staff_url( $post_id ){ ... }
By the way,
It will be almost impossible for me to follow your updates if I will need to add this code each time. There are too many places.
Should not you fork this plugin for your purpose?
My update would not be always able to please you.Forum: Plugins
In reply to: [Attendance Manager] Multisite (network) support* There are individual staff each site.
In that cace, I did the following procedure.
- Add a 2nd site.
- Copy a table “wp_attmgr_schedule” as “wp_2_attmgr_schedule”.
SQL:
CREATE TABLE wp_2_attmgr_schedule LIKE wp_attmgr_schedule;
- Export the “pages” of main site. (“Tools > Export > pages”)
* daily
* weekly
* monthly
* staff_scheduler
* admin_scheduler - Import these “pages” into 2nd site.
- Add new user to 2nd site.
- Add new post to for that user.
(Insert a short code [attmgr_weekly id=”xx”] to that post.) - Edit the schedule of that user.
Forum: Plugins
In reply to: [Attendance Manager] Multisite (network) supportYour solution is wonderful !
A person with the same needs in the multisite should refer to this topic.* One common schedule
* Different pages for same USERThat seems similar to “Pre-Domain Mode (uses https://en.yoursite.com)” of a “qTranslate X” plug-in in the single site which is not a multisite.
* There are individual staff each site.
I feel the multisite may be suitable in that case.
By the way, I don’t hope that “Attendance Manager” is being equipped with everything.
I hope that it is customized originally according to the respective needs.
Just like your original solution.But I feel that your idea about the “name” attribute in [attmgr_weekly] is good.
I will think about that.Thank you!
Forum: Plugins
In reply to: [Attendance Manager] Layout of dateThank you very much!
Please send to me your translation.https://olbsys.com/contact/
You can attach a file temporarily.