Re: PHP/MySQL tasks on the website

> Hi,
> You guys expressed an interest is doing some PHP/MySQL work on the new
> art website. Over the past week I've dug into it a bit and taught myself
> some basic PHP just to get it up and running, though this is not a
> viable approach for the long term (ie. I don't really have the PHP
> skills ATM to write good code). After launching the site, a few issues
> have cropped up that could use some work. I'll list them here and post
> them on the wiki:
> * Code comments and cleanup: there are very few comments in the code. It
> might be a good exercise for someone to go through and add sensible
> comments and perhaps even clean up the code in various ways if they have
> the experience to do that. I already abstracted out some hard-coded
> things like site name, contact email etc., from the original gnome
> in-line versions to variables in the config file, but more of this could
> be done.

This would be nice and Benjamin has made an excellent start by
modularising the code into objects. Until recently, art-web has always
been a one man project, so unfortunately comments have never had high
priority. Adding headers to the files to explain name, purpose and license
would probably be a good idea, but we need to agree on a standard format.

> * Direct upload: The way we are currently uploading images is awful! the
> gnome version had some server-specific stuff that I couldn't get working
> and had to work around. Their version was less than super-convenient,
> but ours is directly dreadful. It's quite easy for artists/users to
> submit artwork, but it's then a very laborious process for the admins to
> upload it and link to the right place. Getting it to work they way the
> original does would help, but making a solution where the original
> submitter uploads artwork and thumbnails directly would be much better
> (into a holding area for evaluation). It would be good if you didn't
> have to tick the box next to the URL field but that the application
> detected that there was text in it and also what extension was used.
> * Automatically generated thumbnails (on upload). From backgrounds,
> screenshots, etc. we could get automatically generated 96x72px
> thumbnails with Imagemagik or GD, saving the uploader from making them.

If anyone wants to tackle this, I suggest looking at the contest code.
This was out test bed for user file uploads, and includes all the
functions to generate thumbnails and upload files, including error
checking etc.

What I would like to do is abstract the file upload and thumbnail creation
into a separate class, so that all the submit pages can make use of it.
Continuing the art_ naming scheme, this should probably be an art_upload
class in includes/

Another thing that was in the works to be added (James: any progress?) was
a screenshots section allowing users to upload screenshots to show off the
latest features of GNOME. I'm thinking about something along the lines of
/screenshots/gnome-2.12/ or whatever, which will mean an addition to the
apache config, and a new table in the database.

Just to let you know what I'm currently working on, I have been trying to
make it easier to add and remove categories from the system, as well as
clean up some of the admin side. I've also been thinking about moving to a
template based system for the layout, possibly supporting i18n too. My
ideas at the moment are to create a new templates directory structure such
as /templates/en/ and then place a number of xhtml files as templates.


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]