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 / post.php

post.php in wpForo Forum 3.1.6, at themes/classic/post.php

50 lines 2.2 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 if( ( ( $topic = WPF()->current_object['topic'] ) && wpforo_is_owner( $topic['userid'], $topic['email'] ) ) || ( WPF()->perm->forum_can( 'vt' ) && WPF()->perm->forum_can( 'ent' ) ) ):
3
4 if( ( $forum = WPF()->current_object['forum'] ) && ( $topic = WPF()->current_object['topic'] ) && ( $posts = WPF()->current_object['posts'] ) ) :
5 if( ! ( $topic['private'] && ! wpforo_is_owner( $topic['userid'], $topic['email'] ) && ! WPF()->perm->forum_can( 'vp' ) ) ): ?>
6
7 <div class="wpf-head-bar">
8 <?php wpforo_single_title( 'post', $topic, '<h1 id="wpforo-title">', '</h1>' ); ?>
9 <div class="wpf-action-link">
10 <?php do_action( 'wpforo_template_post_head_bar_action_links', $forum, $topic, $posts ); ?>
11 </div>
12 </div>
13 <?php do_action( 'wpforo_template_post_head_bar', $forum, $topic, $posts ); ?>
14
15 <?php
16 wpforo_template_pagenavi( 'wpf-navi-post-top' );
17 if( $forum['layout'] == 3 ) include_once( wpftpl( 'layouts/3/comment.php' ) );
18 $template_path = wpftpl( 'layouts/' . $forum['layout'] . '/post.php' );
19 if( file_exists( $template_path ) ) {
20 include( $template_path );
21 }
22 wpforo_template_pagenavi( 'wpf-navi-post-bottom' );
23
24 if( WPF()->perm->forum_can( 'cr' ) || ( wpforo_is_owner( $topic['userid'], $topic['email'] ) && WPF()->perm->forum_can( 'ocr' ) ) ) {
25 WPF()->tpl->reply_form( $topic );
26 } elseif( ! WPF()->current_userid ) {
27 WPF()->tpl->please_login();
28 }
29 do_action( 'wpforo_post_list_footer' );
30
31 else: ?>
32 <p class="wpf-p-error">
33 <?php wpforo_phrase( 'Topic are private, please register or login for further information' ) ?>
34 </p>
35 <?php endif;
36 endif;
37
38 else : ?>
39 <p class="wpf-p-error">
40 <?php if( WPF()->current_userid ): ?>
41 <?php echo apply_filters( 'wpforo_no_topic_access_message_for_users', wpforo_phrase( "Your user level does not have appropriate permission to view the content", false ) ); ?>
42 <?php else: ?>
43 <?php echo apply_filters(
44 'wpforo_no_topic_access_message_for_guests',
45 wpforo_phrase( "You do not have permission to view the content", false ) . '<br>' . wpforo_get_login_or_register_notice_text()
46 ); ?>
47 <?php endif; ?>
48 </p>
49 <?php endif;
50