Advertisement
Guest User

Untitled

a guest
Dec 20th, 2014
193
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
HTML 5.58 KB | None | 0 0
  1. <div class="userpro userpro-users userpro-<?php echo $i; ?> userpro-<?php echo $layout; ?>" <?php userpro_args_to_data( $args ); ?>>
  2.  
  3.  <div class="title"><?php
  4.  
  5.     echo userpro_userwall_get_option( 'title' );
  6.  
  7. ?>
  8.  </div>
  9. </div> 
  10. <div id="loading" style="display:none; text-align: center;"><img src="http://stolenmx.com/wp-content/themes/load.gif" width="40px" height="40px" alt="Please Wait" /></div>
  11. <div class="textarea"><textarea placeholder="<?php _e('Update Status...','userpro-userwall');?>" id=userpost name="userpost"cols="50" rows="2" style="border: 1px solid #ccc;border-radius: 5px;width: 100%;"></textarea></div>
  12. <div class="buttonpost"><button id="but1" type="submit"  name="Post_Now" value="Post Now" title="<?php _e('Add to Wall','userpro-userwall'); ?>" onclick="user_post_data('userpost',<?php echo get_current_user_id();?>); $('#loading').show();"><i class="fa fa-send fa-fw"></i><b><?php _e('Add to Wall','userpro-userwall');?></b></button></div>
  13.        
  14. <div class="upload"><button id="but2" class=userwall_upload  data-filetype = 'photo' type="submit"  name="upload_image" value="upload" data-allowed_extensions=jpg,png,jpeg,gif title="<?php _e('Upload','userpro-userwall'); ?>"><i class="fa fa-image fa-fw"></i> <b><?php _e('Add Photos','userpro-userwall');?></b></button></div>
  15. <div id="userwalldata">
  16. <?php
  17. $args = array(
  18.     'posts_per_page'   => userpro_userwall_get_option( 'totalpost' ),
  19.     'order'            => 'DESC',
  20.     'include'          => '',
  21.     'exclude'          => '',
  22.     'meta_key'         => '',
  23.     'meta_value'       => '',
  24.     'post_type'        => 'userpro_userwall',
  25.     'post_mime_type'   => '',
  26.     'post_parent'      => '',
  27.     'post_status'      => 'publish',
  28.     'suppress_filters' => true );
  29.  
  30. $postslist = get_posts( $args );
  31.  
  32. foreach($postslist as $post)
  33. {
  34.  
  35. global $userpro;
  36. $user_id = get_post_meta( $post->ID,'user_id');
  37.  
  38. ?>
  39. <div class="userwall" id=<?php echo $post->ID?>>
  40.  
  41.  
  42. <?php if($user_id[0]==get_current_user_id()) {?>
  43. <div class="userwall_delete_post">
  44. <button type="submit"  name="delete" value="delete" title="<?php _e('Delete','userpro-userwall'); ?>" onclick="userwall_delete_post(<?php echo $post->ID;?>);"><i class="fa fa-trash fa-fw"></i> </button>
  45. </div>
  46. <?php }?>
  47. <div class="userwall-post-content-img" data-key="profilepicture"><a  href="<?php echo $userpro->permalink($user_id[0]); ?>" title="<?php _e('View Profile','userpro'); ?>" ><?php echo get_avatar( $user_id[0], "60" );  ?> </a></div>
  48.  
  49. <div class="userwall-post-content">
  50.                 <div class="displayname"><a href="<?php echo $userpro->permalink($user_id[0]); ?>"><?php echo userpro_profile_data('display_name', $user_id[0]); ?></a>
  51. <?php $timestamp = strtotime($post->post_date);
  52. $new_date = date('d-M-Y h:i', $timestamp);?>
  53.                 <div class="post-date"><?php echo "Posted On ".$new_date;?></div>       </div>
  54. <br>
  55.        
  56. <br>
  57. <?php
  58.  
  59. if($post->post_title=="imgpost")
  60.     echo '<img src="'.$post->post_content.'" width="auto" style="-moz-user-select: none;
  61.     border-radius: 10px;max-width:99%">';
  62. else
  63. {
  64. echo $post->post_content;
  65. }
  66. ?>
  67. </div>
  68. <div class="userwall-comment-data-<?php echo $post->ID;?>" id="userwall-comment" >
  69. <?php
  70. $comments = get_post_meta($post->ID,'user_comment');
  71.  
  72. foreach($comments as $comment)
  73. {
  74.        
  75. ?>
  76. <div class="userwall_comment_data" id="<?php echo $i ?>"><?php
  77. if($comment['comment_userid']==get_current_user_id()) {
  78.         ?><div class=userwall_delete_comment>
  79.         <button type="submit"  name="delete" value="delete" title="<?php _e('Delete','userpro-userwall'); ?>" onclick="userwall_delete_comment('<?php echo $post->ID;?>','<?php echo $comment['comment_content'];?>',this);"><i class="fa fa-trash fa-fw-3"></i> </button></div>
  80.     <?php
  81.     }?><div class="userwall-comment-content-img" data-key="profilepicture"><a  href="<?php echo $userpro->permalink($comment['comment_userid']); ?>" title="<?php _e('View Profile','userpro'); ?>" ><?php echo get_avatar( $comment['comment_userid'], "40" );  ?> </a></div>
  82.    
  83.            
  84.     <div class="userwall-post-content"><div class="displayname"><a href="<?php echo $userpro->permalink($comment['comment_userid']); ?>"><?php echo userpro_profile_data('display_name', $comment['comment_userid']); ?></a></div>
  85.    
  86.     <?php
  87.     $commenttimestamp = strtotime($comment['comment_date']);
  88.     $commenttime = date('d-M-Y', $commenttimestamp);?>
  89.     <div class="post-date"><?php echo "Commented On ".$commenttime;?></div><?php
  90.     echo "<br><p>".$comment['comment_content']."</p>";
  91.    
  92.        
  93.        
  94. echo "</div></div>";
  95.  
  96. }
  97.  
  98. ?>
  99. </div>
  100. <div class="commenttext">
  101. <a href="<?php echo $userpro->permalink(get_current_user_id()); ?>" title="<?php _e('View Profile','userpro'); ?>"><?php echo get_avatar( get_current_user_id(), "40" );  ?></a>
  102. <textarea id=userwall-comment-<?php echo $post->ID;?> placeholder="<?php _e('Write your reply and hit enter...','userpro-userwall');?>"  onkeypress="user_post_comment('userwall-comment',<?php echo get_current_user_id();?>,<?php  echo $post->ID;?>,event);" name="userwall-comment"cols="40" rows="1" style="border: 1px solid #ccc;+border-radius: 6px;margin: 0px 0px 0px -5px;max-width:100%;width:445px;height:46px;margin-top: 6px;"></textarea>
  103. </div>
  104.  
  105. </div>
  106.  
  107. <?php
  108.  
  109.  
  110. }
  111.  
  112. ?>
  113. </div>
  114. <?php
  115. global $wp_query,$wpdb;
  116. $curauth = $wp_query->get_queried_object();
  117. $post_count = $wpdb->get_var("SELECT COUNT(*) FROM $wpdb->posts WHERE post_type = 'userpro_userwall' AND post_status = 'publish'");
  118. if($post_count>=userpro_userwall_get_option( 'totalpost' ))
  119. {
  120. ?>
  121.  
  122. <div class="socialwall-load-more" id="socialwall-load-more" data-max-pages="<?php  echo userpro_userwall_get_option( 'totalpost' ) ?>"><span><?php _e('Load More','userpro-userwall')?></span></div>
  123. <?php }?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement