Welcome ,

PageCarton Documentation

Interested in coding widgets, classes, or methods? Check out the Code section!

Cloning PageCarton Repository for Contribution

Share

article by Ayoola Falola in Advanced Topics , Getting Started , PageCarton Lessons

# move to where to want PageCarton cloned cd ~ # clone git repo branch you want to work on git clone -b https://github.com/pagecarton/pagecarton.git # edit pagecarton.json and set PC_BASE...
# move to where to want PageCarton cloned
cd ~

# clone git repo branch you want to work on
git clone -b https://github.com/pagecarton/pagecarton.git

# edit pagecarton.json and set PC_BASE to the full path to where "pagecarton" is located. 
# The "pagecarton" dir must be the directory containing the "core" directory 
nano pagecarton/core/local_html/pagecarton.json

# copy local_html files to the web root
# Use cp -r pagecarton/core/local_html/* www/sample-dir/ to install to a sub directory
# change www to location to full path to your web root
cp -r pagecarton/core/local_html/* www/




# 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)
# chmod -R 0777 pagecarton

 

6 yrs ago

Standard Post Types Parameters in Embedding Widgets

Share

article by Ayoola Falola in Design and Layout

It's good to use Standard Post Types Parameters in Embedding Widgets in themes so that when users change themes, similar posts made from previous themes can work in the theme one is building
Data Type Parameters
Our Services / What we do article_type="service"
Team Members article_types="team-member" && post_type_custom_fields="position,full_name,facebook_url,twitter_url,instagram_url,linkedin_url"
Products true_post_type="product"
Blog Posts article_types="blog-post" && true_post_type="article"
Portfolio / Project  article_types="portfolio" && true_post_type="link"
Slideshow article_types="slideshow"
Testimonial article_types="testimonial" && post_type_custom_fields="position,full_name"
Metrics article_types="metric" && post_type_custom_fields="number"
Gallery article_types="gallery-item"
Features / Why choose us article_types="feature"
Pricing article_types="pricing" && true_post_type="product" && post_type_custom_fields="feature_1,feature_2,feature_3,feature_4,feature_5"
Call-to-action article_types="call-to-action" && true_post_type="link"

 

6 yrs ago

Standard Replaceable Texts to use in Building Themes

Share

article by Ayoola Falola in Design and Layout

It is recommended to use standard replaceable texts with their dummy contents in building themes so that users changing themes doesn't need to update new contents. Contents of the previous theme th...

These are the standard static dummy texts to be used in themes so that users may easily update them in the New Site Wizard.

Organization Information

Organization Name
Organization Name

Short Description About Organization
Short About Lorem ipsum dolor sit amet, consectetur adipisicing elit. Eius repellat, dicta at laboriosam, nemo exercitationem itaque eveniet architecto cumque, deleniti commodi molestias repellendus quos sequi hic fugiat asperiores illum. Atque, in, fuga excepturi corrupti error corporis aliquam unde nostrum quas.

More About Organization
More About Accusantium dolor ratione maiores est deleniti nihil? Dignissimos est, sunt nulla illum autem in, quibusdam cumque recusandae, laudantium minima repellendus.

Background History of Organization
Background History Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt labore et magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi aliquip ex ea consequat.

Contact Info

Street Address
City
State
Country

Phone Number 1
+234 800 000 0000

Phone Number 2 / WhatsApp
2348054449535

Email Address
info@example.com

Social Media

Facebook URL
https://www.facebook.com/PageCarton

Twitter URL
https://www.twitter.com/PageCarton

Instagram URL
https://www.instagram.com/PageCarton

LinkedIn Page URL
{https://www.linkedin.com/company/PageCarton}

Youtube Channel URL
https://www.youtube.com/channel/UCMjkDODU47J8iKKbaidQpEw?view_as=subscriber

Link to Descriptive Video
https://vimeo.com/channels/staffpicks/93951774

E-Commerce

E-commerce Shipping Information

{-Free Shipping Lorem ipsum dolor sit amet, consectetur adipiscing elit. Phasellus at iaculis quam. Integer accumsan tincidunt fringilla.-}

E-commerce Returns Information
{-Returns Lorem ipsum dolor sit amet, consectetur adipiscing elit. Phasellus at iaculis quam. Integer accumsan tincidunt fringilla.-}

E-commerce Support Information
{-Support Lorem ipsum dolor sit amet, consectetur adipiscing elit. Phasellus at iaculis quam. Integer accumsan tincidunt fringilla.-}

Other Information

Google Maps Embed URL
https://www.google.com/maps/embed?pb=!1m18!1m12!1m3!1d3956.7573964262942!2d3.862950314775586!3d7.381062994674082!2m3!1f0!2f0!3f0!3m2!1i1024!2i768!4f13.1!3m3!1m2!1s0x10398d11e9ff4445%3A0x27cd60c4ec4cbd97!2sNustreams+Conference+%26+Culture+Centre!5e0!3m2!1sen!2sng!4v1550769560125

Newsletter Write-up

{-Be the first to be notified when we have exciting offers and discounts. Sign up for our newsletter!-}

About Team Member

{-Meet the awesome personalities who make up our team-}

About Services

{-We offer the best in quality services. That is why we are the No. 1 in the industry-}

 

6 yrs ago

Explaining the concepts of PageCarton

Share

article by Ayoola Falola in About PageCarton , Working with PageCarton , PageCarton Lessons

This article is about answering technical questions on how PageCarton works.

Technicalities

Application Controller - controls how PageCarton behaves

index.php

The index.php controller receives all the requests from the user browser and sends it to the Ayoola_Application class run() method to complete the process.

/core/library/Ayoola/Application.php

This is changing to /core/library/PageCarton.php. This continues to process requests from index.php and serves the right file and output to the user. Determines where there the user is requesting a page, a post or an asset. It also checks to determine the correct site data to load in case of a multisite installation. It serves the request accordingly.

Pages

Computes and output html contents. All pages have URLs of format "/page/url". The homepage has URL "/". A page is usally loaded when a user goes to "http://example.com/page/url". Each page has three files:          

  • data.json
    (used to be data.xml or data.php). contains data saved about the page. Only used when page want to be edited. Previous data is retrieved here.        
  • include.php
    Contains widgets classes to instantiate and parameters. Loads the init() method of all the widgets embedded on the page. This is loaded first and sends the output to the template file. 
  • template.phtml
    Contains a structured copy of the appropriate theme to load the contents of the page. Picks data from include.php and runs the view() method of all the widgets embedded on the page.

Location of these files:

{APPLICATION_PATH}/pages/*


Page-related Widgets, Settings and Database Tables are located on

/core/library/Ayoola/Page/*

Posts

Posts are structured data that can be set to have similar attributes and can be categorized. Examples of posts are articles in a blog settings, products in an e-commerce settings, poll, quiz etc. A number of post are defined in a default PageCarton installation but it also comes with the ability for users to define new post types, new categories and post attributes.

Post-related Widgets, Settings and Database Tables are located on

/core/application/modules/Application/Article/*

Each posts have records saved in the post tables /core/application/modules/Application/Article/Table.php. Post must have a unique "article_url" field that is usually deduced by the "article_title" entered by the user of the format "/2019/01/01/sample-article-title.html".

Site Assets

Site assets are images, CSS, JS, fonts and any kind of asset the site may have. The urls usually is of the form "/path/to/file.ext"
        
Location of these files:

{APPLICATION_PATH}/documents/*


Related Widgets, Settings and Database Tables are located on

/core/library/Ayoola/Doc/*

Widgets

A widget is a unit of a coordinated process in PageCarton. It is a means whereby PageCarton transmits a calculated response to the user. With the "$widget->init()" method, a widget runs the logic of the unit. It uses the "$widget->setViewContent( 'HELLO WORLD' )" method within the init process to send output to the user but the user will not see anything until the "$widget->view()" method is "echoed" to the user.

 

The widget comes with a number of features and options, for example, a widget can output content in different types depending on the set "play mode" parameter. It courrently can output content in the following formats:

  • HTML
  • XML
  • JSON
  • ENCRYPTION
    • using OPENSSL
  • PHP serialize()

The ability for widgets to communicate in different output types makes it perfect to build standalone applications that can integrate to third-party systems and front-end frameworks. A widget can "hook" to other widgets to provide related extended functionality for the widget. At specific points in a widget process, the registered hooks for the widget is called and runned, exchanging some vital parameters that could be used to affect the individual widget process.

Widgets allow setting of parameters that are like constants to change the behavior of the widget running in a particular instance. Parameters are usually set whenever a widget is instantiated whether in the page layout editor or in the code of another widget that is instantiating it. In the code, parameters are set with the setParameter method. The set parameters will be available by calling the getParameter method. They also can generate data options that are like variables that can help to show dynamic data in view. The data options are usually set in the init() method.

New widgets are classes extending the PageCarton_Widget class. New widgets can be created from the PageCarton Admin Panel but the file cannot be edited from the web browser.

Related Widgets, Settings and Database Tables are located on

/core/library/Ayoola/Object/*

Read More on Widgets

Databases

Databases are where PageCarton stores structured data. PageCarton comes with an integrated Database system that can be used for almost anything. One can also use any other third-party database. New widgets can be created from the PageCarton Admin Panel but the file cannot be edited from the web browser for security reasons.
Read more on Database Tables

Settings

Settings are special database tables that stores related data for quick retrieval and for in-widget operations. Plugins also can come with their own settings. A settings file can also be created from the PageCarton Admin Panel

Read more on Settings Module


What happens when [needs content]

  •     PageCarton is being installed?
  •     A user requests a PageCarton site
  •     A contributor commits a file
  •     User upgrades a pagecarton installation

File structures in PageCarton

Application Directories {APPLICATION_DIR}

Types:

  • core
    • /pagecarton/core/*
  • default site
    • /pagecarton/sites/default/*
  • plugins
    • /pagecarton/sites/*/extensions/{plugin_name}/*
  • directory multisites
    • /pagecarton/sites/default/{site_directory}/*
  • domain multisites
    • /pagecarton/sites/{domain}/*

Possible contents

  • library/
    • only core has this
    • contains all the classes PageCarton really needs for a good run
  • local_html/
    • contains files that's automatically copied to the site web root
    • only core has this
    • contains
    • index.php
    • web.config (for IIS)
    • .htaccess (for Apache)      
  • application/
    • all application directories can have this
    • referred to as {APPLICATION_PATH}
    • can have the follow directories
      • documents/
      • databases/
      • pages/
      • modules_files/
      • {multisite_dirs}/
  • extensions/
    • Plugins are installed here
    • can contain it's own contents of {APPLICATION_DIR}

How can the core be edited for collaboration?

Cloning the GIT repository

# start from the web root
cd www

# move a step out of the web root
cd ../

# clone git repo branch you want to work on
git clone -b 1.8.x https://github.com/pagecarton/pagecarton.git

# copy public_html files to the web root
# Use cp -r pagecarton/core/local_html/* www/sample-dir/
# to install to a sub directory
cp -r pagecarton/core/local_html/* www/

# set the right file ownership and permissions
# ideallly, the pagecarton directory should be readable and writable 
# by the user running the web server.
# usually www-data or apache or nginx or daemon
chown -hR www-data:www-data pagecarton

Two ways to update core code

  1. Edit the core files directly 
    • Locate the file you want to update within pagecarton/core,
    • change
    • commit and
    • push to git
  2. Make your changes in the web browser
    By default, on a fresh installation of PageCarton, whenever you make changes to the website, the core files are not changed. Your changes go to a separate {APPLICATION_DIR} in the /pagecarton/sites/ directory. To run a "core" version of pagecarton on the browser, you need to create a configuration file in the {APPLICATION_DIR} you want to use and name the file "pagecarton.json" (/pagecarton/sites/default/pagecarton.json). Put this json code '{ "ignore_this_directory": true }' (without the single quotes) and save the file. Once you do this, all your changes on the site will go to the "/pagecarton/core" and not "/pagecarton/sites/default". Use the following steps
    1. Properly Install PageCarton
      • Go to localhost/personalize in the browser
        Change localhost to the respective domain name if you are working on a LIVE server like example.com. Use localhost/sample-dir/personalize if you installed in a directory. Use localhost/index.php/personalize if you don't have URL rewriting capabilities on your web server.
      • Create admin user and set other preferences
      • Proceed to the admin panel at localhost/pc-admin
    2. Create a multisite instance where you will update PageCarton
      1. Go to localhost/widgets/PageCarton_MultiSite_List
      2. Create a new site. Name the site directory anything e.g. "core-v"
      3. Preview the new site or go to localhost/core-v/
      4. Create pagecarton configuration file for the new site - pagecarton/sites/default/core-v/pagecarton.json
        # pagecarton/sites/default/core-v/pagecarton.json
        {
            "ignore_this_directory": true
        }

         

      5. Now localhost/core-v/ will load the core as the "site" and any updates on it will go straight to the core. Confirm this by going to localhost/core-v/pc-admin to see all the core pages, and other settings loaded.
      6. Make required changes
      7. Commit Changes on the core
      8. Push changes to GIT

How is Git linked to the update server

Once a commit is made and files pushed to the github, there is a hook on github that sends the updated repo to the update server. It's automated that the users get freshly baked software everytime.

How is Themes integrated with PageCarton? [needs content]

How is Plugins integrated with PageCarton? [needs content]

How is Documents and files saved and retrieved in PageCarton? [needs content]

 

6 yrs ago

What is PageCarton

Share

Documentation Article by Ayoola Falola in About PageCarton , Getting Started

PageCarton is an innovative world-class tool to structure, build and manage great web sites and apps.  Straight out-of-the-box, PageCarton has been adjudged to be more secure, faster and ea...

PageCarton is an innovative world-class tool to structure, build and manage great web sites and apps. 

Straight out-of-the-box, PageCarton has been adjudged to be more secure, faster and easier to use than most of the big names in the industry.  PageCarton also offers more features that makes it a must-have for everyone that takes ease-of-use and security seriously. This is based on feedback we have received by users who dumped other popular tools for PageCarton.

PageCarton hopes to make a statement that websites could be designed by default to curb all the security challenges that plagues the cyberspace. Web sites and apps could co-exist in a box thats easy to use and visually appealing. 

Everyone should be able to create a website by themselves. No matter their level or their level of technical knowledge, so PageCarton is constantly evolving into a tool that more people will use it comfortably with little or no help. In today's world, ideas need to find their way across the world and the web is a good way to make this seamless. When people could express themselves with a well presented creative web, ideas will find more expression and our world would be a better place.

Why PageCarton?

People frequently asked why we embarked on this project. Why do we need another web site development system/tool/framework?

1. The web is a beautiful place, but because of lack of strict regulations and indistinctive professional guidelines, it is marred with a lot of security vulnerabilities. We believe a lot of cyber-security responsibilties rest on frameworks like PageCarton to by default give the users a covering from a lot of known vulnerabilities.

2. We believe with the right mindset and culture, we can determine a better approach to how web ought to be structure and built. Saving time and resources for users whereby making the web space a better place. 

PageCarton Culture

1. Code is poetry. We want to keep PageCarton open so that people around the world could see it and be inspired by it. That is why PageCarton will forever be open-source. 

2. Code is for people, not vice versa. People will determine the extent they want to be exposed to code. We will carefully guide users through their coding journey; from beginner to advanced.

3. PageCarton is made by Good People for the Good People of the world population. Thats why The PageCarton Community is a big part of PageCarton. The people will always be the custodian of their own future and PageCarton is also be governed and influenced by vibrant members of the Community. 

4. Its a great opportunity to have PageCarton to use. That's why we will use all methods possible to spread the message about PageCarton.

FAQ

Is PageCarton a Content Management System? 

PageCarton can't be called a CMS because it actually works as a CMS and more.

Is it a Framework then?

Well, PageCarton is a Framework and more. So we can't call it a Framework because when we do that, it wouldn't define the PageCarton concept.

Then what is PageCarton? 

PageCarton is PageCarton. Not, Pagecarton, pagecarton or pageCarton; its PageCarton - a tool everyone that needs to save time, resources in building web site and apps should have. There is no known name for a tool that could in definite terms be likened to PageCarton. Earlier, we have "incorrectly" called PageCarton either a CMS, Framework or similar names. We wish to cease such as we have determined such names do not define PageCarton, neither does it give it the kind of brand we hope to have for PageCarton. 

7 yrs ago

Where to get Free HTML Templates to Build PageCarton Themes

Share

Documentation Article by Ayoola Falola in Design and Layout

Basically, any HTML based site would workcould be integrated inside PageCarton seamlessly. Any site that offers a downloadable archive of HTML templates are sites to look out for. Here are sites th...

Basically, any HTML based site would workcould be integrated inside PageCarton seamlessly. Any site that offers a downloadable archive of HTML templates are sites to look out for. Here are sites that provides free templates that works for building PageCarton Themes. Some sites that have templates that fits into PageCarton are below.

  1. https://themewagon.com/theme_tag/free/
  2. https://www.free-css.com/
  3. https://templated.co/
  4. http://www.tooplate.com/free-templates
  5. https://html5up.net/
  6. https://bootstrapmade.com/

The sites listed above have been tested as at the time this article was written. Feel free to report if any of the links are no longer valid or if there are other sites you want us to include here. 

Don't forget that ready-made themes are on PageCarton Themes Repository  - https://themes.pagecarton.org. So when you are done building the theme, you should also upload it there so others can benefit from your work.

7 yrs ago
← Previous Next →