473,396 Members | 1,608 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

User editing

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
Sweden

Sep 22 '06 #1
2 1557
On Fri, 22 Sep 2006 17:16:49 +0200, "Garry Jones"
<ga*********@morack.sewrote:

>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?
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

http://www.xs4all.nl/~sbpoley/webmatters/
Sep 22 '06 #2
Stephen Poley wrote:
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.
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.
Sep 22 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: Angelos | last post by:
Hello, I am developing a CMS and I would like to be able when a user is editing a page to inform any other user that the page is being edited by User X . Ofcourse that's not so difficult if you set...
2
by: trhq | last post by:
How can I shut-out other users from editing a record that is already opened by other user. I want to flash a warning window that the record is currently being modified by other users (better if I...
15
by: Deano | last post by:
I've posted about this subject before but haven't really got anywhere yet. I have now come up with a plan of action that takes into account my strong desire to implement save/discard functionality...
4
by: Jason Cowsill | last post by:
Hi - I am looking for a way to dynamically alter a textbox WHILE the user is typing in it. One example would be while a user is entering their phone number a dash would be entered automatically...
3
by: Patrick McGuire | last post by:
I am instantiating several custom objects from a subset of data contained in an XML file. I then might edit these objects and save the changes back to the XML file. However, I want to compare the...
7
by: Daniel Walzenbach | last post by:
Hello, I want to create a Word XML file based on the input users make in a VB.NET application. I imagine creating a template in Word and saving it as a XML file. I then want to fill the...
0
by: stevenhaochen | last post by:
I add a user control (a simple textbox control) to customize datagridview column to test how to add user control to datagridview. I found a weired behavior. I can not input "q", "!", "#". But I...
2
by: torbjorn.maro | last post by:
I'm the developer of an enterprise level web application that among other things handles documents. The documents are stored in a database. There is now simple functionality to check out and...
1
by: brixdotnet | last post by:
Hi there! I made own user control for displaying and editing content. In Page_Load of this control is checked if user is authorized for editing if so, button for editing is shown, otherwise...
19
by: emanning | last post by:
Using Access 2003 and using a form that's mostly bound. I need a way to tell if user-1 is on the record when user-2 tries to open the same record, w/o waiting for the user-1 to save the record...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.