473,788 Members | 2,897 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 1575
On Fri, 22 Sep 2006 17:16:49 +0200, "Garry Jones"
<ga*********@mo rack.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
1741
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 a flag in the database for example that the current document is being edited, and remove the flag when the user saves the document and exits. BUT what happens if user exits the editing page without folowing any link or submit button that I can...
2
1942
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 can capture the name of the other user). Or, automatically set the latter user on Read Only mode (is that possible?).. We often encounter a simultaneous editing of same record only to find out later that only one version can be saved. Thanks.
15
1660
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 on all key forms. The first thing to do is to successfully split the database. I then rewrite to support multiple users. To allow the save/discard feature I create copies of the key tables and append the word Final to each one. For example I...
4
2204
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 as soon as the user types the third digit - the fourth digit would then follow the dash. I've seen this done on several sites now. I know it can be done once the user leaves the textbox with a postback, but I would like to try to accomplish it...
3
1671
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 original state of the objects with the current object data stored in the XML file to alert the user to any changes that were made by other users during the time that the user was making his own edits. So I'm doing this:
7
4995
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 template (in my application) based on the user input. When the document gets opened there should be fields users can change but others should be prevented from beeing changed (I know that an "open" file format like XML can always be modified to allow...
0
2518
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 can input other keys (e.g. "Q", "@", "W") Anybody found this question? It looks like the textbox eat the input 'q' and does not show up in the text. Public Class DataGridViewEditorButtonEditingControl Inherits TextBox
2
1863
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 download the document. This is done my a normal response to the browser, streaming the document. The user then gets the normal option to 'open', 'save' or 'cancel' til downloaded file. Normal usage would be to save the file to a known location, open...
1
1399
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 controll works in display only mode. I want now use this control to add new content. The idea is that in another web form, let's call AddNewContent.aspx there is placed MyContentControl and I want to run in Editing mode with all fields reset to...
19
4031
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 first. The only way I can think of is by adding a flag to the record and setting it to true when user-1 opens the record. If user-2 tries to open it, the flag is checked for true, then a message would be displayed to them that user-1 is on the...
0
9656
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10177
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10113
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9969
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8995
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7519
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6750
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5402
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
4074
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

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.