Jump to content

cmgmyr

Members
  • Posts

    1,278
  • Joined

  • Last visited

    Never

Posts posted by cmgmyr

  1. Hey Everyone,

    I have posted before about a critique about my site: SyracuseBands.NET but I recently updated the site again and added some more functionallity and also made it easier to read.

    Please tell me what you think and if you have any suggestions to make it better.

    I really haven't gotten a lot of time to validate everything and I know that there are a lot of errors...but please disregard for right now.

    For some reason the members (band) login section doesn't work in firefox for some reason... I have posted about this but no resolve yet.

    So anyways here is the link: [a href=\"http://www.SyracuseBands.NET\" target=\"_blank\"]SyracuseBands.NET[/a]

    Check it out and let me know what else I can add to make it kick ass even more!
  2. Here is the first 4 lines of the JS[code]function validateEmail(emailAddress) {
       var match = /^[_a-zA-Z0-9-]+(\.[_a-zA-Z0-9-]+)*@[a-zA-Z0-9-]+(\.[a-zA-Z0-9-]+)*$/.test(emailAddress);
       return match;
    }[/code]
  3. I have a users.php file on one of my sites that does't seem to show up in foxfire. It's just one big switch with a lot of different functions.

    Since the file is WAY too big to post can you please give me some sort of insight of this?

    I have used and altered this file for some other sites that I made and those seem to work fine...so I don't know why this on isn't.

    The live version is: [a href=\"http://www.SyracuseBands.NET/users.php\" target=\"_blank\"]SyracuseBands.NET[/a]
  4. Ok...that fixed the size problem...but caused another.

    The customers are allowed 5 photos. I originally had it set up to where they can re-name the photos to change the order of them on their profile, but now it's not working like that. The way that it is set up now it shows the second picture [$pic-1] when I try [$pic-2] none of the images show up.

    Is there a way to get around this one?

    Thanks
  5. ok I have a little photo gallery on a site. I made up a little bit of code that resizes the image if it is too big.

    The script works fine when it's on my local computer, but when I upload it the script takes the image size of the image after the one it's supposed to, but outputs the image it is supposed to.

    If I have image1 and image2, When I try and get the size of image1 it takes the size of image2, but still outputs image1...I don't get it...here is my code, please help if you can!

    [code]    if (!isset($userid) or trim($userid)=='') {
          $gal = 1; }
        if (!isset($pic) or trim($pic)=='') {
          $pic = 1; }
        $dir= "custphotos/gallery".$userid;
        @$d = dir($dir);
                  
        if ($d) {
          while($entry=$d->read()) {  
            $entry = preg_replace("/ /","%20",$entry);
            $pos = strpos (strtolower($entry), ".jpg");
            if (!($pos === false)) {  
              $arr_pic[] = $dir."/".$entry; } }
          $d->close(); }
        
        $CONST_WIDTH = 250;
        //Find image h and w
        $size = getimagesize($arr_pic[$pic-1]);
        
        $w = $size[0];
        $h = $size[1];
        
        if($w > $CONST_WIDTH){
            //Find %
            $percent = $w / $CONST_WIDTH;
            $w = $w / $percent;
            $h = $h / $percent;
        }
        
        @sort ($arr_pic);    
        $total  = sizeof($arr_pic);
        echo "<div align=\"center\"><img width=\"$w\" height=\"$h\" src=".$arr_pic[$pic-1]."><br>";[/code]
  6. This is my uploader.php code:[code]global $userid;
        if($file_name !="")
        {
            copy ("$file", "custphotos/gallery".$userid."/$file_name") or die ("Could not copy file");
        }else{
            die("No file specified");
        }[/code]

    This is the error that I'm getting:[!--quoteo--][div class=\'quotetop\']QUOTE[/div][div class=\'quotemain\'][!--quotec--]Warning: copy(): SAFE MODE Restriction in effect. The script whose uid/gid is 8082/8082 is not allowed to access /mounted-storage/home11/sub002/sc17123-RPXM/www/htdocs/memorial/custphotos/gallery2 owned by uid/gid 99/99 in /mounted-storage/home11/sub002/sc17123-RPXM/www/htdocs/memorial/uploader.php on line 5

    Warning: copy(custphotos/gallery2/example.jpg): failed to open stream: No such file or directory in /mounted-storage/home11/sub002/sc17123-RPXM/www/htdocs/memorial/uploader.php on line 5
    Could not copy file[/quote]

    (Line 5 is the copy command)
    The directories are chmod 777.

    What is going on and how can I fix this?

    Thanks
  7. Hey again!

     

    Sorry I didn't reply sooner...I had a pretty busy weekend. I'm glad you liked how I did the top 10 and recent 5.

     

    For the top 10:

    I have a stats table in the database. Each band that has made a profile has and entry in the table. Every time someone clicks on their profile their stats are increased by 1. At the end of my query it is "... ORDER BY hits DESC LIMIT 10"

     

    For the 5 newest:

    When the bands sign up there is a start date for each entry so my query includes "... ORDER BY start_date DESC LIMIT 5"

     

    Pretty simple stuff, but it looks cool to the viewer.

     

    Let me know if you would like to know anything else.

     

    -Chris

  8. I just looked through this real quick and here are some changes that I think you should make:

     

    1. In Table_Releases replace artistname with artistid (same as in Table_Artists) You can always join the 2 together, this will save you space and also keep everything connected by a number and not text, not that it matters too much but I think it's more reliable.

     

    2. in Table_Songs replace reltitle with releaseid (same as Table_Realeases)...for the same reason as above.

     

    Those are only minor changes for you...but I think that they would help you in the long run. Everything else looks pretty good.

     

    Do you have the domain set up for this already, I would like to watch your progress with this and I am interested in visiting the site when you are done with it.

     

    I have also made a local music site for syracuse,ny at www.syracusebands.net check it out, and if you need any other help, please let me know.

     

    -Chris

×
×
  • 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.