Ejemplo n.º 1
0
<?php

/*
Simple:Press
Forum Topic/Post Saves
$LastChangedDate: 2015-02-15 00:54:47 -0800 (Sun, 15 Feb 2015) $
$Rev: 12486 $
*/
if (preg_match('#' . basename(__FILE__) . '#', $_SERVER['PHP_SELF'])) {
    die('Access denied - you cannot directly call this file');
}
# set up required globals and load support files -----------------------------------
global $spThisUser, $spGlobals;
sp_forum_api_support();
sp_load_editor(0, 1);
include_once SF_PLUGIN_DIR . '/forum/library/sp-post-support.php';
# Initialise the class -------------------------------------------------------------
$p = new spPost();
# Set up curret user details needed to keep class user agnostic
$p->userid = $spThisUser->ID;
$p->admin = $spThisUser->admin;
$p->moderator = $spThisUser->moderator;
$p->member = $spThisUser->member;
$p->guest = $spThisUser->guest;
$p->call = 'post';
# Set data items needed for initial needed permission checks -----------------------
if (isset($_POST['action'])) {
    $p->action = $_POST['action'];
}
if (isset($_POST['forumid'])) {
    $p->newpost['forumid'] = sp_esc_int($_POST['forumid']);
Ejemplo n.º 2
0
		success: function(response) {
            jQuery('#spProfileSignaturePreview').load('<?php 
echo $ahahURL;
?>
');
            if (response.type == 'success') {
        	   spjDisplayNotification(0, response.message);
            } else {
        	   spjDisplayNotification(1, response.message);
            }
		}
	});
})
</script>
<?php 
sp_load_editor();
$out = '';
$out .= '<p>';
$msg = sp_text('On this panel, you may edit your Signature.');
$out .= apply_filters('sph_profile_signature_header', $msg);
$out .= '</p>';
$out .= '<hr>';
$out .= '<div class="spProfileSignature">';
$ahahURL = SFHOMEURL . 'index.php?sp_ahah=profile-save&amp;sfnonce=' . wp_create_nonce('forum-ahah') . "&amp;form={$thisSlug}&amp;userid={$userid}";
$out .= '<form action="' . $ahahURL . '" method="post" name="spProfileFormSignature" id="spProfileFormSignature" class="spProfileForm">';
$out .= sp_create_nonce('forum-profile');
$out .= '<div class="spEditor">';
$out = apply_filters('sph_ProfileFormTop', $out, $userid, $thisSlug);
$out = apply_filters('sph_ProfileSignatureFormTop', $out, $userid);
# Signature Set
$out .= '<div class="spEditorSection">';