Thursday, May 28, 2009

Monday, May 4, 2009

create a blank page in phpbb

/*
* phpBB3 blank example page.
*/

define('IN_PHPBB', true);
$phpbb_root_path = (defined('PHPBB_ROOT_PATH')) ? PHPBB_ROOT_PATH : './';
$phpEx = substr(strrchr(__FILE__, '.'), 1);
include($phpbb_root_path . 'common.' . $phpEx);
// Start session management
$user->session_begin();
$auth->acl($user->data);
$user->setup('common');
// include page language file
$user->add_lang('page');
page_header($user->lang['PAGE_TITLE']);

/*
Put your own code here
*/

$template->set_filenames(array(
'body' =>'nanhe_kumar.html'
));
// parse page:
page_footer();
?>

how can your link session with two sites

if you want login in
www.gradtrain.com
and my session is also available in
gradtrain.com/forum
?php
define('IN_PHPBB', true);
define('ROOT_PATH', "forum/");

if (!defined('IN_PHPBB') || !defined('ROOT_PATH')) {
exit();
}

$phpEx = "php";
$phpbb_root_path = (defined('PHPBB_ROOT_PATH')) ? PHPBB_ROOT_PATH : ROOT_PATH . '/';
include($phpbb_root_path . 'common.' . $phpEx);

$user->session_begin();
$auth->acl($user->data);
?>
$auth->login('nanhe', 'nanhe', $remember, 1, 0)
?>
$user->session_kill();
$user->session_begin();
?>

how can login in phpbb, forum with own created page

Suppose your site is
www.gradtrain.com
and your forum is www.gradtrain.com/forum
and if want login with your crated page
www.gradtrain.com/forum-login.php
then take this step
define('IN_PHPBB', true);
define('PHPBB_ROOT_PATH', './forum/');

$phpbb_root_path = 'forum/';

$phpEx = substr(strrchr(__FILE__, '.'), 1);
include($phpbb_root_path . 'common.' . $phpEx);
include($phpbb_root_path . 'includes/functions_display.' . $phpEx);

// Start session management
$user->session_begin();
$auth->acl($user->data);
?>
/* Start Logout*/
if ($user->data['is_registered']){

echo("
data['session_id']."'>");
echo("");
echo("");
echo("
");
}
/*End Logout*/

/*Start Login Box*/
if (!$user->data['is_registered']){
echo("
");
echo(" Username:");
echo("
");
echo(" ");
echo("

");
echo(" Password:");
echo("
");
echo(" ");
echo("

");
echo("");
echo("");
//echo("");
echo("
");
}
/*End Login Box*/

?>

Friday, May 1, 2009

The command prompt has been disabled by your administrator

When you attempt to run CMD.exe or a batch file, you may receive the message "The command prompt has been disabled by your administrator". This is caused by restrictions placed in Registry. DisableCMD value is set to 1 or via Group Policy. To enable Task Manager, try any of these methods:

Method 1: Using the console registry tool

  • Click Start, Run and type this command exactly as given below: (better - Copy and paste)

Method 2: Edit the registry directly

  • Open Registry Editor (Regedit.exe) and navigate to:

[HKEY_CURRENT_USER\Software\Policies\Microsoft\Windows\System]

  • In the right-pane, double-click DisableCMD and set it's data to 0

Method 3: Using Group Policy Editor in Windows XP Professional.

  • Click Start, Run, type gpedit.msc and click OK.

  • Navigate to User Configuration \ Administrative Templates \ System

  • Double-click the Prevent access to the command prompt

You can then disable or set the policy to Not Configured. Disabling or setting this policy to Not Configured should solve the problem.

Related articles

"Registry Editing has been disabled by your administrator"
"Task Manager has been disabled by your administrator"