Menu

Redundant code

marcius
2000-09-11
2000-09-11
  • marcius

    marcius - 2000-09-11

    Hi. I'd like to contribute to this project.
    I agree in splitting files to separate functions.

    My #1 change would be optimization of the redundant code.
    Have a look at admin.php3:
    The code for: lblocks/rblocks/ablock is almost the same.
    Same thing for: diplaystory, editstory, previewstory, previewagain, adminstory, previewadminstory etc.
    That simple html form to edit a story is replicated 6-7 times !

    I've almost finished to add a new feature. The user can also upload an image together with the story. It needs a new table to associate story id and image file name. Once uploaded the image is transferred to images/story and then displayed when asked with a <A IMG SRC=... > tag.

    Please, let me know what do you think about these ideas.

     
    • Daniel Adad

      Daniel Adad - 2000-09-11

      Hi Marcius,

      I think your idea is great. It's interesting not to store the images in the database, but storing it in a directory. I would like that patch.

      Regards,
      Dany

       

Log in to post a comment.

MongoDB Logo MongoDB