This repository contains utility scripts for toggling a phpBB board registrtion on and off via system cron.
Outputs the absolute path of the directory where the script is placed. Useful for determining the root path of a phpBB installation.
-
Place the Script:
- Place
get_phpbb_root_path.phpin the root directory of your phpBB installation.
- Place
-
Run the Script:
- Execute the script from the command line using:
php get_phpbb_root_path.php
- Execute the script from the command line using:
-
Output:
- The script will output the absolute path to the directory where it is located. For example:
phpBB root path: /var/www/html/community
- The script will output the absolute path to the directory where it is located. For example:
To find the phpBB root path, navigate to the phpBB installation directory and run:
php get_phpbb_root_path.phpToggles user registration on a phpBB 3.3 board. This script logs in as a specific administrative user and uses phpBB's configuration system to enable or disable user registration.
- $phpbb_root_path: Path to the phpBB installation.
- $phpEx: PHP file extension (usually
.php). - $admin_user_id: ID of the administrative user for authentication.
- $token: Security token to authenticate the script run.
-
Set Configuration Variables:
- Edit the script to set
$phpbb_root_path,$admin_user_id, and$tokenvalues.
- Edit the script to set
-
Run the Script:
-
Execute the script from the command line with the token and action (
enableordisable) as arguments:php toggle_registration.php securetoken123 enable -
To disable registration:
php toggle_registration.php securetoken123 disable
-
-
Output:
- The script will output whether registration was enabled or disabled based on the action argument.
To disable user registration, use:
php toggle_registration.php securetoken123 disableTo enable user registration, use:
php toggle_registration.php securetoken123 enableget_phpbb_root_path.php: Description, usage, and example for finding the phpBB root path.toggle_registration.php: Description, user-editable configuration, usage, and examples for toggling user registration on the phpBB board.