|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
AT&T devCentral & BlackBerry(r) Webcast Series: BlackBerry and GPS -Build Location Awareness into your BlackBerry Applications, July 10th-1:00PM EST. Register Today!
|
|
#1
|
|||
|
|||
|
Auto Updating Web Page
Ok, here's the outline of what I'm trying to do:
I'm making a page for a client, and he needs this page to be updated regularly by him. I want this page to be updated easily without any knowledge of HTML, yet still retain the the same formatting and CSS. I want to take this even further if possible. I want him to type it in an external text file, and then just link to that text file on the web page. If this is possible it would be great. Ok that is pretty much the jist of it. The problem is I have no idea where to start. I have never seen an example of this anywhere so I don't know if it is even possible. Any help would be appreciated. |
|
#2
|
|||
|
|||
|
Why not run it on a ready made CMS like MoveableType?
If that's not an option, then I would create a text file that had tags in it and he could change the content under the tags, then the site would just read the file, something like: {NEWS} This is the news section of the site, I can type whatever I want and the site shows this. Or, have seperate text files for every section of the site and just read them in. Lots of options, and really easy. |
|
#3
|
|||
|
|||
|
PHP and mySQL was basicly made for what you want, although instead of a text file he'd have to use the mySQL database (but there is a way to work with text files in php, you'd just have to know how to use the explode function)...
all you'd have to do is write the page, make a table, and loop through a mySQL query to display everything then you can make an "admin" folder or something, with a form for what ever he needs to display, then insert what ever he types in into a the database and alls well |
|
#4
|
|||
|
|||
|
You dont need explode for text files :-)
http://www.acecoolco.com/templates/ver4/template.php (text file) Is the file used to template: http://www.acecoolco.com Might be a few missing images due to being loaded from somewhere else.. A REALLY simple solution would be to preg_replace /{CONTENT}/i with ob_start(); include ('page.txt'); $Content = ob_get_contents(); ob_end_clean(); With this: $Content |
|
#5
|
|||
|
|||
|
You could simply use PHP Includes to include the headers, menus and footers. I do this quite successfully on many of my sites.
Ross
__________________
Ross MacDonald WebDesignersTalk.com Head Admin & Owner http://www.webdesignerstalk.com/ |
|
#6
|
|||
|
|||
|
Includes would work. Some knowledge would be needed, though (for formatting) ...
With less than 100 lines of PHP and 1 mySQL database, you could make a news system.. with the same amount, you could make an entire CMS. AzN ... don't I know you?
__________________
http://root32.com - General computing. (network links also) |
![]() |
| Viewing: Tutorialized Forums > Web Design & Development > Ruby on Rails > Auto Updating Web Page |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|
|
|