Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <div class="userpro userpro-users userpro-<?php echo $i; ?> userpro-<?php echo $layout; ?>" <?php userpro_args_to_data( $args ); ?>>
- <div class="title"><?php
- echo userpro_userwall_get_option( 'title' );
- ?>
- </div>
- </div>
- <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>
- <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>
- <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>
- <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>
- <div id="userwalldata">
- <?php
- $args = array(
- 'posts_per_page' => userpro_userwall_get_option( 'totalpost' ),
- 'order' => 'DESC',
- 'include' => '',
- 'exclude' => '',
- 'meta_key' => '',
- 'meta_value' => '',
- 'post_type' => 'userpro_userwall',
- 'post_mime_type' => '',
- 'post_parent' => '',
- 'post_status' => 'publish',
- 'suppress_filters' => true );
- $postslist = get_posts( $args );
- foreach($postslist as $post)
- {
- global $userpro;
- $user_id = get_post_meta( $post->ID,'user_id');
- ?>
- <div class="userwall" id=<?php echo $post->ID?>>
- <?php if($user_id[0]==get_current_user_id()) {?>
- <div class="userwall_delete_post">
- <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>
- </div>
- <?php }?>
- <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>
- <div class="userwall-post-content">
- <div class="displayname"><a href="<?php echo $userpro->permalink($user_id[0]); ?>"><?php echo userpro_profile_data('display_name', $user_id[0]); ?></a>
- <?php $timestamp = strtotime($post->post_date);
- $new_date = date('d-M-Y h:i', $timestamp);?>
- <div class="post-date"><?php echo "Posted On ".$new_date;?></div> </div>
- <br>
- <br>
- <?php
- if($post->post_title=="imgpost")
- echo '<img src="'.$post->post_content.'" width="auto" style="-moz-user-select: none;
- border-radius: 10px;max-width:99%">';
- else
- {
- echo $post->post_content;
- }
- ?>
- </div>
- <div class="userwall-comment-data-<?php echo $post->ID;?>" id="userwall-comment" >
- <?php
- $comments = get_post_meta($post->ID,'user_comment');
- foreach($comments as $comment)
- {
- ?>
- <div class="userwall_comment_data" id="<?php echo $i ?>"><?php
- if($comment['comment_userid']==get_current_user_id()) {
- ?><div class=userwall_delete_comment>
- <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>
- <?php
- }?><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>
- <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>
- <?php
- $commenttimestamp = strtotime($comment['comment_date']);
- $commenttime = date('d-M-Y', $commenttimestamp);?>
- <div class="post-date"><?php echo "Commented On ".$commenttime;?></div><?php
- echo "<br><p>".$comment['comment_content']."</p>";
- echo "</div></div>";
- }
- ?>
- </div>
- <div class="commenttext">
- <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>
- <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>
- </div>
- </div>
- <?php
- }
- ?>
- </div>
- <?php
- global $wp_query,$wpdb;
- $curauth = $wp_query->get_queried_object();
- $post_count = $wpdb->get_var("SELECT COUNT(*) FROM $wpdb->posts WHERE post_type = 'userpro_userwall' AND post_status = 'publish'");
- if($post_count>=userpro_userwall_get_option( 'totalpost' ))
- {
- ?>
- <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>
- <?php }?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement