I’m on a roll it seems. As I was thinking about the layout of the site, I finally decided that putting the photo owners at the bottom of the page was a really bad location for them. So instead, I put them into a draggable box, which also very conveniently gave me a nice location to display more information about a specific photo when clicked.
The only unresolved issue I have right now is that sometimes the list of owners does not update when you switch to a friend’s photos. As a temporary fix for this, I added a manual refresh link to the top of the draggable box that always does the trick.
If anyone has any issues with the new design, such as things not displaying right or not working, please let me know!
EDIT: I was just informed that the box does not work correctly in Internet Explorer (what else is new?). I’m working on fixing it asap.
I just applied the latest thing I’ve been working on for urPics, which adds on to the feature I worked on last night. Last night I added a list of owners to the bottom of the page, but it was a static and boring list. Now, when you click an owners name, their photos become highlighted so you can see who owns which photos. This is but another step forward towards my final goal of much, much more customization over what photos to download. I must add that right now clicking on names DOES NOT change what photos are downloaded. I have some ideas as to how I’m going to implement customizing this, I just need to think them through and figure out what would be the best way to do so first.
If you were wondering how I was able to do this, heres a quick run through (note: this requires scriptaculous):
The PHP
$owners = getOwnerList();
if(is_array($owners))
{
echo "<p>";
for($i=0; $i<count($owners); $i++)
{
if(!$i==0){ echo ", "; }
echo "<a href="javascript:highlightUserPics('".$owners[$i]['uid']."')">";
echo $owners[$i]['name'];
echo "</a>";
}
echo "</p>";
}
else
{
echo "<p>No Owners</p>";
}
The Javascript
function highlightUserPics(owner)
{
if(lastOwner!=null)
{
var lastOwner_classes = document.getElementsByClassName(lastOwner);
for(n=0;n<lastOwner_classes.length;n++)
{
lastOwner_classes[n].style.border = 'none';
}
}
var owner_classes = document.getElementsByClassName(owner);
for(i=0;i<owner_classes.length;i++)
{
if(lastOwner == owner)
{
owner_classes[i].style.border = 'none';
}
else
{
owner_classes[i].style.border = '4px #516fa6 solid';
}
}
if(lastOwner==owner){lastOwner=0;}
else{lastOwner = owner;}
}
After not touching any code for way too long, tonight I started working on urPics again. Nothing too drastic so far, but now at the bottom of the page, after all the pictures, there is a list of the people who own the pictures. I plan to do a lot more with this list soon, but I needed to get this part done to pave the way for future updates.
Also, I got rid of a very old bug that I kept forgetting about that appeared if you chose a user with no photos. Before, an ugly PHP error appeared, and many people thought the application was malfunctioning even though in reality, the user just didn’t have any photos available. Now, a nice little message informing the user as such appears instead of the ugly error.
Just to let everyone know, I just flushed out the image cache directory in case anyone didn’t finish transferring their photos or didn’t download their .zip file in order to protect your privacy. I do this every now and then to clean out the directory and also give me a little disk space back (not that I really need it that badly, I have 50GB to spare or so).
On another note, I might be adding some new features soon depending on whether I get the time or not. I’m currently balancing college and another web design job, so I’ll see how it all works out.
I would like say thanks to everyone for the positive feedback on my application, especially to those who took the time to send me messages. It really means a lot to me. urPics has been steadily increasing in users every day, and should reach the 700th user mark soon. It also recently passed the 666th user mark without a hitch, so that should be a good sign :) All I ask of you is to spread the word about my application to other friends on Facebook, but if you would like to donate to help motivate me to work more on urPics, then feel free to do so using the link at the bottom of this page, thanks!
Leave a Comment | Posted in New Features