[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

basic cms script

Posted on 2012-09-03
7
Medium Priority
?
465 Views
Last Modified: 2012-09-04
ok I know... should be wordpress or joomla but it wasn't my desicion.  My client now wants to edit a deals page for tours on his html website.  We are into enough that a conversion to wordpress will cost a few hundred to do.  Since he wants to edit the basic elements on one page is there a basic php script that I can use to give him a cms like admin panel for one page?
0
Comment
Question by:tf2012
7 Comments
 
LVL 60

Accepted Solution

by:
Julian Hansen earned 800 total points
ID: 38360854
Writing a CMS is not that difficult - it depends on what you want to do.

1. Create a database to store the information

Two things - will the data be structured or unstructured.

Structured would be like a product (Price, SKU, Description, Category) are all fields that can be captured.

Unstructured is free form

If Unstructured create a simple table that stores the content (text) and potentially, page title, header etc - depends on requiements.

If structured create table to match requirements.

2. In your html page turn this into a template.

i) At the top add the code to fetch your data from the database.
ii) In the html replace the static sections with the data you retrieved from the DB.

That's the front end done.

Backend - build a simple page with a form to edit the data. On load it retrieves the data from the database (or file - if simple enough does not have to be a db).

Add a simple login and you are done.
0
 
LVL 111

Assisted Solution

by:Ray Paseur
Ray Paseur earned 800 total points
ID: 38361181
0
 
LVL 34

Assisted Solution

by:Slick812
Slick812 earned 400 total points
ID: 38361349
greetings  tf2012, , Not sure I see the "Logic" for having a "Content Management System" for just a page or two of your site, Although there are hundreds of PHP CMS code containers that do more than what you need (I guess from your question), a CMS is meant to manage content for an entire Large web site, so you asking for a PHP script that does NOT use a CMS does seem better to me. Like when you said -"is there a basic php script that I can use to give him a cms like admin panel for one page (without a CMS ton of code)? "
I have NOT ever looked for that sort of thing, but I have used some Javascript "what you see is what you get" text editors, you should be able to have your client do his own HTML modifications with one of these - have a look at this web page, for a listing of JS text editors -
http://www.queness.com/post/212/10-jquery-and-non-jquery-javascript-rich-text-editors

the TinyMCE is popular and works, but has a large js file size, and may have TOO MANY options to choose from.

I would suggest that instead of a complicated (or simple) PHP administrative "Log IN" for your client, you might use the CPanel (or the htaccess) to make a user-password directory, with the javascript-rich-text-editor PHP administrative page in that, You will need to make the PHP code for that javascript-rich-text-editor, with your own web theme header, footer images and arrangement, but you'll have to deal with that even in  a pre-made PHP package for this.

I web searched for some PHP that did what you want, but I could not get the correct search string, to have any useful results.
Hope I have the right Idea about what you may need, ask questions if you need more Info.
0
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 
LVL 111

Assisted Solution

by:Ray Paseur
Ray Paseur earned 800 total points
ID: 38361606
One comment on TinyMCE (and this comment may be outdated since in my experience the issue arose in 2009)... If you have a Word for Windows document and you cut/paste from the Word document into the TinyMCE textarea, you will get an unholy mess.  In case you go this way, you will need to either figure out how to clean up the mess or carefully instruct your client to avoid copying Word documents into the text area.  Unfortunately, that is a very tempting thing to do.  "It looked perfect in the Word document - why is it so screwed up on the web site?"
0
 
LVL 60

Assisted Solution

by:Julian Hansen
Julian Hansen earned 800 total points
ID: 38361612
Writing a CMS on this scale is a very straight forward exercise - I have done many and built my own CMS framework.

If you are going to do WYSIWYG editing then tinyMCE or FCKEditor are good options - but I would check before using them as they do add a level of complexity that is not always good. Many of my clients use the html button on tiny to get at the underlying html code because they don't like the default formatting that tiny does.

Slick812's suggestion of using .htaccess for access control is a good one and if the requirement is simple enough you don't even need a database. A text file or XML file will suffice.

I am not sure I understand the comments about a CMS being complicated - it is no more so than a form on a website that captures and processes information.
0
 
LVL 1

Author Closing Comment

by:tf2012
ID: 38363156
thnx, convinced customer to let convert site to wordpress
0
 
LVL 111

Expert Comment

by:Ray Paseur
ID: 38365854
That's probably best for everyone involved!  Thanks for the points, ~Ray
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

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

Build an array called $myWeek which will hold the array elements Today, Yesterday and then builds up the rest of the week by the name of the day going back 1 week.   (CODE) (CODE) Then you just need to pass your date to the function. If i…
Without even knowing it, most of us are using web applications on a daily basis.  In fact, Gmail and Yahoo email, Twitter, Facebook, and eBay are used by most of us daily—and they are web applications. We generally confuse these web applications to…
In this tutorial viewers will learn how to embed videos in a webpage using HTML5. Ensure your DOCTYPE declaration is set to HTML5: "<!DOCTYPE html>": Use the <video> tag to insert a video. Define the src as the URL of your video; this is similar to …
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.
Suggested Courses
Course of the Month19 days, 16 hours left to enroll

873 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