?
Solved

Content Management system for existing website

Posted on 2011-03-01
12
Medium Priority
?
304 Views
Last Modified: 2012-05-11
Hi

Could anyone reccommend a CMS (preferably open source) that is easy to install on top of a pre existing site?

It doesnt have to be too functionality rich, just basic CMS functionality really

Thanks
0
Comment
Question by:coolispaul
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 5
  • 3
  • 2
  • +2
12 Comments
 
LVL 27

Expert Comment

by:Lukasz Chmielewski
ID: 35007688
Surely you can pick from some of these:
http://php.opensourcecms.com/
0
 
LVL 39

Expert Comment

by:Aaron Tomosky
ID: 35007792
The top php cms are joomla, Drupal, dragonfly, wordpress. Some dont consider wordpress a cms...
0
 

Author Comment

by:coolispaul
ID: 35007848
Thanks

Are there any in particular that make it easy to just install on top of an existing webiste? Or do you have to build your website into the CMS?

Cheers
Paul
0
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 
LVL 39

Accepted Solution

by:
Aaron Tomosky earned 400 total points
ID: 35007907
No cms will install on top of a website. It can be just part of a site, many people imstallwordpress like this. Mysite.com/blog is where wordpress is rooted.

Unless you do something like this, you really have to redisign your whole site into the cms.
0
 
LVL 34

Assisted Solution

by:Slick812
Slick812 earned 1200 total points
ID: 35008564
greetings coolispaul, , There are advantages and dis-advantages to using a pre-made and tested open source content management system. And you can install many (maybe all) of them in any public web directory on your server, it does not have to be the main web address directory for that site, however if it is not in the main web address directory, YOU will have to figure out how to integrate that CMS into your web site structure, as a CMS is designed to be the only web site structure that is used, and usually offer few examples of working outside of it's CMS structures and methods, but you can easily place links to web pages on your site that are not in the CMS calling method of page=about , , like this, for the about page-
http://www.cms.com/?page=about
I do not really understand what you hope to do when you say  "just install on top of an existing website", if you want to change your website to a CMS, you will have to abandon your current set up, and convert over to the CMS, but it is also possible to have a separate add on to your existing site that uses a CMS (I would not think of this as being "install on top"). Please consider that the large and popular CMS like Joomla , Drupal and Wordpress can seem very restrictive for the options they have, if you are used to coding in php without a pre-made structure to limit you.
For a lightweight CMS, you might consider these two -
http://get-simple.info/

http://krneky.com/en/wondercms

but there are a very large amount of CMS available for php with all kinds of features and modules, so you'll have to kinda know what you need or want in order to pick out a CMS.
0
 
LVL 34

Expert Comment

by:Slick812
ID: 35008761
sorry I forgot this, it's an article that gives you some advice on picking a CMS

http://webmasterformat.com/blog/how-to-choose-cms
0
 

Author Comment

by:coolispaul
ID: 35008911
great thanks guys

I guess my question was really whether there is a cms that doesnt use a database i.e reads/writes to HTML files directly

So, rather than having to recode my site to become a CMS, the site i already have in HTML i can content manage somehow.
Perhaps the cms software can directly read the HTML file and save out the changes. (in theory!)

Cheers
0
 
LVL 34

Assisted Solution

by:Slick812
Slick812 earned 1200 total points
ID: 35009271
OK, thanks coolispaul, for explaining more of what you need. I am not sure about what you may think a content management system is suppose to do, as your requirements "directly read the HTML file and save out the changes (to the html file)", , to me it does not seem to be php content management, which, the way I see it, is to have a single web address like www.cms.com  and then do all of the many pages in that web site by only using that web addy, with a php call for the _GET. like this
http://www.cms.com/?page=about
http://www.cms.com/?page=products1
http://www.cms.com/?page=products2&id=largesize
with all of the different pages "content" that it is managing, in a flat file or database, if it has the page=about, then the words, menus and images for the about page is read from the file or database, and rendered in a changing PHP output, not as an fixed html output. Dynamic  PHP and Static HTML are two different ways of thinking about presenting your web content.

But for your requirements, there are many JavaScript Html Content Editors, which can have you (or people that do content modifications) place the content (html) on a web page and then it is posted to a php page, which can change (by rewriting) files (php, html or others), and add or subtract content, or create new html pages, as in php you control what and how the files are written. I would think that this may be the approach you may want to consider.
0
 
LVL 34

Expert Comment

by:Slick812
ID: 35009346
some JavaScript Html Content Editors you might look at -

http://tinymce.moxiecode.com/

http://nicedit.com/

http://ckeditor.com/
0
 
LVL 39

Expert Comment

by:Aaron Tomosky
ID: 35009508
Most functionality can be done right in php and JavaScript Check out using libraries like Jquery adodb and maybe a php framework to help you out.
0
 
LVL 111

Assisted Solution

by:Ray Paseur
Ray Paseur earned 400 total points
ID: 35011813
When you say you want to install a CMS "on top" of a web site, that seems counterintuitive to me.  Let me tell you what my experience has been in this area.

I have had staffers ask for their own blog.  It was very easy to do - we just installed WordPress in a separate directory and let them blog away happily.  Entire process was done in an hour or two, including custom themes.

I have had staffers ask to be able to update some of the pages of the site.  Of course they did not know HTML and did not want to learn HTML.  To help them I extracted the TinyMCE editor from Wordpress and built a simple CMS with get and put functionality.  The first snippet contains the functions, the second contains the CMS page update capability.

It was my experience that the staff was not very successful in using the CMS.  Things that would be obvious to IT professionals were overlooked, like what happens when you copy and paste from Word or from a web page.  As a result we abandoned the CMS.  TinyMCE was just too hard for non-technical staff to use.
/* ************************************************************************* */
//
// CMS DB FUNCTIONS
//
/* ************************************************************************* */
function cms_put($page_name, $page_text) 
{
    global $db_connection, $my_dbt_prefix;
    $isql = "INSERT INTO {$my_dbt_prefix}_CMS () VALUES ()";
    if (!$iresult = mysql_query("$isql", $db_connection)) { fatal_query_error($isql); }
    $_key      = mysql_insert_id($db_connection);
    $page_text = mysql_real_escape_string(stripslashes($page_text), $db_connection);
    $timestamp = date('Y-m-d H:i:s');
    $curator   = $_SESSION["email"];
    $usql = "UPDATE {$my_dbt_prefix}_CMS SET timestamp = \"$timestamp\", curator = \"$curator\", page_name = \"$page_name\", page_text = \"$page_text\" WHERE _key = $_key LIMIT 1";
    if (!$result    = mysql_query("$usql", $db_connection)) { fatal_query_error($usql); }
    return;
}
/* ************************************************************************* */
function cms_get($page_name) 
{
    global $db_connection, $my_dbt_prefix;
    $sql = "SELECT * FROM {$my_dbt_prefix}_CMS WHERE page_name = \"$page_name\" ORDER BY timestamp DESC LIMIT 1";
    if (!$result = mysql_query("$sql", $db_connection)) { fatal_query_error($sql); }
    $num_rows    = mysql_num_rows($result);
    if ($num_rows == 0) 
    { // NOT INITIALIZED
        cms_put($page_name, "");
        return;
    }
    $row = mysql_fetch_assoc($result);
    $page_text = stripslashes($row["page_text"]);
    return $page_text;
}
/* ************************************************************************* */
function cms_page($page_name='') 
{
    global $db_connection, $my_dbt_prefix;
    if ($page_name == '') { $page_name = substr($_SERVER["PHP_SELF"],1); }
    $_SESSION["cms_page"] = $page_name;
    echo cms_get($page_name);
    return;
}
/* ************************************************************************* */
function cms_create() 
{
    global $db_connection, $my_dbt_prefix;

    $sql = "DROP TABLE {$my_dbt_prefix}_CMS ";
    if (!$result = mysql_query("$sql", $db_connection)) { echo mysql_error(); }

    $sql  = "CREATE TABLE {$my_dbt_prefix}_CMS ( _key int(8) UNIQUE NOT NULL auto_increment, ";
    $sql .= "timestamp  varchar(24), ";
    $sql .= "curator    varchar(64), ";
    $sql .= "page_name  varchar(64), ";
    $sql .= "page_text  text ";
    $sql .= " )";

    if (!$result = mysql_query("$sql", $db_connection)) { fatal_query_error($sql); }
    return;
}
/* ************************************************************************* */

Open in new window

<?php // NationalPres: cms.php
$config_page	= $_SERVER["DOCUMENT_ROOT"] . '/' . 'config.php'; require_once($config_page);
if (!admin_access_control()) { die('Service not available'); }

if (substr($_POST["_submit"],0,4) == "Post") {
	if (!check_form_token()) { die("Error: F"); }
	foreach ($_POST as $k => $v) { $$k = $v; }
//	echo "<pre>"; var_dump($_POST); echo "</pre>";
	cms_put ($page_name, $page_text);
}

if (!empty($_GET)) {
	$page_uri	= very_clean_string(urldecode($_GET["p"]));
	$x			= explode("?", $page_uri);
	$page_name	= trim($x[0]);
	$page_GET	= trim($x[1]); // SAVE FOR LATER
	if ($page_name == $_SERVER["PHP_SELF"]) { die('Error: C'); }
}

if (empty($page_name)) { die("Error: P"); }
$page_link	= "<a href=\"$page_name\">$page_name</a>";

$page_title	= "CMS $page_name";
top_of_page();

?>

<script language="javascript" type="text/javascript" src="../jscripts/tiny_mce/tiny_mce.js"></script>
<script language="javascript" type="text/javascript">

tinyMCE.init({
	mode : "textareas",
	theme : "advanced",
	plugins : "safari,pagebreak,style,layer,table,save,advhr,advimage,advlink,emotions,iespell,inlinepopups,insertdatetime,preview,media,searchreplace,print,contextmenu,paste,directionality,fullscreen,noneditable,visualchars,nonbreaking,xhtmlxtras,template",

	theme_advanced_buttons1 : "bold,italic,underline,|,justifyleft,justifycenter,justifyright,|,bullist,numlist,|,copy,paste,pastetext,pasteword,|,undo,redo,|,link,unlink,anchor,image,cleanup,|,removeformat,|,forecolor,backcolor,|,formatselect,charmap,emotions,iespell,",
    theme_advanced_buttons2 : "",
    theme_advanced_buttons3 : "",
	theme_advanced_toolbar_location : "top",
	theme_advanced_toolbar_align : "left",
	theme_advanced_statusbar_location : "bottom",
	theme_advanced_resizing : true
});

</script>

<h2>CMS Editor</h2>


<?php

$page_text	= cms_get($page_name);
?>
<p>Edit the contents of <strong><?=$page_link?></strong> here:</p>
<form name="reg_form" action="<?=$_SERVER["REQUEST_URI"]?>" method="POST">
<input type="hidden" name="_form_token" value="<?=make_form_token();?>" />
<input type="hidden" name="page_name" value="<?=$page_name?>" />

<textarea style="width: 100%;" class="formBox" rows="12" name="page_text" wrap="physical"><?=$page_text?></textarea><br />

<br />
<input class="formButton" type="submit" name="_submit" value="Post <?=$page_name?>" />
&nbsp; &nbsp; &nbsp; <strong>View <?=$page_link?></strong>
</form>
<p>&nbsp;</p>


<?php end_of_page(); ?>

Open in new window

Here is an example of what a CMS page looked like.
<?php // http://www.NationalPres.org/employment.php
$config_page	= $_SERVER["DOCUMENT_ROOT"] . '/' . 'config.php'; require_once($config_page);

$page_name	= "employment";
$page_title	= "NPC |  Employment Opportunities";

$meta_array["description"]	= "Employment Opportunities at National Presbyterian Church, Washington, DC";
$meta_array["keywords"]		= "jobs, employment, work, hiring, personnel, job opening, food, food service, director, paid employment";


$sidebars[] = "sidebar_share.php";


top_of_page();

cms_page();

end_of_page();

Open in new window


Best of luck with the project, ~Ray
0
 
LVL 34

Assisted Solution

by:Slick812
Slick812 earned 1200 total points
ID: 35019636
coolispaul, you may not have enough experience with using PHP to determine what you want to do by reading the many posts here so far. You could tell us about what your view might be for writing your own php to do what you want, or having us help you with some php code examples.

I may have not understood your requirements in your last post. You may not need a JavaScript Html Content Editors, if you are going to be the only one editing the HTML files, and you know html formatting. I have many php pages that read and write data from local files on the server, some of these require me to edit text files, to change words displayed on a blog or message (remove obscenities).

Below is some code you might look at to see if you can use it for changing a html file. It requires a password of 'allow this' for it to be able to re-write the test.html page. I used a standard Form Textarea for the display and editing of the html text data. This code works for me.

Ask some questions, or give us some more info, if we are not understanding what you need for changing your html files.

<?php
error_reporting(E_ALL);
ini_set("display_errors", 1);

$file = 'test.html';// place your own TEST file name here
$Error = 'No Error';
// I have the $Error above to show you how to display some of what happened in the code execution
if (!empty($_POST['doRewrite'])) { // test for submit button click and sen to POST
	$passw = (empty($_POST['passw'])) ? 'x' : $_POST['passw'];
// I have a very limited access control for this with a password
// since this question was not about security, I do not use proper secure access
	$newHTML = (empty($_POST['new'])) ? 'x' : $_POST['new'];
// $newHTML has the submitted HTML for the test.html page
	$version = (empty($_POST['version'])) ? 'x' : $_POST['version'];
// the version is not used here, only to show you that more data can be submitted
	if (($passw == 'allow this') && (strlen($newHTML)>32)) {
// IMPORTANT if you allow all web access to this page, you must restrict write access some how
// I use a simple password test, but a session sign in would be better
		if (!file_put_contents($file, $newHTML)) $Error = 'ERROR - Did Not Write new file'; else
			$Error = 'success FILE was Rewriten!';
		} else {
			$Error = 'ERROR - password or string length failed.';
			sleep(1);// help prevent a password roller attack
			}
	} else {
	$passw = 'No Data Submitted';
	$version = 'No Version';
	}
	
	
$fileRead = file_get_contents($file);
if (!$fileRead) $Error = 'ERROR - Could NOT read the file';
?>
<html><head><title>Re Write</title></head><body bgcolor="#d3e7f2" text="#000000" leftmargin="0" topmargin="0" marginheight="0" marginwidth="0"><h2>Re Write Test</h2>
<? echo 'Error- '.$Error.' || Form Submit, passw- '.$passw.' -version- '.$version.'<br />'; ?>
</center><form action="rewrite1.php" method="post">
<p>Password: <input type="text" name="passw" size="16" maxlength="24" value="" /> - version: <input type="text" name="version" size="16" maxlength="16" value="0" /> &nbsp; Title: <input type="text" name="title" size="20" maxlength="30" value="title1" /></p>
<p>&nbsp; <textarea NAME="new" cols=96 rows=24><? echo $fileRead; ?></textarea><br>
&nbsp; <input name="doRewrite" type="submit" value="Change HTML file"><br></p>
</form></body></html>

Open in new window

0

Featured Post

Are You Using the Best Web Development Editor?

The worlds of web hosting and web development are constantly evolving. Every year we see design trends change, coding standards adapt and new frameworks/CMS created. With such a quick pace of change it’s easy to get lost trying to keep up.

See if your editor made the list.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

There are times when I have encountered the need to decompress a response from a PHP request. This is how it's done, but you must have control of the request and you can set the Accept-Encoding header.
Originally, this post was published on Monitis Blog, you can check it here . In business circles, we sometimes hear that today is the “age of the customer.” And so it is. Thanks to the enormous advances over the past few years in consumer techno…
In this tutorial viewers will learn how to embed an audio file in a webpage using HTML5. Ensure your DOCTYPE declaration is set to HTML5: : The declaration should display (CODE) HTML5 is supported by the most recent versions of all major browsers…
The viewer will learn the benefit of using external CSS files and the relationship between class and ID selectors. Create your external css file by saving it as style.css then set up your style tags: (CODE) Reference the nav tag and set your prop…
Suggested Courses

764 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question