Jump to content

ldb358

Members
  • Posts

    199
  • Joined

  • Last visited

    Never

Everything posted by ldb358

  1. can you post the getHeadlines() function also this should work: if(strlen($data) > $numberofcharaters){ list($body, $extra) = str_split($data, $numberofcharaters); } echo $body . "...";
  2. is it possible to override user defined functions? like: function test(){ echo "hello"; } function test2(){ return "hello"; } //then do something like //switch the value of test to be equal to the value of test2 and in turn return instead of echo override_function("test", "test2");
  3. ldb358

    Wordpress

    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
  4. the error you described is the one i get when it cannot connect to the database either i forget to import my connection file or a username/password is incorrect so i would assume the error is somewhere in there
  5. 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
  6. 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
  7. 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
  8. try using single quotes in side the onclick attribute your only slashing out the quotes in php not in javascript
  9. 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
  10. i really like the design i agree that you need to tell people what you do theres a good place for a slogan right next to the logo also i would extend the bar across the bottom of all the links across all of them
  11. i found i bunch of "junk names" in the message database, I'm assuming that meant that in filtered it correctly??? if not what is the particular probleum
  12. okay heres my fix do you see any bugs in this: list($x, $y, $type2) = getimagesize($upload['tmp_name']); $type = image_type_to_mime_type($type2);
  13. 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
  14. to mac that was proboly because i had error reporting on that is fixed and darkfreak i have version 5.2.10 i doubt my host will upgrade what is the replacment?
  15. 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
  16. 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
  17. i did that and got the same error it says the same error
  18. did you say that you where esacping it? if the get_magic_quotes_gpc is on, on your server it will automaticly slash every thing so make sure to use stripslashes before escaping
  19. i dont think you need the ";" in the while loop other than that i would think that it would work
  20. i dont really know for sure but try changing that to a while loop while(i < 17){ //code }
  21. 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.