Jump to content

runnerjp

Members
  • Posts

    2,214
  • Joined

  • Last visited

Everything posted by runnerjp

  1. Have you tried using javascrpt function redirect(){ window.location.href = "http://yourwebsite/"; }
  2. Where are you string ur id?
  3. I thought that was the issue thats why i was checking the picture Seems like its 2 thinks 1) check the path of your image ... is it correct? .. does it have the image in there?? 2) right click on the html output and go to properties and copy the address url <- it might not show the user id!
  4. because we are checking if the file exists because at the moment it seems to not be there! If you can display the image just stand alone then we know its there and working!
  5. Ok now try setting your default picture as members/$id/image01.jpg to see if this pics up the image...
  6. First of all i would check that it is getting the row ID. $id = $row["id"]; echo $id;
  7. Hello, Lokking at your code i can see ur path is incorrect $check_pic = "..//members/$id/image01.jpg"; $default_pic = "..//members/0/image01.jpg"; It should be $check_pic = "../members/$id/image01.jpg"; $default_pic = "../members/0/image01.jpg";
  8. humm if there away with php to just add border to the image and curve them corners ? that way sounds alittle complex and bulky lol
  9. so you mean have a black box and set it to 51px and have the images at 50px add the images over each other.... how could i add an image ontop of an image :S <img src='roundedCorners.php?src=http://www.runningprofiles.com/members/imageupload/test/<?php echo $username1;?>50.jpg&radius=05&imagetype=jpeg&backcolor=ffffff' alt = "thumb_img" border="0" align="middle" /> Thats how the rounded corner is produces
  10. Hey guys, I use the code below to add a corners to an image and it works great but when i add a border to the image it add a square.... any ideas how i can add a border to the rounded image? <?php $image_file = $_GET['src']; $corner_radius = isset($_GET['radius']) ? $_GET['radius'] : 20; // The default corner radius is set to 20px $topleft = (isset($_GET['topleft']) and $_GET['topleft'] == "no") ? false : true; // Top-left rounded corner is shown by default $bottomleft = (isset($_GET['bottomleft']) and $_GET['bottomleft'] == "no") ? false : true; // Bottom-left rounded corner is shown by default $bottomright = (isset($_GET['bottomright']) and $_GET['bottomright'] == "no") ? false : true; // Bottom-right rounded corner is shown by default $topright = (isset($_GET['topright']) and $_GET['topright'] == "no") ? false : true; // Top-right rounded corner is shown by default $imagetype=strtolower($_GET['imagetype']); $backcolor=$_GET['backcolor']; $endsize=$corner_radius; $startsize=$endsize*3-1; $arcsize=$startsize*2+1; if (($imagetype=='jpeg') or ($imagetype=='jpg')) { $image = imagecreatefromjpeg($image_file); } else { if (($imagetype=='GIF') or ($imagetype=='gif')) { $image = imagecreatefromgif($image_file); } else { $image = imagecreatefrompng($image_file); } } $size = getimagesize($image_file); // Top-left corner $background = imagecreatetruecolor($size[0],$size[1]); imagecopymerge($background, $image, 0, 0, 0, 0, $size[0], $size[1], 100); $startx=$size[0]*2-1; $starty=$size[1]*2-1; $im_temp = imagecreatetruecolor($startx,$starty); imagecopyresampled($im_temp, $background, 0, 0, 0, 0, $startx, $starty, $size[0], $size[1]); $bg = imagecolorallocate($im_temp, hexdec(substr($backcolor,0,2)),hexdec(substr($backcolor,2,2)),hexdec(substr($backcolor,4,2))); $fg = imagecolorallocate($im_temp, hexdec(substr($forecolor,0,2)),hexdec(substr($forecolor,2,2)),hexdec(substr($forecolor,4,2))); if ($topleft == true) { imagearc($im_temp, $startsize, $startsize, $arcsize, $arcsize, 180,270,$bg); imagefilltoborder($im_temp,0,0,$bg,$bg); } // Bottom-left corner if ($bottomleft == true) { imagearc($im_temp, $startsize, $starty-$startsize,$arcsize, $arcsize, 90,180,$bg); imagefilltoborder($im_temp,0,$starty,$bg,$bg); } // Bottom-right corner if ($bottomright == true) { imagearc($im_temp, $startx-$startsize, $starty-$startsize,$arcsize, $arcsize, 0,90,$bg); imagefilltoborder($im_temp,$startx,$starty,$bg,$bg); } // Top-right corner if ($topright == true) { imagearc($im_temp, $startx-$startsize, $startsize,$arcsize, $arcsize, 270,360,$bg); imagefilltoborder($im_temp,$startx,0,$bg,$bg); } $newimage = imagecreatetruecolor($size[0],$size[1]); imagecopyresampled($image, $im_temp, 0, 0, 0, 0, $size[0],$size[1],$startx, $starty); // Output final image header("Content-type: image/png"); imagepng($image); imagedestroy($image); imagedestroy($background); imagedestroy($im_temp); ?>
  11. The image logged-in.png should be .gif to show transparent background
  12. Hey, Im not to sure about the bottom bars with info on users.. it kinda take ur focus of the main page. Also setting the page to span to 960px and centering it would be an idea as this is the most used practice. also the link buttons at the top could do with working on. The script itself is good tho . Only my opinion tho
  13. http://www.zend.com//code/codex.php?ozid=977&single=1 Creat the page to be print friendly then try
  14. Hey! You need to use strlen(); to change length preg_replace() will remove the fulltop
  15. Hye... you need to be using mysql_escape_string() on ALL data going into and out the DB. This will help prevent your sql db becoming hacked and will also allow you to add ' & " into the form
  16. Hey, Are there any online courses i could do, to get a qualification in php that employes would recognise?
  17. PFMaBiSmAd : This is perfect... i can use this and tinker it now... thanks loads guys for the help.
  18. hey guys, Ok so i have this in my database: id user event date time created 7 Admin 2010-06-14 1282745334 8 Admin 2010-07-14 1282745334 9 Admin 2010-07-24 1282745334 Now what i want to do is with this out put just show JUNE JULY in an output, so i could show it on my website only if there is an event posted with that month View all the events in June .... how could i do that?
  19. How can i get the forum and postid from the above query as it wont let me due to it being distinct but i need it to be distinct so i dont pick up replys. $sql = "Select DISTINCT title FROM forumtutorial_posts where author = '$profilename' ORDER BY `showtime` DESC LIMIT 0, 5"; $postsresult = mysql_query($sql) or die("Could not get threads"); $num = mysql_num_rows($postsresult);
  20. Hey guys, When my users are on the profile page i want to be able to record the users profile name they are on. Now i can do this via the get method. but the issue is that i have included the commetn script so when i use $url = "http://".$_SERVER['HTTP_HOST'].$_SERVER['SCRIPT_NAME']; to get the url its showin it as the included one...so where it should be members/profilename $url = "http://".$_SERVER['HTTP_HOST'].$_SERVER['SCRIPT_NAME'];echo $url; shows it as http://www.runningprofiles.com/members/update_ajax.php! This means im unable to grab the users.. how can i get around this?
  21. @Ken2k7 - this will then display 5 4 but i want it to be 4 5
  22. Hey Guys, I want to get the last two posts in my db... so if my db looks like this 1 2 3 4 5 i want it to show 4 5 how can i do this??
  23. If i use a query to limit results to 2 $small=mysql_query("select * from {$prefix}comments where msg_id_fk='130' order by com_id limit $second_count,2 "); while($rowsmall=mysql_fetch_array($small)) { how could i find the com_id number of the lastone so if i run a query again i can carryon from that number so something like $com=mysql_query("select * from comments where msg_id_fk='130' and com_id > '$thenumber' order by com_id");?> E.G - limit two would be 3 4 then if i ran $com=mysql_query("select * from comments where msg_id_fk='130' and com_id > '4' order by com_id");?> i would get the remainder 5 6 7 8 9
  24. code update <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <title>9lessons Applicatio Demo</title> <link href="frame.css" rel="stylesheet" type="text/css"><script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.0/jquery.min.js"></script> <script type="text/javascript" src="jquery.oembed.js"></script> <script type="text/javascript"> $(function() { $(".comment_button").click(function() { var element = $(this); var boxval = $("#content").val(); var dataString = 'content='+ boxval; if(boxval=='') { alert("Please Enter Some Text"); } else { $("#flash").show(); $("#flash").fadeIn(400).html('<img src="ajax.gif" align="absmiddle"> <span class="loading">Loading Update...</span>'); $.ajax({ type: "POST", url: "update_ajax.php", data: dataString, cache: false, success: function(html){ $("ol#update").prepend(html); $("ol#update li:first").slideDown("slow"); document.getElementById('content').value=''; $('#content').value=''; $('#content').focus(); $("#flash").hide(); $("#expand_url").oembed(boxval); } }); } return false; }); // delete undate $('.delete_update').live("click",function() { var ID = $(this).attr("id"); var dataString = 'msg_id='+ ID; if(confirm("Sure you want to delete this update? There is NO undo!")) { $.ajax({ type: "POST", url: "delete_update.php", data: dataString, cache: false, success: function(html){ $(".bar"+ID).slideUp(); } }); } return false; }); //comment slide $('.comment').live("click",function() { var ID = $(this).attr("id"); $(".fullbox"+ID).show(); $("#c"+ID).slideToggle(300); return false; }); //commment Submint $('.comment_submit').live("click",function() { var ID = $(this).attr("id"); var comment_content = $("#textarea"+ID).val(); var dataString = 'comment_content='+ comment_content + '&msg_id=' + ID; if(comment_content=='') { alert("Please Enter Comment Text"); } else { $.ajax({ type: "POST", url: "comment_ajax.php", data: dataString, cache: false, success: function(html){ $("#commentload"+ID).append(html); document.getElementById("textarea"+ID).value=''; $("#textarea"+ID).focus(); } }); } return false; }); //comment delete $('.cdelete_update').live("click",function() { var ID = $(this).attr("id"); var dataString = 'com_id='+ ID; if(confirm("Sure you want to delete this update? There is NO undo!")) { $.ajax({ type: "POST", url: "delete_comment.php", data: dataString, cache: false, success: function(html){ $("#comment"+ID).slideUp(); } }); } return false; }); return false; }); </script> <style type="text/css"> body { font-family:Arial, Helvetica, sans-serif; font-size:12px; } .update_box { background-color:#D3E7F5; border-bottom:#ffffff solid 1px; padding-top:3px } a { text-decoration:none; color:#d02b55; } a:hover { text-decoration:underline; color:#d02b55; } *{margin:0;padding:0;} ol.timeline {list-style:none;font-size:1.2em;}ol.timeline li{ display:none;position:relative; }ol.timeline li:first-child{border-top:1px dashed #006699;} .delete_button { float:right; margin-right:10px; width:20px; height:20px } .cdelete_button { float:right; margin-right:10px; width:20px; height:20px } .feed_link { font-style:inherit; font-family:Georgia; font-size:13px;padding:10px; float:left; width:350px } .comment { color:#0000CC; text-decoration:underline } .delete_update { font-weight:bold; } .cdelete_update { font-weight:bold; } .post_box { height:55px;border-bottom:1px dashed #006699;background-color:#F3F3F3; width:499px;padding:.7em 0 .6em 0;line-height:1.1em; } #fullbox { margin-top:6px;margin-bottom:6px; display:none; } .comment_box { display:none;margin-left:90px; padding:10px; background-color:#d3e7f5; width:300px; height:50px; } .comment_load { margin-left:90px; padding:10px; background-color:#d3e7f5; width:300px; height:30px; font-size:12px; border-bottom:solid 1px #FFFFFF; } .text_area { width:290px; font-size:12px; height:30px; } #expand_box { margin-left:90px; margin-top:5px; margin-bottom:5px; } embed { width:200px; height:150px; } </style> </head> <body> <?php include '../../settings.php'; ?> <div align="center"> <table cellpadding="0" cellspacing="0" width="500px"> <tr> <td> <div align="left"> <form method="post" name="form" action=""> <table cellpadding="0" cellspacing="0" width="500px"> <tr><td align="left"><div align="left"> <h3>What are you doing?</h3></div></td></tr> <tr> <td style="padding:4px; padding-left:10px;" class="update_box"> <textarea cols="30" rows="2" style="width:480px;font-size:14px; font-weight:bold" name="content" id="content" maxlength="145" ></textarea><br /> <input type="submit" value="Update" id="v" name="submit" class="comment_button"/> </td> </tr> </table> </form> </div> <div style="height:7px"></div> <div id="flash" align="left" ></div> <?php $query = "SELECT * FROM messages2"; $sqlinbox = mysql_query($query); //Error thingy, ohh no! Dispaly the error and the query so we can diagnose the problem if there is one if(!$sqlinbox) { ?> <p><?php print '$query: '.$query.mysql_error();?></p> <?php } else { echo 'yes it is'; } $sql=mysql_query("SELECT * FROM messages2 LIMIT 9")or die(mysql_error()); while($row=mysql_fetch_array($sql)) { $msg=$row['msg']; $mes_id=$row['mes_id']; $up=$row['up']; $down=$row['down']; ?> <div class='box2' ><?php echo $msg; ?></div> </div> <?php } ?> <ol id="update" class="timeline"></ol> </td> </tr> </table> </div> </body> </html> it echos yes it is but then no results!
  25. here is a link to a working piece of the code http://www.runningprofiles.com/members/shout/Facebook_Wall_Script.php
×
×
  • 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.