sp_ColumnEnd();
            sp_InsertBreak();
            sp_SectionEnd('', 'topic');
        }
    } else {
        sp_NoTopicsInForumMessage('tagClass=spMessage', __sp('There are no topics in this forum'));
    }
    sp_SectionEnd('', 'topiclist');
    sp_SectionEnd('', 'forum');
    # Start the 'pagelinks' section
    # ----------------------------------------------------------------------
    sp_SectionStart('tagClass=spPlainSection', 'pageLinks');
    sp_TopicNewButton('tagId=spTopicNewButtonBottom&tagClass=spButton spRight', __sp('Add Topic'), __sp('Start a new topic'), __sp('This forum is locked'), __sp('No permission to start topics'));
    sp_TopicIndexPageLinks('', __sp('Page: '), __sp('Jump to page %PAGE% of topics'), __sp('Jump to page'));
    sp_InsertBreak();
    sp_SectionEnd('', 'pageLinks');
    # Start the 'editor' section
    # ----------------------------------------------------------------------
    sp_SectionStart('tagClass=spHiddenSection', 'editor');
    sp_TopicEditorWindow($addTopicForm);
    sp_SectionEnd('', 'editor');
} else {
    sp_NoForumMessage('tagClass=spMessage', __sp('Access denied - you do not have permission to view this page'), __sp('The requested forum does not exist'));
}
sp_SectionEnd('', 'forumView');
sp_SectionEnd('', 'body');
# Load the forum footer template - normally last thing
# ----------------------------------------------------------------------
sp_SectionStart('tagClass=spFootContainer', 'foot');
sp_load_template('spFoot.php');
sp_SectionEnd('', 'foot');
Beispiel #2
0
$spGlobals['editor'] = apply_filters('sph_this_editor', $spGlobals['editor']);
do_action('sph_load_editor', $spGlobals['editor']);
$out = '';
# is it a popup profile?
if ($action == 'popup') {
    if (empty($userid)) {
        sp_notify(SPFAILURE, sp_text('Invalid profile request'));
        $out .= sp_render_queued_notification();
        $out .= '<div class="sfmessagestrip">';
        $out .= apply_filters('sph_ProfileErrorMsg', sp_text('Sorry, an invalid profile request was detected'));
        $out .= '</div>';
        return $out;
    }
    sp_SetupUserProfileData($userid);
    echo '<div id="spMainContainer">';
    sp_load_template('spProfilePopupShow.php');
    echo '</div>';
    die;
}
if ($action == 'update-sig') {
    if (empty($userid)) {
        die;
    }
    sp_SetupUserProfileData($userid);
    echo sp_Signature('', $spProfileUser->signature);
    ?>
	<script type="text/javascript">
	jQuery(document).ready(function() {
        spjSetProfileDataHeight();
	})
	</script>
Beispiel #3
0
<?php

# --------------------------------------------------------------------------------------
#
#	Simple:Press Template
#	Theme		:	Barebones
#	Template	:	Head
#	Author		:	Simple:Press
#	Version		:	1.0
#
#	The 'group' template is used to display the forum header.
#
#	This template makes a call to either the desktop or mobile template
#	depending on what device the forum is being viewed through.
#
#	To edit the head for desktop use- templates/desktop/spHeadDesktop.php
#	To edit the head view for mobile use- templates/mobile/spHeadMobile.php
# --------------------------------------------------------------------------------------
global $spDevice;
if ($spDevice == 'mobile') {
    sp_load_template('mobile/spHeadMobile.php');
} else {
    sp_load_template('desktop/spHeadDesktop.php');
}
Beispiel #4
0
<?php

# --------------------------------------------------------------------------------------
#
#	Simple:Press Template
#	Theme		:	Barebones
#	Template	:	List View (simplified topic listing)
#	Author		:	Simple:Press
#	Version		:	1.0
#
#	The 'List' template is used to display a simplified Topic Listing.
#
#	This template makes a call to either the desktop or mobile template
#	depending on what device the forum is being viewed through.
#
#	To edit the List view for desktop use- templates/desktop/spListViewDesktop.php
#	To edit the List view for mobile use- templates/mobile/spListViewMobile.php
# --------------------------------------------------------------------------------------
global $spDevice;
if ($spDevice == 'mobile') {
    sp_load_template('mobile/spListViewMobile.php');
} else {
    sp_load_template('desktop/spListViewDesktop.php');
}
function sp_process_template()
{
    global $spVars, $spGlobals, $spThisUser, $spNewPosts;
    # grab the pageview, checking to see if its a search page
    $pageview = $spVars['pageview'];
    # determine page template to load
    switch ($pageview) {
        case 'group':
            $tempName = sp_process_group_view();
            break;
        case 'forum':
            $tempName = sp_process_forum_view();
            break;
        case 'topic':
            $tempName = sp_process_topic_view();
            break;
        case 'search':
            $tempName = sp_process_search_view();
            break;
        case 'members':
            $tempName = sp_process_members_view();
            break;
        case 'profileedit':
            $tempName = sp_process_profileedit_view();
            break;
        case 'profileshow':
            $tempName = sp_process_profileshow_view();
            break;
        case 'newposts':
            $tempName = sp_process_newposts_view();
            break;
        default:
            $tempName = sp_process_default_view($pageview);
            break;
    }
    # allow plugins/themes access to the template name
    $tempName = apply_filters('sph_TemplateName', $tempName, $pageview);
    # allow output prior to SP display
    do_action('sph_BeforeDisplayStart', $pageview, $tempName);
    # SP display starts here
    # Any control data item inspection needed
    if (sp_current_user_can('SPF Manage Toolbox') && !empty($spThisUser->inspect)) {
        sp_display_inspector('control', '');
    }
    # forum top anchor
    echo '<a id="spForumTop"></a>';
    # Define the main forum container
    echo "\n\n<!-- Simple:Press display start -->\n\n";
    echo '<div id="spMainContainer">';
    # Create the sliding panel div needed for mobile display
    echo "<div id='spMobilePanel'></div>";
    # allow output before the SP display
    do_action('sph_AfterDisplayStart', $pageview, $tempName);
    # load the pageview template if valid
    sp_load_template($tempName);
    # allow output after the SP display
    do_action('sph_BeforeDisplayEnd', $pageview, $tempName);
    # Display any queued messages
    sp_render_queued_notification();
    echo '</div>';
    echo "\n\n<!-- Simple:Press display end -->\n\n";
    # forum bottom anchor
    echo '<a id="spForumBottom"></a>';
    # SP display ends here
    # allow output after the SP display
    do_action('sph_AfterDisplayEnd', $pageview, $tempName);
    # Post display processing
    sp_post_display_processing($pageview);
}
function sp_RecentPostList($args = '', $label = '')
{
    global $spGroupView, $spThisUser, $spListView, $spThisListTopic;
    # check if group view is set as this may be called from elsewhere
    if (isset($spGroupView) && $spGroupView->groupViewStatus == 'no access') {
        return;
    }
    $defs = array('tagId' => 'spRecentPostList', 'tagClass' => 'spRecentPostSection', 'labelClass' => 'spMessage', 'template' => 'spListView.php', 'show' => 20, 'group' => 0, 'admins' => 0, 'mods' => 1, 'first' => 0, 'get' => 0);
    $a = wp_parse_args($args, $defs);
    $a = apply_filters('sph_RecentPostList_args', $a);
    extract($a, EXTR_SKIP);
    # sanitize before use
    $tagId = esc_attr($tagId);
    $tagClass = esc_attr($tagClass);
    $labelClass = esc_attr($labelClass);
    $template = sanitize_file_name($template);
    $show = (int) $show;
    $group = (int) $group;
    $admins = (int) $admins;
    $mods = (int) $mods;
    $first = (int) $first;
    $label = sp_filter_title_display($label);
    $get = (int) $get;
    if (!$admins && $spThisUser->admin || !$mods && $spThisUser->moderator) {
        return;
    }
    echo "<div id='{$tagId}' class='{$tagClass}'>\n";
    echo "<div class='{$labelClass}'>{$label}</div>\n";
    $topics = !empty($spThisUser->newposts['topics']) ? $spThisUser->newposts['topics'] : '';
    if ($get) {
        return $topics;
    }
    $spListView = new spTopicList($topics, $show, $group, '', $first);
    sp_load_template($template);
    echo '</div>';
}
function sp_SearchResults($args = '')
{
    global $spSearchView, $spThisUser, $spListView;
    $defs = array('tagId' => 'spSearchList', 'tagClass' => 'spSearchSection', 'template' => 'spListView.php', 'first' => 0, 'get' => 0);
    $a = wp_parse_args($args, $defs);
    $a = apply_filters('sph_SearchResults_args', $a);
    extract($a, EXTR_SKIP);
    # sanitize before use
    $tagId = esc_attr($tagId);
    $tagClass = esc_attr($tagClass);
    $template = sp_filter_title_save($template);
    $first = (int) $first;
    $get = (int) $get;
    if ($get) {
        do_action('sph_search_results');
        return $spSearchView->searchData;
    }
    echo "<div id='{$tagId}' class='{$tagClass}'>\n";
    $spListView = new spTopicList($spSearchView->searchData, 0, false, '', $first, 1, 'search');
    sp_load_template($template);
    echo "</div>\n";
}
Beispiel #8
0
<?php

# --------------------------------------------------------------------------------------
#
#	Simple:Press Template
#	Theme		:	Barebones
#	Template	:	Group View
#	Author		:	Simple:Press
#	Version		:	1.0
#
#	The 'Group' template is used to display the Group/Forum Index Listing.
#
#	This template makes a call to either the desktop or mobile template
#	depending on what device the forum is being viewed through.
#
#	To edit the group view for desktop use- templates/desktop/spGroupViewDesktop.php
#	To edit the group view for mobile use- templates/mobile/spGroupViewMobile.php
# --------------------------------------------------------------------------------------
if ($spDevice == 'mobile') {
    sp_load_template('mobile/spGroupViewMobile.php');
} else {
    sp_load_template('desktop/spGroupViewDesktop.php');
}
Beispiel #9
0
<?php

# --------------------------------------------------------------------------------------
#
#	Simple:Press Template
#	Theme		:	Barebones
#	Template	:	Members View
#	Author		:	Simple:Press
#	Version		:	1.0
#
#	The 'members' template is used to display the Members Listing.
#
#	This template makes a call to either the desktop or mobile template
#	depending on what device the forum is being viewed through.
#
#	To edit the Members view for desktop use- templates/desktop/spMembersViewDesktop.php
#	To edit the Members view for mobile use- templates/mobile/spMembersViewMobile.php
# --------------------------------------------------------------------------------------
if ($spDevice == 'mobile') {
    sp_load_template('mobile/spMembersViewMobile.php');
} else {
    sp_load_template('desktop/spMembersViewDesktop.php');
}
        $first = sp_esc_int($_GET['first']);
        $group = isset($_GET['group']) ? sp_esc_int($_GET['group']) : false;
        $spListView = new spTopicList($topics, $count, $group, '', $first, $popup, 'forum unread posts');
        sp_load_template('spListView.php');
        if ($popup) {
            echo '</div>';
        }
    }
}
# All forums (users new post list)
if ($_GET['action'] == 'all') {
    echo '<div id="spMainContainer">';
    $first = sp_esc_int($_GET['first']);
    $group = sp_esc_int($_GET['group']);
    $spListView = new spTopicList($spThisUser->newposts['topics'], $count, $group, '', $first, $popup, 'all unread posts');
    sp_load_template('spListView.php');
    echo '</div>';
}
if ($_GET['action'] == 'mark-read') {
    sp_mark_all_read();
    die;
}
if ($_GET['action'] == 'mark-forum-read') {
    $forum = empty($_GET['forum']) ? '' : sp_esc_int($_GET['forum']);
    if (empty($forum)) {
        die;
    }
    sp_mark_forum_read($forum);
    die;
}
die;
Beispiel #11
0
<?php

# --------------------------------------------------------------------------------------
#
#	Simple:Press Template
#	Theme		:	Barebones
#	Template	:	Topic View
#	Author		:	Simple:Press
#	Version		:	1.0
#
#	The 'Topic' template is used to display the Topic/Post Index Listing.
#
#	This template makes a call to either the desktop or mobile template
#	depending on what device the forum is being viewed through.
#
#	To edit the Topic view for desktop use- templates/desktop/spTopicViewDesktop.php
#	To edit the Topic view for mobile use- templates/mobile/spTopicViewMobile.php
# --------------------------------------------------------------------------------------
global $spDevice;
if ($spDevice == 'mobile') {
    sp_load_template('mobile/spTopicViewMobile.php');
} else {
    sp_load_template('desktop/spTopicViewDesktop.php');
}
Beispiel #12
0
<?php

# --------------------------------------------------------------------------------------
#
#	Simple:Press Template
#	Theme		:	Barebones
#	Template	:	Forum View
#	Author		:	Simple:Press
#	Version		:	1.0
#
#	The 'Forum' template is used to display the Forum/Topic Index Listing.
#
#	This template makes a call to either the desktop or mobile template
#	depending on what device the forum is being viewed through.
#
#	To edit the Forum view for desktop use- templates/desktop/spForumViewDesktop.php
#	To edit the Forum view for mobile use- templates/mobile/spForumViewMobile.php
# --------------------------------------------------------------------------------------
global $spDevice;
if ($spDevice == 'mobile') {
    sp_load_template('mobile/spForumViewMobile.php');
} else {
    sp_load_template('desktop/spForumViewDesktop.php');
}