• How do I edit calendars once I add them

    Question: 
    I noticed the guest calendar on my own 🙂 However, none of my calendars that I set as Public show up there. Am I doing something wrong?

    Answer:
    The reason is that the events are set to Private by default when created. Public calendar allows users to view the calendar without login. But each individual events also have the option to be private or public. 

  • What are the options for integrating into an existing website

    Please take a look at the calendar.php, make changes to that file to fit into your current system.

    The user login can be changed in the database directly inside pec_users table. 

  • Errors – Strict Standards: date() and timezone settings

    Question:

    We installed PHP event calendar a few days ago and all was fine. Now we have lots of errors 
    Strict Standards: date(): It is not safe to rely on the system’s timezone settings…..

    Solution:
    Did you update the PHP version recently?  Please Set a value to date.timezone in your php.ini

    http://php.net/manual/en/datetime.configuration.php#ini.date.timezone

  • Access denied for “root@localhost”

    Make sure the login info in conf.php is correct. See http://phpeventcalendar.com/docs/installation/ for more information. 

  • Is there any way to have individual logins so that each user can manage their own calendar only?

    Question:
    Hi, is there any way to have individual logins so that each user can manage their own calendar only? I have a group of 50 calendars but I need them to only manage their own only with a super admin available to manage them all.

    Solution:
    Here’s the SQL query to insert new user into the calendar database table ‘pec_users‘ with user role as “user“.

    You would need to simply replace with some real user data. The password can be encode here.

    INSERT INTO pec_users
    (access_key, activated, admin_id, role, first_name, last_name, active_calendar_id, company, username, password, email, timezone, language, theme, kbd_shortcuts, created_on, updated_on)
    VALUES
    (NULL, 1, NULL, ‘user’, ‘Joe’, ‘Blow’, ‘0’, ‘Rand Corp’, ‘joeblow’, md5(‘123456’), ‘joeblow@example.com’, ‘+6’, ‘English’, ‘default’, 1, NOW(), NOW());

    <br>

    Users will only see their own calendars.

  • Admin user cannot add events to the other users calendars

    Question:
    When I have multiple users, I can view the other users calendars with an admin user. But I can’t use the admin user to add events to other users calendars. How can I change this behavior so that the admin user can add events to the other users calendars.

    Solution:
    In file ‘/server/html/event-create.html.php‘, there are three load options to choose from

    LOAD_ALL_CALENDARS

    LOAD_MY_CALENDARS

    LOAD_USER_CALENDARS

    Change the load option to 

    LOAD_MY_CALENDARS

  • I keep having the error “Something went wrong, please try again later”.

    When you have errors similar to the following

    Warning: C_Calendar::loadAllCalendars(): It is not safe to rely on the system’s timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. 

    It’s likely that the system timezone isn’t enabled.

    Here’s an instruction how to set the timezone in php.ini in cPanel. If you don’t have cPanel, you can always open in any text editor and edit then save.

    Always remember to restart web server after edit php.ini.

  • The admin I can only see the calendars I created. The other admin can’t see my calendars.

    Problem:

    The admin I can only see the calendars I created. The other admin can’t see my calendars etc. The Users can create calendars, but I don’t want them too.

    Solution:

    All calendars are private by default unless they are made public.

    For other users to view the calendar only, send you the public calendar link. Calendars must be made to the public. 


  • How to change calendar language

    In Calendar Settings, select a language and click save.

    If you don’t see the language you need, please send us an email info (at) phpeventcalendar.com and request a new language pack for free!


    Older PHP Event Calendar

    Depending on the versions, especially older calendar versions, you may need to manually update a few more files under server/html directory may require some search and replace such as “Close” and “Calendar” and other minor text.

    See the screenshot below:



  • Warning after cron job execution “Notice: Undefined index: HTTP_HOST in pec.php…”

    $_SERVER[‘HTTP_HOST‘] only exist when visit calendar via web page, so if you are trying to run cron jobs for event reminders, you will be using PHP CLI. If you getting the following warning

    Warning after cron job execution “Notice: Undefined index: HTTP_HOST in pec.php…”

    you will need to set the HTTP_HOST manually to point to your domain in pec.php

    if ( defined( 'WP_CLI' ) && WP_CLI ) {
    $_SERVER['HTTP_HOST'] = 'yourdomain.com';
    }
  • How to change the time-picker Interval?

    It’s currently hard coded. You can change it in  event_create.html.php, and Modify the DIV that has the id 

    time-panel-start
  • Calendar Auto Login (by pass login)

    Though it is not recommended,  you can log in as an admin or a user automatically without entering credential in the login form by setting a default login credential in the following file. 

    server/ajax/user_manager.php

    The user authentication is handled in the class 

    C_User
    .

    Also see

  • Google Map Settings and Display

    The map demo can be seen in the guest calendar (click Public Calendar on the login page)

    It should take you to http://www.quickproductdemo.com/phpeventcal/guest.php. Click an event that has an address.

    Our free Google Map API often exceeds the free daily limit allowed by Google, so you might or might not see the map. Here’s how it should look like.

    The API can be entered in the Settings Window after logged in as an admin.

  • Change the admin password of admin?

    Generate a new password here and then update the password field in pec_users table. It is recommended to use a password that is at least 16 characters in length.

  • Setup event reminder via email or in popup window

    When displaying ‘pop-up’ reminder window, keep in mind the pop-up work only when the calendar is the currently active tab. 

    For the built-in email reminder that sends emails reminders (cron job required). See https://phpeventcalendar.com/docs/event-emailpopup-reminder/

    To setup cron job, it is recommended to use cPanel Cron Job tool. See https://kb.iweb.com/hc/en-us/articles/230244168-Setting-up-cron-jobs-with-cPanel-. This tool is always included in host provider that uses cPanel.

    When use PHPMailer, you are required set up an SMTP server in order to send out emails. See https://github.com/PHPMailer/PHPMailer

  • Where can I find the procedure/guidelines

    The installation procedure is here 

  • Default demo login username and password

    The default login name is 

    admin

    password

    123456

    You can also access the online demo by clicking the “demo” link on the top menu.

    https://quickproductdemo.com/phpeventcal

  • Implementation of event recurrence rules

    For recurring events, please see repeating events documentation here: 

  • How to re-download the files I’ve purchased?

    Please visit http://phpcontrols.com/account/ to obtain downloads, updates, invoices, activate and manage your software licenses. It’s our new umbrella site for all of our PHP products.

    Click **Account** on upper right to access to your downloads. If you don’t know your password, use “Lost Password” link please.

    Note that only existing customers can renew their licenses at 40% OFF!

  • Modify Event Form to Include Additional Data

    To modify event form, follow these steps below to modify the form for customization:

    1. Modify the event form UI file 
      /server/html/event-create.html.php
      to include any additional input one would like to include on the event form. 
    2. Edit event class  
      /server/classes/cls_events.php
       class, in which save and edit event functions as 
      saveEvent()
       and 
      editEvent()
      . Keep in mind that an event data is passed as a simple array.
    3. Those two functions
       saveEvent, editEvent
       are called in 
      /ajax/event_manager.php

    4. Lastly, be sure to modify the database event table to include any additional data.
  • How to bypass login

    The login routine is hosted in 

    /server/ajax/user_manager.php

    The following line checks for the login. 

    $userObj = new C_User($_POST['username'],$_POST['password']);

    Then once simply checks for status returned from $userObj->loggedIn, and set session variable accordingly.

  • Laravel Integration

    Laravel uses composer for dependencies management. Put calendar in the app/Libraries folder, and use ‘files‘ property because it is a 3rd party external library.

    Recap: Composer autoload

    Now move on to an important Composer feature: autoload. Autoloading is a way to automatically include the necessary files when a class is used in an application, without having to manually include or require each file. This can greatly simplify the organization and maintenance of your codebase.

    So instead of having to manually include a large number of files at the top of each script, you can simply use the classes you need and let the autoloader handle the rest. You can organize your code into different namespaces and directories, without having to worry about manually including the correct files.

    In other words, Composer autoload replaces the old way of using include and require on top of every PHP script.

    More about autoloading: https://getcomposer.org/doc/01-basic-usage.md#autoloading

    Autoload a 3rd party library manually

    To add a 3rd party library, such as PHPEventCalendar, to the autoload section in Composer, It is recommended to use “files” autoloading method

    This method allows you to specify a list of files that should be included in the autoloader. You can add the files entries to the “autoload” section of your composer.json file like this:

    
    
    "autoload": {
            "classmap": &#91;
                "database"
            ],
            "psr-4": {
                "App": "app/"
            },
            "files": &#91;"app/Libraries/phpEventCalendar/conf.php"]

        },

    Don’t forget to run composer dump-autoload

    It is important to note that when you use the classmap and files autoloading method, you need to run the composer dump-autoload command after adding or modifying the files/classmap, for the autoloader to be updated.

    
    
    composer dump-autoload