Jump to content

Jim R

Members
  • Posts

    988
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by Jim R

  1. Cancel the request. While I'm still not sure why it is like that or where to find it, I did add to the styles I could locate, and they override the mystery styles.
  2. My site: http://hoosierhoopsreport.com. The second row of navigation. It's the Custom Menu option that is relatively new in WordPress. The sub-menu items have gaps in between them, and the Recruiting 101 spacing is bad, forcing it to a second line. Using Firebug, it says the style can be found at http://hoosierhoopsreport.com#15 line 1696. As far as I can tell there is nothing that matches in any of my files. Any thoughts?
  3. Not sure if I posted this in the right board: As I'm setting up a plugin to parse Google Calendar events, when they are set as All Day events, they "end" at midnight, which pushes them into the next day. So if an event is to run All Day Friday, Saturday, and Sunday, it actually shows the end date as Monday, since it's midnight. Any thoughts?
  4. It's kind of like something I have. If they are fixed width and height, make sure the container DIV can fit two columns and make them all Float Left.
  5. Here is the site: http://hoosierhoopsreport.com If you scroll down, just above the footer on the right hand side are my image galleries. There is a gap, due to one of the titles being three lines instead of two. It only affects the left column. The DIVs are set to float left, and I want to get rid of that gap without changing the width or font size. I've tried bigger margins, as well as padding. Here is the CSS and code: <style type="text/css"> .menu-item { float: left; position: relative; width: 100px; font-weight: bold; line-height: 15px; font-size: 10px; padding: 5px; display: inline-block; } .menu-item a { font-weight: bold; color: #000; text-decoration: none; } .menu-item a:hover { text-decoration: underline; } </style> <div class="menu-item"> <a href="{=gallery.link}" title="{=gallery.title}"><img src="{=image.url}"{=image.output_width_tag}{=image.output_height_tag} alt="{=gallery.title}" />{=gallery.title}</a> </div>
  6. I'm not getting any error messages on the screen. It's not inserting to the database, so that much I know. I have zero experience with jQuery beyond setting up their tab GUI. Here is the site I took the sample from: http://webcache.googleusercontent.com/search?q=cache:WJ0Gt6UUqZUJ:www.9lessons.info/2009/11/insert-delete-with-jquery-and-ajax.html+jquery,+live,+insert+database&cd=7&hl=en&ct=clnk&gl=us&client=firefox-a Their demo works pretty well, which is linked on that page. Here is my test page. http://hoosierhoopsreport.com/live/
  7. Here is update_data.php if(isSet($_POST['content'])) { $content=$_POST['content']; mysql_query("insert into messages(msg) values ('$content')"); $sql_in= mysql_query("SELECT msg,msg_id FROM messages order by msg_id desc"); $r=mysql_fetch_array($sql_in); $msg=$r['msg']; $msg_id=$r['msg_id']; } ?> <li class="bar<?php echo $msg_id; ?<"> <div align="left"> <span ><?php echo $msg; ?> </span> <span class="delete_button"><a href="#" id="<?php echo $msg_id; ?>" class="delete_update">X</a></span> </div> </li> Here is delete_data.php if($_POST['msg_id']) { $id=$_POST['msg_id']; $id = mysql_escape_String($id); $sql = "delete from messages where msg_id='$id'"; mysql_query( $sql); }
  8. Not really any code of my own. I found an example online, copied it, made the changes to match my database, and it doesn't work. It uses jQuery too. Here is just the code on the page using the jQuery and the form: <link href="/resources/live_test/live_entry.css" rel="stylesheet" type="text/css"> <?php if(!$con = mysql_connect("localhost","######","######")) { die("Could not connect to database: ".mysql_error()); } mysql_select_db("jwrbloom_wpHHR", $con); ?> <script type="text/javascript" > $(function() { //Update Message... $(".update_button").click(function() { 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-loader.gif" align="absmiddle"> <span class="loading">Loading Comment...</span>'); $.ajax({ type: "POST", url: "update_data.php", data: dataString, cache: false, success: function(html){ $("ol#update").prepend(html); $("ol#update li:first").slideDown("slow"); document.getElementById('content').value=''; document.getElementById('content').focus(); $("#flash").hide(); } }); } return false; }); //Delete Message.. $('.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_data.php", data: dataString, cache: false, success: function(html){ $(".bar"+ID).slideUp('slow', function() {$(this).remove();}); } }); } return false; }); }); </script> <div> <form method="post" name="form" action=""> <h3>What are you doing?</h3> <textarea name="content" id="content" maxlength="145" > </textarea> <input type="submit" value="Update" name="submit" class="update_button"/> </form> <div id="flash"></div> <ol id="update" class="timeline"> </ol> <div id='old_updates'> // Display old updates form messages table. </div>
  9. A basketball coach choose his School from a drop down list, which needs to be a constant throughout the rest of the data input on this page. Beneath that are Text Fields requesting a Player's name, class, height, and stats. Just one set of fields. Here is what I want. I want the coach, when he is done inputting the player's information, to hit ADD PLAYER button and have a blank set of Text Fields appear on the page without having left the page. It can show up just beneath it or in place of the old Text Fields. When he is done entering all the players, he hits the FINISHED button. I'm assuming the ADD PLAYER button is the one submitting the information to the database, and the FINISHED button just moves the coach beyond that screen or maybe submits the final player's information. I'm also assuming, as referred to above, the School selection stays constant throughout the whole process. 406 schools in a pre-populated drop down menu is not fun the scroll through 8-12 times. Easy enough, right? Riiiiiiiiiiiiiiiiight. : ) Can anyone help me with this or throw me in a great direction for help?
  10. Thanks. That did the trick. Clearly I haven't had much experience with arrays either.
  11. I have a column in my MySQL database "paid". I have values of p for PayPal, c for check, and f for free. Those who haven't paid the record is marked (NULL). Right now my code is: if ($line['paid'] == 'y') { echo '.</center></td>';} else { echo '</center></td>';} That works pretty well for when I was just using those who paid vs. those who didn't. However, I'm wanting my site to show who has paid vs. those who haven't, while my data table will easily show how they paid. I either need an array or I need to reverse the IF...ELSE to say IF it's NULL do nothing, ELSE mark paid.
  12. I'm just not familiar at all at how triggers work.
  13. It's ultimately what WordPress uses to create their permalinks.
  14. Not sure what you mean by that. I just need to have that slug value so WP can match it.
  15. YES...that's where I was going with my request. I'm just up with all (or much) terminology. If it was a spread sheet, I'd have =[column A]-[column B] (I need the hash in between) Is it simple like that, or should I just start digging around?
  16. It should be. Such a simple spreadsheet function, it would be nice to apply that type of setting.
  17. Additionally, I'm not inserting. I'm typing directly into my database, via SQLyog--a great tool. I was hoping I could set a default value for a column based on the variable output of two other columns. You're saying that is not the case?
  18. I figured that would be one of the responses. What I'm trying to do is create within my database a value to match WordPress slugs in a separate data table I use for personal information for basketball players. It works very well. Just that each year, I enter about 150 names at one setting, and it would be nice to have some of it auto-populate. I put their personal information on their Tag Archive page, so as you click on their tag to see everything they're tagged in, you see their height, school, position, school coach's name, and anything else I choose to put in there.
  19. Ok. Well, the error tells you where it happens, not necessarily what causes it to happen. I think the point is, if I knew what the issue was, I wouldn't have needed the help or would have been more accurate in my description.
  20. Is it possible to set a default value for a column based on what is entered in other columns? Example: Column A: nameFirst Column B: nameLast Column C: 'nameFirst'-'nameLast' So as I type in the A and B, C self populates. I see in my column properties, there is a Default option, but I'm not sure I can put variables in there from other columns.
  21. I didn't know that it mattered. I removed them, and it worked. Thanks.
  22. I've tried two separate captcha options, Securimage and reCaptcha, which is the one I currently have on my page. I got the same error with each code: It's a conflict with the code that moves my User to the 'next step'. Here is the code: (scroll down toward the bottom, just before the email fields) <?php require_once('/home/jwrbloom/public_html/metroindybasketball.com/recaptcha/recaptchalib.php'); $privatekey = "6LetxbwSAAAAAMP2q1q5F5S_tiEcu1sH1_dM3DTl "; $resp = recaptcha_check_answer ($privatekey, $_SERVER["REMOTE_ADDR"], $_POST["recaptcha_challenge_field"], $_POST["recaptcha_response_field"]); if (!$resp->is_valid) { // What happens when the CAPTCHA was entered incorrectly die ("The reCAPTCHA wasn't entered correctly. Go back and try it again." . "(reCAPTCHA said: " . $resp->error . ")"); } else { // Your code here to handle a successful verification } ?> <?php /* connect to database */ if(!$con = mysql_connect("localhost","######","######")) { die("Could not connect to database: ".mysql_error()); } mysql_select_db("######_wpMIB", $con); $nameFirst = $_POST['nameFirst']; $nameLast = $_POST['nameLast']; $email = $_POST['email']; $addressHome = $_POST['addressHome']; $cityHome = $_POST['cityHome']; $stateHome = $_POST['stateHome']; $zipHome = $_POST['zipHome']; $phoneHome = $_POST['phoneHome']; $phoneMobile = $_POST['phoneMobile']; $school = $_POST['school']; $grade = $_POST['grade']; $coachSchool = $_POST['coachSchool']; $feet = $_POST['feet']; $inches = $_POST['inches']; /* search for existing row */ $sql = "SELECT id FROM fallLeague10 WHERE nameFirst='".mysql_real_escape_string($nameFirst)."' AND nameLast='".mysql_real_escape_string($nameLast)."' AND school='".mysql_real_escape_string($school)."'"; if(!$result = mysql_query($sql)) { die(mysql_error()."<br />Query: ".$sql); } if(mysql_num_rows($result)) { $row = mysql_fetch_assoc($result); /* update existing row */ $sql = "UPDATE fallLeague10 SET confirm='y', email='".mysql_real_escape_string($email)."', addressHome='".mysql_real_escape_string($addressHome)."', cityHome='".mysql_real_escape_string($cityHome)."', stateHome='".mysql_real_escape_string($stateHome)."', zipHome='".mysql_real_escape_string($zipHome)."', phoneHome='".mysql_real_escape_string($phoneHome)."', phoneMobile='".mysql_real_escape_string($phoneMobile)."', coachSchool='".mysql_real_escape_string($coachSchool)."', feet='".mysql_real_escape_string($feet)."', inches='".mysql_real_escape_string($inches)."' WHERE id='".$row['id']."'"; if(!$result = mysql_query($sql)) { die(mysql_error()."<br />Query: ".$sql); } } else { /* insert new row */ $sql = "INSERT INTO fallLeague10 SET confirm='y', nameFirst='".mysql_real_escape_string($nameFirst)."', nameLast='".mysql_real_escape_string($nameLast)."', email='".mysql_real_escape_string($email)."', addressHome='".mysql_real_escape_string($addressHome)."', cityHome='".mysql_real_escape_string($cityHome)."', stateHome='".mysql_real_escape_string($stateHome)."', zipHome='".mysql_real_escape_string($zipHome)."', phoneHome='".mysql_real_escape_string($phoneHome)."', phoneMobile='".mysql_real_escape_string($phoneMobile)."', school='".mysql_real_escape_string($school)."', grade='".mysql_real_escape_string($grade)."', coachSchool='".mysql_real_escape_string($coachSchool)."', feet='".mysql_real_escape_string($feet)."', inches='".mysql_real_escape_string($inches)."'"; if(!$result = mysql_query($sql)) { die(mysql_error()."<br />Query: ".$sql); } } /* redirect user HERE IS WHERE I AM HAVING MY ERROR */ header("Location:/fall-league/payment"); //exit(); ?> <?php // The message $message = $_POST['nameFirst'] . " " . $_POST['nameLast'] ." has entered the fall league.\n"; $message .= $_POST['feet'] . "'" . $_POST['inches'] ."\", " . $_POST['grade'] . "; " . $_POST['school'] ."\n"; $message .= $_POST['email']; // In case any of our lines are larger than 70 characters, we should use wordwrap() $message = wordwrap($message, 70); $headers = 'From: ' . $_POST['nameFirst'] . " " . $_POST['nameLast'] . " " . $_POST['email']; // Send mail('basketball@metroindybasketball.com', '2010 Fall League Registration', $message, $headers); ?>
  23. Very cool! Thanks it worked. You guys are making me look pretty smart over here. : )
  24. Actually, I have two tables: hhr_schools (my main table) hhr_email_coaches (has email addresses I want to move into the other table) So I'm trying to merge. Through some searching, I think I need to use UPDATE, which makes sense. I don't seem to be getting the syntax right. Here is what I'm using: UPDATE 'hhr_schools', 'hhr_email_coaches' SET 'hhr_schools'.'email'='hhr_email_coaches'.'email' WHERE 'hhr_schools'.'school'='hhr_email_coaches'.'school';
  25. You're a good man. That pretty much worked: $nFirst = $line['nameFirst']; $nLast = $line['nameLast']; $nameFull = "{$nLast}{$nFirst}"; echo '<div><img src="/wp-content/gallery/head_shots/' . strtolower($nameFull) . '.jpg"></div>';
×
×
  • 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.