예제 #1
0
	
	// If del_id in URL then delete that URL
	if (isset($_GET['del_id']) && is_numeric($_GET['del_id'])) {
		if ($id = $wps_forum->delete_post($_GET['del_id'])) echo '<div class="my-notice">Post deleted</div>';
	}

	// If tid passed, show the topic
	if ($tid) {

		$topic = $wps_forum->get_topic($tid);
		
		if ($topic) {

			// Add breadcrumbs (including last level as a link)
			echo '<div id="my-topic-breadcrumbs">';
				echo $wps_ui->get_breadcrumbs($catid, 'catid', true, '&rarr;', true);
			echo '</div>';
			
			// Show avatar
			echo '<div id="my-topic-avatar">';
				$wps_user = new wps_user($topic->topic_owner);
				echo $wps_user->get_avatar(100);
			echo '</div>';
			
			// Show initial topic post
			echo '<div id="my-forum-topic">';
				if ( ($topic->topic_owner == $current_user->ID || current_user_can('manage_options')) && (!$wps_forum->is_topic_locked($topic->tid)) ) {
					echo '<a href="'.$wps->get_forum_url().$wps->get_url_q($wps->get_forum_url()).'catid='.$catid.'&tid='.$tid.'&del_id='.$topic->tid.'" class="delete">Delete topic and replies</a>';
				}
				echo '<div id="my-topic-subject">';
				echo stripslashes($topic->topic_subject);
예제 #2
0
<link rel="stylesheet" type="text/css" href="<?php bloginfo('template_url'); ?>/wps_forum_page.css" />

<div id="primary">
	<div id="content" role="main">
	
	<!-- WordPress page content components -->
	<?php the_post(); ?>
	<?php get_template_part( 'content', 'page' ); ?>
	<!-- End WordPress page content components -->

	<?php	
	// Get passed parameters
	$catid = isset($_GET['catid']) ? $_GET['catid'] : 0;

	// Add breadcrumbs
	echo $wps_ui->get_breadcrumbs($catid, 'catid');

	// Start forum table
	echo '<div id="my-forum-table">';
			
	// Shows categories from the current level
	$categories = $wps_forum->get_categories($catid);
		if ($categories) {
			echo '<div class="my-forum-row my-forum-row my-forum-row-header">';
				echo '<div class="my-forum-title">';
					echo '<strong>CATEGORY</strong>';
				echo '</div>';
				echo '<div class="my-forum-title-topic">';
					echo '<strong>LAST TOPIC</strong>';
				echo '</div>';
			echo '</div>';