SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Addict
    Join Date
    Jan 2008
    Location
    Shaw AFB
    Posts
    282
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Question about Images

    I'm trying to create a wordpress plugin that allows people to add some custom content to one of their pages. I've already tried asking this on the wordpress forums, but I get nada.

    Anyway, I figured it would be easier to install the NextGen photo gallery and let that do all of the image uploading and processing, rather than write up my own code to create thumbnails and stuff.

    Now, how to I write code in my own plugin that will allow me to choose an already exiting image on the server?

    Typically, when you upload an image - you browse for it on your computer, and then upload it and it's attached to that entry you just created.

    Now I'm trying to figure out a way to choose an image that already exists on the server.
    ~ Nate L ~

  2. #2
    SitePoint Addict
    Join Date
    Oct 2008
    Posts
    295
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    You could use a link table in database. Create new table that links the existing entries to new entries based on user actions. And when showing entry fetch from db images that belongs to this entry and also images that are linked to this entry. When user is adding image place for example a link saying "Add existing image?" as an alternative choice. then show the user the existing images and let him choose from them.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •