Thursday, December 14, 2006

javascript still not quite working

I spliced this together from found code and creative trial and error. Logically I'm pretty sure it should work, but there are some peices I don't quite understand...


first I set up arrays of the images and captions for each slideshow:

var original_img = new Array();
original_img[1] = "images/original/original.jpg";
original_img[2] = "images/original/astoria.jpg";
original_img[3] = "images/original/alisasausage1.jpg";
original_img[4] = "images/original/marysausage1.jpg";
original_img[5] = "images/original/hotdogmary.jpg";

var original_cap = new Array();
original_cap[1] = "Amy and the Infamous Roast Beef Dinner";
original_cap[2] = "Astoria, Queens";
original_cap[3] = "Alisa";
original_cap[4] = "Mary";
original_cap[5] = "HOT DOG";

var garlic_img = new Array();
garlic_img[1] = "images/original/original.jpg";
garlic_img[2] = "images/original/astoria.jpg";
garlic_img[3] = "images/original/alisasausage1.jpg";

var garlic_cap = new Array();
garlic_cap[1] = "Amy and the Infamous Roast Beef Dinner";
garlic_cap[2] = "Astoria, Queens";
garlic_cap[3] = "Alisa";


these functions are supposed to make the clicked-on slideshow the array used for the slideshow function then call the slideshow function:

var Picture = new Array();
var Caption = new Array();


function getShow1() {
var Picture = original_img.slice();
var Caption = original_cap.slice();
//alert (Caption[1]);
runSlideShow();
}

function getShow2() {


runSlideShow();
}

function getShow3() {


runSlideShow();
}

function getShow4() {


runSlideShow();
}

slideshow function:

var current=1

function runSlideShow(){
document.getElementById("media_image").setAttribute("src", Picture[current]);
document.getElementById("media_caption").innerHTML= Caption[current];
current=(current setInterval("runSlideShow()", 2500);
}

in the html (disassembled or else blogger tries to load it):

links to slideshows:
a href="#" onclick="getShow1()">the beginning
a href="#" onclick="getShow2()">meat platter
a href="#" onclick="getShow3()">garlic

where displayed:
img src="1.jpg" name="media_image" id="media_image" width=450 height=400
div class="basic_text" id="media_caption"


javascript circles

I'm working on putting together an image library viewer page on my site using javascript (for various reasons it has to be javascript). Basically, there are links along the left that each represent a separate slideshow (individual images are not listed). When a link is clicked the slideshow should play in the righthand side of the window. Ok. Thing is, I'm having trouble figuring out how to get each different slildeshow to play in the window when its link is clicked without calling a whole entire separate function for each slideshow. (Just to make things more interesting, I also have a series of captions that run with each image on the slideshow.) I've got each slideshow/captions stored in a separate set of arrays. So many little things have to change withig the function for the function to work (differing sizes of arrays, etc.) for each slideshow, and I can't seem to figure out how to change them all systematically. For one attempt, I've replaced things with variables and created another function around the function that plays the slideshow and attempted to pass a variable through it stored in the link and re-define the variables for the slideshow function using a switch statement. This is also clunky and not working properly. Does anyone have code for a working slideshow I could test this method on? I'm not sure if my slideshow function is ideal. Does anyone think this is a poor method or have another suggestion? A way to do this with an external script? I'm going to try to iron out the code some more and I'll put it up later when its readable. Thanks!

Tuesday, December 12, 2006

Help! Disaster! also, 'importing' databases on mac

I have just tried to get to work on my home computer, but I can do nothing at all. Any file with php in it opens up with the php code all over the browser, unsystematically spliced into the html (which still seems to be working fine). I have not changed the code in any way from before when it was working fine in the lab. I have apache running and moved the files into the htdocs folder, but the behavior remains the same. I am at a complete loss for what to do and panicking becuase I can't make any progress without figuring this out. Help!!!

In better news, I had a breif moment of terror when I discovered there was no "import" function in my phpmyadmin (I use a mac, an old one), but I discovered that the .sql file I exported at the lab could be opened as a text file and the commands it is made up of copied right into the SQL queary form (after creating a databast to put them in) and the tables and content show up in perfect form.

Thursday, December 07, 2006

color tip

To get just the right color, use the color picker in photoshop to get the #'s to plug into { color: rgb(#,#,#) }. This is working well for me because I don't want to use simple, bright colors.

The Plan:

I’ve been thinking hard about what I can reasonably accomplish in two weeks. Taking into consideration everything I’ve learned, my desire to utilize it and the full scope of the website I want to build, I could set a rather massive goal for myself containing all the pages with all the bells and whistles that would satisfy my sense of completion. However, there is the issue of time, particularly as it relates to my level of experience. I’ve spent at least 10 hours now putting together a very basic homepage (mostly in trying to get the div’s lined up right). A lot of this is learning how to work out problems without any assistance or helpful suggestions, which I see is going to be a time-consuming process of acclimation for each new technology I use and getting over the fear of messing the whole thing up (in this area, I am finding that the comment tags are perhaps the most useful tags in any language, allowing me to test for errors one little line or part of a line or any other segment at a time without erasing anything). Also, I’m finding that I want to get the pages I work on functioning perfectly, that is, I’m being a perfectionist with my design. I think this is ok, but I know I won’t be able to get the whole site up and running in perfect form by the 16th. That’s why I’ve decided to set out a goal for myself of exactly what pages and all I’m going to get done. Below is a list of all the pages I have planned for the site with what I will complete for each (maybe means I will move on to that feature if things are going very smoothly, later means I will tackle that feature after this class project)

main tabs:
HOME – complete
IMAGES – visually complete with functional library navigation for images and IMAGE/VIDEO sub-tab navigation, all available images up and accessible, slideshow capabilities (maybe—functional video viewer, keyword/search navigation)
NEWSLETTER – design structure w/subtabs (NEWS, STORIES, REVIEWS, ABOUT designed but generally empty [unless I get some of this content in on time from my collaborators]) (maybe- an rss feed) (later- searchability, archive)
STORE – empty placeholder page

auxiliary pages:
MEMBERSHIP – visually complete with functional login (w/cookie) and signup forms and working database (maybe- if possible: return-to page clicked from when login is successful)
FORUM – very basic functional bulletin board integrating with database such that login is required to post (maybe- make this look nice) (later- searchability)
QUIZ – (maybe- a few questions with functional scoring mechanism (later this will be a big feature and integrate with the database but it doesn’t seem as important right now as getting the member stuff in order)
CONTACT -- empty
ADVERTISE -- empty

I also want a good web traffic monitor in place sooner rather than later because I will definitely do some search engine optimization later on and go around trying to get linked on people’s blogs, etc. just to see what kind of response it gets.

All of the database-related stuff will obviously utilize php but I’m considering using javascript to navigate between the subtabs in the images and newsletter sections. I haven’t decided if I want to use javascript to do the slideshows or to try to use php and a database. I know how to go about the javascript but I’m generally more comfortable with php, although I really have no idea how to do this with php. This MAY have to wait until later anyway, but I’d like to figure out how to go about it while I have the resources.

I’m really interested in the search features but I’m pretty clueless as to how to set it up, so I will be asking about this in class Saturday and whether or not I tackle this part immediately depends on what I learn from that. If it’s very complex I may section this off as my next project for this site after this class project is complete.

In just this one page of going it alone, though, I am feeling a hundred times more comfortable with html and css, which I had been struggling with from the beginning. I feel like these are much harder to learn conceptually than javascript or php because they are all about the details and can only be really learned by using them extensively. I haven’t started putting together any php or javascript yet, so I may get entirely turned on my head with these, but I feel like I understand how they work so the experience of utilizing them on my own will be a different type of learning curve. I’m still very frustrated that I keep having to look up the tags, etc. to do what I want to do and I’m not always able to find them, but I am very encouraged by the fact that I am able to think up the ways to do these things and eventually figure them out.

For example, I’ve been keeping a running list of questions to ask in class, but I’ve already answered some of them for myself. I figured out how to stop the page from resizing with the window at a certain point (while remaining flexible) by using the min- max- properties in css. I also figured out by experimentation that the % width is the width of the parent element, not necessarily of the whole page, and that padding can interact with this in odd ways...

Wednesday, December 06, 2006

About Girls Love Meat

As the site will tell you, girlslovemeat started as a joke between three friends who loved to cook and eat together. We really truly very much do love meat, seriously, it’s delicious. The joke is the line it walks between racy and wholesome. The name sounds like something advertised on late night TV, but the content completely belies that aesthetic. It’s absurd, its fun. It’s girls eating, having fun and loving life. Eating is an act of joy, and that’s really what it all about—how much joy we take in our food and sharing it. And its funny, precisely because its good clean fun. I really enjoy the absurdity of the whole thing. It doesn’t matter if nothing ever happens with this, but I’d like to think that I can collect a small army of girls who love to eat and laugh and feel a little freer. So feel free to laugh at me as I ostentatiously much on this bloody steak, because that’s what this is here for.

I’m making this site because I’ve dared myself to. I talked about doing this so I’m just going to follow through and do it. Why not? An obvious answer would be that there is probably something much more productive I could work on, but perhaps I’m terribly jaded but this is the most beneficial thing I can currently think of to work on as a website that is not incredibly boring. I could put up a self-promotional site with my resume and design portfolio, but for one thing, I don’t want to, and for another, once I learn on this if I decide to do something like that it will be incredibly easy. I’m interested in learning from this as an experiment really, of how to build a web site, how to market it and all the things involved in that, how to take on my own project independently. Learning to work independently is very important for me right now, as is exploring the business end of things. I’m on the verge of a major career shift out of the cushy humanities world and into the business world (taking my sense of humor with me, thank you) so its time to adjust my analytical lens and play a little with the possibilities scattered about me.

It’s (distantly) possible that I could make a few spare bucks off my absurd sense of humor. Of course, that all lies in doing this right and legitimatizing the whole thing by actually doing reviews of restaurants and grocery stores and properly planning and documenting events and moderating comments (note: I’ve got to figure out how to moderate comments!) thus getting sponsors or advertisers. The other method, which is a big reason this got started in the first place, is to sell absurd merchandise. We’ve actually designed a bunch of this stuff already, and the idea of making the site was originally just as a tool for selling our funny meat merchandise, but the truth is that it’s much easier to put up a web site than to manufacture products, and I’d like to try to see if anyone gets the joke before putting any dollars into a material incarnation of it. Though a little research shows that there is a market at least for this sense of humor and meat as a theme (there’s a couple decent Threadless shirts out there along these lines, for example). Really, I’m not counting on these things, but I’d like to see how far the three of us (and anyone we recruit) are willing to take it once it becomes a digital reality.

Therefore, what I need this site to do most of all at this point is show me if anyone else finds this as funny as we do. Thus, it has to have enough well-displayed and organized content for people to take an interest in and recognize it as a phenomenon and at least enjoy it if not identify with it (in some weird way, surely). It also needs a mechanism by which to record the responses, which includes a behind the scenes device to monitor traffic and the obvious comment board, where I get to see in plain English if anyone gets it.

The purpose of the login is to hopefully reduce the amount of trash and general creepyness in the message boards this site inherently invites. This will filter out anyone who hasn’t put a certain degree of thought into what they are about to post, I hope for the best, and inspire a minimal level of community.

It also has to be able to change with time...

Saturday, December 02, 2006

Welcome to the Making of girlslovemeat.com

It's importart to know that this website is a JOKE. Granted, this joke has already gone way, way too far... the full story coming up next.