Jump to content

steelmanronald06

Staff Alumni
  • Posts

    2,006
  • Joined

  • Last visited

Posts posted by steelmanronald06

  1. I keep my dynamic. There are times when I need to get links that are controlled by cpanel to work on their directory and not the root.  Sounds confusing, but here is what i do:

     

    <?php

     

    $path = "..";

     

    $link = $path . '/index.php';

     

    echo $link;

     

    require_once($path . 'includes/master.php');

     

    unset($path);

     

    ?>

     

    stuff like that :-/

  2. Okay, i got a question. There are some web sites that have music videos (youtube and american idol mainly) and I was wondering how I could strip the sound off and save just the sound, not the video, to my computer as a .mp3 format?  I know software will be required, but i'm poor so free software would be great.  the reason is i have a client who wants a web site and they want audio clips of people singing in the American Idol, but they don't want the video that goes with it.  An example would be this one:  http://www.americanidol.com/videos/view/?vid=720  I want the sound and everything, but no video. 

  3. I made all A's in my classes,but those grades counted on a 4.0 scale and my school grades on a 3.0 scale.  So when they went to average it in with my grades from 8-11th grade, which were all 3.0 scale based, it lowered my overall average considerably.  It was really fucked up. I got a golden knot, and an honors award, which was the first they have ever done that, but that is all.

  4. haha!  wow, i feel so overwhelmed.  Against what I'm sure most people say, I grabbed CakePHP.  I had me a PDF of the manual, I've spent all day reading the manual and doing no coding.  It is a lot to learn, but I needed to learn the basics and it is pretty good at laying it out for you.  So, I'm working with CakePHP. It is pretty complex, but I think I might survive. It is just so overwhelming learning all this new stuff.

  5. Right off the orange and white hurt my eyes, and I wasn't a big fan of the flash welcome.  :-/

     

    I also don't like the logo at the top. WTF is with the wavy almost randomly drawn blob or splat of darker orange with the site name?  Not very well with the over all design.

     

    The links in themselves are too small, and most of the time it is weird having them right aligned.  Majority of the websites have them left aligned so when i went to click i instinctivly ran to the left side of the link box and worked my way right.

     

    Also, since  your gonna have them in the little box looking things in your nav, you might as well apply a hover on the entire box and make it where clicking anywhere in the box will activate the link, and not just clicking the words.  Hovers do a lot for your site if applied properly.

     

    All the little boxes next to the banner seem kind of random and don't really play well with the overall design.  The text is really bland, needs to spice it up a bit to attract the eye.  I sent you a quote using yoru form and put a lot of HTML and some javascript into it. It never once told me that was not allowed, not once did it check to be sure i entered a valid phone/email format, etc. 

     

    Also, the entire site is a table layout.  Let's see some CSS in there. <div>'s go a long way.

  6. yea. What AndyB said. If it has more than one dot PHP is easily capable of exploding at the first dot. It just takes a bit of code tweaking.  I would tell you how, but I feel people learn a lot more if they make an attempt, even if the attempt fails.  Take the code AndyB gave ya, and if you feel like there might be more than one dot in the file name/extension, which normally it is good pratice never to put dots in your filenames, then it is extremely easy to tweak it a bit to fit your needs.  Hope it works out for ya.

  7. wow!  Eric it sounds like you know what your talking about, but that all just went way over my head. Plus, i was just using a shopping cart as an example. My main point of the post was to ask what happens when you want to create something that isn't prepackaged in CakePHP. Do you add to their source files or do you create your own or what?  But I think you answered some in your post, and redbullmarky answered it in his too.

  8. See, you have localhost.  Your new host provider might not have localhost as a valid mysql database host. It might be a subdomain like i showed you above. Read the emails you got on signup. They should explain it. If you  have cpanel, click the MySQL icon and it shows you the database host url. If all else fails, contact support and ask them.

  9. Personally, I think two tables would be for the best. I mean your going to have to add an extra column to the one table so it looks like so:

     

    comment_id, name, email, comment, for

     

    Where the for field is either blog or photo.  Well, first your query is going to have to search through sum 1000+ records, assuming it gets that popular, and find all the ones for a blog entry or all the ones for a photo entry.  THEN, say you want to get rid of your photos section later on, or your blog section. All those comments will still exist, taking up space.

     

    Now, you also have to look at something else. You only want to display the comments made for each blog entry or each photo. So your going to have to add another two fields, and both will have to be set to NULL.  Now your table has grown to look like this:

     

    comment_id, name, email, comment, for, photo_id (NULL), blog_id(NULL)

     

    So now your query will be like this to get a blog entry for a blog with id 6:

     

    SELECT * FROM `table_name` WHERE `for`='blog' AND `blog_id`='6' ORDER BY comment_id DESC

     

    Now your query above is going to go through thousands of comments to find about 5 comments for blog entry 6 and it is going to order them with the newest comments at the top and the oldest at the bottom.

     

    Now, say you have it split into two tables. You get this:

     

    blog:    comment_id, name, email, comment, blog_id

    photo:  comment_id, name, email, comment, photo_id

     

    Now your query just got smaller:

     

    SELECT * FROM `blog` WHERE `blog_id`='6' ORDER BY comment_id DESC

     

    Now you can choose in the future to get rid of one without harming the comments on the other, there is less your query has to sift through, AND the query itself is smaller. Plus, it makes it easier to tell things apart.

     

    The entire point of is to keep things optimizied.  Granted it doesn't make a HUGE amount of difference at first, or even later on since MySQL is a powerful database, BUT the goal is to stay as organized and optimized as possible.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.