Jump to content

ldb358

Members
  • Posts

    199
  • Joined

  • Last visited

    Never

Everything posted by ldb358

  1. lol i thought of this one more: http://xkcd.com/932/
  2. minecraft is fun because its a easy to play but creative game especially when you start getting in to redstone wiring. offline you almost need an inventory editor for it to be fun. or like said before playing online on a server is also fun.
  3. For me I commit every time i finish a feature, it passes all the tests and is stable or before i start working on a new feature (these two are usually the same but not always). Also you can revert file to the state that it was in at a commit. another useful thing about git(or any source code control) is that you can use sites like github to make team coding easier.
  4. never used it but heard cloud9 ide is pretty good. http://cloud9ide.com/
  5. Sure, it might not be harder to make... but are you using the right tool for the job? I might be able to hit a nail in with a screwdriver, but was it really the best way to do it? Wait, if its not any harder and it's easier to manage why wouldn't it be the best tool for the job.
  6. this thread makes me shiver like really bad. <ul>'s and css are a good way to go and creating a table layout with div's isn't any harder than with a table tag and is easier to manage.
  7. okay the reason that it is saving the data and dropping down when you start typing the command is because this is a feature of your browser and because you are literally submitting the form. the best way to handle this would be with AJAX and with a framework like Jquery would be really easy to make as opposed to an iframe. if you really want to use your current solution add the autocomplete="off" attribute to your form tag. Edit: also remember to clear your form data
  8. try: $matchlink = "onclick=\"location.href='".$match_link."'\"";
  9. Yeah thats not secure its easy to spoof http headers, you would be better off setting a session on the first page and checking that it is set on the second page.
  10. Here is the deafult wordpress index.php: <?php /** * @package WordPress * @subpackage Default_Theme */ get_header(); ?> <div id="content" class="narrowcolumn" role="main"> <?php if (have_posts()) : ?> <?php while (have_posts()) : the_post(); ?> <div <?php post_class() ?> id="post-<?php the_ID(); ?>"> <h2><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>"><?php the_title(); ?></a></h2> <small><?php the_time('F jS, Y') ?> <!-- by <?php the_author() ?> --></small> <div class="entry"> <?php the_content('Read the rest of this entry »'); ?> </div> <p class="postmetadata"><?php the_tags('Tags: ', ', ', '<br />'); ?> Posted in <?php the_category(', ') ?> | <?php edit_post_link('Edit', '', ' | '); ?> <?php comments_popup_link('No Comments &#187;', '1 Comment &#187;', '% Comments &#187;'); ?></p> </div> <?php endwhile; ?> <div class="navigation"> <div class="alignleft"><?php next_posts_link('« Older Entries') ?></div> <div class="alignright"><?php previous_posts_link('Newer Entries »') ?></div> </div> <?php else : ?> <h2 class="center">Not Found</h2> <p class="center">Sorry, but you are looking for something that isn't here.</p> <?php get_search_form(); ?> <?php endif; ?> </div> <?php get_sidebar(); ?> <?php get_footer(); ?> what do you mean edit the index.php like the theme file or through view source?
  11. First off the wordpress codex is really good after you get more familiar with wordpress. As for the problem you described there, you need to get used to wordpress naming conventions. any function that is "get_the_*" returns the value where as "the_*" echos the value out. also i good way to see what a function does is to just type it into the search bar on the codex.
  12. this should work function trimdash($string){ if($string{strlen($string)-1} == '-'){ $string = substr($string,0,-1); } return $string; }
  13. that's not actually how it works, often with in your theme there is a header.php file that is included, it is normally not done by replacing html
  14. <?php wp_reset_query(); ?> <div id="archive"> <?php if (is_category()) { ?> <div class="title breadcrumbs"> <?php $cat_ID = get_query_var('cat'); ?> <a href="<?php echo get_category_feed_link($cat_ID, '' ); ?>"><img src="<?php bloginfo('template_directory'); ?>/images/icon_rss.png" alt="" /></a> <?php echo '<h3>'; wpzoom_breadcrumbs(); echo'</h3>'; ?> </div><!-- end .title --> <?php } elseif (!is_category() && !is_home()) { ?> <div class="title breadcrumbs"> <?php echo '<h3>'; wpzoom_breadcrumbs(); echo'</h3>'; ?> </div><!-- end .title --> <?php } else { ?> <div class="title"> <h3><?php _e('Recent Posts', 'wpzoom');?></h3> </div><!-- end .title --> <?php } ?> <div class="box"> <?php if (have_posts()) : ?> <ul class="posts"> <?php $i = 0; while (have_posts()) : the_post(); $i++; ?> <li> <?php unset($img); if ( current_theme_supports( 'post-thumbnails' ) && has_post_thumbnail() ) { $thumbURL = wp_get_attachment_image_src( get_post_thumbnail_id($post->ID), '' ); $img = $thumbURL[0]; } else { unset($img); if ($wpzoom_cf_use == 'Yes') { $img = get_post_meta($post->ID, $wpzoom_cf_photo, true); } else { if (!$img) { $img = catch_that_image($post->ID); } } } if ($img){ $img = wpzoom_wpmu($img); ?> <div class="cover"><a href="<?php the_permalink(); ?>" rel="bookmark" title="<?php the_title(); ?>"><img src="<?php bloginfo('template_directory'); ?>/scripts/timthumb.php?src=<?php echo $img ?>&h=120&w=160&zc=1" width="160" height="120" alt="<?php the_title(); ?>" /></a></div><?php } ?> <div class="postcontent"> <h2><a href="<?php the_permalink() ?>" title="<?php the_title(); ?>"><?php the_title(); ?></a></h2> <div class="postmetadata"> <ul> <li class="calendar"><?php the_time("$dateformat"); ?></li> <li class="author"><?php _e('By', 'wpzoom');?> <?php the_author_posts_link(); ?></li> <li class="<?php if($i%2 == 0) echo 'category-last'; ?> category"><?php the_category(', '); ?></li> <li class="comments"><a href="<?php the_permalink() ?>#commentspost" title="Jump to the comments"><?php comments_number(__('no comments', 'wpzoom'),__('1 comment', 'wpzoom'),__('% comments', 'wpzoom')); ?></a></li> </ul> </div> <?php the_excerpt(); ?> <p class="more"><a href="<?php the_permalink() ?>" title="<?php the_title(); ?>" class="readmore" rel="nofollow"><?php _e('continue reading »', 'wpzoom');?></a> <?php edit_post_link( __('Edit this post', 'wpzoom'), ' | ', ''); ?></p> </div> <div class="cleaner"> </div> <div class="sep"> </div> </li> <?php endwhile; // ?> </ul> <div class="cleaner"> </div> <?php else : ?> <p class="title"><?php _e('There are no posts in this category', 'wpzoom');?></p> <?php endif; ?> <div class="navigation"> <p class="more"><?php next_posts_link(__('« Older Entries', 'wpzoom')); ?><?php previous_posts_link(__('Newer Entries »', 'wpzoom')); ?></p> </div><!-- end .navigation --> </div><!-- end .box --> </div><!-- end #archive --> <div class="cleaner"> </div> That should work.
  15. post the code and maybe someone can help you find what is going wrong.
  16. when you echo variables you can do it two ways either: echo ">$day</option>"; // or echo "{$r['dayofbirth']}";
  17. are you asking how you can get the url of the site? if so you would do that with: var url = location.href;
  18. there are two ways to send a copy of every email to two addresses: you could pass a cc header: $to = $selected_email; $subject = 'subject'; $content = 'this goes to multiple addresses'; $header 'Cc: sendcopyto@test.com' . "\r\n"; mail($to,$subject,$content,$header); Or you could use multiple recipient addresses: $to = $selected_email.', sendcopyto@test.com'; $subject = 'subject'; $content = 'this goes to multiple addresses'; mail($to,$subject,$content);
  19. <?php function replace_links($string){ $start = strpos($string, 'http://'); if($start !== false){ $end = strpos($string, " ",$start); $link = substr($string, $start,$end-$start); $link = "<a href='$link'>".$link."</a>"; return substr_replace($string,$link,$start,$end-$start); }else{ return $string; } } ?>
  20. the reason it would do that is because of where to document root is set to( i think) you could also try: include(__DIR__."/views/layouts/shop.php");
  21. foreach($dimensions as $ key => $value){ $dimensions[$key] = $value ."in" } in between your to statements
  22. try: $my_query = str_replace("''",'null',"select * from fruits where flavor = '$flavor'");
  23. SELECT id2 FROM table WHERE id1 != 1 AND (id2 = 2 OR id2 = 3)
  24. SELECT * FROM ".$table_prefix."online_users WHERE session='".$session."' ORDER BY user ASC, user_date DESC LIMIT 1 should work
×
×
  • 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.