Jump to content

ldb358

Members
  • Posts

    199
  • Joined

  • Last visited

    Never

Posts posted by ldb358

  1. im trying to help my friend for a feature on his theme for word press. the script i  wrote it's self is very simple but Im having trouble finding out where to add my functions the first one needs to go to in the function where it adds the comment to the database and 2) it needs to go into the loop that loads the comments if anyone could tell me the script or the general code to put them in that would be nice

     

    please any help would be appreciated

  2. for the first one i think that the easiest option would be frames but any way you do the option is going to be sever side , then for the second one if you already have a poll system then you could add a ranking system to you users table then when a user votes you check there rank then continue on with the voting depending on there rank

  3. okay I'm making an "i.m. bar" that is supposed to be placed perfectly center on my web site, to make it easier to use in other projects i have it all done in JavaScript but on internet explorer and only internet explorer it is giving me an error on this code:

        imbar.style.left = ((window.innerWidth - 960)/2)+"px";
        imbar.style.right = ((window.innerWidth - 960)/2) +"px";
    

     

    its giving me this error when i use the debugger

    invalid argument      line 7 character 5
    invalid argument      line 8 character 5
    

     

    I've tried messing with gettting rid of the px and other things but then it breaks it in all of the browsers heres the script its from:

     

    function imbar(){
        var newimbar = document.createElement('div');
        newimbar.setAttribute('id', 'imbar');
        document.getElementById('imbarholder').appendChild(newimbar);
        var imbar = document.getElementById('imbar');
        imbar.style.width = "940px";
        imbar.style.left = ((window.innerWidth - 960)/2)+"px";
        imbar.style.right = ((window.innerWidth - 960)/2) +"px";
        imbar.style.height = "25px";
        imbar.style.background = "#FFFFCC";
        imbar.style.border = "3px solid #000000";
        imbar.style.borderBottom = "none";
        imbar.style.position = "fixed";
        imbar.style.bottom = "0px";
        imbar.innerHTML = "<span id='onlineFriends' onclick='getFriends()'>Select a Friend to Chat With</span>";
    }
    

     

    thanks in advance

  4. i like the logo, and actually the whole site except there was way to much white space, on top of that it didn't fit in my browser horizontally, which normally isn't a problem i  know i have a low resolution, but with all the white space it was kind of annoying

  5. I think you forgot to use the HORIZONTAL scrolbar..please scroll towards right side and see there is a tag </a> ...

     

    bY THE WAY whats the right way of deleting record from sql table? if you are talking about stripping slashes then that i know and will use later.

     

    the major part where i need help is the php script where i used the "delrec" function and passing parameter inside...that i am not doing it correctly...and also in javascript where i declared "Delrec" ...please suggest the code or correct mine.

     

    thanks

     

    Hi

     

    Couple of things. You are missing the closing tag for the <a> for the onclick (well, it might assume the closing tag of the <img> tag is it).

     

    The function delrec doesn't pass on the id of the record to delete to delprocess. It does pass thecustomerid but that isn't initialised.

     

    All the best

     

    Keith

     

    actually he's right your missing the ">" on the first tag after the on click event so i  guess not technically a closing tag but in general the samething

  6. okay maq sorry about the name as about the errors it was on for an emergancey fix only my local server is up to date with version where as host apearaltly is not

     

    and to darkfreak it gets the same error hmm... ill have to work on a work around unless my host gets to fixing

     

  7. okay first off the left side bar, all off the pictures on the share this page tab were fuzzy and had a small blue bar in the corner, i don't really like the statistics but it could be worst, i don't really like the scroll in the center and the constant loading but other than that it looks okay i have no problem with the color scheme actually i kind of like it

  8. heres the upload script:

     

    function upload($maxsize, $upload, $name, $desc){
    if(isset($_SESSION['username'])){
    $finfo = finfo_open(FILEINFO_MIME, "/usr/share/misc/magic");
    $type = finfo_file($finfo, $filename);
    finfo_close($finfo);
    if((($type == "image/jpeg") || ($type == "image/pjpeg") || ($type == "image/gif") || ($type == "image/png")) && ($upload['size'] < "104857600") ){
                if(strlen($upload['name']) < 60){
    
                    if($upload['error'] == 0){  
    			$artistFill = $_SESSION['username'];
    			$newSrc = $artistFill . "/" . $upload['name'];		
    			if(!file_exists($newSrc)){
    			$findArr = array('_', '(', ')', ' ');
                    		$nameFill = str_replace($findArr , '' ,$upload['name']);
                    		$artistFill = $_SESSION['username'];
    			$sizeFill = (int)$upload['size']; 
    			$thisdir = getcwd(); 
    			$newdir = $thisdir ."/" . $artistFill;
    			if(!file_exists($newdir)){
    			mkdir($newdir);
    			}				mysql_query("INSERT INTO photos (`id`, `username`, `src`, `name`, `desc`) VALUES ('null', '$artistFill', '$nameFill', '$name', '$desc');") or die(mysql_error());
    			move_uploaded_file($upload['tmp_name'], $artistFill . "/" . $nameFill);
    			echo "file uploaded";
    			}else{
    			    echo "file already exists?";
    			}
    		}
                }else{
                    echo "filename is too long please shorten it to under 60 character";
                }
    	}else{
    		echo "invalid file type";
    	}
    }else{
    home("You must be logged in order to upload an image");
    }
    }
    
    

    and heres the exact error:

     

    
    Fatal error: Call to undefined function finfo_open() in /home/vol4/summerhost.info/sum_2677639/lbflash.com/htdocs/functions.php on line 536
    
    

  9. okay now i thought id try and upload an image and now it generates a fatal error

    Fatal error: Call to undefined function mime_content_type() in /home/vol4/summerhost.info/sum_2677639/lbflash.com/htdocs/functions.php on line 536
    

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