
kansasakki
Members-
Posts
27 -
Joined
-
Last visited
Never
Everything posted by kansasakki
-
Thank you QOC, that is what I was thinking and trying to express, but I guess I did not make it clear. I am still having troubles getting my changes to work. kind of a big friggen mess I got into, and now I am looking like a donkey not being able to get this to work. I can make it work locally, but when I move it out to the real website, no dice. I am not sure what to do with it anymore. Jeremy
-
DNS changed according to the owner, waiting for it to resolve to the DNS servers I guess. I will stand down for now. Nelson
-
I need to customize a theme for WordPress a bit. I want to change modify the index.php file and the order one of the sidebars is called. I have searched, tested, and retested the index.php file and have been unable to locate the index.php file that is currently being used. Can some one give me a tip on where the active them index.php file is being called from? I have the theme working mostly correct, but I am unable to even get an HTML comment to show up in the viewed source code. The path I think the index.php file is located at is ../wp-content/themes/WPLocalPro/index.php but changing the comments in this file does not affect the rendered source code. Any help is greatly appreciated. <?php /** * Template Name: Home Page * * A custom page template without sidebar. * * The "Template Name:" bit above allows this to be selectable * from a dropdown menu on the edit page screen. * * @package WordPress * @subpackage Enterprise * @since Enterprise 1.0 */ get_header(); ?> <!--NAVIGATION PANEL END --> <!--BODY PANEL START --><!-- Nelson Test --> <div class="body_panel"> <!--LEFT BODY STARTaaaa --> <?php include (TEMPLATEPATH . '/leftbar.php'); exit('wtf smalls'); ?> <!--LEFT BODY END --> <!--MIDDLE BODY START --> <div class="middle_body"> <?php $upper = get_option('revchurch_upper'); echo stripslashes($upper); ?> <?php $section = get_option('revchurch_post1'); if($section == "") $section = 2; ?> <?php $i=1; query_posts('category_name=&order=desc&showposts='. $section.''); if (have_posts()) : while (have_posts()) : the_post(); ?> <?php $img_url = get_post_meta($post->ID, "Rob Post Image URL", true); ?> <?php $video_code = get_post_meta($post->ID, "Rob Post Video Code", true); ?> <? if($img_url==""){?> <?php $img_url = get_post_meta($post->ID, "img_url", true); ?><? }?> <? if($i==2 ) { echo '<div class="pic_panel pic_panel_right">'; } else { echo '<div class="pic_panel">'; } ?> <?php if($video_code != '') { ?> <div class="video_div"> <?php preg_match_all('!height=["|\'](.*?)["|\']!is', $video_code, $matches); if(isset($matches[0])){ foreach($matches[0] as $key=>$val){ $video_code = str_replace($val, 'height="166"',$video_code); } } $matches = array(); preg_match_all('!width=["|\'](.*?)["|\']!is', $video_code, $matches); if(isset($matches[0])){ foreach($matches[0] as $key=>$val){ $video_code = str_replace($val, 'width="269"',$video_code); } } echo $video_code; ?> </div> <? }else if($img_url != '') { ?> <img src="<?php //echo get_option('home'); ?><?php echo $img_url;?>" width="269" height="166" alt="pic" /> <? } else { ?> <img src="<?php bloginfo('stylesheet_directory'); ?>/images/pic.gif" width="269" height="166" alt="pic" /> <? } ?> <h2> <a href="<?php the_permalink() ?>"><?php the_title(); ?></a></h2> <?php $chn = get_option('revchurch_chn'); ?> <p> <?php the_content_rss('', FALSE, '',$chn,2) ?><a href="<?php the_permalink() ?>"> Read More</a></p> </div> <? $i++; if($i==3) { $i=1; } endwhile; else: endif; //Reset Query wp_reset_query(); ?> <?php $lower = get_option('revchurch_lower'); echo stripslashes($lower); ?> </div> <!--MIDDLE BODY END --> <!--RIGHT BODY START --> <?php include (TEMPLATEPATH . '/rightbar.php'); ?> <!--RIGHT BODY END --> </div> <!--BODY PANEL END --> </div> <!--MAIN CONTANER END --> <!--FOOTER PANEL START --> <?php get_footer(); ?>
-
Hi All, I am a bit new to CSS and am having some troubles positioning the right hand column up higher on the page than what it is now. I would like to move the column up from its current location up about 250px higher. When I try to move this, the graphics become hidden. I essentially want it to float above the menu bar. I am trying to get the entire contact form above the fold on the page. I am new to wordpress and such. I just am not sure how to move it up and get it to display as desired. Any help is greatly appreciated. www.torontomover.org. Thanks CP
-
Does phpFreaks have any sister sites?
kansasakki replied to kansasakki's topic in PHPFreaks.com Website Feedback
CV, you make some really good points. I did not realize that javascript might run different in different browsers, but hey everything else is rendered different in the browsers, whey not js??? just follows the norm. I did find solutions to my questions, and yeah I was in a bit of a panic when I posed them with a deadline looming. I am putting myself between a rock and a hard place right now. Learning html, css, php, mysql, etc.... as I completing projects. I like programming overall, I really like the php and back end stuff more than the web display. This site is a VALUABLE resource to beginning php programmers like myself. CV, Gizmola, Thorpe, and many others are very gracious in offering any advice. I hope I can eventually give back to the community here, what I have gotten. Thanks Kansas -
Multiplayer Bingo or Poker possible with PHP?
kansasakki replied to coder71's topic in PHP Coding Help
never seen that before that is pretty funny. Kansas -
Passing a variable from Javascript to PHP?
kansasakki replied to BellQuestWars's topic in PHP Coding Help
btherl is correct. I had the same issue earlier this week. Took me lots of heartache and suffering because I am a superNoob when it comes to javascript, but here is my question and own answer. http://www.phpfreaks.com/forums/index.php?topic=331490.0 Kansas -
Can you recommend a good place to do PHP exercises?
kansasakki replied to KyZu's topic in Miscellaneous
Hi KyZU, A book I am using is PHP and MySQL for Dynamic Web Sites by Larry Ullman. I started with the php stuff about 2 months ago. I followed tutorials as well, but there it seemed like there was always something lacking. There are some great tutorials out there, but as I read somewhere else in the forum, they can be kind of a gap filler more than educational. With a written book you should be getting a more polished product that can help guide you through some of the instruction. One of my first self made projects was rather simple overall. I just took my hobby of archery and implemented some basic calculations to figure drawlength and minimum arrow weight for a certain poundage of bows. While I knew how to figure this, writing the code to take values from input and then process this was a great learning tool. Besides, what is better than combining to interests for a common theme. Regards, Kansas -
finished code. <html> <head> <script type="text/JavaScript"> function submitform(){ document.forms["updateCheck"].submit() } </script> </head> <body> <form id="updateCheck" method="post" action="check.php" target="newcheck"> Sponsor: <input name="sponsor" onChange="submitform()"><br /> Date: <input name="date" onChange="submitform()"><br /> Payee: <input name="payee" onChange="submitform()"><br /> Amount:<input name="numamount" onChange="submitform()"><br /> Memo:<input name="memo" onChange="submitform()"><br /> Signature:<input name="signature" onChange="submitform()"><br /> </form> <iframe src="check.php"name ="newcheck"id="newcheck" height="460px" width="910" frameborder="0"> <head> <script type="text/JavaScript"> </script> <head> <body> </body> </iframe> </body> </html> check.php <?php require_once ('class.number2word.php'); // array from posted input $newimage = imagecreatefrompng("dream_scenes_check.png"); imagealphablending($newimage, true); // setting alpha blending on imagesavealpha($newimage, true); // save alphablending setting $color = imagecolorallocate($newimage, 0, 0, 0); $font = 'arial.ttf'; $datefontSize = "14"; $payeeFontSize = "18"; $NumamountFontSize = "24"; $sigFontSize = "15"; $fontRotation = "0"; if (isset($_POST['sponsor']) || isset($_POST['date']) || isset($_POST['payee']) || isset($_POST['numamount']) || isset($_POST['memo']) || isset($_POST['signature'])){ /* Check Text To be written */ if ($_POST['sponsor'] > ''){ ImageTTFText($newimage, $payeeFontSize, $fontRotation, 45, 105, $color, $font, $_POST['sponsor']); } if ($_POST['date'] > ''){ ImageTTFText($newimage, $datefontSize, $fontRotation, 625, 105, $color, $font, $_POST['date']); } if ($_POST['payee'] > ''){ ImageTTFText($newimage, $payeeFontSize, $fontRotation, 180, 210, $color, $font, $_POST['payee']); } if ($_POST['numamount'] > ''){ ImageTTFText($newimage, $NumamountFontSize, $fontRotation, 715, 210, $color, $font, $_POST['numamount']); // need to creat class & make the $_POST['textamount'] $instance = new number_word(); $words = $instance->number_word($_POST['numamount'],0,0); //ImageTTFText($newimage, $datefontSize, $fontRotation, 55, 270, $color, $font, $words);//$_POST['textamount']); //ImageTTFText($newimage, $datefontSize, $fontRotation, 55, 270, $color, $font, $_POST['textamount']); } if ($_POST['memo'] > ''){ ImageTTFText($newimage, $datefontSize, $fontRotation, 110, 360, $color, $font, $_POST['memo']); } if ($_POST['signature'] > ''){ ImageTTFText($newimage, $sigFontSize, $fontRotation, 560, 360, $color, $font, $_POST['signature']); } // Output the image to the browser header("Content-Type: image/PNG"); ImagePng ($newimage); imagedestroy($newimage); }else{ // if no $_POST values, write the blank image header("Content-Type: image/PNG"); ImagePng ($newimage); imagedestroy($newimage); } ?> <?php require_once ('class.number2word.php'); // array from posted input $newimage = imagecreatefrompng("dream_scenes_check.png"); imagealphablending($newimage, true); // setting alpha blending on imagesavealpha($newimage, true); // save alphablending setting $color = imagecolorallocate($newimage, 0, 0, 0); $font = 'arial.ttf'; $datefontSize = "14"; $payeeFontSize = "18"; $NumamountFontSize = "24"; $sigFontSize = "15"; $fontRotation = "0"; /* Check Text To be written */ if ($_POST['sponsor'] > ''){ ImageTTFText($newimage, $payeeFontSize, $fontRotation, 75, 105, $color, $font, $_POST['sponsor']); } if ($_POST['date'] > ''){ ImageTTFText($newimage, $datefontSize, $fontRotation, 625, 105, $color, $font, $_POST['date']); } if ($_POST['payee'] > ''){ ImageTTFText($newimage, $payeeFontSize, $fontRotation, 180, 210, $color, $font, $_POST['payee']); } if ($_POST['numamount'] > ''){ ImageTTFText($newimage, $NumamountFontSize, $fontRotation, 715, 210, $color, $font, $_POST['numamount']); // need to creat class & make the $_POST['textamount'] $instance = new number_word(); $words = $instance->number_word($_POST['numamount']); //ImageTTFText($newimage, $datefontSize, $fontRotation, 55, 270, $color, $font, $words);//$_POST['textamount']); //ImageTTFText($newimage, $datefontSize, $fontRotation, 55, 270, $color, $font, $_POST['textamount']); } if ($_POST['memo'] > ''){ ImageTTFText($newimage, $datefontSize, $fontRotation, 110, 360, $color, $font, $_POST['memo']); } if ($_POST['signature'] > ''){ ImageTTFText($newimage, $sigFontSize, $fontRotation, 560, 360, $color, $font, $_POST['signature']); } // Output the image to the browser header("Content-Type: image/PNG"); ImagePng ($newimage); imagedestroy($newimage); ?> Big thanks to Crayon Violet for his image tutorial on this site. Kansas
-
yes, but I needed each element to update dynamically if you will. I have gotten this to work finally. here is the code in action I am working on implementing a php class to write out the numbered amount for the text amounts on the image. http://www.novacontech.com/~jeremy//check/check.html Thanks Kansas
-
Does phpFreaks have any sister sites?
kansasakki replied to kansasakki's topic in PHPFreaks.com Website Feedback
I have tried posting a couple different questions in the javascript forum. but no luck with any answers yet. No biggie. The PHP coding help forum just seems to get quite a few more responses, which makes sense. The community here really seems to be a great group. I have been helped more times by this forum than I can count just by reading other topics. Some of it is over my head, some I get quite readily. Great site. Thanks Kansas -
well I figured it out a bit finally. <html> <head> <script type="text/JavaScript"> function submitform() { document.forms["updateCheck"].submit() } </script> </head> <body> <form id="updateCheck" method="post" action="check.php"> Sponsor: <input name="sponsor" onChange="submitform()"><br /> Date: <input name="date" onChange="submitform()"><br /> Payee: <input name="payee" onChange="submitform()"><br /> Amount:<input name="numamount" onChange="submitform()"><br /> Memo:<input name="memo" onChange="submitform()"><br /> Signature:<input name="signature" onChange="submitform()"><br /> </form> <iframe src="check.php" id="newcheck" height="460px" width="910" frameborder="1"> <body> </body> </iframe> <body> </html> I can see the post array now holding the values that have been submitted. Any thoughts on getting the values to now be placed in the iframe element ? Thanks Kansas
-
such as javascriptfreaks or ajax freaks. This is a great site with gigs of information and great community help. I guess I am hoping to find a bit of help with the javascripting side as well. Thanks! Kansas
-
Hello, I am wanting to send a field that has been updated to a check.php. check.php should then generate an updated image of a check. I would like the image when it is updated to be in an iframe on the same page. My thoughts are to pass this to the via the $_POST array. Can this be done without ajax? I have looked for a couple hours trying to find a possible solution, but none seem to fit the bill. Any help is greatly appreciated. <html> <head> <script src='myjs.js' type="text/JavaScript"> </script> </head> <body> <form id="updateCheck" method="post" action="check.php"> Sponsor: <input name="sponsor" onChange="updateSponsor(this.value)"><br /> Date: <input name="date" onChange="updateDate(this.value)"><br /> Payee: <input name="payee" onChange="updatePayee(this.value)"><br /> </form> <iframe src="check.php" id="newcheck" height="460px" width="910" frameborder="1"> <body> </body> </iframe> </body> </html> Thanks, Kansas
-
<?php function money($amount,$separator=true,$simple=false){ return (true===$separator? (false===$simple? number_format($amount,2,'.',','): str_replace('.00','',money($amount)) ): (false===$simple? number_format($amount,2,'.',''): str_replace('.00','',money($amount,false)) ) ); } $income = 5000000000; $daily = money($income*24,true,true); $weekly = money(($income*24)*7,true,true); $monthly = money((($income*24)*7)*30,true,true); ?> <html> <center> <table border="1"> <tr> <td>Daily</td> <td><?php echo $daily; ?></td> </tr> <tr> <td>Weekly</td> <td><?php echo $weekly; ?></td> </tr> <tr> <td>Monthly</td> <td><?php echo $monthly; ?></td> </tr> </table> </form> </center> </html> The top php section did not end with ?> I also added the semicolons to the end of the variables in the php. I also added an <html> and </html> but no body or header tags. Kansas
-
My son was asking what an array was. (He is 12 with a good 12 year old algebra base). An array is variable with pockets, you just have to know which pocket the data is stored in, was kind of the way I broke it down for him. I agree with analog, should be no problem. Kansas
-
In the code I posted, I left out the semi colon in the code have you tried it adding a semi colon to terminate the line as you have posted it ? ?? That syntax error could cause a blank screen. Another step in the debugging process I would take would be to do an $sql = "SELECT * FROM member_profile SET newfield = '1' WHERE userid = $user_id"; $qry = mysql_query($sql); $res = mysql_assoc($qry); echo '<pre>'; print_r ($res); echo '</pre>'; if($res['newfield'] == 1){ $sql = "UPDATE member_profile SET newfield = '0' WHERE user_id = $user_id"; $upresult = mysql_query($sql); if(mysql_affected_rows()== 1){ //update successfull }else{ //update failed } } the print_r will allow you to see the array values in $res. Kansas
-
I used this tutorial to get an example of how to do something very similar to what you are asking. http://www.phpfreaks.com/tutorial/php-add-text-to-image This allowed me some basics I needed and i ran with it from there. Kansas
-
I am having trouble getting the line <a href="javascript:void(0)" onClick="getPosition(1)">First</a> to work correctly and pull the first 50. I think I have everything else working. work in process can be seen at http://www.1dayreturn.com/activity.php I have been spinning my wheels for about 5 hours. The get Get Older Positions: value is set to show which else statement is currently being view. Any help would be greatly appreciated. function getPosition(pageNumber){ document.getElementById('lastfifty').innerHTML = '<div style="text-align:center;"><img src="loadingbg.gif" /></div>'; $.ajax({ type: "POST", url: 'getpositions.php', data: "filter1="+pageNumber+"&filter2=<?php $pcount = $previouspositions['pcount']; echo $pcount;?>", complete: function(data){ //print results as appended //targetDiv.append(data.responseText); //print result in targetDiv document.getElementById('lastfifty').innerHTML = (data.responseText); var last = <?php $pcountholder = number_format($pcount/50,0);echo $pcountholder;?>; var first = last - (last -1); if(pageNumber != 'last'){ var last= <?php $pcountholder = number_format($pcount/50,0);echo $pcountholder;?>; var next= pageNumber+1; var prev= pageNumber-1; if(pageNumber >= last){ pageNumber = <?php $pcountholder = number_format($pcount/50,0);echo $pcountholder;?>; prev = pageNumber-1; next = pageNumber +1; } if(prev < 0){prev = 0;pageNumber = 1;next = 2;} if (pageNumber != 1){ if(pageNumber == last){ last == <?php $pcountholder = number_format($pcount/50,0);echo $pcountholder;?>; pageNumber == last; next = pageNumber +1; prev = pageNumber -1; document.getElementById('prevnav').innerHTML = '<h2>Last 502 Positions</h2> <div style="float:right">Get Older Positions: Positions: <a href="javascript:void(0)" onClick="getPosition(1)">First</a> | Prev | '+pageNumber+' | <a href="javascript:void(0)" onClick="getPosition('+next+')">Next</a> | <a href="javascript:void(0)" onClick="getPosition(\'last\')">Last</a></div>'; } else{ if(next == last){ next = "\'last\'"; } document.getElementById('prevnav').innerHTML = '<h2>Last 503 Positions</h2> <div style="float:right">Get Older Positions: <a href="javascript:void(0)" onClick="getPosition(1)">First</a> | <a href="javascript:void(0)" onClick="getPosition('+prev+')">Prev</a> | '+pageNumber+' | <a href="javascript:void(0)" onClick="getPosition('+next+')">Next</a> | <a href="javascript:void(0)" onClick="getPosition(\'last\')">Last</a></div>'; } }else{ pageNumber = 1; next = pageNumber +1; document.getElementById('prevnav').innerHTML = '<h2>Last 504 Positions</h2> <div style="float:right">Get Older Positions: First | Prev | '+pageNumber+' | <a href="javascript:void(0)" onClick="getPosition('+next+')">Next</a> | <a href="javascript:void(0)" onClick="getPosition(\'last\')">Last</a></div>'; } }else{ var last= <?php $pcountholder = number_format($pcount/50,0);echo $pcountholder;?>; pageNumber = last; var prev = last-1; document.getElementById('prevnav').innerHTML = '<h2>Last 505 Positions</h2> <div style="float:right">Get Older Positions: <a href="javascript:void(0)" onClick="getPosition('+first+')">First</a> | <a href="javascript:void(0)" onClick="getPosition('+prev+')">Prev</a> | '+pageNumber+' | Next | Last</div>'; } } }); } Thanks Kansas
-
$a != $b Not equal TRUE if $a is not equal to $b after type juggling. <?php if (($news['accounttyperaw'] !== 0) || ($news['accounttyperaw'] !== 1)) // Can be: if ($news['accounttyperaw'] !== 0 || $news['accounttyperaw'] !== 1) ] should be != with one 'equal' sign i think <?php if (($news['accounttyperaw'] != 0) || ($news['accounttyperaw'] !== 1)) // Can be: if ($news['accounttyperaw'] != 0 || $news['accounttyperaw'] !== 1) ]
-
I think the steps are just about there. Me being new as well, I still get lost in what I want to do and what I am telling the code to do. $sql = "SELECT * FROM member_profile SET newfield = '1' WHERE userid = $user_id"; $qry = mysql_query($sql); $res = mysql_assoc($qry) if($res['newfield'] == 1){ $sql = "UPDATE member_profile SET newfield = '0' WHERE user_id = $user_id"; $upresult = mysql_query($sql); if(mysql_affected_rows()== 1){ //update successfull }else{ //update failed } } I think this will get you closer, I did not test it but I tried to make sure the syntax was correct. I still make a lot of errors when writing code blocks and debug them constantly Kansas
-
I am no pro at all but I see a SELECT statement instead of an UPDATE ? I am brand new so this might be way off as well. Kansas
-
Thanks Net, I am enjoying it overall, but there are times when the frustration kicks me hard. I get up go grab an adult beverage and end up coming back for more punishment. Thanks for the encouragement. Kansas
-
The hard way is I am not very experienced with any of these. I have read/keyed tutorials and still feel like I am a fish out of water. I actually enjoy the challenge. I guess the hard way is trying to learn HTML, CSS, PHP, and MYSQL all at the same time. Kansas