SitePoint Sponsor

User Tag List

Results 1 to 11 of 11
  1. #1
    Evil Genius MilchstrabeStern's Avatar
    Join Date
    Nov 2003
    Location
    Arizona
    Posts
    1,131
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Top 3 Pictures of week, PHP?!

    Ill keep this as simple as possible but I know some of it is complex.

    I have a CSS design Im coding right now, and its almost complete but ignoring the design lets just say i have the following parameters:
    Code:
    <div id="bottomleft">
    <table width="350px" height="135px"border="0">
    <tr>
    \*php code goes here*\
    </tr>
    <tr>
    \*php code goes here*\
    </tr>
    <tr>
    \*php code goes here*\
    </tr>
    </table>
    </div>
    So heres the gist of things. On my front page I want areas in my tables ( i know its an awful word, but tables were smarter to style this part of the div than css) to have pictures. Yea thats easy but this is the top 3 pictures of the week section. So the top picture will be the number one picture, the 2nd the number 2 picture, the 3rd, the number 3 picture.

    Good so far? Good.

    How are the pictures determined though? Ah ha, by vote of course! So in my galleries (god knows how thats gonna be set up yet) I'll have an option for people to vote on pictures, and which every has the most votes will be placed number 1 and so on.

    Can I do that? If so, please help me! I have more questions, dont you worry.
    ]

  2. #2
    get into it! bigduke's Avatar
    Join Date
    May 2004
    Location
    Australia
    Posts
    847
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Sounds viable but then they say believe half you see and nothing you hear.

    Keep the questions rolling

  3. #3
    Evil Genius MilchstrabeStern's Avatar
    Join Date
    Nov 2003
    Location
    Arizona
    Posts
    1,131
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by bigduke
    Sounds viable but then they say believe half you see and nothing you hear.

    Keep the questions rolling
    haha i dont want to ask people for too much, but any help would be nice
    ]

  4. #4
    SitePoint Zealot
    Join Date
    Apr 2004
    Location
    Michigan
    Posts
    140
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I suppose you could (this is just the thought process):

    1. setup a database table (or text file in a pinch), where you could keep count of the votes

    2. query the database to get all the data from time to time (picname:votes) ordering by votes

    3. take the first 3 results and post them to your page accordingly

    Lite...

  5. #5
    Evil Genius MilchstrabeStern's Avatar
    Join Date
    Nov 2003
    Location
    Arizona
    Posts
    1,131
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by litebearer2
    I suppose you could (this is just the thought process):

    1. setup a database table (or text file in a pinch), where you could keep count of the votes

    2. query the database to get all the data from time to time (picname:votes) ordering by votes

    3. take the first 3 results and post them to your page accordingly

    Lite...
    I deffinately see what your getting at, So I'll set up a table in my database and have ever singly picture in there? and have one of the columns be number of votes, and somehow when people vote it modifies the number in that column? Then the top 3 rows are taken cause they'll be in order by highest number to lowest?

    But I'll have thousands of pictures and having a row for each picture is a huge task.
    ]

  6. #6
    Evil Genius MilchstrabeStern's Avatar
    Join Date
    Nov 2003
    Location
    Arizona
    Posts
    1,131
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Okay I gave this some more thought.

    Maybe I should have some PHP scripting to generate the photo galleries eh? good idea? lol In past ive used software to generate the pages, but thats messy and annoying too. If I had databases with tables filled with picture links and brief descriptions do you think its possible to have PHP generate the pages for me? So it automatically creates a table, fills the table with 8-12 images per page, and creates more pages with more images. The CSS coding will be surrounding the PHP oh course.

    An issue that this brings up is, how do I manage to easily insert 100-300 images at a time into a database?

    Arent there free scripts out there for some of this?

    By the way to help with the top 3 pictures deal:
    www.mplionhearts.com/idea3 for what i have done on my layout
    ]

  7. #7
    SitePoint Zealot
    Join Date
    Apr 2004
    Location
    Michigan
    Posts
    140
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Creating a gallery script with pagination is not all that difficult. As a noobie myself to php and mysql, I was able to learn to do it in a relaitvely short time. here is a rough example of a script. The two iframes use essentially the same script with only 3 or 4 variable changes

    http://nstoia.com/effie/gallery/

    Lite..

  8. #8
    Evil Genius MilchstrabeStern's Avatar
    Join Date
    Nov 2003
    Location
    Arizona
    Posts
    1,131
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Now i remember it was you who posted about Coppermine. I dont know who to ask this question, but how exactly does coppermine work and how can i incorporate it into my website? I downloaded it and I have a bunch of php files. Will anything allow me to "upload" a ton of pictures into a database? Will coppermine allow this?

    I found the readme file but still any help would be cool in answering those questions. Coppermine looks like a excellent solution, anything i should know though before uploading all these scripts lol?
    ]

  9. #9
    Evil Genius MilchstrabeStern's Avatar
    Join Date
    Nov 2003
    Location
    Arizona
    Posts
    1,131
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Uh when im installing this script, can i install it into my public_html folder?Or does it need to be in a seperate folder so i can change the dir permissions, cause im not gonna risking changing my public_html's permissions.
    ]

  10. #10
    SitePoint Zealot
    Join Date
    Apr 2004
    Location
    Michigan
    Posts
    140
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I, personally, have never used coppermine. I read some reviews of it and thought it might be a good solution for people who, for whatever reason, so do not want to create their own scripts. So, unfortunately, I am unable to give you any guidance as to how to install and/or use it. If I recall correctly, they have a users forum where you might be able to get some assistance.

    Lite...

  11. #11
    Evil Genius MilchstrabeStern's Avatar
    Join Date
    Nov 2003
    Location
    Arizona
    Posts
    1,131
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Im just having trouble accessing the root directory, the one that contains public_html etc. I've never had to do this, I mean, I can upload stuff into it, but in my browser how to i access it? What do I type?

    I started a new thread cause this is too far off topic
    ]


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
  •