General ⇒ DVCS Info (Mercurial/CVS) ⇒ Dragonfly CMS v10: how to. ⇒ Community Forums ⇒ CPG Dragonfly™ CMS
Forum IndexDVCS Info (Mercurial/CVS)

Dragonfly CMS v10: how to. Reply to topic


This is a progressive and mutable list

Access resources as:
  • Install from: /?install
  • Admin control panel: /?admin
  • RSS: ?feed=News, ?feed=News&type=atom (needs handler)

/modules/Module_Name/install/ directory listing
  • cpg_inst.php: required, the usual with new optional features to use
  • schema.xml: optional, tables structure
  • data.xml: optional, module data, if any
  • schema-instance: optional, move here shared tables when multi install is supported
  • data-instance: optional, as above but for data
Developers tip: make sure you upgrade to latest cvs with modules already installed. Then go to Admin -> Database -> and export tables, with or without data, as a XML installer file.

Check attachments for v10 compatible cpg_insts.
A module can be without schema and data xml files in case it just want to use $this->config.

Will need to set guidelines:
- queries SHOULD be passed to the installer with a rollback value
- ...
Attachment: pms.zip
Description Private Message cpg_inst
Filename pms.zip
Filesize 979 B
Downloaded 5 Time(s)
You are not allowed to view/download this attachment
Attachment: forums.zip
Description Forums cpg_inst
Filename forums.zip
Filesize 1.20 KiB
Downloaded 2 Time(s)
You are not allowed to view/download this attachment

.:: 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

Last edited by NanoCaiordo on Wed Apr 18, 2012 3:59 am; edited 2 times in total


DF_ACP admin framework will prepare variables and variable blocks to be used in templates, it relies heavily on css files.
It aims to reduce developer work load and moreover it unifies configuration pages across the admin control panel by providing shared templates, and i reckon good looking one too.

Avoid feedback if you are not using a real browser.

If you have a v10 installed you can have a visual example in admin -> security.

DF_ACP::section_name(string) setup the page url and the name of the admin module, doesn't change $pagetitle.

DF_ACP::section_menu($tpl_handle, array)

The section menu is a navigation menu within the admin module only.
As for now only a simple "submenu_inline".html exist.

The array is a simple combinations of URLs and Titles basically:
array('flooding'=> "Floods") # becomes <a href="?admin&op=security&flooding">Floods</a> #Then either use $cpgtpl->display($tpl_handle); #or <!-- INCLUDE admin/$tpl_handle.html --> #when and where you want to display it.
DF_ACP::section_items($tpl_handle, array);
The control panel page, the best and tricky part.
It's modestly configurable already but expanding.

As for now only "section".html template handle exists, ?admin=op=security is the living example.

The array:
The very first key is a ID, and it will be used as a shortcut or not used at all.

So first level array can contain the following options: title, iscfg, toggle, items.
  • title: (string) what to show when the key ID is used.
  • iscfg: (bool) is a shortcut for a a single onclick image enable/disable post form.
  • toggle: (mixed) if "items" needs to the toggle options
  • items: (array) html element id => array ( html attributes )

extra html element id switches: item-extra-data0, item-text-only0
  • item-extra-data0: (string) build the html element with all it's attributes and add extra text into a new line, increase last zero by one each use.
  • item-text-only0: (string) only use your provided text, increase last zero by one each use.

extra html attributes switches: required, extra;
  • required: (bool) simply add `*' after the title, later to be hooked with poodle js.
  • extra: (string) add custom attributes to the element

Upcoming a single column section file, currently two columns only, and a "list" templates to use when displaying a list of values.

.:: 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


Note, when using iscfg, the form will be posted to eg: op=security.
Items will be always posted to eg: op=secuity&flooding regardless the above option.

This method kindly forces you to use the Security::check_post() method for additional protection.

Also note that all add and delete operations done by this framework are performed by posts, again for additional security.

.:: 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


Upgrade documentation is migrating to dragonflycms.org/Wiki/id=135/

Developer documentation is migrating to dragonflycms.org/Wiki/id=137/

.:: 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


Where can I get more info about using the Head Linking technique in
dragon10

href="?css=t:default:cookmenu;t:default:style;t:default:admin;t:default:cpgmm" /> src="?js=i:poodle;i:infobox;i:JSCookMenu;t:default:cookmenu;t:default:toggle">

Thank you for your help

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


I haven't wrote nothing about it yet but a quick guide is to use CSS::add('path/to/file.css'), same for JS::add().
You can also feed raw, live and dynamic (but not cacheble) css with CSS::inline('.myclass {display:inline}') Wink

One more very important thing is the automatic autoloading of themes/y/style/custom.css if found. This file is not to be shipped with any theme but is to be created by the user when in needs to overwrite styles, without losing any tweak on theme upgrades.

.:: 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


Paths allowed are: includes/css, includes/javascript, modules/y/style, modules/y/javascript, themes/y/style and themes/y/javascript

.:: 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


As of today we also support multilanguage JS and CSS files.
Automatically loaded when the parent file is loaded.

CSS example:
Dragonfly_Output_Css::add('modules/MyModule/css/style.css', 'screen', true);

# try to load modules/MyModule/l10n/style.en-au.css # if not found fallback to modules/MyModule/l10n/style.en.css # CSS multilanguage paths are language/english/poodle|dragonfly/css/parentName.css modules/Module/l10n/parentName.languageCode.css

JS Example:
Dragonfly_Output_Js::add('modules/MyModule/css/file.js', true);

# try to load modules/MyModule/l10n/file.en-au.js # if not found fallback to modules/MyModule/l10n/file.en.js # JS multilanguage paths are language/english/poodle|dragonfly/js/parentName.js modules/Module/l10n/parentName.languageCode.js

.:: 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


In the smarty template we used
<!-- INCLUDE viral_launch/head_display_common.html -->

What is the syntax to do the same thing in TAL xml template ?

also what are the allowed Paths we can use ?

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


bulldog500 wrote
In the smarty template we used
<!-- INCLUDE viral_launch/head_display_common.html -->

What is the syntax to do the same thing in TAL xml template ?

also what are the allowed Paths we can use ?


<div tal:replace="structure php:here.toString('viral_launch/head_display_common')"></div>

or

<div tal:replace="structure php:self::toString('viral_launch/head_display_common')"></div>

Server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS):
Fedora 25 / Apache 2.4.27 / MariaDB 10.1.26 / PHP 7.1.10 / Mercurial


Thank you for the help....

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

All times are UTC


Jump to: