GithubHelp home page GithubHelp logo

otumian-empire / 24pill-code Goto Github PK

View Code? Open in Web Editor NEW
2.0 1.0 0.0 1.18 MB

This is a blogging platform, combining my interest and admiration of the effect that Quora and Stackoverflow has on developers. So I am trying to merge them or something like that or even far fetch from either, worse together. This project is purely written Php.

License: MIT License

PHP 89.01% CSS 2.50% Hack 5.66% TSQL 2.83%
php php-blog html css bootstrap4 javascript myqli

24pill-code's Introduction

24pill-code

This is a blogging platform, combining my interest and admiration of the effect that Quora and Stackoverflow has on developers. So I am trying to merge them or something like that or even far fetch from either, worse together. This project is purely written Php.

Reach Me here

  1. Github
  2. Gmail
  3. Telegram

Disclaimer

Well, I am a human being and some statement may be read by other human beings and others would like to sue me. I do not own any of the Brand names or registered names used here or have anything doing with them directly or implied. I am only using those techs to make my work here, easier.I do not also claim, should i just add, that I am related to these tech or any tech that'd be mention or used with mentioning it.

Techs

  1. Php 7
  2. Git
  3. Bootstrap 4
  4. Font-awesome-4.7.0
  5. Tinymce
  6. Jquery-3.4.1
  7. PhpMailer
  8. Gmail server (used once to test phpmailer)

Coding standards

For now I am not glued to any standard as there is.

  1. I am trying to imitate MVC pattern or at least I am convinced of it due to the file structure.
  2. I mostly use snake case, eg: var_name, for everything, from variable naming to file naming.
  3. My file naming appear consistent in the controllers directory where painfully, all file must end with processor. eg: hello_world_processor.php.
  4. Anything that can or could be a function is made a function after implementation.

File structure

  1. controllers
  2. includes
  3. statics (js, css, img)
  4. templates
  5. vendor (phpmailer)
  6. anything else is a view or LICENSE, README, .gitignore, 24pill_code_db.sql, CODING_STANDARDS, TODO, etc.

There is more files. TODO is my issue tracker file, any error I am not working on that pops up is reported there.

Testing

There is no testing yet, those i intend to use PhpUnitTest and Qunit. Well, I do test certain parts that needs trial before implementation.

Todo - after this

This is a Php version of this project, without a framework (I don't really like the idea of a framework even with its merits). I intend to use a Php framework perhaps Laravel or CodeIgniter or Symfony. I am not sure because I am not into frameworks, if they are not seen as extensions. I will write the same (or similar) project using:

  1. Python, considerably flask.
  2. JavaScript, nodejs and a front-end framework like vue.js but not sure yet.

Things I did quietly

In offline mode I use the actual files in the tech stated above but when i am pushing, I'd wanted to comment them out and use the available CDNs. So if it happens to crush or behave unpredictably, kindly check to see if the dependencies are met.

How to set up 24pill-code on your local server

Here I assume you have Xammp/Lammp/Mammp installed and you are familiar with how to fire it up and surely do your way around. You git set up and a registered github account. I am using Xammp.

  1. First clone 24pill-code. Click on the green button with the text Clone or Download.
  2. Copy the url - https://github.com/Otumian-empire/24pill-code.git from the url field.
  3. Create a folder and initialize git. This is what I meant. Do the following:
    1. Ctrl + Alt + T - opens terminal
    2. cd /opt/lammp/htdocs - moves you to the htdocs directory
    3. mkdir 24pill-code - creates a new folder called 24pill-code
    4. cd 24pill-code - moves you into the new folder
    5. git init - starts gits
    6. or at step 3, just do git init 24pill-code then cd 24pill-code
  4. git pull https://github.com/Otumian-empire/24pill-code.git
  5. finally, sudo /opt/lammp/lammp start to fire up xammp
  6. Open your browser and enter, localhost/24pill-code into the address bar
  7. In a new tab, open localhost/phpmyadmin
  8. Create a database of name, 24pill_code_db
  9. Click on import then browse and then navigate to 24pill_code_db.sql which is part of the files in the root directory, 24pill-code/ and select it.
  10. Pull the scroll bar down and click on the Go button below.
  11. Refresh the previous tab
  12. Good job..You are done.

Caution - Do this after pulling onto local server

Basically, just copy this lines and save it in this path includes/gmail_configuration.php. This contains email and password the app. This is note the recommended approach.

<?php
    include_once "functions.php";
    // if (!check_session()) {
    //     redirect_to("https://en.wikipedia.org/wiki/Goliath");
    //     exit;
    //     exit;
    // }
    
    // configurations for the GMAIL ACCOUNT
    define('GUSERNAME', 'username');
    define('GPASSWORD', 'password');
    define('GEMAIL', 'email');

    // replace username, password and email

?>

To contribute

Before you make any changes, locate the TODO file and see what you can do in it. Kindly remove that line when you are sure you are done. When you encounter any problem whilst working on another, kindly report it in TODO as descriptively as possible.

Follow the steps above and create a new brach for your changes. Send a PR.

24pill-code's People

Contributors

otumian-empire avatar

Stargazers

 avatar  avatar

Watchers

 avatar

24pill-code's Issues

Strip tag

I noticed that, say i enter a tag such as <html>, the whole tag is strip away.
so if i have

#include <iostream>
unsing namespace std;

int main() {
    cout << "Hello world" << endl;
    return 0;
}

after the content is read, <iostream> is stripped. Look into the check_data function, in includes/functions.php

add avatar

Add an avatar with a drop down menu containing, my account, write article and logout, on the navigation bar.

return URL

A return URL is needed so that the user can return to the previous page they were on before interrupted. Sometimes a user may be reading an article but would like to comment, since this user isn't signed in or signed up, one would be required. After that process, the user is needed to be redirected to the page they were on before. and a return URL will help. Read on how to implement a return URL

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.