Jump to content

Matpatnik

Members
  • Content Count

    227
  • Joined

  • Last visited

Community Reputation

1 Neutral

About Matpatnik

  • Rank
    Member
  • Birthday 06/26/1979

Previous Fields

  • Languages
    HTML, CSS, PHP

Contact Methods

  • Website URL
    http://www.matpatnik.com/
  • ICQ
    0

Profile Information

  • Location
    Mtl
  • Interests
    Learning as much as possible every single thing

Recent Profile Visitors

5,752 profile views
  1. Hi guys, I came with a problem and can't find the solution. I looked on internet everywhere I could and here is the closest I found but still not right. The problem here is it cut the last part of the my longest table. The 2 tables doesn't have the same rows number but I need them all and I only need 1 category to be shown. So I need the 2 tables be glued together side by side filtered by category ( both table share the same categories ) with no missing data (of that category) So far this is what I got. I tried to join but it keep duplicating rows so instead of getting 200 rows I get like 3k rows. I tried union too and no success. I'm out of inspiration right now. If you can point a right or better path it would be great. Here's my query so far: SELECT t1.`id`, t1.c1, t1.`total`, t2.`id`, t2.c2, t2.`total` FROM ( SELECT @i:=@i+1 AS rowId, `id`, `categories` as c1, `total` FROM extable17, (SELECT @i:=0) a ) AS t1, (SELECT @j:=@j+1 AS rowId, `id`, `categories` AS c2, `total` FROM extable18, (SELECT @j:=0) a ) AS t2 WHERE t1.rowId = t2.rowId;
  2. Hi guys it's been forever I haven't touch code and I ended up with this situation. I have no problem to display the page with IE and FF. I have a div that contain embedded posts from a facebook page that should not exceed 500px by 500px and keep the left of the page. On the right there is an other div a little bit smaller that should float right but for some reason the facebook div seems to clear right only with chrome. I've been trying to wrap it, force my other div, and find a hack but no success. Since every attempt failed I went back to my original code. Your help is appreciated, thx! the address of the page is http://www.matpatnik.com/White-Spiders css: /****************** #desc Style ******************/#desc{ float: right; width:450px; max-width:450px; display:block;}#desc>.innerBox>.contentBox{ height: 484px;} html: <div class="outerBox fb-page" data-href="https://www.facebook.com/WhiteSpiders" data-width="500" data-height="500" data-small-header="true" data-adapt-container-width="true" data-hide-cover="true" data-show-facepile="true" data-show-posts="true"> <div class="fb-xfbml-parse-ignore"> <blockquote cite="https://www.facebook.com/WhiteSpiders"> <a href="https://www.facebook.com/WhiteSpiders">WhiteSpiders</a> </blockquote> </div></div><div id="desc" class="outerBox"><div class="innerBox"><div class="contentBox">
  3. I probably sent a wrong parameter somewhere ^^
  4. Here you can do an if statement to find the current path and if it's longer then their root directory leave it allow them to go up else leave it the way it is.if (strlen(/farm/$userID/) == $currentPath){ $up = $currentPath;} else { $up = substr($path, 0, (strrpos(dirname($path."/."),"/")));} I don't know if it work but you get the idea.
  5. Matpatnik

    Mkdir

    I'm glad it help
  6. Matpatnik

    Mkdir

    I see, have you tried with $_SERVER['DOCUMENT_ROOT']? <?php$target_path = $_SERVER['DOCUMENT_ROOT'] ."/farm/$userID/";$NewFolder = ($_POST["FileName"]);mkdir("$target_path" & "/" & "$NewFolder" ,0755);?> maybe that's why it doing it's thing in the same directory
  7. Matpatnik

    Mkdir

    try this: <?php $target_path = "/farm/$userID/"; $NewFolder = $_POST["FileName"]; mkdir($target_path . $NewFolder ,0755); ?>
  8. The code below works good alone so fare but I need to call it more then once.Copy and paste can't be the solution, I hope hehe!a soon as I wrap this snippets to create a function out of it it give me this error: I tried to wrap only the foreach() as a function, same errorWhere ever I wrap it it give me the error.can someone give me a hand on this plz, Thank you.$fontSize = 15;$ox = 10;$y = 40;$text = $row['description'];// Set the content-typeheader('Content-type: image/png');// Create the image$im = imagecreatetruecolor(750, 300);// Create some colors$beige = imagecolorallocate($im, 255, 206, 122);$dark_red = imagecolorallocate($im, 193, 0, 0);$grey = imagecolorallocate($im, 128, 128, 128);$black = imagecolorallocate($im, 0, 0, 0);imagefill($im, 0, 0, $beige);$text = text_to_array($text);foreach ($text as &$value){ $x = $ox; foreach ($value as &$val) { $mod = 0; if (substr($val, 0, 3) == '[B]') { $val = substr($val, 3); $mod = 1; } else if (substr($val, 0, 3) == '[I]') { $val = substr($val, 3); $mod = 2; } else if (substr($val, 0, 4) == '[BI]') { $val = substr($val, 4); $mod = 3; } // Bounding box $bbox = imagettfbbox($fontSize, 0, 'Fonts/'. $fonts['bkant'][$mod], $val); imagettftext($im, $fontSize, 0, $x, $y, $black, 'Fonts/'. $fonts['bkant'][$mod], $val); $x += $bbox[2] + 10; } $y += $bbox[1] + ($bbox[1] - $bbox[5]) + 5;}unset($val);unset($value);// Using imagepng() results in clearer text compared with imagejpeg()imagepng($im);imagedestroy($im);
  9. we probably all got his pm,Fortunatly I couldn't access the private message I don't know if they toke off this option totaly or it's just for me?
  10. Yes the switch (0) was a typing errorWe have no problem with FF and Opera.The countdown doesn't work on my 3 computers and my friends computer too with IE. It show the starting number but that's all and give me an error Line: 68, Char: 5, Error: Object required, Code: 0... function myConstructor(blocknum) { hid = ('hide' + (blocknum)); unhid = ('click' + (blocknum)); if (t == 0) { document.getElementById("the_countdown").innerHTML = t--; document.getElementById(hid).style.display = "block"; document.getElementById(unhid).style.display = "none"; } else if (t < 0) { t = 10; document.getElementById("the_countdown").innerHTML = "GO!"; myCalculOperation(); document.getElementById(hid).style.display = "none"; document.getElementById(unhid).style.display = "block"; } else { document.getElementById("the_countdown").innerHTML = t--; document.getElementById(hid).style.display = "none"; /* <--- It's this line */ document.getElementById(unhid).style.display = "block"; } }
  11. ok it work with Firefox but not with IE of course. I guess when I've look on IE it was still on cache and I still didn't figured out the click problem with the auto answer.I did some minor change: <script type="text/javascript"> function showMoreAnything(blocknum, isOpen) { /* --Merci a http://www.scriptygoddess.com-- */ hid = ('hide' + (blocknum)); unhid = ('click' + (blocknum)); if(document.getElementById) { if(document.getElementById(hid).style.display) { if(isOpen != 0) { document.getElementById(hid).style.display = "block"; document.getElementById(unhid).style.display = "none"; }else{ document.getElementById(hid).style.display = "none"; document.getElementById(unhid).style.display = "block"; } }else{ location.href = isOpen;return true; } }else{ location.href = isOpen;return true; } } function myCalculOperation() {num2 = Math.round(Math.random() * 10); do { num1 = Math.round(Math.random() * 10); }while (num1 < 0) switch (0) { case 1: document.getElementById("the_calcul").innerHTML = num1 +" + "+ num2 +"</div><div id=\"hide101\" style=\"display:none;\" align=\"left\">= "+ (num1 + num2); break; case 2: document.getElementById("the_calcul").innerHTML = num1 +" - "+ num2 +"</div><div id=\"hide101\" style=\"display:none;\" align=\"left\">= "+ (num1 - num2); break; case 3: document.getElementById("the_calcul").innerHTML = num1 +" x "+ num2 +"</div><div id=\"hide101\" style=\"display:none;\" align=\"left\">= "+ (num1 * num2); break; case 4: document.getElementById("the_calcul").innerHTML = (num1 * num2) +" ÷ "+ num1 +"</div><div id=\"hide101\" style=\"display:none;\" align=\"left\">= "+ num2; break; } } var t=10; var int=self.setInterval("myConstructor(101)",1000); function myConstructor(blocknum) { hid = ('hide' + (blocknum)); unhid = ('click' + (blocknum)); if (t == 0) { document.getElementById("the_countdown").innerHTML = t--; document.getElementById(hid).style.display = "block"; document.getElementById(unhid).style.display = "none"; } else if (t < 0) { t = 10; document.getElementById("the_countdown").innerHTML = "GO!"; myCalculOperation(); document.getElementById(hid).style.display = "none"; document.getElementById(unhid).style.display = "block"; } else { document.getElementById("the_countdown").innerHTML = t--; document.getElementById(hid).style.display = "none"; document.getElementById(unhid).style.display = "block"; } } </script> </head> <body> <div align="center"> <div id="the_calcul" class="calcul"></div> <div id="click101"> <a href="#jsenabled=no" class="uLigne" onclick="showMoreAnything(101,'#?jsenabled=no');t=0;return false;">Voir la réponse</a> </div> <div id="the_countdown" class="calcul_countdown"></div> </div>
  12. will it only be for mobile device? if so I suggest that you expend to stationary device too :)more accessibility, more people.edited: It doesn't show everything under 3" wide (wrap)
  13. Matpatnik

    My web site

    since you are using .png images for your top menu I suggest that you do a better fade in fade out effect on mouse over.good start :thumb_up:
  14. I know that you are still on your beta testing but the design style is not appealing there is a lot of work to do on this part.My 2 cents worth
×
×
  • Create New...