Friday, December 20, 2013

WEB PRESS CREATIVE ... a different kind of CMS





WEB PRESS CREATIVE ... a different kind of CMS


Web Press Creative (WPC) is a Content Management System (CMS) website with a new angle on the design. Although WPC is designed to be used primarily as a CMS website, there are some very unique ideas built into it. The development and design is centered at the core of the application in being “globally evolving”, meaning as the application becomes more complex and advanced and as additional functions and plug-in's are added to the core design the application itself will not need to be re-engineered or take on any changes to the scripts already in use.

Advanced GUI CMS Menu

As an example, most other designs in current use by other developers will build the applications around a structured database in which the tables and columns are in a state that puts limits on even minor changes and has a predetermined limit on functionality without making major changes to its database and all scripts using those affected database tables.

To make the changes that type of design would require the website to be completely shut down and re-written or patches to be applied, and once again limits would be inherent to its design with repeating those steps again and again.

That is a complete polar opposite to the foresight intensely developed into WPC. The design of WPC’s core is designed to be limited only by the limitations of the database in as the maximum data that can be stored in a single table row column and since the values WPC’s core uses to function are very small per column row making WPC almost limitless in the growth and complexity of its application core.

Also the core is written and arranged is such a way that adding any new secondary applications and functions act in the same manner as current “plug and play” devices do on present computer systems operating systems.

Additional software added to WPC is installed in the same type of action as Microsoft Windows installers and also have auto uninstall functionality deleting all files, folders and core values back to the state before the installation was made.

The core itself is developed in the same engineering order as any computer system, software and OS in which starting with a machine orated user unfriendly code system is first order, a primary programing language, CLI and void of any complex graphical user interface (GUI). As in layers of application complexity the languages become increasingly more powerful and easier to recall and use for the human user communicating with the machine.

Automated complex coding grouped into independent directives take the place of hundreds of lines of the code evolutionary lower than the one relative to the one the user currently operates.

Steps in this machine evolutionary language chain are completely necessary for the directives used in GUI's to work properly within every possible program environment without error.

WPC of course is limited by the operation of its environment, being server sided creating certain conditions which some elements of communication from user to machine, functionality and speed are greatly reduced in comparison to running an application and OS with the machine at the users location.

Security restrictions also play a major role in these limitations. WPC is engineered with evolutionary languages similar as described in the previous paragraphs of this document.


Using CLI type functionality and independently core wide sub-scripting makes adding applications by developers independent from core engineering developers simple to develop.

Built in design of plug-in type of applications remain consistent with the over all functionality, appearance and layout without any modifications and chances of application error become less likely.

The manner in which the WPC core functions makes it very flexible, adding variables and new values to its core are added to the database in a previously existing table column row string and in no way effects original values and can also be easily removed or changed without any changes to previous existing database structures instantly without interruption.

Data is stored in a single mySQL column row which maximizes page load speeds along with sever sided gzip compression makes WPC very fast with data transfers over the internet.

Coding also is written in its simplest form to optimize process speed and limit the chance of error.

Another insight into design is WPC’s functionality for the user to develop scripts on the fly and on the server without uploading. Security option features allow for scripts to be ran with a low level of possibility of a breach by unauthorized intruders.

Single allowable administrative users insure some level of anti-interception. But without an SSL user/password transmission over the internet is in plain text.

Scripts are executed from the server path independent from the domain or relative root/path. Themes and templates are embedded into page scripts by the “include” directive and not echo to the browser.

It has been a priority to place as much page data and values data in the database as allowed including HTML and CSS in as for reliable functionality will allow.

All these combined invites the administrative user to be creative within sessions. Uploading, deletion and control over these within an advanced menu system, access to all core database column rows and values with just a mouse click. Independent add-on specialized advanced user friendly GUI menus and custom options.

WPC is much more than an ordinary CMS website, the possibilities are virtually limitless.

No limitations, full version always free to the public.


Thank you,

Donald Dion
WPC Developer
CEO Softnet Technologies - Tulsa, OK
email: webpress.softnet@gmail.com

Saturday, December 14, 2013

Installation of Web Press Creative

Installation of Web Press Creative:


Above is the install script that is initiated at first run, this script is located in '/install_files/install.php'. All fields must have values for the install to complete, this includes the 'optional' value which acts as a placeholder if not replaced by a valid analytics script.

The 'footer message' will be added to the footer of each page, the default has a link back to Web Press Creative at webpresscreative.org and can contain any HTML wanted to be placed at the footer of each page within the area's limits.

Database credentials are needed at this point so the install script can create all needed tables and add data to them. The mySQL database must first be created through your hosting provider, it does not need to be an empty database the install will drop all tables that apply and with the prefix 'wpc_' only.

There are several tools available with the install package, these can be found at '/install_files/tools/'. These include 'code.php' which encodes and decodes any text into hex values, this is important as the database is encoded in hex. The 'v_test.php' script tests some important core values and sends those values to the browser for troubleshooting 'config.php' if necessary. 'keypasswrd.php' is used if the administration user and password is lost and will create new ones. It is very important to delete this and all install files from the server after use or the website will be vulnerable to compromise and unauthorized access.

Be sure install deleted all folders and files in the install directory '/install_files/' and the directory itself as well after install completes.

NOTES:

iSpell located in 'optional browser plug-in' folder is included in this package and is optional to install. It provides a spell check function for the editors and has no other function or purpose.

Web Press Creative incompatibility issues:

Important items to note about Web Press Creative is some incompatible issues with older browsers and some hosting providers that may exist that cause the scripts to not function. It is mandatory that all scripts are uploaded and are executed from the root directory in '/', 'public_html' or 'htdocs' of the server. Web Press Creative will not work if it is placed any other place on the server. Hosting server must be Linux OS and Apache server with PHP and mySQL database.

Recommend using Filezilla FTP client to upload files to server, a free download from the following website address: https://filezilla-project.org/download.php

A free hosting provider that will not cause this to be an issue is 'http://byethost.com/' if you choose to use free hosting with a free sub-domain this is an excellent hosting provider to use.

Another issue involves Microsoft's IE 8 and older browsers which are no longer used as of Windows 7. In this case using Google Chrome or Mozilla Firefox browsers will work. If your operating system is Windows XP Internet Explorer will not work with Web Press Creative and you must use one of the other mentioned browsers. Internet Explorer 10 has some other minor issues with the appearance of the Menu as it is a non-compliance browser there is a known issue with CSS borders in the settings section in some cases but does not effect the operation of the website.

Please report any bugs found to: webpress.softnet@gmail.com


GNU GPL v3 License:

THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.

Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License.

This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages arising from the use of this software.

You MAY distribute it and charge for that service. Of course, you MAY accomplish changes, add design and content to it and you MAY charge for that. When distributing you must clearly state what you have changed in Web Press Creative.

Important: You MAY NOT alter the license and/or the copyright.
Copyright hints are present inside the source code and also inside the generated output. Both may not be altered.

You must NOT pretend that Web Press Creative has been developed solely by you and market WPC in that way. If you intend on selling the WPC core, you MUST contact Web Press Creative developers and explain what you intend to do and why. WPC is available as a free download so charging for the application will need to have had custom changes specific to it for there to be reasonable to charge for it. And it is mandatory that WPC be notified for permission prior to distributing.

Web Press Creative uses libraries and other programs: iSpell - Copyright (c) 2002-2010 Red Egg Software All Rights Reserved. http://www.iespell.com, TinyMCE - Copyright (c) 2008 Moxiecode Systems AB. All rights reserved. http://www.tinymce.com

You also have to take care about the licenses of these third party components. For any questions on these third party components please ask the respective owner of the copyright directly.

Friday, December 13, 2013

Technical information using and developing functions scripts

Technical information using and developing functions scripts:

Functions scripts can not be executed directly, they need to be included in another script for use and require variables from config.php by using the following code:

'$doc_root=$_SERVER['DOCUMENT_ROOT'];
include_once ($doc_root.'/core/system/config/config.php');'

Functions are located in both the secured area and non-secured area 'open' in the '/fortomb/' directory '/core/system/fortomb/secure/functions/' and '/core/system/fortomb/open/functions/' . Each funtion must have several elements to the script to identify the function and give its description as explained below:

Below is an example of the code:

<?php
$doc_root=$_SERVER['DOCUMENT_ROOT'];
include_once ($doc_root.'/core/system/config/config.php');
$functions_name="Administrative HTML file list secure function - This function allows the administrator to view these files in both ascending or descending order while logged in even if the open version is not allowed. Also allows for file deletion.";
if($funct_off !== "yes") {
require ($doc_root.'/core/system/includes/secure.php');
if($status !== "secure") {echo "<a href=\"http://".$domain_name."/core/system/admin/login.php\"><u>Click here to login.</u></a>"; exit;}

if($options[15] == "yes") {

$delete_number=$_POST['delete'];

$data_name="pg.secure_admin_dir_html_file_list";

$templ_data=$data_name;

str_replace('secure', '', $templ_data, $true);
if($true > 0) {

include ($doc_root.'/core/system/includes/db_wpc_core.php');
$page_html=$db_wpc_core_out_decoded;
$data_name="x-css";
include ($doc_root.'/core/system/includes/db_wpc_core.php');
$page_html=$db_wpc_core_out_decoded.$page_html;

$dir = $doc_root.'/store/html/';
$files_dir = scandir($dir);
$files_dir[0] = NULL;
$files_dir[1] = NULL;
if($options[18] !== "yes") {$files_dir = array_reverse($files_dir);}

include ($doc_root.'/core/system/includes/templates/'.$template.'/menu_html_inc/inc_menu_header.php');
echo $page_html;
echo "<form id=\"delete_form\" name=\"delete_form\" method=\"post\" action=\"admin_html_files_list.php\">";
echo "<table width=\"700\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\">
<tr>
<td align=\"left\">";
if($delete_number > 0) {$delete_x=$delete_number+1; unlink($doc_root.'/store/html/'.$files_dir[$delete_x]);}

$files_dir = scandir($dir);

foreach($files_dir as $dir_list) {
$number++;
if($dir_list !== NULL && $number > 2) {
$number_list++;

echo "<p><a class=\"link_b\" style=\"text-decoration: none;\" href=\"http://".$domain_name."/store/html/".$dir_list."\" target=\"_blank\">[".$number_list."] <u>".$dir_list."</u></a>&nbsp;&nbsp;<input type=\"checkbox\" name=\"delete\" id=\"delete\" value=\"".$number_list."\" /></p>";
}}

echo "</td>
</tr>
<tr><td align=\"right\">";
if($number_list > 0) {echo "<input type=\"submit\" name=\"button\" id=\"button\" value=\"DELETE\" />";}
echo "</td></tr>
</table></form><br /><br />";

include ($doc_root.'/core/system/includes/templates/'.$template.'/menu_html_inc/inc_menu_footer.php');
}else{echo "<p>This is a secure page non-secure data can not be displayed.</p>"; exit;}
}else{echo "<p>Function 'uploaded file list' disabled.</p>";}
}
?>

The first bit of code following including the config.php script is to identify the function and give its description, the variable must remain the same as this example below:

$functions_name="Administrative HTML file list secure function - This function allows the administrator to view these files in both ascending or descending order while logged in even if the open version is not allowed. Also allows for file deletion.";

The function must be disabled during the core's scan for installed functions, this is done by the below code:

if($funct_off !== "off") { place function code here within these brackets }

The next element is for secured functions only:

require ($doc_root.'/core/system/includes/secure.php');
if($status !== "secure") {echo "<a href=\"http://".$domain_name."/core/system/admin/login.php\"><u>Click here to login.</u></a>"; exit;}

Optional code allows the administrator to disable the function:

if($options[15] == "yes") { place function code here within these brackets }







Thursday, December 12, 2013

Technical information using includes scripts

Technical information using includes scripts:

The scripts in includes can not be executed directly, they need to be included into other scripts for use. They all need to use the 'config.php' ie;

'$doc_root=$_SERVER['DOCUMENT_ROOT'];
include_once ($doc_root.'/core/system/config/config.php');'

This script is mandatory for necessary values to work. These are the includes scripts that are available:

db_dump.php

db_wpc_core.php

get_core_values.php

get_open_functions_data.php

get_open_menu_data.php

get_plugins_data.php

get_secure_functions_data.php

get_template_data.php

list_db_items.php

secure.php

db_dump.php: This script retrieves all data within the database. This data is placed in an multi-dementional array $db_dump.

$db_dump[x][0] --> item [x][1] --> data --> $db_dump[x][0/1] $items[7/8]

db_wpc_core.php: This script retrieves all core values. The retrieved core values data it will be contained as a string in '$core_value_set'. This variable is an array with each set of core values contained in each element of the array. Data separator is '|' descriptions are separated by a comma, data is in an encoded hex string in each element.

$core_value_set[0] contains core version information

$core_value_set[1] contains options values

$core_value_set[2] contains configuration values

$core_value_set[3] contains database credentials

$core_value_set[4] contains installed secure functions list

$core_value_set[5] contains installed open functions list

$core_value_set[6] contains the administrative user and password

get_open_functions_data.php: This script retrieves all installed functions in the non-secure or 'open' section and places the data in an array: $open_functions_paths[x] --> $open_functions_names[x] --> $items[3]



get_open_menu_data.php: This script retrieves all installed menus in the non-secure or 'open' section and places the data in an array: $open_menus[x] $open_menu_paths[x] --> $open_menu_names[x] --> $items[1]

get_plugins_data.php: This script retrieves all installed plug-in's and places the data in an array: $plugin_menus[x] $plugin_paths[x] --> $plugin_names[x] --> $items[4]

get_open_functions_data.php: This script retrieves all installed functions in the secure section and places the data in an array: $secure_functions_paths[x] --> $secure_functions_names[x] --> $items[2]

get_open_menu_data.php: This script retrieves all installed menus in the secure section and places the data in an array: $secure_menus[x] $secure_menu_paths[x] --> $secure_menu_names[x] --> $items[0]

get_template_data.php: This script retrieves all installed templates and places the data in an array: $menu_path_temp[x] $template_dirs[x] $template_paths[x] --> $template_names[x] --> $items[9]

list_db_items.php: This script retrieves all data within the database. It then is separated into its item type group. This data is placed in an array: ($db_items_all[x] $db_items[x] --> $items[5] $items_title_list[x]) ($pg_name[x] $page_list[x] --> $items[6] $page_title_list[x])

secure.php: This script secures pages that require login to execute. $status="secure" user is logged in, $status="not_secured" user is not logged in.


All includes scripts are located in: '/core/system/includes/'

Technical information on developing plug-in's

Technical information on developing plug-in's:

Plug-in's allows for various operations of the core to enhance the website or additions to the administrative user addition options and control of the website and its content.

All plug-in's need to be located at this directory path: '/core/systems/plugins/' Each added plug-in must be place in its unique folder within this directory. All plug-in scripts and images need to be placed within this folder. Each plug-in needs to be identified by a script named 'plugin_name.php'. The menu for the plug-in will also be placed in this script. The plug-in menu will need to be disabled during the core's search for plug-in's installed. Below is code to disable this during that time.

if($plugin_off !== "off") { place plug-in menu code here within these brackets }


The menu HTML code should be developed in nested tables as to not effect the structure and CSS of the menu displaying this data, this menu will be included into the menu displaying it. Below is example of HTML plug-in menu code, it is important that the overall width of these tables to be set at 100% and not a set pixel width so it can fit into the displaying menu consistently with all other plug-in menus and not effect the width of the displaying menu.

$plugin_name="RSS Feed v1.0";

$plugin_menu="<table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"5\">
<tr>
<td> <center><div class=\"text_1\" style=\"border-bottom:#000000 solid 1px; width:100%; text-align:center\"><b>Menu for RSS Feed v1.0</b>
</div></center>
<div class=\"text_1\"><br />Before the RSS (Atom v1.0) will validate it needs a valid email address.<br />
The feed is located at:<br />
<b>http://".$domain_name."/rss_feed/?<span style=\"color:#0000FF;\"> [ name of the page ]</span></b>
</div></td>
</tr>
</table><form action=\"plugins.php\" method=\"post\" enctype=\"application/x-www-form-urlencoded\" name=\"rss_feed\">
<table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"5\">
<tr>
<td width=\"65\" align=\"left\" valign=\"middle\"><div class=\"text_1\">email addres:</div></td>
<td align=\"left\" valign=\"middle\"><input class=\"detail\" name=\"rss_email_address\" type=\"text\" value=\"".$array_values[1]."\" /></td>
<td width=\"65\" align=\"right\" valign=\"middle\"><input class=\"button\" style=\"cursor:pointer; font-size:10px; font-family:Arial, Helvetica, sans-serif; color:#0000FF; font-weight:bold;\" name=\"submit_rss_email\" type=\"submit\" value=\" Save \"></td>
</tr>
</table>
<table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"5\">
<tr>
<td align=\"left\" valign=\"middle\"><div class=\"text_1\">To delete this plug-in click on this delete button.</div></td>
<td width=\"65\" align=\"right\" valign=\"middle\"><input class=\"button\" onClick=\"return confirm('Are you sure you want to delete this plug-in?')\" style=\"cursor:pointer; font-size:10px; font-family:Arial, Helvetica, sans-serif; color:#FF0000; font-weight:bold;\" name=\"delete_rss_feed\" type=\"submit\" value=\"Delete\" /></td>
</tr>
</table><table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"5\">
<tr>
<td><center><div style=\"border-bottom:#000000 solid 1px; width:100%; text-align:center;\"></div></center></td>
</tr>
</table></form><br />";
The two variables that the core will be gathering data from are: '$plugin_name' and '$plugin_menu'.

Delete plug-in function must have this exact code below and all buttons on this menu must ust the exact CSS and style as this button as well.

<input class=\"button\" onClick=\"return confirm('Are you sure you want to delete this plug-in?')\" style=\"cursor:pointer; font-size:10px; font-family:Arial, Helvetica, sans-serif; color:#FF0000; font-weight:bold;\" name=\"delete_rss_feed\" type=\"submit\" value=\"Delete\" />

The code to delete the plug-in must also have certain elemts included for the delete to function properly. Below is an example of a delete script, all that needs be changed is the directories, folders and file names of the plug-in to be deleted.

<?php
ini_set('display_errors', 'off');
$con=mysql_connect($db_host,$db_user,$db_pass);
@mysql_select_db($db_name, $con) or die(mysql_error());

@mysql_query("DELETE QUICK FROM wpc_core WHERE pagename = sys.email_rss");

mysql_close($con);

function deleteFiles($dir,$doc_r) {
str_replace('.', '', $dir, $true);
if($true == 0) {$dirct=$doc_r.$dir.'/'; $file_list=scandir($dirct);}
$cnt=2;
while(strlen($file_list[$cnt]) > 0) {
str_replace('.', '', $file_list[$cnt], $true);
if (file_exists($dirct.$file_list[$cnt]) && $true > 0)
 {unlink($dirct.$file_list[$cnt]); $file_list[$cnt]=NULL;}
$cnt++;
}
$cnt=2;
$elmt=count($file_list)+1;
while($elmt > $cnt) {
if(strlen($file_list[$cnt]) > 0) {$folder=$file_list[$cnt];}
$cnt++;}
return $folder;
}

$base_dir='/core/system/plugins/rss_feed';
$start_dir=$base_dir;
$run=scandir($doc_root.$base_dir.'/');
while(strlen($run[2]) > 0) {
$run=scandir($doc_root.$base_dir.'/');
$rem_dir=deleteFiles($start_dir,$doc_root);
$nxt=0;
while(strlen($rem_dir) > 0 || strlen($files_s) > 0) {
$dir_add=$base_dir.'/'.$rem_dir;
$dir_fldrs[$nxt]=$doc_root.$dir_add; $nxt++;
$rem_dir=deleteFiles($dir_add,$doc_root);
str_replace('.', '', $rem_dir, $true);
if($true == 0 && strlen($rem_dir) > 0) {$files_s=scandir($doc_root.$dir_add.'/');}
} $nxt=count($dir_fldrs);
while($nxt > 0) {
if(strlen($dir_fldrs[$nxt-1]) > 0) {
if (file_exists($dir_fldrs[$nxt-1])) {$files_l=scandir($dir_fldrs[$nxt-1].'/');}
if(strlen($files_l[2]) == 0) {
if (file_exists($dir_fldrs[$nxt-1])) {rmdir($dir_fldrs[$nxt-1]);}}}
$nxt--;
}}
if (file_exists($doc_root.$base_dir)) {$files_l=scandir($doc_root.$base_dir.'/');}
if(strlen($files_l[2]) == 0) {
if (file_exists($doc_root.$base_dir)) {rmdir($doc_root.$base_dir);}}

$base_dir='/core/system/fortomb/secure/menu/rss_feed_menu';
$start_dir=$base_dir;
$run=scandir($doc_root.$base_dir.'/');
while(strlen($run[2]) > 0) {
$run=scandir($doc_root.$base_dir.'/');
$rem_dir=deleteFiles($start_dir,$doc_root);
$nxt=0;
while(strlen($rem_dir) > 0 || strlen($files_s) > 0) {
$dir_add=$base_dir.'/'.$rem_dir;
$dir_fldrs[$nxt]=$doc_root.$dir_add; $nxt++;
$rem_dir=deleteFiles($dir_add,$doc_root);
str_replace('.', '', $rem_dir, $true);
if($true == 0 && strlen($rem_dir) > 0) {$files_s=scandir($doc_root.$dir_add.'/');}
} $nxt=count($dir_fldrs);
while($nxt > 0) {
if(strlen($dir_fldrs[$nxt-1]) > 0) {
if (file_exists($dir_fldrs[$nxt-1])) {$files_l=scandir($dir_fldrs[$nxt-1].'/');}
if(strlen($files_l[2]) == 0) {
if (file_exists($dir_fldrs[$nxt-1])) {rmdir($dir_fldrs[$nxt-1]);}}}
$nxt--;
}}
if (file_exists($doc_root.$base_dir)) {$files_l=scandir($doc_root.$base_dir.'/');}
if(strlen($files_l[2]) == 0) {
if (file_exists($doc_root.$base_dir)) {rmdir($doc_root.$base_dir);}}

unlink($doc_root.'/rss_feed/index.php');
chdir ($doc_root);
rmdir($doc_root.'/rss_feed');

$meta_refresh="<meta http-equiv=\"refresh\" content=\"1;url=http://".$domain_name."/core/system/fortomb/secure/menu/gui_cms_menu/plugins.php\">";
?>

Database entries must be deleted as well if any as seen above. This script must be placed into the root folder of the plug-in folder. Meta refresh is used to return to the GUI CMS Menu.

Tuesday, December 10, 2013

Technical information on core values

Technical information on core values:

Options values:

These values are located at the database page name 'sys.options_table' These values can be edited with the CODE editor only and values can be added to this table by following this syntax. Any new values and their descriptions will be added to the settings list without any further adjustments.

[1] main template
[2] use template as location of page HTML? (no/template)
[3] location of page HTML if location is not template
[4] location of CSS for user pages
[5] administrative title
[6] copyright information
[7] page title
[8] website name title
[9] page description location
[10] location of admin main menu CSS
[11] admin main menu template
[12] allow file upload open (yes/no)
[13] allow file upload secure (yes/no)
[14] allow file upload list open (yes/no)
[15] allow file upload list secure (yes/no)
[16] allow store file list 'PHP' (yes/no)
[17] allow store file list 'HTML' (yes/no)
[18] reverse file list order (yes/no)
[19] login to menu path from '/core/system/'
[20] WPC core version
[end]
,default_template,no,default_template,css.index,Web Press Creative,Web Press Creative - Copyright 2013,Web Press Creative version 5.63,Web Press Creative,default,css_main,default_template,yes,yes,yes,yes,yes,yes,yes,fortomb/secure/menu/gui_cms_menu/menu.php,5.63

Above is how the options table appears in the CODE editor. It is easy to read and only follows a few guidelines to work properly. First the values must always be separated by comma's and can never be placed in the description area. The values already in place can not be changed in their order or removed. There can never be a NULL or empty value between comma's and the value itself can not contain any comma's. If a comma is needed in the value a hex value can be used '%2C'.

The area before the values begin above '[end]' are where the descriptions of the values are placed. There must be a description for each value this is not optional. The description must be placed after its designator within the brackets '[' and ']' only. This description must be in the exact location as the value counting from left to right. This description will be shown along with its value in the setting menu section. These values are encoded in hex within the database and in some cases code such as HTML will be lost in the second conversion so it must be converted to another value in this table then translated by the script using it later. The last set '[end]' must always remain and be the last in the description list.

This table can hold a very large number of values, the values should be kept to a minimal length as not to use up available size allowed at its maximum length. The value between brackets in the descriptions will match the values array element within the $options[x] variable and will be applied to that variable by the the configuration script within the core. That value is globally available throughout the website.

Configure values:

These values are located at the database page name 'sys.config_values' These values can be edited with the CODE editor only and values can be added to this table by following this syntax. Any new values and their descriptions will be added to the settings list without any further adjustments.

[1] domain name ($domain_name)
[2] advertisement ($advertise)
[3] session time in seconds ($session_time)
[4] analytics tracking code ($tracking_code)
[5] ad rotate script location
[end]
^webpresscreative.org^Web Press Creative Community Project <a class="link_w" href="http://webpresscreative.org" target="_blank">webpresscreative.org</a> Tulsa, Oklahoma^12000^<script> (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){ (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o), m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m) })(window,document,'script','//www.google-analytics.com/analytics.js','ga'); ga('create', 'UA-44773651-1', 'webpresscreative.org'); ga('send', 'pageview'); </script>^http://webpresscreative.org/store/build/avt.php

Above is how the configure values data appears in the CODE editor. It is easy to read and only follows a few guidelines to work properly. First the values must always be separated by '^' and can never be placed in the description area. The values already in place can not be changed in their order or removed. There can never be a NULL or empty value between separators and the value itself can contain any comma's.

The area before the values begin above '[end]' are where the descriptions of the values are placed. There must be a description for each value this is not optional. The description must be placed after its designator within the brackets '[' and ']' only. This description must be in the exact location as the value counting from left to right. This description will be shown along with its value in the setting menu section. These values are encoded in hex within the database and in some cases code such as HTML will be lost in the second conversion so it must be converted to another value in this table then translated by the script using it later. The last set '[end]' must always remain and be the last in the description list.

This table can hold a very large number of values, the values should be kept to a minimal length as not to use up available size allowed at its maximum length. The value between brackets in the descriptions will match the values array element within the $options[x] variable and will be applied to that variable by the the configuration script within the core. That value is globally available throughout the website.

All core values can be obtained by using the 'get_core_values.php' script located in '/core/system/includes/'. The includes and functions scripts can not be executed directly, they all need to be included withing the script that uses them and that script needs to have data from the configure script as well.

The retrieve core values data it will be contained as a string in '$core_value_set'. This variable is an array with each set of core values contained in each element of the array. Data separator is '|' descriptions are separated by a comma, data is in an encoded hex string in each element.

$core_value_set[0] contains core version information

$core_value_set[1] contains options values

$core_value_set[2] contains configuration values

$core_value_set[3] contains database credentials

$core_value_set[4] contains installed secure functions list

$core_value_set[5] contains installed open functions list

$core_value_set[6] contains the administrative user and password

Technical information on developing templates

Technical information on developing templates:

Templates can contain any type of code needed to make the pages. There are various ways to present the CSS and JavaScript for the pages. Since both of those types of code are located in the head of the document it is written into the PHP header script and can be inline or external CSS, or use the database for the CSS and JavaScript.

There are several elements that need to be present for the template to function. One is a PHP script to have the template name data. This page should follow this syntax and must be named 'template_name.php':

<?php
$template_name="Name of the template";
$template_menu_info="/core/system/path to template menu”;
?>

The two variables are '$template_name' which has the template unique name in normal text and '$template_menu_info' that contains the path to the template menu if any. If the is no menu for the template use this path instead:

$template_menu_info="/core/system/".$options[19];

This will sent the user back to the menu in current use if the menu button is clicked.

This script and all other parts to the template must be located in a unique folder at this path:

'/core/system/includes/templates/TEMPLATE FOLDER/'

Template elements themselves and images must be placed into folders at this path below and with these exact folder names and file names:

User pages:

'/core/system/includes/templates/TEMPLATE FOLDER/'images/'
'/core/system/includes/templates/TEMPLATE FOLDER/index_html_inc/inc_index_header.php'
'/core/system/includes/templates/TEMPLATE FOLDER/index_html_inc/inc_index_footer.php'

Administration pages:

'/core/system/includes/templates/TEMPLATE FOLDER/index_menu_inc/inc_menu_header.php'
'/core/system/includes/templates/TEMPLATE FOLDER/index_menu_inc/inc_menu_footer.php'
'/core/system/includes/templates/TEMPLATE FOLDER/index_menu_inc/inc_admin_main_menu_header.php'
'/core/system/includes/templates/TEMPLATE FOLDER/index_menu_inc/inc_admin_main_menu_footer.php'
'/core/system/includes/templates/TEMPLATE FOLDER/index_menu_inc/inc_admin_documentation_header.php'
'/core/system/includes/templates/TEMPLATE FOLDER/index_menu_inc/inc_admin_documentation_footer.php'
'/core/system/includes/templates/TEMPLATE FOLDER/index_menu_inc/images/'

Other elements that are needed are a preview image and security index.html files to block viewing of directory contents. The preview image must be named 'preview.jpg' and be located at:

'/core/system/includes/templates/TEMPLATE FOLDER/preview.jpg'

The size of this image must be 300x229 px and is a screen shot of the template for previewing.

Security index.html files need to be located in all folders of the new template and have this HTML code in them:

<!-- access directly to this directory disallowed -->


Here is a sample of the PHP code for the header and footer for the user pages:

inc_index_header.php

<?php
// main header
$data_name=$options[4]."_".$template;
include ($doc_root.'/core/system/includes/db_wpc_core.php');
$page_css=$db_wpc_core_out_decoded;

$data_name=str_replace('pg.', 'pgd.', $templ_data);
include ($doc_root.'/core/system/includes/db_wpc_core.php');
$page_desc=$db_wpc_core_out_decoded;
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title><?php echo $page_title." ".$page_desc; ?></title>
<meta http-equiv="X-UA-Compatible" content="IE=9" />
<!--[if lt IE 9]>
<meta http-equiv="X-UA-Compatible" content="IE=8" />
<![endif]-->
<link rel="shortcut icon" href="http://<?php echo $domain_name; ?>/favicon.ico" />
<link rel="alternate" type="application/atom+xml" title="RSS" href="http://<?php echo $domain_name; ?>/rss_feed/?<?php echo $page; ?>" />
<?php echo $page_css; ?>
<style type="text/css"> html{display : none ; } </style>
<script type="text/javascript">
<!--
if( self == top ) {
document.documentElement.style.display = 'block' ;
} else {
top.location = self.location ;
}
//-->
</script>
<?php echo $tracking_code; ?>
</head>
<body>
<div class="top_header"></div>
<div class="lower_header"><div class="bizbook"><?php echo $header_name; ?></div>
</div>
<div class="bluebar"><?php echo $header_name." ".$page_desc; ?></div>
<div class="main_container">
<table width="100%" height="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td height="112" align="center" valign="middle">&nbsp;</td>
</tr>
<tr>
<td align="center" valign="top">


inc_index_footer.php

<?php
// main footer
?>
</td>
</tr>
<tr>
<td height="30" align="center" valign="bottom"><div class="footer"><span style="color:white; font-size:9px; line-height:30px;"><?php echo $advertise; ?> | <?php echo $copyright; ?></span>
</div></td>
</tr>
</table>
</div>
</body>
</html>

A breakdown of the code starting with the header:

$data_name=$options[4]."_".$template;
include ($doc_root.'/core/system/includes/db_wpc_core.php');
$page_css=$db_wpc_core_out_decoded;

This bit of code calls to use a script located in includes that accesses the database and retrieves data from location name '$data_name' and returns decoded data '$db_wpc_core_out_decoded'. The location of this page CSS is '$options[4]'. Unless a new variable with new CSS location data is added to the core it should always be found from this variable.

$data_name=str_replace('pg.', 'pgd.', $templ_data);
include ($doc_root.'/core/system/includes/db_wpc_core.php');
$page_desc=$db_wpc_core_out_decoded;

This bit of code should always remain unchanged and returns the page title and page name in variable '$page_desc'. Other variables used within the header is highlighted above.

HTML data for the body of the page is located in the database and is inserted between the header and footer so the HTML open and close tags should be in their proper places taking in account that the user can change the body of the page HTML code any way they choose to, so header and footer code should take this in account and be written to not be affected by this.

Database data must follow this syntax for the core to use that data to create the page. For the CSS the database page name can be anything but must be all lower case and not have any spacing or other characters besides alpha numeric. Spaces should be replace by an under score. This database page name must begin with the index extension 'css', the css will be added to the page itself ie: (css.any_name), it is not external CSS and must have the proper open and close tags, JavaScript can also be added with the CSS with the proper open and close tags as well. This needs to be edited in the CODE editor only, using the HTML editor all open and close tags will be removed.

The body HTML code database page name can also be anything and follow the same syntax as the above except the index extension must be 'pg' and the character set 'secure' and 'docs' can not be included in the database page name. These are used with secure pages and documents only. The HTML editor may be used for this HTML code and the CODE editor as well. Some HTML may be altered or removed by the HTML editor, in those cases the CODE editor must be used. The template name needs to be added to the database page name as in this example: pg.any_name_template_name

For the page title and page name only change the index extension to 'pgd' ie; (pgd.any_name_template_name). The only editor that can be used for this page data is the CODE editor. The HTML editor will add paragraph tags causing the HTML code to become invalid. It is mandatory the database page name remain exactly the same as the HTML database page name except the index extension.


Keep in mind the actual page will be located on the root directory so images and links will need to take that path in account.

Developing new menu templates:

This is not necessary for all new templates, but if the developer wants to add these theme elements to the new templates or develop these separately these guidelines will need to be followed.

Header and footer PHP code:

inc_menu_header.php

<?php
// Menu Header
$data_name=$options[4]."_".$template;
include ($doc_root.'/core/system/includes/db_wpc_core.php');
$page_css=$db_wpc_core_out_decoded;

$data_name=str_replace('pg.', 'pgd.', $templ_data.'_'.$page_desc_loc);
include ($doc_root.'/core/system/includes/db_wpc_core.php');
$page_desc=$db_wpc_core_out_decoded;
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title><?php echo $admin_title; ?> <?php echo $page_desc; ?></title>
<meta http-equiv="X-UA-Compatible" content="IE=9" />
<!--[if lt IE 9]>
<meta http-equiv="X-UA-Compatible" content="IE=8" />
<![endif]-->
<link rel="shortcut icon" href="http://<?php echo $domain_name; ?>/favicon.ico" />
<?php echo $page_css; ?>
<?php echo $menu_page_css; ?>
<style type="text/css"> html{display : none ; } </style>
<script type="text/javascript">
<!--
if( self == top ) {
document.documentElement.style.display = 'block' ;
} else {
top.location = self.location ;
}
//-->
</script>
<?php echo $tracking_code; ?>
</head>
<body>
<div class="top_header"></div>
<div class="lower_header"><div class="bizbook"><?php echo $admin_title; ?></div>
</div>
<div class="bluebar"><?php echo $admin_title; ?> <?php echo $page_desc; ?></div>
<div class="main_container">
<table width="100%" height="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td height="112" align="center" valign="middle">&nbsp;</td>
</tr>
<tr>
<td align="center" valign="top">
inc_menu_footer.php

<?php
// Menu Footer
?>
</td>
</tr>
<tr>
<td height="30" align="center" valign="bottom"><div class="footer"></div></td>
</tr>
</table>
</div>
</body>
</html>

inc_admin_main_menu_header.php

<?php
// Admin main menu header
$doc_root=$_SERVER['DOCUMENT_ROOT'];
include_once ($doc_root.'/core/system/config/config.php');

$data_name="css.admin_menu_".$options[10]."_".$template;
include ($doc_root.'/core/system/includes/db_wpc_core.php');
$page_css=$db_wpc_core_out_decoded;

$data_name=str_replace('pg.', 'pgd.', $templ_data.'_'.$page_desc_loc);
include ($doc_root.'/core/system/includes/db_wpc_core.php');
$page_desc=$db_wpc_core_out_decoded;
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title><?php echo $admin_title; ?> <?php echo $page_desc; ?></title>
<meta http-equiv="X-UA-Compatible" content="IE=9" />
<!--[if lt IE 9]>
<meta http-equiv="X-UA-Compatible" content="IE=8" />
<![endif]-->
<link rel="shortcut icon" href="http://<?php echo $domain_name; ?>/favicon.ico" />
<?php echo $page_css; ?>
<style type="text/css"> html{display : none ; } </style>
<script type="text/javascript">
<!--
if( self == top ) {
document.documentElement.style.display = 'block' ;
} else {
top.location = self.location ;
}
//-->
</script>
<?php echo $tracking_code; ?>
</head>
<body>
<div class="top_header"></div>
<div class="lower_header"><div class="bizbook"><?php echo $page_desc; ?></div>
</div>
<div class="bluebar"><?php echo $admin_title; ?> Administration Main Menu List of Options</div>
<div class="main_container">
<table width="100%" height="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td height="112" align="center" valign="middle">&nbsp;</td>
</tr>
<tr>
<td align="center" valign="top">
<table width="70%" border="0" cellspacing="0" cellpadding="20">
<tr>
<td align="right"><form id="logout" name="logout" method="post" action="http://<?php echo $domain_name; ?>/core/system/admin/logout.php">
<input type="submit" name="button" id="logout" value="Logout" />
</form></td>
</tr>
</table>

inc_admin_main_menu_footer.php

<?php
// Admin main menu footer
?>
</td>
</tr>
<tr>
<td height="30" align="center" valign="bottom"><div class="footer"><span style="color:white; font-size:9px; line-height:30px;"><?php echo $advertise; ?> | <?php echo $copyright; ?></span>
</div></td>
</tr>
</table>
</div>
</body>
</html>

inc_admin_documentation_header.php

<?php
// Admin documentation header
$doc_root=$_SERVER['DOCUMENT_ROOT'];
include_once ($doc_root.'/core/system/config/config.php');

$data_name="css.admin_docs_".$options[10]."_".$template;
include ($doc_root.'/core/system/includes/db_wpc_core.php');
$page_css=$db_wpc_core_out_decoded;

$data_name=str_replace('pg.', 'pgd.', $templ_data.'_'.$page_desc_loc);
include ($doc_root.'/core/system/includes/db_wpc_core.php');
$page_desc=$db_wpc_core_out_decoded;
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title><?php echo $admin_title; ?> <?php echo $page_desc; ?></title>
<meta http-equiv="X-UA-Compatible" content="IE=9" />
<!--[if lt IE 9]>
<meta http-equiv="X-UA-Compatible" content="IE=8" />
<![endif]-->
<link rel="shortcut icon" href="http://<?php echo $domain_name; ?>/favicon.ico" />
<?php echo $page_css; ?>
<style type="text/css"> html{display : none ; } </style>
<script type="text/javascript">
<!--
if( self == top ) {
document.documentElement.style.display = 'block' ;
} else {
top.location = self.location ;
}
//-->
</script>
<?php echo $tracking_code; ?>
</head>
<body>
<div class="top_header"></div>
<div class="lower_header"><div class="bizbook"><?php echo $admin_title; ?></div>
</div>
<div class="bluebar"><?php echo $admin_title; ?> <?php echo $page_desc; ?></div>
<div class="main_container">
<table width="100%" height="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td height="112" align="center" valign="middle">&nbsp;</td>
</tr>
<tr>
<td align="center" valign="top">
inc_admin_documentation_footer.php

<?php
// Admin documentation footer
?>
</td>
</tr>
<tr>
<td height="30" align="center" valign="bottom"><div class="footer"><span style="color:white; font-size:9px; line-height:30px;"><?php echo $advertise; ?> | <?php echo $copyright; ?></span>
</div></td>
</tr>
</table>
</div>
</body>
</html>

The syntax for the database names are the same as the user pages except for the addition of two added charater sets, 'secure' and 'docs' are used here.

HTML data for the body of the page is located in the database and is inserted between the header and footer so the HTML open and close tags should be in their proper places taking in account that the user can change the body of the page HTML code any way they choose to, so header and footer code should take this in account and be written to not be affected by this.

Database data must follow this syntax for the core to use that data to create the page. For the CSS the database page name can be anything but must be all lower case and not have any spacing or other characters besides alpha numeric. Spaces should be replace by an under score. This database page name must begin with the index extension 'css', the css will be added to the page itself ie: (css.any_name), it is not external CSS and must have the proper open and close tags, JavaScript can also be added with the CSS with the proper open and close tags as well. This needs to be edited in the CODE editor only, using the HTML editor all open and close tags will be removed. CSS database name may end with a location identifier but is not mandatory and is defendant upon how the PHP is written for the menu template.

The body HTML code database page name can also be anything and follow the same syntax as the above except the index extension must be 'pg' and the character set 'secure' and 'docs' can not be included in the database page name. These are used with secure pages and documents only. The HTML editor may be used for this HTML code and the CODE editor as well. Some HTML may be altered or removed by the HTML editor, in those cases the CODE editor must be used. The template name does not need to be added to the database page name as in this example: pg.secure_any_name. Also the character set 'secure' must be added to the database page name so this data can not be viewed by unauthorized users, ie; (pg.secure_any_name). HTML database name may end with a location identifier but is not mandatory and is defendant upon how the PHP is written for the menu template.

For the page title and page name only change the index extension to 'pgd' ie; (pgd.secure_any_name). The only editor that can be used for this page data is the CODE editor. The HTML editor will add paragraph tags causing the HTML code to become invalid. It is mandatory the database page name remain exactly the same as the HTML database page name except the index extension.


For secured documents the database page name would be: pg.secure_docs_any_name. Documents that are not secured: pg.docs_any_name. All the above syntax would also apply.