[This Article Needs Content]
Interested in coding widgets, classes, or methods? Check out the Code section!
article by Ayoola Falola in
[This Article Needs Content][This Article Needs Content]
article by Ayoola Falola in
[This Article Needs Content][This Article Needs Content]
article by Ayoola Falola in Advanced Topics , PageCarton Lessons
PageCarton is an opensource project. This in simple terms means that you get to see the codes behind the awesome features PageCarton is bringing to the web. It also means that you are able to contr...PageCarton is an opensource project. This in simple terms means that you get to see the codes behind the awesome features PageCarton is bringing to the web. It also means that you are able to contribute to it, so that together, we could make a massive contribution towards a safer and more accessible tool to publish to the web. Contributing to PageCarton Core is easy; it may not even require coding knowledge. PageCarton is made for collaboration champions. Contribution is even enhanced with Github as the core of PageCarton is hosted on Github. This tutorial uses more of GIT, Github, VS Code and other tools that enhances collaboration.
The following are the steps required to contribute to the PageCarton core:
Let us set up PageCarton for local development. This allows us to try a lot of settings locally before we push it to git.
{
"PC_BASE": "",
"application_dir": "",
"run_as_core": true,
"repository": ""
}
Usually, you would need more than a simple code editor to be able to use advanced features of GIT and other things required to contribute to PageCarton. An IDE is the good way to easily manage your development.
An integrated development environment (IDE) is a software application that provides comprehensive facilities to computer programmers for software development. An IDE normally consists of at least a source code editor; build automation tools, and a debugger.
For the purpose of this tutorial, we will be setting up Visual Studio Code "VS Code". But any other IDE like Atom, Netbeans, etc should do. If you would like to download VS Code, follow the instructions below:
Make sure you choose to install the version for your operating system.
Open VS Code
VS Code File Options
These are Options to the top left corners allow us to manage the files and updates to them. These are the options we are going to be using the most to update core files. They are:
Explorer - first option on the top left corner allows you to view all the files in the current project and select the one we want to edit
Search - Allows you to search the files using any term or keywords
Source Control - View files that has recently been changed. This is where you have options to commit and push changes to the remote GIT
Debug - Get tools to debug codes for errors, etc.
Extensions - Download more extensions to VS Code to enhance performance.
PageCarton core files are hosted on Git, so you need GIT to be able to post your contributions to PageCarton. Before you start using Git, you have to make it available on your computer. Even if it’s already installed, it’s probably a good idea to update to the latest version. You can either install it as a package or via another installer, or download the source code and compile it yourself. Follow the following to set up Git:
# Go to your home directory
cd /home/~
# clone your forked PageCarton repo locally
git clone https://github.com/myusername/pagecarton
Make sure you change "myusername" to the username so that is yours so that the clone url is the url of your fork version. This process will help you synchronize your github repository with your local system. So that whenever you make any changes locally, you could "push" the changes to Github with just a single command.
{
"PC_BASE": "/home/examplelocaluser/pagecarton/pagecarton",
"application_dir": "",
"run_as_core": true,
"repository": ""
}
# Go directory where the clone is
cd /home/~
# set the right file ownership and permissions
# ideally, the pagecarton directory must be readable and writable
# by the user running the web server.
# usually this user is www-data or apache or nginx or daemon
chown -hR www-data:www-data pagecarton
# alternatively, set global permissions (not recommended except for extreme local dev)
# chmod -R 0777 pagecarton
There are a number of ways to make changes to PageCarton Core from your local environment. The two commonest methods are:
Good to note that everything in/out of PageCarton are files and could be directly editable through any method that's convenient. Whenever changes are made, it is recorded in the local git and the changes would be ready to be "pushed" to the remote github you cloned.
The process of making the changes you make locally reflect on the remove Github account is called a "push". You can do this either of two easy ways:
# Go directory where the clone is
cd /home/~/pagecarton/pagecarton
# commit changes
# update the commit message to short phrase about the changes made
git commit -m "Change titles and styling on homepage"
# The "push" command is used to publish new local commits on a remote server.
git push
What we have been doing is to create a copy (called "fork") of the main PageCarton repository to make our update, so we could indepently make changes and test new functionalities. Once the update has been made and tested, we can now merge our own repository with the main repository. This is called a "Pull Request". When a pull request is made, the contributors of the main PageCarton repository will be notified of the request and they have the duty to review the pull requests and perform the merge of the codes thereafter.
This is how you make a pull request:
Go to the github page of your forked PageCarton. The page URL should be something like https://github.com/myusername/pagecarton. Change "myusername" to your Github username.
article by Ayoola Falola in Advanced Topics , PageCarton Lessons
From PageCarton 1.8.71, it is now possible to sync one's PageCarton core with a third-party repository. In some cases, it is useful to want to connect PageCarton to one's own fork of the Pa...From PageCarton 1.8.71, it is now possible to sync one's PageCarton core with a third-party repository. In some cases, it is useful to want to connect PageCarton to one's own fork of the PageCarton core from Github. You can do this in few easy steps:
article by Ayoola Falola in Installation , Advanced Topics
There are three documented ways to install PageCarton 1. Offline Standalone Installer - http://docs.pagecarton.org/2017/10/10/installing-pagecarton.html. Default installation method. 2. Boots...There are three documented ways to install PageCarton
1. Offline Standalone Installer - http://docs.pagecarton.org/2017/10/10/installing-pagecarton.html. Default installation method.
2. Bootstrap Installer - https://www.pagecarton.org/2018/03/17/php-auto-installer-script.html. To use this, the server must be able to connect to the internet to download the files.
3. Manual Installation - http://docs.pagecarton.org/2019/06/27/installing-pagecarton-core-custom-directory.html. Install PageCarton in a custom directory.