[ create a new paste ] login | about

Link: http://codepad.org/JchmyBGe    [ raw code | output | fork ]

C, pasted on Oct 8:
       <?php $words = 25; ?>
       	  <div id="featured">
       	    <ul id="featured-nav">
        <li class="theShow"><a class="theShow tab">Upcoming Show</a></li><li class="featuredBusiness"><a class="featuredBusiness tab">Around Town</a></li></ul>
      
      <div class="theShow featuredStuff">
     <?php $i = 1; ?>
	<?php 
		query_posts('cat=4&order=DESC');?>
         
         <?php $theShow_PostCount = $wp_query->post_count;?>
         <script language="javascript">
		 	var theShowCount = "<?php echo($theShow_PostCount);?>"
			</script>
         
      <?php while (have_posts()): the_post(); ?>
      
      
      <div class="<?php echo 'theShow' . $i; ?> inActive">
     
   			<?php
				//Get images attached to the post
							$args = array(
								'post_type' => 'attachment',
								'post_mime_type' => 'image',
								'numberposts' => -1,
        						'order' => 'ASC',
								'post_status' => null,
								'post_parent' => $post->ID
							);
							$attachments = get_posts($args);
							if ($attachments) {
								foreach ($attachments as $attachment) {
									$imgurl = wp_get_attachment_thumb_url( $attachment->ID );
                							break;
        							}
							//Display image
							}

					
						//Get Image information
						$imgsrc = get_post_meta($post->ID, 'Image', true);
						
						$size = 100;?>
			<a href="<?php the_permalink(); ?>"><img src="<?php echo $imgurl; ?>" id="featured-pic" /></a>
      	
        <div id="featured-content">
      
        	<h1><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h1>
        	<h2><?php echo get_post_meta($post->ID, 'featuredSubTitle', true); ?> </h2>
        	<?php echo excerpt($words); ?><a href="<?php the_permalink(); ?>">[more...]</a>
        
        </div>
    </div>
      <?php $i++; ?>
      <?php endwhile; ?>
   <?php wp_reset_query(); ?>
    </div>
    
    
    <div class="featuredBusiness featuredStuff">
    
     <?php $i = 1; ?>
	<?php 
		query_posts('cat=25&orderDESC');?>

         <?php $featuredBusiness_PostCount = $wp_query->post_count;?>
         <script language="javascript">
		 	var featuredBusinessCount = "<?php echo($featuredBusiness_PostCount);?>"
			</script>
            
         
      <?php while (have_posts()): the_post(); ?>
      
      
      <div class="<?php echo 'featuredBusiness' . $i; ?> inActive">
   <?php
//Get images attached to the post
							$args = array(
								'post_type' => 'attachment',
								'post_mime_type' => 'image',
								'numberposts' => -1,
        						'order' => 'ASC',
								'post_status' => null,
								'post_parent' => $post->ID
							);
							$attachments = get_posts($args);
							if ($attachments) {
								foreach ($attachments as $attachment) {
									$imgurl = wp_get_attachment_thumb_url( $attachment->ID );
                							break;
        							}
							//Display image
							}

					
						//Get Image information
						$imgsrc = get_post_meta($post->ID, 'Image', true);
						
						$size = 100;?>
<a href="<?php the_permalink(); ?>"><img src="<?php echo $imgurl; ?>" id="featured-pic" /></a>
      <div id="featured-content">
      
        <h1><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h1>
        <h2><?php echo get_post_meta($post->ID, 'featuredSubTitle', true); ?> </h2>
        <?php echo excerpt($words); ?><a href="<?php the_permalink(); ?>">[more...]</a>
        
        </div>
        </div>
      <?php $i++; ?>
      <?php endwhile; ?>
      
       
    </div>


Output:
Line 1: error: expected identifier or '(' before '<' token
Line 1: error: expected identifier or '(' before '?' token
Line 7: error: expected identifier or '(' before '?' token
Line 14: warning: character constant too long for its type
Line 9: error: expected identifier or '(' before '?' token
Line 11: error: expected identifier or '(' before '?' token
Line 16: error: expected identifier or '(' before '?' token
Line 8: warning: character constant too long for its type
Line 23: warning: character constant too long for its type
Line 8: warning: character constant too long for its type
Line 28: warning: character constant too long for its type
Line 8: warning: character constant too long for its type
Line 14: warning: character constant too long for its type
Line 25: warning: multi-character character constant
Line 8: warning: character constant too long for its type
Line 8: warning: character constant too long for its type
Line 31: warning: data definition has no type or storage class
Line 31: error: '$args' undeclared here (not in a function)
Line 31: error: initializer element is not constant
Line 32: error: expected identifier or '(' before 'if'
Line 42: warning: data definition has no type or storage class
Line 42: error: '$post' undeclared here (not in a function)
Line 41: warning: character constant too long for its type
Line 42: error: 'true' undeclared here (not in a function)
Line 42: error: initializer element is not constant
Line 44: warning: data definition has no type or storage class
Line 44: error: expected identifier or '(' before '?' token
Line 49: error: expected identifier or '(' before '?' token
Line 49: warning: character constant too long for its type
Line 50: error: expected identifier or '(' before '?' token
Line 51: error: expected identifier or '(' before '?' token
Line 55: error: expected identifier or '(' before '?' token
Line 56: error: expected identifier or '(' before '?' token
Line 57: error: expected identifier or '(' before '?' token
Line 63: error: expected identifier or '(' before '?' token
Line 14: warning: character constant too long for its type
Line 65: error: expected identifier or '(' before '?' token
Line 67: error: expected identifier or '(' before '?' token
Line 73: error: expected identifier or '(' before '?' token
Line 8: warning: character constant too long for its type
Line 23: warning: character constant too long for its type
Line 8: warning: character constant too long for its type
Line 28: warning: character constant too long for its type
Line 8: warning: character constant too long for its type
Line 14: warning: character constant too long for its type
Line 25: warning: multi-character character constant
Line 8: warning: character constant too long for its type
Line 8: warning: character constant too long for its type
Line 87: warning: data definition has no type or storage class
Line 87: error: redefinition of '$attachments'
Line 31: error: previous definition of '$attachments' was here
Line 87: error: initializer element is not constant
Line 88: error: expected identifier or '(' before 'if'
Line 98: warning: data definition has no type or storage class
Line 98: error: redefinition of '$imgsrc'
Line 42: error: previous definition of '$imgsrc' was here
Line 41: warning: character constant too long for its type
Line 98: error: initializer element is not constant
Line 100: warning: data definition has no type or storage class
Line 100: error: redefinition of '$size'
Line 44: error: previous definition of '$size' was here
Line 100: error: expected identifier or '(' before '?' token
Line 104: error: expected identifier or '(' before '?' token
Line 48: warning: character constant too long for its type
Line 105: error: expected identifier or '(' before '?' token
Line 106: error: expected identifier or '(' before '?' token
Line 110: error: expected identifier or '(' before '?' token
Line 111: error: expected identifier or '(' before '?' token


Create a new paste based on this one


Comments: