Results 1 to 4 of 4
  1. #1
    Join Date
    Sep 2002

    screenshot system

    Ok, i have coded a preview and a review system. Now, i want there to also be a screenshot system. For example, when my staff is making a review or preview, they can upload up to 15 screenshots to the corresponding game, then however many they uploaded will be displayed at the bottom of the review or preview like..

    1 | 2 | 3 | etc.

    But, im unsure on how to make it so however many are upload, thats the number of pages and also how the screenshot id would correspond to my review or preview id, thanks

    p.s. It is a windows server

  2. #2
    Join Date
    Aug 2001
    Orange County, CA
    If you're storing the screenshots in a MySQL database (either in binary or URL to the images stored on the server) you could just do a simple mysql_num_rows on the query, or a COUNT(*) in SQL.

    If you need more info, PM me. Thanks!
    Jeff Standen, Chief of R&D, WebGroup Media LLC. - LinkedIn
    Cerb is a fast and flexible web-based platform for business collaboration and automation.

  3. #3
    Join Date
    Nov 2000

    Interesting article that may help you out
    A well-reasoned assumption is very close to fact.
    - Adorno

  4. #4
    This is quite simple actually ... follow along boys and girls hehe

    In the admin backend for the screenshot system you're going to want a page like this ... since CFM is easy to quickly type and understand I'll use it here:
    <cfswitch expression="url.action">
    <cfparam name="#url.action#" default="index">
    	<cfcase value="add">
    		<cfif isdefined("form.shots")>
    			<cfloop index="loop" from="1" to="15">
    				<cfoutput>Shot #loop#: <input type="file" name="screenshot#loop#" size="5"></cfoutput>
    				<input type="submit">
    			<form action="screenshots.cfm?action=add" method="post">
    				<strong>Shots:</strong> <input type="text" name="shots" size="5" maxlength="5"> <input type="submit" value="   Create Gallery   ">
    Then insert the code into the database with a structure like this:
    Table -- screenshots
     itemid (or if you don't have a table containing all the games, just put something like "gamename" and manually type in game name)
     shotid (this is where the "#loop#" would be inserted)
     file (the result from the cffile upload, or it's equiv. in your programming language)
    This code of course won't work and was made in about 20 seconds just to give you a rough idea of how I would go about doing it.

Posting Permissions

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