Skip to content

About

Black Hole Framework

Resources

Stars

0 stars

Watchers

1 watching

Forks

Latest commit

 

History

194 Commits

Folders and files

Repository files navigation

🌌 BlackholeFrame

BlackholeFrame is an ultracondensed PHP framework designed for fast development of dynamic websites using a loop-based templating system.


USAGE

PRE SETUP

To start using the only pre setup you need is a server running on your computer aka: Xampp or similar. (of course, php, mysql and that stuff is required, but it is usually already on server defaults)

SETUP

0

Browse to http://bit.ly/blackholefw. There you will find a screen with instructions for installation.

1

Enter the name of your project, just lowercase letters and numbers, without spaces. This will be used for many things, including your project folder name.

2

Right click and save the file bigbang.php in the root folder of your project (the folder must have the same name you provided above).

3

Click the indication to start. All files will be downloaded to your project folder and you can start customizing your project.

That’s it.


It focuses on:

  • Minimal structure
  • Automatic database rendering
  • <loop> driven templates
  • Inline SQL configuration
  • Function filters inside templates
  • Zero dependencies

The philosophy is simple: HTML first, PHP invisible.


🚀 Features

  • Automatic routing by folder name
  • Database rendering via <loop>
  • Inline SQL using <sql>
  • Field placeholders {column}
  • Function filters {function->slug->title}
  • PDO MySQL backend
  • Extremely small core
  • Built-in Bootstrap
  • Built-in Fontawesome
  • Built-in jQuery library
  • Built-in CKEditor

📁 Folder Structure

/
│ index.php
| .htaccess
│ README.md
| void.php (only for install)
| singularity.php (only for install)
│ bigbang.php (only for install)
│
└── app/
    |
    ├── config/
    │     config.php
    │     database.php
    │     directories.php
    |
    ├── model/
    │     AppModel.php
    │     AdminModel.php
    |
    ├── vendors/
    │     composer/
    |     etc.
    │
    ─── view/
        |
        --- elements/
            |
            |── site/
            |     banners.php
            |     footer.php
            |     gallery.php
            |     head.php
            |     menu-mobile.php
            |     menu.php
            |     top.php
            |         
            |── helper/
            |     form.php
            |     list.php
            |
        |
        |── pages/
            |
            |── home/
            |     index.php
            |    
            |── items/
            |     index.php
            |     item.php
            |
    |        
    |─── webroot/
        |
        | index.php
        | admin.php
        | login.php
        | logout.php
        | 
        |── css/
        |     style.css
        |
        |── files/
        |     logo.svg
        |     etc.
        |
        |── img/
            |
            |── banners/
            |     banner-01.webp
            |     etc.
            |
            |── items/
            |     item-01.webp
            |     etc.
            |
        |── js/
        |     etc.
    

⚙️ Installation

  1. Make sure you have PHP 7+, MySQL, Apache.
  2. Access the void.php to start the cloning.
  3. Follow the steps
  4. Visit http://localhost{:port}/yourproject

🌐 Routing

http://localhost/yourproject/items → http://localhost/yourproject/app/view/pages/items/index.php


🔁 Basic Loop

<loop>
  <h1>{title}</h1>
  <p>{description}</p>
</loop>

🧠 SQL Customization

<loop>

  <sql>
    table=items;
    where=category=2;
    orderby=id;
    order=DESC;
    limit=3;
  </sql>

  <h2>
    {title}
  </h2>

</loop>

🧩 Placeholders

You fetch the data from the database by simply telling the column you want within braces. eg.:

{title}
{description}
{id}

🔧 Function Filters Examples

{function->slug->title}
{function->uppercase->title}
{function->limit_chars_200->description}

🛠 Internal Flow

  1. Scan loops
  2. Extract columns
  3. Clean SQL
  4. Query PDO
  5. Apply PHP functions
  6. Replace placeholders

Author: Éctor Rodrigues

License: MIT

About

Black Hole Framework

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages