Comments (60)
no worries the PDO wrapper is a package that is installed by composer so to install you open the project in terminal/command line and then type composer install
this will then generate the vendor folder and the autoloader.
from dcblogcomments.
Nevermind my question, adding it to the calander as I did is correct.
I needed to include the locales file to the page :(
from dcblogcomments.
Nevermind, @dcblogdev. I solved it another way!
from dcblogcomments.
Hi @dcblogdev, i wanna ask if it's possible make the week view as default view, 'cause I try to make a binnacle per week, so only I need that, if it's possible and u wanna help I'll be very grateful.
Thanks a lot!
from dcblogcomments.
Hi @dcblogdev, i wanna ask if it's possible make the week view as default view, 'cause I try to make a binnacle per week, so only I need that, if it's possible and u wanna help I'll be very grateful.
Thanks a lot!
Yes you can add a default view to the javascript:
defaultView: 'dayGridWeek',
More details https://fullcalendar.io/docs/v4/defaultView
from dcblogcomments.
@dcblogdev thanks a lot! it was the answer, you're amazing dude!.
greetings from Mexico!
from dcblogcomments.
Nevermind, fixed it already. You're the best dcblogdev!
from dcblogcomments.
I found.
For me in french:
- in index.php : insert <script src='packages/core/locales/fr.js'></script> juste before <script src='calendar.js'></script>
- in calendar.js : insert locale: 'fr', juste before plugins:
from dcblogcomments.
ref -
https://github.com/pipiscrew/fullcalendar-php-example
from dcblogcomments.
?
from dcblogcomments.
same components on older version, I post as reply to your blog, didnt know that will come here.. please proceed w/ close..
from dcblogcomments.
you're is using an older version so I don't understand why just post a link and nothing else?
yours is using version v3 mine is version v4.4 the underlining API is different what used to work no longer works with the new version. That was why I wrote this tutorial.
from dcblogcomments.
Dear dcblogdev,
I would like to ask a question about 'How can i use pgsql instead of Mysql in your demo tutorial?'
Thanks for teaching me, and i look forward to hearing from you.
from dcblogcomments.
Sorry for my poor English and...ignorance! I do not know wath is PDO Wrapper...I have search into many blog but I do not understand the way to install the package.I've copyed all files to my server, configure the sql access, but have the error unable locate vendor/autoload.php. Pls can you give me the complete folder or show me the way to install?thank's in adavance. Mario
from dcblogcomments.
Dear dcblogdev,
I would like to ask a question about 'How can i use pgsql instead of Mysql in your demo tutorial?'Thanks for teaching me, and i look forward to hearing from you.
Have you tried settings passing pssql to the connection ie:
use Dcblogdev\PdoWrapper\Database;
// make a connection to mysql here
$options = [
//required
'username' => '',
'database' => '',
//optional
'password' => '',
'type' => 'pssql',
'charset' => 'utf8',
'host' => 'localhost',
'port' => '3309'
];
$db = new Database($options);
from dcblogcomments.
dcblogdev thank you. Solved :I've installed xampp and download composer. It was a little hard for me, due my poor experience in these operation.
first question : when I create an event, the TIME dropdown menu is visible only on click.I can't select the time but I can edit in time box.
second question : is it possible disable the ADD and DELETE command to prevent accidental or unauthorized edit ? es: the index.pxp is used by the administrator and a similar file, but without tje ADD and DELETE button (es user.php) is user by the user only to display calendar and event (without login or similar...only different file). Thank's in advance
Mario
from dcblogcomments.
sorry again...is possible change languages?
from dcblogcomments.
-
The time is populated by the dropdown it can't be written on the popup this is a limitation of the https://trentrichardson.com/examples/timepicker/ plugin.
-
you could edit the buttons and modals inside index.php based on the role but that's outside the scope of this demo.
-
not currently there is no localisation built in
from dcblogcomments.
OK, Thank's again! Have a nice day!
Mario
from dcblogcomments.
Hi thank you for your work.
Is it possible to evitate the composer step and have already the file ready?
from dcblogcomments.
I highly recommend using composer, it handles the autoloading of classes you would avoid this by downloading the PDO wrapper from https://github.com/dcblogdev/pdo-wrapper/blob/master/src/Database.php and include the file in config.php manually using a require() call.
from dcblogcomments.
i'ask because on server i'v no access to terminal to run composer (or maybe i dont know how to do it..)
from dcblogcomments.
You could run composer locally then FTP the files up, I think you can do the above steps either way as composer is used for autoloading the database class.
from dcblogcomments.
thank you i did it and worked!, is it possible to add resources too? (for example name of persons to have the planning\shift?) so everyday have more column for persons on calendar that can have events
from dcblogcomments.
hey dcblogdev, i wanna ask, why the end date always the same with start date when making new event ?, is there a way to fix the problem ??
from dcblogcomments.
hi, i wanna ask is there an option to make the event end to duration, the duration will determine how the event end date, hours, and minute
from dcblogcomments.
Hi! Thank you for the most useful tutorial. Is there a room for a request? The same calendar but with admin panel and member panel with login and registration page? Thank you in advance and keep up the good work! :)
from dcblogcomments.
hey dcblogdev, i wanna ask, why the end date always the same with start date when making new event ?, is there a way to fix the problem ??
you've found a mistake I've corrected it now by going into /api/insert.php and changing line 10. I've made this change in the repo now.
from dcblogcomments.
Hi! Thank you for the most useful tutorial. Is there a room for a request? The same calendar but with admin panel and member panel with login and registration page? Thank you in advance and keep up the good work! :)
thanks @plazast, unfortunately, that's a fair amount of work and is outside the scope of this tutorial/demo.
If I was to go to that length I would restructure the project a fair bit and use a framework like Laravel to do the authentication and then bring in the calendar that shows for people based on their user level.
If you want to have a go with something a little easier then I have a login tutorial that you may find useful https://dcblog.dev/login-and-registration-system-with-php
from dcblogcomments.
Hi! Thank you for the tutorial, it works perfectly in my wamp server, but on my remote server the events calendar are not showing, any ideas ?
from dcblogcomments.
hi!
good job, i need export excel, do you know how this is possible ?
from dcblogcomments.
hi dcblogdev, Thank you for this wonderful code!
I managed to install the package and included it as an iframe inside Nubuilder.
However the events appear with a 12a inside it.
May I know how to change that?
Ernest
from dcblogcomments.
Ahhh... I realized what 12a is. it's 12am. okok
from dcblogcomments.
Hi there, if I wanted to add more fields, and filter the events by those fields, how do I do this?
from dcblogcomments.
you can add more fields to the add/edit models inside index.php and update the /api files.
The api/load.php file is used to load the events, you can alter that page. If you want to use query params then you will likely need to alter this line on calendar.js
events: url+'api/load.php',
You may want to move the contents of calendar.js into index.php then you can use PHP to alter the URL passed on conditions.
from dcblogcomments.
@medbounas did you solve your issue?
from dcblogcomments.
hi!
good job, i need export excel, do you know how this is possible ?
Ho @edgrod01 yes here's what you can do:
edit index.php add an export link:
<a href="export.php" class="btn btn-primary">Export to CSV</a>
Create export.php:
<?php require('config.php');
/**
* CSV export
* @param array $records array of records
* @param string $filename name of the file including .csv
* @param array $headerFields array of column names
* @param string $delimiter set the delimiter
* @return download csv file
*/
function export(array $records, string $filename, array $headerFields = [], string $delimiter = ',')
{
//set headers to download file rather than displayed
header('Content-Type: text/csv');
header('Content-Disposition: attachment; filename="'.$filename.'";');
//open output
$f = fopen('php://output', 'w');
//check for header fields
if (!empty($headerFields)) {
//set column headers
fputcsv($f, $headerFields, $delimiter);
}
foreach($records as $row) {
//output each row of the data,
fputcsv($f, array_values($row), $delimiter);
}
}
//set filename
$filename = 'events.csv';
//set column names
$headerFields = ['id', 'title', 'start', 'end', 'backgroundColor', 'textColor'];
//create array
$records = [];
//loop through data and add to array
$result = $db->select("* FROM events ORDER BY id");
foreach($result as $row) {
$records[] = [
$row->id,
$row->title,
$row->start_event,
$row->end_event,
$row->color,
$row->text_color
];
}
//send params to csv
export($records, $filename, $headerFields);
This will export all events in the database.
from dcblogcomments.
@dcblogdev
Thank you for your work. I have implemented it with success on a project of mine. I've made a page that shows the detalis (lots of!) for each event. What should I do to add a button on the modal form to simply open said page with the event id as a querystring? Thanks in advance! :-)
from dcblogcomments.
Hello, could you allso explain how I can chenge the locale to dutch?
I have tried adding it to "calendar" in calendar.js, but I think I did something wrong:
var calendar = new FullCalendar.Calendar(calendarEl, {
locale: 'nl',
plugins: ['interaction', 'dayGrid', 'timeGrid', 'list'],
.....
....
Thanks
from dcblogcomments.
I have Insert More details in my SQL Database using this project. but do not know how to display more parameters on calendar. can you please guide.
from dcblogcomments.
is it possible to use oracle database?
from dcblogcomments.
is it possible to use oracle database?
PDO supports oracle so yes I believe so
$connect = new PDO('oci:dbname=//localhost:1521/xe/ORCL, 'username', 'password');
from dcblogcomments.
thanks a lot! may I ask again, can I use mysqli instead of pdo ??
from dcblogcomments.
thanks a lot! may I ask again, can I use mysqli instead of pdo ??
Yes you would just need to change the config file and the php files in the api folder if I remember correctly
from dcblogcomments.
Good evening
I work on the project
jquery-fullcalender-with-php-and-mysql
When I execute the command I always get this error:
C:\wamp64\www\agenda>composer install
'composer' is not recognized as an internal order
or external, an executable program or a batch file.
I am under wampserver
Could you give me a solution
Thank you again for your work
Stéphane(belgium)
from dcblogcomments.
this means you don't have composer installed, Composer is used to install dependencies you can install composer from their website https://getcomposer.org/
from dcblogcomments.
I uploaded files from git and i get the calendaer and add event button but when i save it doesnt do anything ?? changed config to connect to db already. any ideas ?
from dcblogcomments.
Hello ,
I'm trying to add users like this:
Friday 02/12
user1 | user2
7am |
8am |
What parameters should I use to add users?
How to adapt the json data?
I can't find any information about this problem
thank you in advance
Stephane
from dcblogcomments.
Hi,
I'm not able to connect to DB using below from config.php:
$db = Database::get($username, $password, $database, $host);
I have other projects in the same server where I use below to connect to DB, which works fine.
$db = new mysqli($host, $username, $password, $database);
Request you to please tell me if there is any alternative for "Database::get".
from dcblogcomments.
Database::get uses PDO, so PDO should be available on your server otherwise you can use your mysqli implementation and adjust the API PHP files to use mysqli calls instead
from dcblogcomments.
Hello,
Could you tell me how change the langage ?
I have tried to add <script src='packages/core/locales-all.js'></script> in the index.php but it does not work for me.
REGARDS.
from dcblogcomments.
Is it possible to open addeventmodal when the user clic on a date (not on a event) ?
If yes could you tell me how to do ?
REAGARDS.
from dcblogcomments.
Hello dcblogdev,
Sorry for my poor english.
Thank you for this example and It works fine.
I've solde my problem "How to add event when the user click on a date". Thanks a lot.
But I found a problem.
- If you click on an existing event and click on DELETE you have a message (Are you sure you want to remove IT). It's perfect and I click on NO (not delete).
- if you open a other existing event, click on delete, you have the message again (Are you sure to remove it). It's normal. If I click on NO the message (are you sure to remove it) come again. So twice.
- If I open an other existing event and I made the same process, the message appears thrice. and so on...
How can I resolve this issue ?
REGARDS.
from dcblogcomments.
Hi David,
thanks a lot for this powerfull code.
I can't add some option like this
nowIndicator: true,
height: '100%',
Regarding core file , your code running with Fullcalendar v4.4.0.
I don't understand my mistake.
If you have an idea .
Best regard
from dcblogcomments.
Hi,
Thankyou for this amazing sharing !
I have a problem when I change the name of the table "events" (I do change the name everywhere (that I know of) in the ISQL requests). For instance, on the "load php" file, the events appear normally and are fine but when I click on it, the modal "Edit" does not appear. Do I have to change the table name somewhere else to make the modal appear ?
Thankyou so much for your help.
Best regards,
Pierre
from dcblogcomments.
Thank you for this tutorial. I am currently exploring it, I've tried adding some fields in my database, however I am lost on the part of showing this field in the modal pop out during event click.
I did tried adding the column in calendar.js and also updated the id and name on the index.php but still the result from the database is not showing.
Hoping for your response.
Thank you very much.
Regards.
from dcblogcomments.
hi, thank you for the tutorial.. i'm trying to add an icon before the time event row but if i try to use eventcontent: nothing happen... someone have idea how to do?
from dcblogcomments.
sorry i can't editate my previous message, the problem is that override all the event text even the fc-event-time but i'm trying to put just a circle before that time...
from dcblogcomments.
Great piece of coding my friend! Thank you for that. There is a small bug with the delete function. If you open a dialog to edit an event, then close it, then open another one and delete it, both will get deleted. But it works just great!! I solved that little problem by sending another variable to the delete.php ajax, which worked great. Thanks again, it helped me a lot learning how to develop a nice calendar myself!
from dcblogcomments.
Hi,
The source code of the config.php in GitHub has this line:
$db = new Database($options);
When I code with this line,
I can run the index.php but
there is no reaction when I add an event after I've input all the event info.
The same line of the config.php in this page is different from it:
$db = Database::get($username, $password, $database, $host);
When I code with this line,
I even can't run the index.php page.
And I can't add any event in the calendar right now.
Hope to know if I got any mistakes.
Regards.
from dcblogcomments.
Related Issues (20)
- stop-bootstrap-drop-menus-being-cut-off-in-responsive-tables HOT 1
- create-an-rss-feed-with-php HOT 2
- switching-between-php-versions-with-homebrew HOT 8
- duplicate-form-sections-with-jquery HOT 1
- integrate-elfinder-21-with-ckeditor-4 HOT 3
- setting-up-development-environment-on-ubuntu HOT 2
- creating-an-image-gallery-from-a-folder-of-images-automatically HOT 2
- send-emails-with-office-365-smtp HOT 1
- build-a-dropbox-file-manager-in-laravel-part-1-setup-and-folder-listings HOT 2
- securing-elfinder-with-a-login-page HOT 2
- my-favourite-vs-code-extensions HOT 2
- convert-mobile-number-to-international-format-dynamically-with-php HOT 1
- laravel-security-headers
- integrate-laravel-with-xero
- integrate-laravel-with-xero HOT 1
- format-xero-dates-from-the-api
- show-all-mysql-databases-and-tables
- using-laravel-sail-alongside-phpstorm HOT 1
- cpanel-create-emails-with-php HOT 1
- delete-folders-from-server-using-php HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from dcblogcomments.