Hi I have started learning PHP, but I am not experienced enough to know how to add this. I want to add a caption to every image in the image gallery. Right now I am using the text file alternative, rather than the mySQL database. Right now I am editing the slooze.php file, but I am not sure what else I need to edit or how I should go about this task.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Add a "Caption" column to the pictures text file.
Modify showPicture() to emit some HTML to show the caption. The caption will be in $picture at this point.
That's about it for showing captions. You can test it by manually adding data to the Caption column in your text file.
To allow captions to be added and edited through the web forms do this:
Create a function showFormElementCaption(), perhaps modeled after $this->showFormElementDescriptionTextArea().
Call it from showFormAddPicture.
I'm going from memory here and I haven't touched this code in about eight years so I may have missed something, but that should get you going.
Matthew
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi I have started learning PHP, but I am not experienced enough to know how to add this. I want to add a caption to every image in the image gallery. Right now I am using the text file alternative, rather than the mySQL database. Right now I am editing the slooze.php file, but I am not sure what else I need to edit or how I should go about this task.
Add a "Caption" column to the pictures text file.
Modify showPicture() to emit some HTML to show the caption. The caption will be in $picture at this point.
That's about it for showing captions. You can test it by manually adding data to the Caption column in your text file.
To allow captions to be added and edited through the web forms do this:
Create a function showFormElementCaption(), perhaps modeled after $this->showFormElementDescriptionTextArea().
Call it from showFormAddPicture.
I'm going from memory here and I haven't touched this code in about eight years so I may have missed something, but that should get you going.
Matthew