Support ⇒ Themes ⇒ blocks How they Work? ⇒ Community Forums ⇒ CPG Dragonfly™ CMS
Forum IndexThemes

blocks How they Work? Reply to topic


I have went through the files, I found several places that have code related to blocks. Blocks.php, the templates, several other places. What i am trying to understand is:

1. How are the block displayed?
2. What makes them show up on the left side when you assign them to the left side?
3. What function creates the block locations left, right, center up/down?






DF ver 9.3.3.1

Server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS):
Multiple Setups


if your using windows grab a free copy of
www.wingrep.com/ GREP

It's a windows vrs Great search tool. searches inside all types of files
Fast and easy...

Search for:
$Blocks
$Blocks->init

You'll find all ......

The blocks.php CLASS is loaded from cmsinit.
The $Blocks->init is in header.php

Now to display just search for $Blocks->display(

Server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS):
PHP Version 7.0.6 + MariaDB + Dragonfly 9.4 Modified


I did that with phpdesigner 8 has a built in tools for searching for anything in a single file all the way to searching an entire hard drive for a file with a certain word in it. I found the related files, i cant figure out exactly how they work together, in what order, what makes this do that? etc. Thanks tho thats a good tool!

Server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS):
Multiple Setups


cmsinit load the class so later on, but before loading header.php, a page can disable all blocks or add custom ones.

Blocks::init in header.php read settings while creating others, try to load and organize all blocks data.

Blocks::display process and push to templates.

.:: I met php the 03 December 2003 :: Unforgettable day! ::.

Server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS):
CloudLinux / Apache 2.4 LSAPI / MySQLi 5.6 / PHP 5.6 / DCVS


can I get the "4 dummies version" pls

Server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS):
Multiple Setups


I'll try to help......
before we get started it would help If i know what your trying to
accomplish.

Dragonfly 9.4 Running on PHP 7.x + MariaDB

Server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS):
PHP Version 7.0.6 + MariaDB + Dragonfly 9.4 Modified


Basically I am trying to learn exactly how blocks work step by step.
What part of the script controls the blocks, which part determines where the blocks are displayed left right top center bottom center. What controls what? What does what?

Server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS):
Multiple Setups

All times are UTC


Jump to: