I am trying to build a form like the one depicted in the attachment that will populate a table (that I have already built). One my problems is with the image uploads, which I will work on last. I can get partial returns from the database (that I popoulated using phpMyAdmin) with the maketable snippet, but I need a layout like the Display page in the attachment, not a dataset table. Right now I am trying to focus on the display page but I can find nothing similar in the forums or resources for the layout. I want to use a table for all the data, so I can’t use the news publisher/manager/etc. which looks like it builds from documents or ID’s. It should just build from the database whether there is 2 or 20 entries. Am I going about this all wrong or is there an easier way? The guy doing the uploading knows just enough to be dangerous, so I thought just two pages to access will be good. Thanks for any help and/or direction.
Well if you’ve already built the table and you want to keep it that way, then you’ll probably need to write a custom snippet that queries the database and outputs the info the way that you want it. You might look at the MaxiGallery code for an example of how to do that. You can create a chunk with the code the way that you want it and have your snippet set placeholders to be inserted into it, or you can just have the snippet return the output formatted as desired.
The other route that you might consider is to not use your custom table but instead create TVs with the info fields that you want. Then your form can create a document for each entry and you can use ditto to return the output. I wouldn’t do this if you’re going to have thousands of entries, although this method does have the advantage of being standardized (so the content can be indexed by search snippets, you can create RSS feeds from it, or whatever other idea comes to you the day after you finish this stage).
Either way should work, and of course you can do pretty much anything in a snippet that you can do using PHP on its own, so there’s no reason you can’t get this just the way you want it.
I definately want to keep the table I have. The Gallery snip’s I have seen might work, but I would be stripping out a lot of functionality to do the simple call I need, it seems. I can definately use the upload image functions. I keep thinking of the data as the prime information and the pictures as a secondary. The galleries have more image focus. Do any of them have input boxes for information on the pictures themselves other than a title or something?
Well, yes you could in fact just add more fields to the MaxiGallery snippet’s table and use it instead of writing your own snippet. I hadn’t considered that possibility actually (I was just suggesting that you look at MaxiGallery’s syntax and methods for inputing and saving info to a custom table). But now that you mention it, that might be the best and easiest solution.
You’d have to add your custom fields to the MaxiGallery forms and table structure, and you’d probably want to create your own output template to show them the way you like. But that’s certainly doable with MaxiGallery. I’ve done similar things with it, and if you ask for advice in the MaxiGallery forum you will surely receive quick replies.
You can use any sort of display method that you like with MaxiGallery, so don’t worry if none of the bundled scripts seem to be exactly what you need.
Will do. Thanks, hopefully it works out well and I can let others use it as well.