More efficient way of managing an online web store - php

I am about to start implementing an online web store for a client. The web store will be constantly receiving new products that will be added into the store's online web catalogue.
My current code design for adding items is a web form where an admin would enter in the name, description, and images of the product. Each item comes with multiple images both in thumbnail, high resolution, and sometimes 3D rotation (sequence of images).
My main concern with the web form is the uploading of many high resolution images. Waiting for the upload every time the admin submits a new item really makes it a slow process to add a bunch of new items into the catalogue. Is there a better way to build this system other than having a web form? Maybe something like an offline system that the admins can just "sync" to the online version. I don't mind learning something new and coding it myself, but also if there's something on the market already available to buy with similar features I'm all ears.
More info:
I will be the primary developer of this system and I'm only a novice in PHP, Ajax, jQuery, and AS3. The current website and system is authored in PHP with mySQL.

You can allow the editors to input images as zip files, and a progress bar would be good. You can have an inline upload that just happens when the images are selected, instead of uploading after the form post so that the editors do not feel the waiting effect.

Related

Add title screen to video on upload to YouTube via API

I currently use the YouTube API to allow website users to upload their videos through the site straight to our YouTube channel (adding META data etc) at the time of upload.
Ideally we would like to dynamically add some sort of title, watermark, opening screen or an image to the beginning and / or the end of the video. Essentially we just need any method of adding something to the video which adds some form of branding to it (even if just a plain company name at the bottom).
The uploads are from internal users (i.e. secure and trusted) and there is not an excessive amount so I would be happy to upload to our server first (instead of straight to YouTube), manipulate the video then upload to YouTube.
The site runs PHP on a dedicated Linux / Apache server setup.
Any suggestions greatly appreciated
Thanks
Here's a really quick and easy one: Invideo Programming. Invideo Programming lets you add a small logo to a corner of the video, or promote another video in a different corner, or both.
You can add this to the API via the Channels resource as as invideoPromotion attribute. We recently did a show on Google Developers Live explaining how to configure this on both the web UI as well as in the API. Check it out - I think this'll do what you need.

A Responsive Photo-wall Gallery with Swipe Functionality

I'm looking to build a javascript/jquery gallery that meets the criteria below, and would love to know if there are any existing gallery modules that have all/most of these features:
1. Photo wall with zoom (single view) functionality. eg. http://tympanus.net/Tutorials/SlidingPanelPhotowallGallery/
2. Responsive, so that the photo wall images tile properly for desktop & mobile devices, and reshuffle if the user resizes their browser. eg. http://isotope.metafizzy.co/
3. (optional but desirable). If a user is on a mobile device, allow them to swipe through single-view images.
In a nutshell. A user will go to the thumbnail wall, select an image, and can then either swipe through more enlarged photos, or switch back to the wall.
The photos will be sourced from a folder on the server. Moderators are simply camera girls, who will upload images from their digital cameras to this folder via ftp - They wont resize / optimise the images, so it would be great if this could happen in the process somewhere too.
We are hosting on a PHP / Linux environment.
Have a look at jQuery Mason: http://masonry.desandro.com/
It can be used as a responsive wall.
What your asking for is not called 'zoom' (that is another effect), you seem to what what is called a lightbox. There are a lot of these, here is a comparison, http://planetozh.com/projects/lightbox-clones/
To re-size images your going to have to write some php to make use of image GD or imagemagick, here is a tutorial, http://net.tutsplus.com/tutorials/php/image-resizing-made-easy-with-php/ or possibly a script, http://shiftingpixel.com/2008/03/03/smart-image-resizer/ (or timthumb.php).
For serving them your going to have to write some php with your javascript.
There is no all in one solution for what you asking for, you're going to have to write it or hire someone to do so.
As far as I know you have to create a plugin or write you own jquery functions for getting all customized features.(that will be very good in sense of performance and maintenance)
for zooming functionality you can use some of the modal windows with ajax call or you can create.
to achieve this you have to write good css so that your photo aligned according to screen.reshuffle will be handled if you write good css.
yes you can achieve this by detecting the browser navigator and changing the css and javascript accordingly.
For pre processing images(re sizing,dynamically generating thumbanails) you can opt for php backend solutions.
And no worries you can handle images from folder via Ajax and show them as they requires.

How do I integrate PHP with a 3d environment?

I have built a website using php and simple HTML/CSS for a client. In its simplest form : The website allows users to upload pictures and view them in a virtual art gallery. Basically I just placed images against a background image that looks like a art gallery wall.
The client wants a 3d website now, where the user can "walk through rooms and view pictures on walls, etc."
I'm wondering what's the best way to create a 3d environment that will allow me to use php to dynamically change the layout of the walls. I have been thinking of using html5 canvas.
I'm open to pretty much anything. Thanks!
You can try WebGL, Adobe Flash/Flex, Silverlight or Java applets for that.
For all approaches, you likely will have a "loader program" (or "engine") which then fetches the room description via RPC from your PHP-based backend, along with image URI and other stuff you need. This way, there is no need to change your program again just for updating the rooms or images.

what are the best practices for letting users upload theme files to my server

I'm trying to make my own framework for my own projects and I would want people to upload themes for their profiles to the database. Letting them theme the look and feel of their accounts.
I first thought of having the files on the server.
A user would log in and the PHP would pick up their user id and other misc details and route the urls to their particular folder and serve the files in that folder.
an example would be a real directory of
http://www.foo.bar/users/me/style.css
http://www.foo.bar/users/me/script.js
http://www.foo.bar/users/me/index.tpl
http://www.foo.bar/users/me/otherPage.tpl
then I was thinking wow, imagine if I have 100's of users? then I would have 100's of folders in my users directory on my server, not to mention duplicate files all over the place taking up space. So ok, while this may be the fasted way to fetch a file maybe loading the markup from the database won't be such a bad idea right?
My server looks cleaner but now my database will get queried a lot more than I would want.
Then comes the major issue i think, is having files that are particular to a user. For example stylesheets may have background url's with images, so now these images needed to be linked to their real path on the server. Which brings me back to having a dedicated folder for each user to house their theme specific files.
How can i securely and effectively find a way to let users upload themes and have all files images, pdf's, docs, etc. all saved without them potentially being accessed by another account holder or thru simple hacking techniques to pull a file from the server that belongs to another user.
One solution I thought of was to only let users who are logged in view files, append to the file a unique tag that will let the user view the file if the tag matches a session variable. But then what if a user wants to share that file with another person, then tagging the file would bring my back to square 1 with the security thing not letting view the file because they wouldn't be an authorized user.
Well in any case, what would be best practices to get some of my concerns on the right path to being delt with.
P.S.
I choose these tags because in my solutions I think they will touch upon some of these aspects.
You can store html or css in a table row but be sure to sanitize the data to avoid hacks, or injections. The easiest way would be to let the user paste the code into a text area or field. If you want to let them upload files, you will need to write a script that parses the data from the uploaded file. This is more complicated as you will have to manage all filtering and sanitizing along with making pulling the data from the file and saving it to the database.
We skin our CMS to work with multiple clients and their own users. But rather than giving them the possibility of changing ANY area or style of the page we allow certain areas such as:
upload your logo
set the colour of the banner bar behind your logo (using a smart colour picker and some 'figure out the contrast between the colours' functions)
set your text colour (using a colour picker)
and so on for the items you want them to change.
We then store those in the database and serve them up through dynamic stylesheets (I know these don't cache but it's better than having hundreds of files).
I know that MySpace used to let you upload a whole host of HTML and CSS (not sure if they still do) but it's a security nightmare as the potential for XSS is enourmous.
You may want to look at HTML Purifier if you're going to let them add their own custom HTML and full themes -> http://www.htmlpurifier.org

Image management system

I have a user that wants to be able to upload photo's to his website, and then be able to choose which album he wants them to appear in. I already have the albums hard coded on the site, but he wants the ability to add more.
Does anyone know of a script or cms or something that this can easily and cheaply be implemented or am I going to have to develop all of this from scratch?
Gallery 2 is my go-to. It's powering several large website's galleries around the web.
If you're very picky (as several of my clients have been) you can query image information out of the DB and build your own front-end. I've done several photographer's websites this way. There is even a desktop upload tool that can be downloaded if desired.
There is no cost at all.
This seems to be the cheapest and most complete solution I found. Slick Gallery
This one also seems like it would work well
PhotoCMS
For Image management I have used and recommend http://coppermine-gallery.net/

Categories