User editing

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View

I asked this earlier and received a tip of going to Joomla. Problem is
according to the gurus in their forums I need to rewrite the entire site so
that Joomla becomes the core. As I am on 700+ pages its not practical as I
only need to open up two pages for user editing.

I have a website consisting of pages made up of php segments using the
include statement. The top, left and right panels are static and the text in
the center changes according to which menu/sub menu is chosen.

page1.php consists of top.php, left.php, right.php, and blue.php
page2.php consists of top.php, left.php, right.php, and red.php

It's blue.php and red.php that need to be opened up for selected users. But
the browser displays and the user sees "page1.php" or "page2.php".

What I want is a button in left.php for selected users to log in. Once they
have logged in they should be able to browse the site as normal but when -
for instance seeing text on page2.php that needs changing they can press a
text edit button. This would edit the text in red.php leaving everything
else alone.

Is there a program that allows me to do this without me having to rewrite
the entire site?

Garry Jones

Re: User editing

On Fri, 22 Sep 2006 17:16:49 +0200, "Garry Jones"

Quoted text here. Click to load it

This is pretty much the sort of thing that PHP was created for. Let them
edit the text in a textarea input.  On the server, use the PHP
strip_tags function to remove any undesirable elements from the entered
text and pop the result into (say) a text file. The page 'include's that
text file at the appropriate point.

If this isn't sufficient info, try comp.lang.php

Stephen Poley /

Re: User editing

Stephen Poley wrote:
Quoted text here. Click to load it

Please don't use strip_tags(). If you don't want to allow any HTML at
all, htmlentities() would be a better choice, because it allows the user
to insert literal HTML (or other markup) into the text, which is a
reasonable thing for them to want to do. If you want to allow some
limited HTML, strip_tags still isn't a good choice, because it doesn't
restrict attributes and a malicious user could put bad JavaScript inside
an event handler.

Site Timeline