Ruby on Rails

 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me



Go Back   Tutorialized ForumsWeb Design & DevelopmentRuby on Rails

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Tutorialized Forums Sponsor:
  #1  
Old November 27th, 2004, 02:15 PM
AzN AzN is offline
Contributing User
Tutorialized Newbie (0 - 499 posts)
 
Join Date: Nov 2004
Posts: 2 AzN New User: is a brand new recruit and a unknown entity at this point. 
Time spent in forums: < 1 sec
Reputation Power: 0
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.

Reply With Quote
  #2  
Old November 27th, 2004, 08:06 PM
kurt kurt is offline
Contributing User
Tutorialized Novice (500 - 999 posts)
 
Join Date: Jan 2004
Posts: 506 kurt User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 5 m 48 sec
Reputation Power: 0
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.

Reply With Quote
  #3  
Old December 21st, 2004, 03:11 PM
rc69 rc69 is offline
Contributing User
Tutorialized Newbie (0 - 499 posts)
 
Join Date: Dec 2004
Posts: 28 rc69 New User: is a brand new recruit and a unknown entity at this point. 
Time spent in forums: < 1 sec
Reputation Power: 0
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
__________________

Deceptive Logic
Mind the gap

Reply With Quote
  #4  
Old December 21st, 2004, 03:57 PM
Acecool Acecool is offline
Contributing User
Tutorialized Newbie (0 - 499 posts)
 
Join Date: Jul 2004
Posts: 116 Acecool New User: is a brand new recruit and a unknown entity at this point. 
Time spent in forums: < 1 sec
Reputation Power: 0
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
__________________

If you plan on contacting me, please read this: Legal Terms & Conditions

Reply With Quote
  #5  
Old January 13th, 2005, 11:43 AM
rossmacd rossmacd is offline
Contributing User
Tutorialized Newbie (0 - 499 posts)
 
Join Date: Jan 2005
Posts: 12 rossmacd New User: is a brand new recruit and a unknown entity at this point. 
Time spent in forums: 3 m 4 sec
Reputation Power: 0
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/

Reply With Quote
  #6  
Old January 13th, 2005, 02:03 PM
Terencentanio Terencentanio is offline
Contributing User
Tutorialized Newbie (0 - 499 posts)
 
Join Date: Oct 2004
Location: England
Posts: 143 Terencentanio New User: is a brand new recruit and a unknown entity at this point. 
Time spent in forums: < 1 sec
Reputation Power: 0
Send a message via MSN to Terencentanio
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)

Reply With Quote
Reply

Viewing: Tutorialized ForumsWeb Design & DevelopmentRuby on Rails > Auto Updating Web Page


Developer Shed Advertisers and Affiliates


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 

Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.

© 2003-2017 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap