Hello!
I would use php to do this. The text will be easy. Have a php admin page that will scan a txt file, then, create a form, put the text into a text box for modifications, and then have a submit button.
When you submit the form, you will use php to overwrite the text file with the new/old/same text from the text box. Easy. . .
Your photo gallery can work with a simple scanning of a directory, or directories.
SAMPLE OF CODE FOR TEXT:
if($txtBtn){
//Create text boxes to display the student text description and name
$TheFile = "files/" . $Text . "/" . $Name . ".php";
$Open = fopen($TheFile, "r");
if($Open){
$Data = file($TheFile);
for ($n=0; $n < count($Data); $n++){
$Getline = explode ("\t", $Data[$n]);
}
print("<input type=checkbox name=tUpdate value=checkbox>check to update text<input type=text size=15 name=textHeader wrap=VIRTUAL value=\"$Getline[0]\"><br>");
print("<textarea name=desc wrap=VIRTUAL rows=10 cols=40>$Getline[1]</textarea><br>");
}//end open
}//end if student
- if($txtBtn){
- //Create text boxes to display the student text description and name
- $TheFile = "files/" . $Text . "/" . $Name . ".php";
- $Open = fopen($TheFile, "r");
- if($Open){
-
-
- $Data = file($TheFile);
- for ($n=0; $n < count($Data); $n++){
- $Getline = explode ("\t", $Data[$n]);
-
- }
- print("<input type=checkbox name=tUpdate value=checkbox>check to update text<input type=text size=15 name=textHeader wrap=VIRTUAL value=\"$Getline[0]\"><br>");
-
- print("<textarea name=desc wrap=VIRTUAL rows=10 cols=40>$Getline[1]</textarea><br>");
- }//end open
-
- }//end if student
-
This code will read a text file, find a tab in the text file, and print the text before the tab as a header/title of the file, and then print the body of the file. These will be printed into a text box in a form that you can then modify. You must submit a form and then use php to use the values for the submitted data to write to the file.
Have fun!