1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
|
<?php
/**
* $Header: /cvsroot/bitweaver/_bit_users/edit_personal_page.php,v 1.2 2005/06/28 07:46:23 spiderr Exp $
*
* Copyright (c) 2004 bitweaver.org
* Copyright (c) 2003 tikwiki.org
* Copyright (c) 2002-2003, Luis Argerich, Garland Foster, Eduardo Polidor, et. al.
* All Rights Reserved. See copyright.txt for details and a complete list of authors.
* Licensed under the GNU LESSER GENERAL PUBLIC LICENSE. See license.txt for details
*
* $Id: edit_personal_page.php,v 1.2 2005/06/28 07:46:23 spiderr Exp $
* @package users
* @subpackage functions
*/
/**
* required setup
*/
require_once( '../bit_setup_inc.php' );
// Check if the page has changed
if (isset($_REQUEST["fSavePage"])) {
$gBitUser->store( $_REQUEST );
header( "Location:".USERS_PKG_URL."index.php?home=".$gBitUser->mUsername );
die;
}
if ($gBitSystem->getPreference('package_quicktags','n') == 'y') {
include_once( QUICKTAGS_PKG_PATH.'quicktags_inc.php' );
}
// see if we should show the attachments tab at all
foreach( $gLibertySystem->mPlugins as $plugin ) {
if( ( $plugin['plugin_type'] == 'storage' ) && ( $plugin['is_active'] == 'y' ) ) {
$smarty->assign( 'show_attachments','y' );
}
}
$smarty->assign('preview',0);
// If we are in preview mode then preview it!
if(isset($_REQUEST["preview"])) {
$smarty->assign('preview',1);
$gBitUser->mInfo['title'] = $_REQUEST["title"];
if(isset($_REQUEST["description"])) {
$gBitUser->mInfo['description'] = $_REQUEST["description"];
}
$gBitUser->mInfo['data'] = $_REQUEST["edit"];
$parsed = $gBitUser->parseData($_REQUEST["edit"], (!empty( $_REQUEST['format_guid'] ) ? $_REQUEST['format_guid'] :
( isset($gBitUser->mInfo['format_guid']) ? $gBitUser->mInfo['format_guid'] : 'tikiwiki' ) ) );
/* SPELLCHECKING INITIAL ATTEMPT */
//This nice function does all the job!
if ($wiki_spellcheck == 'y') {
if (isset($_REQUEST["spellcheck"]) && $_REQUEST["spellcheck"] == 'on') {
$parsed = $gBitSystem->spellcheckreplace($edit_data, $parsed, $gBitLanguage->mLanguage, 'editwiki');
$smarty->assign('spellcheck', 'y');
} else {
$smarty->assign('spellcheck', 'n');
}
}
$smarty->assign( 'parsed', $parsed );
}
$smarty->assign_by_ref( 'pageInfo', $gBitUser->mInfo );
$smarty->assign_by_ref( 'gContent', $gBitUser );
$smarty->assign('show_page_bar', 'y');
$gBitSystem->mPrefs['feature_wiki_description'] = 'n';
$gBitSystem->display( 'bitpackage:wiki/edit_page.tpl');
?>
|