This repository has been archived by the owner on Nov 28, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathuser-public-profile.php
63 lines (61 loc) · 2.28 KB
/
user-public-profile.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
<?php
osc_add_hook('header', 'mtx_follow_construct');
mtx_add_body_class('user-public-profile');
osc_enqueue_script('jquery-validate');
osc_add_hook('after-main', function() {
osc_current_web_theme_path('user-public-sidebar.php');
});
$address = '';
if(osc_user_address()!='') {
if(osc_user_city_area()!='') {
$address = osc_user_address().", ".osc_user_city_area();
} else {
$address = osc_user_address();
}
} else {
$address = osc_user_city_area();
}
$location_array = array();
if(trim(osc_user_city()." ".osc_user_zip())!='') {
$location_array[] = trim(osc_user_city()." ".osc_user_zip());
}
if(osc_user_region()!='') {
$location_array[] = osc_user_region();
}
if(osc_user_country()!='') {
$location_array[] = osc_user_country();
}
$location = implode(", ", $location_array);
unset($location_array);
osc_current_web_theme_path('header.php');
?>
<div id="item-content">
<div class="user-card">
<img src="http://www.gravatar.com/avatar/<?php echo md5( strtolower( trim( osc_user_email() ) ) ); ?>?s=120&d=<?php echo osc_current_web_theme_url('images/user_default.gif') ; ?>" />
<ul id="user_data">
<li class="name"><?php echo osc_user_name(); ?></li>
<?php if( osc_user_website() !== '' ) { ?>
<li class="website"><a href="<?php echo osc_user_website(); ?>"><?php echo osc_user_website(); ?></a></li>
<?php } ?>
<?php if( $address !== '' ) { ?>
<li class="adress"><?php printf(__('<strong>Address:</strong> %1$s'), $address); ?></li>
<?php } ?>
<?php if( $location !== '' ) { ?>
<li class="location"><?php printf(__('<strong>Location:</strong> %1$s'), $location); ?></li>
<?php } ?>
</ul>
</div>
<?php if( osc_user_info() !== '' ) { ?>
<h2><?php _e('User description', 'matrix'); ?></h2>
<?php } ?>
<?php echo nl2br(osc_user_info()); ?>
<?php if( osc_count_items() > 0 ) { ?>
<div class="similar_ads">
<h2><?php _e('Latest listings', 'matrix'); ?></h2>
<?php osc_current_web_theme_path('loop.php'); ?>
<div class="paginate"><?php echo osc_pagination_items(); ?></div>
<div class="clear"></div>
</div>
<?php } ?>
</div>
<?php osc_current_web_theme_path('footer.php') ; ?>