PluginProbe
wpForo Forum / 3.1.6
wpForo Forum v3.1.6
3.1.6 3.1.5 3.1.4 3.1.2 3.1.1 3.1.0 3.0.9 3.0.8 3.0.7 trunk 1.0.0 1.0.1 1.0.2 1.1.0 1.1.1 1.1.2 1.2.0 1.3.0 1.3.1 1.4.0 1.4.1 1.4.10 1.4.11 1.4.12 1.4.13 All 138 releases
wpforo / themes / classic / profile-activity.php

profile-activity.php in wpForo Forum 3.1.6, at themes/classic/profile-activity.php

53 lines 2.0 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 // Exit if accessed directly
3 if( ! defined( 'ABSPATH' ) ) exit;
4
5 $activities = (array) wpfval( WPF()->current_object, 'activities' );
6 ?>
7
8 <div class="wpforo-activity-content">
9 <?php if( $activities ) : ?>
10 <table>
11 <?php $bg = false;
12 foreach( $activities as $activity ) : ?>
13 <tr<?php echo( $bg ? ' class="wpfbg-9"' : '' ) ?>>
14 <td class="activity-icon"><?php wpforo_topic_icon( $activity['topicid'], 'mixed' ); ?></td>
15 <td class="activity-title">
16 <?php
17 if( $activity['is_first_post'] ) {
18 $href = esc_url( WPF()->topic->get_url( $activity['topicid'] ) );
19 $link_text = wpforo_text( $activity['title'], 60, false );
20 } else {
21 $href = esc_url( WPF()->post->get_url( $activity['postid'] ) );
22 if( ! $link_text = wpforo_text( $activity['body'], 60, false ) ) {
23 $link_text = wpforo_text( $activity['title'], 60, false );
24 }
25 }
26 if( ! $href ) $href = '#';
27 if( ! $link_text ) $link_text = wpforo_phrase( 'post link', false );
28
29 printf( '<a style="font-size: 17px;" href="%s">%s</a>', $href, $link_text );
30
31 if( $activity['forumid'] ) {
32 $href = wpforo_forum( $activity['forumid'], 'url' );
33 $link_text = wpforo_forum( $activity['forumid'], 'title' );
34
35 if( ! $href ) $href = '#';
36 if( ! $link_text ) $link_text = wpforo_phrase( 'forum link', false );
37
38 printf( '<p style="font-style: italic"><span>%s</span> <a href="%s">%s</a></p>', wpforo_phrase( 'in forum', false ), $href, $link_text );
39 }
40 ?>
41 </td>
42 <td class="activity-date"><?php wpforo_date( $activity['created'] ); ?></td>
43 </tr>
44 <?php $bg = ( $bg ? false : true ); endforeach ?>
45 </table>
46 <div class="activity-foot">
47 <?php wpforo_template_pagenavi() ?>
48 </div>
49 <?php else : ?>
50 <p class="wpf-p-error"> <?php wpforo_phrase( 'No activity found for this member.' ) ?> </p>
51 <?php endif ?>
52 </div>
53