Git Product home page Git Product logo

Comments (60)

dcblogdev avatar dcblogdev commented on July 28, 2024 1

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.

mistert209 avatar mistert209 commented on July 28, 2024 1

Nevermind my question, adding it to the calander as I did is correct.
I needed to include the locales file to the page :(

<script src='packages/core/locales-all.js'></script>

from dcblogcomments.

papyana avatar papyana commented on July 28, 2024 1

Nevermind, @dcblogdev. I solved it another way!

from dcblogcomments.

AlexisBalderas27 avatar AlexisBalderas27 commented on July 28, 2024 1

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.

dcblogdev avatar dcblogdev commented on July 28, 2024 1

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.

AlexisBalderas27 avatar AlexisBalderas27 commented on July 28, 2024 1

@dcblogdev thanks a lot! it was the answer, you're amazing dude!.

greetings from Mexico!

from dcblogcomments.

zenemy avatar zenemy commented on July 28, 2024 1

Nevermind, fixed it already. You're the best dcblogdev!

from dcblogcomments.

dandrimontp avatar dandrimontp commented on July 28, 2024 1

I found.
For me in french:

  1. in index.php : insert <script src='packages/core/locales/fr.js'></script> juste before <script src='calendar.js'></script>
  2. in calendar.js : insert locale: 'fr', juste before plugins:

from dcblogcomments.

pipiscrew avatar pipiscrew commented on July 28, 2024

ref -
https://github.com/pipiscrew/fullcalendar-php-example

from dcblogcomments.

dcblogdev avatar dcblogdev commented on July 28, 2024

?

from dcblogcomments.

pipiscrew avatar pipiscrew commented on July 28, 2024

same components on older version, I post as reply to your blog, didnt know that will come here.. please proceed w/ close..

from dcblogcomments.

dcblogdev avatar dcblogdev commented on July 28, 2024

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.

917364825 avatar 917364825 commented on July 28, 2024

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.

iz1kbp avatar iz1kbp commented on July 28, 2024

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.

dcblogdev avatar dcblogdev commented on July 28, 2024

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.

iz1kbp avatar iz1kbp commented on July 28, 2024

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.

iz1kbp avatar iz1kbp commented on July 28, 2024

sorry again...is possible change languages?

from dcblogcomments.

dcblogdev avatar dcblogdev commented on July 28, 2024
  1. 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.

  2. you could edit the buttons and modals inside index.php based on the role but that's outside the scope of this demo.

  3. not currently there is no localisation built in

from dcblogcomments.

iz1kbp avatar iz1kbp commented on July 28, 2024

OK, Thank's again! Have a nice day!
Mario

from dcblogcomments.

dillo83 avatar dillo83 commented on July 28, 2024

Hi thank you for your work.
Is it possible to evitate the composer step and have already the file ready?

from dcblogcomments.

dcblogdev avatar dcblogdev commented on July 28, 2024

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.

dillo83 avatar dillo83 commented on July 28, 2024

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.

dcblogdev avatar dcblogdev commented on July 28, 2024

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.

dillo83 avatar dillo83 commented on July 28, 2024

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.

jjjjjjiy avatar jjjjjjiy commented on July 28, 2024

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.

jjjjjjiy avatar jjjjjjiy commented on July 28, 2024

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.

 avatar commented on July 28, 2024

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.

dcblogdev avatar dcblogdev commented on July 28, 2024

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.

dcblogdev avatar dcblogdev commented on July 28, 2024

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.

medbounas avatar medbounas commented on July 28, 2024

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.

edgrod01 avatar edgrod01 commented on July 28, 2024

hi!
good job, i need export excel, do you know how this is possible ?

from dcblogcomments.

ernesttan1976 avatar ernesttan1976 commented on July 28, 2024

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.

ernesttan1976 avatar ernesttan1976 commented on July 28, 2024

Ahhh... I realized what 12a is. it's 12am. okok

from dcblogcomments.

ernesttan1976 avatar ernesttan1976 commented on July 28, 2024

Hi there, if I wanted to add more fields, and filter the events by those fields, how do I do this?

from dcblogcomments.

dcblogdev avatar dcblogdev commented on July 28, 2024

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.

dcblogdev avatar dcblogdev commented on July 28, 2024

@medbounas did you solve your issue?

from dcblogcomments.

dcblogdev avatar dcblogdev commented on July 28, 2024

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.

papyana avatar papyana commented on July 28, 2024

@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.

mistert209 avatar mistert209 commented on July 28, 2024

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.

MBilal5494 avatar MBilal5494 commented on July 28, 2024

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.

zenemy avatar zenemy commented on July 28, 2024

is it possible to use oracle database?

from dcblogcomments.

dcblogdev avatar dcblogdev commented on July 28, 2024

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.

zenemy avatar zenemy commented on July 28, 2024

thanks a lot! may I ask again, can I use mysqli instead of pdo ??

from dcblogcomments.

dcblogdev avatar dcblogdev commented on July 28, 2024

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.

locationweb avatar locationweb commented on July 28, 2024

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.

dcblogdev avatar dcblogdev commented on July 28, 2024

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.

isfun42ofus avatar isfun42ofus commented on July 28, 2024

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.

svan1812 avatar svan1812 commented on July 28, 2024

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.

SourabhKanth avatar SourabhKanth commented on July 28, 2024

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.

dcblogdev avatar dcblogdev commented on July 28, 2024

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.

dandrimontp avatar dandrimontp commented on July 28, 2024

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.

dandrimontp avatar dandrimontp commented on July 28, 2024

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.

dandrimontp avatar dandrimontp commented on July 28, 2024

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.

  1. 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).
  2. 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.
  3. 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.

cbernard2b avatar cbernard2b commented on July 28, 2024

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.

armure94 avatar armure94 commented on July 28, 2024

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.

userblocked avatar userblocked commented on July 28, 2024

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.

dillo83 avatar dillo83 commented on July 28, 2024

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.

dillo83 avatar dillo83 commented on July 28, 2024

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.

danogg avatar danogg commented on July 28, 2024

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.

dancingrock avatar dancingrock commented on July 28, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.