User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the JavaScript / DHTML / AJAX section within the Web Development category of DaniWeb, a massive community of 391,644 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 2,770 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our JavaScript / DHTML / AJAX advertiser: Lunarpages Web Hosting
Views: 959 | Replies: 5
Reply
Join Date: Apr 2006
Location: San Jose, CA
Posts: 24
Reputation: Spycat is an unknown quantity at this point 
Rep Power: 3
Solved Threads: 0
Spycat's Avatar
Spycat Spycat is offline Offline
Newbie Poster

Question Allowing limited authorship to a web page.

  #1  
Jul 3rd, 2007
Hello,

I am running a homeowner's association website (1 page only).
The manager asked if I might be able to allow her access
to make announcements from time to time.
I think this would be a good idea, but I don't want to give her
carte blanche access to the entire page. Also, I am assuming she does not know html.
Does anyone have any suggestions as to the best way this could be done?
I really (really!) want to keep this simple -- that is, no databases, no mysql, no cms, etc. I am doing this on a voluntary basis, and so I don't have an abundance of time to devote to this project.
Perhaps a way for her to go to a password-protected page, where she could write her info into a form, then in turn have it write to an html page (say, manager.html) that I could present on the main index.html page as an i-frame. It should be non-destructive (that is, now content should not over-write previous), but she should be able to manually edit all content.
This is one way, but I am open to suggestions.
Again, the simpler the better.

Thanks

Rick
AddThis Social Bookmark Button
Reply With Quote  
Join Date: May 2007
Location: North Humberside, UK
Posts: 66
Reputation: Resonate is an unknown quantity at this point 
Rep Power: 2
Solved Threads: 1
Resonate's Avatar
Resonate Resonate is offline Offline
Junior Poster in Training

Re: Allowing limited authorship to a web page.

  #2  
Jul 3rd, 2007
If you are thinking of linking from your main index to her page would it not be possible for her to set up a free blog which you could link to instead & have her blog link to you. I say this as it is much easier to post announcements from a blog.
Reply With Quote  
Join Date: Apr 2006
Location: San Jose, CA
Posts: 24
Reputation: Spycat is an unknown quantity at this point 
Rep Power: 3
Solved Threads: 0
Spycat's Avatar
Spycat Spycat is offline Offline
Newbie Poster

Re: Allowing limited authorship to a web page.

  #3  
Jul 3rd, 2007
Hi there,

Thanks for the speedy reply.
I really want the content she writes to not be a link, but to instead (somehow) show up on my own index.html page.
Also, I really didn't want to get into creating/administering blog stuff....
Reply With Quote  
Join Date: Jun 2006
Location: India
Posts: 6,774
Reputation: ~s.o.s~ is a splendid one to behold ~s.o.s~ is a splendid one to behold ~s.o.s~ is a splendid one to behold ~s.o.s~ is a splendid one to behold ~s.o.s~ is a splendid one to behold ~s.o.s~ is a splendid one to behold ~s.o.s~ is a splendid one to behold 
Rep Power: 23
Solved Threads: 330
Moderator
Featured Poster
~s.o.s~'s Avatar
~s.o.s~ ~s.o.s~ is offline Offline
Rebellion Revamped

Re: Allowing limited authorship to a web page.

  #4  
Jul 3rd, 2007
You can set up a text area on your web page, the way it is done on blogging sites, with two text fields for username and password which would be known to the one who wants to post announcements. After that, its a simple case of validation and updating the page from the database.

The same can be done using DHTML if you are not using any server side language.
"I don't accept change. I don't deserve to live."

"Working a real job is a win if you're lazy, greedy, or unmotivated. If you're average, you fit right in. And if you're above average, the basic terms of employment and premise of the arrangement is against your interests."
Reply With Quote  
Join Date: Apr 2006
Location: San Jose, CA
Posts: 24
Reputation: Spycat is an unknown quantity at this point 
Rep Power: 3
Solved Threads: 0
Spycat's Avatar
Spycat Spycat is offline Offline
Newbie Poster

Re: Allowing limited authorship to a web page.

  #5  
Jul 4th, 2007
What do you guys think of this solution?:


<?php
include "password_protect_page.php";
?> 

<?
if($_POST['Submit']){
$open = fopen("testit.txt","w+");
$text = $_POST['update'];
fwrite($open, $text);
fclose($open);
echo "<div style='font-family:tahoma,sans-serif;background-color:#7fa3df;border:1px solid #000000;padding:10px;color:#f0f0f0;line-height:175%;font-size:12pt;'>";
echo "File has been Updated.<br />";
echo "File Now Reads:<br />";
$file = file("testit.txt");
foreach($file as $text) {
echo $text."<br />";
}
echo "<p style='color:#f0f0f0;'><a href=\"./\">click here to view the live updated webpage</a></p>";
echo "<p style='color:#f0f0f0;'><a href=\"./edit.php\">click here to edit again</a></p>";
echo "</div>";
}else{
$file = file("testit.txt");
echo "<form action=\"".$PHP_SELF."\" method=\"post\">";
echo "<textarea Name=\"update\" cols=\"50\" rows=\"10\">";
foreach($file as $text) {
echo $text;
}
echo "</textarea>";
echo "<input name=\"Submit\" type=\"submit\" value=\"Update\" />\n
</form>";
}
?>


Note at top: "Includes" Links to password-protect script
Last edited by Spycat : Jul 4th, 2007 at 9:09 pm.
Reply With Quote  
Join Date: May 2007
Location: North Humberside, UK
Posts: 66
Reputation: Resonate is an unknown quantity at this point 
Rep Power: 2
Solved Threads: 1
Resonate's Avatar
Resonate Resonate is offline Offline
Junior Poster in Training

Re: Allowing limited authorship to a web page.

  #6  
Jul 4th, 2007
Thats not bad, Have you tried it on your index page yet?
Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

DaniWeb JavaScript / DHTML / AJAX Marketplace
Thread Tools Display Modes

Similar Threads
Other Threads in the JavaScript / DHTML / AJAX Forum

All times are GMT -4. The time now is 1:08 am.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC