phaziz interface design Constructr CMS

Updated ChangeLog

This is an updated ChangeLog of upcoming Version 3.02.9 of Constructr CMS. Do not use it in productive Environments – it is still a Beta:

============================================================
Pre-Update to Constructr-CMS 3.02.9 (SVN ONLY)
// 23.04.2009 //
============================================================
1) Altered config-files
2) Altered Backend Footer (Bugtracking)
3) Updated Logfile handling (clear the Log)
4) Altered Login-Routine and Design (Captcha-Numbers)
5) Updated Helper-Functions
6) Updated ROOT/INDEX-File
7) Altered Styling-File
8) Updated Workspace-Files
9) Altered BE-Layout
10) Deleted Workspace Editing of BE (Use a real IDE)
11) Added multi FE-Languages Feature
12) Page-Alias Bug is fixed (0000008)
(http://bugtracking.phaziz.com)
13) Several BugFixes (0000001-0000007)
(http://bugtracking.phaziz.com)
14) Added Page-Information [(i)-Picture at Page Actions]

Grab Your fresh Copy here.

A lot of new Features available for testing

I am working at Version 3.02.9 of Constructr CMS (available via Subversion). But be carefull – 3.02.9 is a development Version and it might be unstable. It should not be used in productive Environments. The ChangeLog:

============================================================
Pre-Update to Constructr-CMS 3.02.9 (SVN ONLY)
============================================================
1) Altered config-files
2) Altered Backend Footer (Bugtracking)
3) Updated Logfile handling (clear the Log)
4) Altered Login-Routine and Design (Captcha-Numbers)
5) Updated Helper-Functions
6) Updated ROOT/INDEX-File
7) Altered Styling-File
8) Updated Workspace-Files
9) Altered BE-Layout
10) Deleted Workspace Editing of BE (Use a real IDE)
11) Added multi FE-Languages Feature
============================================================

To test this Version grab a complete Copy of 3.02.9 via Subversion and have a lot of Fun. Please report any Bugs! Thanx!!!

Bugtracking available for Constructr CMS

Visit the phaziz interface design Bugtracker to report Bugs in Constructr CMS. It is the Mantis Bugtracker (Documentation).

Pre-Update to Constructr-CMS 3.02.9 (DEV-Version // SVN ONLY) (Might be unstable)

============================================================
Pre-Update to Constructr-CMS 3.02.9 (SVN ONLY)
============================================================
1) Altered config-files
2) Altered Backend Footer (Bugtracking)
3) Updated Logfile handling (clear the Log)
4) Altered Login-Routine and Design (Captcha-Numbers)
5) Updated Helper-Functions
6) Updated ROOT/INDEX-File
7) Altered Styling-File
8) Updated Workspace-Files
============================================================

This Update is available via Subversion only – it should not be used in productive Environments – it might be unstable. Subversion // Bugtracker

BugFix 1 to Version 3.02.08 // 07.04.2009

=============================================
BugFix 1 to Version 3.02.08 // 07.04.2009
=============================================

Bug-Description
===============
Sticky Content Elements could not be edited,
once created.

Fix
===
Just replace the Backend content.php-File
with the updated File of This Bugfix
(content.php). No Database Update’s are
needed!

Sticky Content

In Constructr CMS Version 3.02.8 wurde das Konzept der “Sticky Content’s” eingeführt. Hiermit ist es möglich einem Content-Element eine feste ID zuzuweisen. Über diese global einzigartige und feste ID kann man Inhalts-Elemente im Frontend an beliebiger Stelle zuweisen und darstellen.

Vorstellbar ist zum Beispiel, ein Inhaltselement für den fiktiven Bereich New’s. Dieses muss nur einmal im Backend gepflegt werden, kann aber im Frontend an beliebig vielen und beliebig unterschiedlichen Stellen im Template dargestellt werden.

Zum abgreifen eines Sticky-Content ist folgender Code nötig:

<?php

// Example for grabbing Content with defined Sticky ID 999
$get_sticky_999 = $db -> query("
SELECT *
FROM $DB_TABLE_CONSTRUCTR_CONTENT
WHERE sticky_id = '999'
LIMIT 1
") or die(mysql_error());

$sticky999 = $db -> num_rows($get_sticky_999);


if($sticky999 != 0) {
$act999 = $db -> fetch_array($get_sticky_999);
$content = $act999['content'];
echo unhtmlentities(base64_decode($content));
}

?>

Constructr-CMS 3.02.8 05.04.2009

Use update.php for DB-Update (Point 7)
1) Added Global Settings Array
2) New FileUpload (move_uploaded_file() // copy())
3) CSS-Update
4) Added logfile.php to view the BE-Logfile
5) Updated Config-Files
6) Updated Header-Files (BE)
7) Added Sticky-ID to Content Elements
8) Altered Definition-Files
9) Altered Constructr Base JS-File
10) Altered Constructr Settings-File
11) Updated user.php-File (Backend)
12) Updated User Class-File

Constructr CMS Overview

ConstructrCMS is a new Open-Source and forever free Content-Management-System written in PHP and MySQL. Visit the SourceForge.net Project-Page or the Constructr CMS-Website. Take a look at the new Forum to get Help or participate and sign-up for the phaziz interface design-Newsletter. Downloads are available. More than 3.400 Downloads can´t be wrong!

The Main-Features are:

  • Clean Frontend URLs
  • Frontend Cache-System
  • Backend User-Management and Rights-Management
  • Backend Action-Logging
  • Available Fullscreen View
  • Stealth Login-System with unique Hash via Hyperlink or direct Access (MD5 based)
  • Nested_Sets-Logic for Page-Structuring
  • TinyMCE-Integration for easy Content-Editing
  • jQuery Integration for simple Workflow the Ajax Way of Style
  • File based Template System
  • Multilingual Frontends are simple possible
  • You can use a Frontent that fits Your special Needs (pure PHP and MySQL, Smarty, Flash …)
  • Native UTF-8 XML-Output (Flash-Frontend Content Management)
  • Asset-Center for Your Uploads
  • Integrated Search-Engine for Your Asset´s
  • Upload Files via FTP
  • Automatic Sync after FTP-Uploads
  • Automatic Thumb´s for Image-Uploads (with Cache-System)
  • Integrated Shadowbox-Viewer for Your Asset´s
  • Customizable Backend-Language (Available: DE, EN, US, CH, AU)
  • Live Preview-System for hidden Pages and Content
  • Individual 404 Error Page
  • Automatic RSS 2.0-Feed for every single Content-Page
  • Love the Silk Icons
  • Whole System-Size less than 3MB
  • Written in PHP and MySQL (OOP)

I’ve spent a lot of time to develop/support this Content Management System. You liked it? Feel free to donate!

How to implement a nice Slideshow? (Using a Plugin)

The dbf_slideshow_gallery-Plugin enables You to show a nice Slideshow at Your Constructr-Website.  It is build using jQuery and the Cycle-Plugin. You can define the Effect of the Slideshow (shuffle,zoom,fade,turnDown,curtainX,…). Just follow these Steps to include a Slideshow at Your Website driven by Constructr CMS:

1) First download the Plugin-Files.
2) Unzip the Plugin and transfer it to the Plugin-Directory locatet at ROOT/plugins/
3) Place the Plugin File jquery.cycle.all.js in a Directory js in Your Workspace located at ROOT/data/workspace/js/
4) Define the $JS_INNER_PATH if not defnied yet at Your main Template File:

$INNER_JS_PATH = ‘http://’ . $host . $uri . ‘/data/workspace/js/’;

5) Include some Javascript in the Header of Your Main Template File:

<script type=”text/javascript” src=”http://code.jquery.com/jquery.js”></script>
<script type=”text/javascript” src=”<?php echo $INNER_JS_PATH; ?>jquery.cycle.all.js”></script>
<script type=”text/javascript”>

$(document).ready(function()
{
$(‘#special_phaziz’).cycle({
fx     : ’shuffle’,
random : true,
speed  : ’slow’,
timeout: 3000
});
});

</script>

6) Include a little additional CSS in Your Style-Definition:

.phazizSlider
{
margin-left: auto;
margin-right: auto;
display:block;
width:960px;
height:300px;
overflow:hidden;
}

.phazizSlider img
{
padding: 0;
border:  1px solid #ccc;
background-color: #eee;
width:  960px;
height: 300px;
top:  0;
left: 0
}

7) Include the Plugin File in Your Main Template-File:

<?php include(‘plugins/dbf_slideshow_gallery/dbf_slideshow_gallery_fe.inc.php’); ?>

8) Install and activate the Plugin at Your Backend. Thats it – now You should be able to select some Pix at the Backend of Your Constructr CMS Plugin-Section.

Any Questions? Visit http://phaziz.com/forum/!

Creating a simple Constructr CMS Theme

Let´s play araound and create a nice Theme for Constructr CMS. We will build a simple basic PHP-based Theme. We will have Page Titles, a Typo Head – linked to the Root-Level, an static Intro Section, a Text based Navigation and a Content Section. Thats all we need for our first Theme. How to create the Page-Titles? Take a Look at the following simple Code:

<?php

//Including some neccessary Files

require_once(‘data/config/config.inc.php’);
require_once(‘data/config/constructr_define.inc.php’);
require_once(‘content_decoder.inc.php’);
require_once(‘data/php/constructr.class.php’);

// Grabbing the actual Host and URL

$host      = $_SERVER['HTTP_HOST'];
$uri       = rtrim(dirname($_SERVER['PHP_SELF']), ‘/\\’);

// Creating some Paths for including Grafix, linking to CSS and Javascript

$ROOT_PATH = ‘http://’ . $host . $uri;
$IMG_PATH  = ‘http://’ . $host . $uri . ‘/data/workspace/pix/’;
$CSS_PATH  = ‘http://’ . $host . $uri . ‘/data/workspace/css/’;
$UPL_PATH  = ‘http://’ . $host . $uri . ‘/data/workspace/uploads/’;
$JS_PATH   = ‘http://’ . $host . $uri . ‘/data/workspace/js/’;

// Open the main Database Connnection to grab Pages and Content
$db =& new constructr($HOST,$USER,$PASSWD,$DATABASE);

?>

First, we include all the needed Files to interact with Constructr CMS. The $host and $uri Section is needed for the Navigation and the inclusion for the following Paths. In the next Part we set some relative Links for Images, CSS-Files, the Uploads and Javascript. Finaly we create the DB-Connection. That´s the Head of our main index.php-File.

<!DOCTYPE html
PUBLIC “-//W3C//DTD XHTML 1.0 Strict//EN”
“DTD/xhtml1-strict.dtd”>
<html xmlns=”http://www.w3.org/1999/xhtml” xml:lang=”de” lang=”de”>
<head>
<meta http-equiv=”content-type” content=”iso-8859-1″ />
<link rel=”stylesheet” type=”text/css” href=”<?php echo $CSS_PATH; ?>style.css” />

Above You will see the HTML-Head with the included CSS-File for the Style. The main Template FIle is a simple PHP-Document.

<?php

if(!isset($_GET['show_page']))
{
echo ‘<title>My Page Title</title>’;
}
else
{
echo ‘<title>My Page Title – ‘ . strtoupper($_GET['show_page']) . ‘</title>’;
}

?>

</head>
<body>

Above you will see the simple Creation of the Page Titles. The “$_GET['show_page']” is our Page Alias we will get from the CMS-Logic, to select the rght Content and more.

We just take the $_GET['show_page'] and transform it into uppercase Letters – thats all.

<div id=”head”>
<div id=”inner_head”>
<h1><a href=”<?php echo $ROOT_PATH; ?>”><span class=”orange”>My Typo Head – Could be a Graphic too</span></a></h1>
<p>
Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet.
</p>
</div><!–EOF DIV INNER_HEAD–>
</div><!–EOF DIV HEAD–>

This will be our Head-Section of the Template. We link the Typo-Logo to the Root-Path we created above. Then follows a static Part – it will be the same at every Page.

<div id=”navigation”>
<div id=”inner_navigation”>
<p>
<?php

$get_pages = $db -> query(”
SELECT *
FROM $DB_TABLE_CONSTRUCTR_PAGES
WHERE page_visibility = ‘1′
ORDER BY page_lft ASC
“);

while ($all_pages = $db -> fetch_array($get_pages))
{
$page_id      = $all_pages['page_id'];
$page_name  = $all_pages['page_name'];
$page_alias = $all_pages['page_alias'];
$page_lft   = $all_pages['page_lft'];
$page_class = $all_pages['page_class'];

$ACT_SHOW_PAGE = $_REQUEST['show_page'];

if(isset($ACT_SHOW_PAGE) && $ACT_SHOW_PAGE == $page_alias)
{
if($page_lft == ‘1′)
{
echo ‘<a href=”http://’ . $host . $uri . ‘/” title=”http://’ . $host . $uri . ‘/” class=”orange”>’ . $page_name . ‘</a>’;
}
else
{
echo ‘&#160;<a href=”http://’ . $host . $uri . ‘/’ . $page_alias . ‘/” title=”http://’ . $host . $uri . ‘/’ . $page_alias . ‘/” class=”orange”>’ . $page_name . ‘</a>’;
}
}
else
{
if($page_lft == ‘1′)
{
echo ‘<a href=”http://’ . $host . $uri . ‘/” title=”http://’ . $host . $uri . ‘/”>’ . $page_name . ‘</a>’;
}
else
{
echo ‘&#160;<a href=”http://’ . $host . $uri . ‘/’ . $page_alias . ‘/” title=”http://’ . $host . $uri . ‘/’ . $page_alias . ‘/”>’ . $page_name . ‘</a>’;
}
}
}

?>
</p>
</div><!–END OF INNER_NAVIGATION–>
</div><!–END OF NAVIGATION–>

That´s all we need for displaying the Navigation. We just select all visible Pages orderd by page_lft (Nested Sets-Structure).

<div id=”content”>
<div id=”inner_content”>
<?php

if(!isset($_GET['show_page']))
{
$get_page_id = $db -> query(”
SELECT *
FROM $DB_TABLE_CONSTRUCTR_PAGES
WHERE page_lft = ‘1′
LIMIT 1
“);

$act_page_id = $db -> fetch_array($get_page_id);
$page_id     = $act_page_id['page_id'];
$page_name     = $act_page_id['page_name'];
$page_class     = $act_page_id['page_class'];

$get_page_content = $db -> query(”
SELECT *
FROM $DB_TABLE_CONSTRUCTR_CONTENT
WHERE page_id = ‘$page_id’
AND visibility = ‘1′
ORDER BY sort ASC
“);

$content_counter = $db -> num_rows($get_page_content);

if($content_counter != 0)
{
while ($act_content = $db -> fetch_array($get_page_content))
{
$id         = $act_content['id'];
$page_id    = $act_content['page_id'];
$content    = $act_content['content'];
$visibility = $act_content['visibility'];
$sort       = $act_content['sort'];

echo unhtmlentities(base64_decode($content));
}
}
else
{
echo ‘No Content available on Page ‘ . $page_name;
}
}
else
{
$db        =& new constructr($HOST,$USER,$PASSWD,$DATABASE);
$host        = $_SERVER['HTTP_HOST'];
$uri       = rtrim(dirname($_SERVER['PHP_SELF']), ‘/\\’);
$show_page = $_REQUEST['show_page'];

$get_page_id = $db -> query(”
SELECT *
FROM $DB_TABLE_CONSTRUCTR_PAGES
WHERE page_alias = ‘$show_page’
LIMIT 1
“);

$act_page_id = $db -> fetch_array($get_page_id);
$page_id     = $act_page_id['page_id'];
$page_name     = $act_page_id['page_name'];

$get_page_content = $db -> query(”
SELECT *
FROM $DB_TABLE_CONSTRUCTR_CONTENT
WHERE page_id = ‘$page_id’
AND visibility = ‘1′
ORDER BY sort ASC
“);

$content_counter = $db -> num_rows($get_page_content);

if($content_counter != 0)
{
while ($act_content = $db -> fetch_array($get_page_content))
{
$id         = $act_content['id'];
$page_id    = $act_content['page_id'];
$content    = $act_content['content'];
$visibility = $act_content['visibility'];
$sort       = $act_content['sort'];

echo unhtmlentities(base64_decode($content));
}
}
else
{
echo ‘No Content available on Page ‘ . $page_name;
}
}

?>
</div><!–EOF DIV INNER_CONTENT–>
</div><!–EOF DIV CONTENT–>

Thats all we will need to grab the Content from our Database.

We need a Footer:

<div id=”footer”>
<div id=”inner_footer”>
&copy; <?php echo date(‘Y’); ?> Alle Rechte vorbehalten. Webdesign &amp; Programmierung <a href=”http://phaziz.com/”>phaziz <span class=”pink”>interface</span> design</a>.
</div><!–EOF INNER_FOOTER–>
</div><!–EOF FOOTER–>

Static Content with a little PHP for displaying the actual Year. And now, close the HTML-File and the Database Connection:

</body>
</html>
<?php

$db -> close();

?>

We are done! Thats all we need to create a individual Theme for Constructr CMS – a little HTML, a nice CSS-Style and a little PHP for grabbing the Page-Title, the Navigation and the Content.

Donate for Constructr CMS!



Follow me on twitter.com

XING

Wordpress.org

9rules.com