Skip to content

Instantly share code, notes, and snippets.

View 3D-I's full-sized avatar
💭
😜 Buried by a certain volume of code 🤓

3Di 3D-I

💭
😜 Buried by a certain volume of code 🤓
View GitHub Profile
@3D-I
3D-I / ipcfcurl.php
Created July 3, 2016 02:07
Used to debug IPCF cURL - 1.0.0-dev-v0002
<?php
/**
* Usage: Download and unzip the file, upload it to your Board's root (i.e.: www.mydomain.com/phpBB3/)
* Point your browser to i.e.: www.mydomain.com/phpBB3/ipcfcurl.php - results will be on your screen
* @package - IPCF tests
* @copyright (c) 2016 3Di (Marco T.) 01-jul-2016
* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
*/
@3D-I
3D-I / ipcfreal.php
Last active January 17, 2017 00:10
IPCF tests for 3.1/3.2 - Check wheter the host is masking IPs with HTTP_X_FORWARDED_FOR - Check CloudFlare,
<?php
/**
* Usage: Download and unzip the file, upload/save it to your Board's root
* (i.e.: www.mydomain.com/phpBB3/ipcfreal.php)
* Point your browser to i.e.: www.mydomain.com/phpBB3/ipcfipreal.php - results will be on your screen
* @package - IPCF tests / IP Real
* @copyright (c) 2016, 2017 3Di
* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
*/
@3D-I
3D-I / core.php
Created November 9, 2016 01:32 — forked from cYbercOsmOnauT/core.php
The url params are cleaned by the order they are in the request This gets rid of unneeded 301 redirects
public function expected_url($path = '')
{
$path = empty($path) ? $this->phpbb_root_path : $path;
$params = array();
// Check the params by the order they are in the request
foreach($this->request->variable_names(\phpbb\request\request_interface::GET) AS $get) {
$def = $this->seo_opt['zero_dupe']['redir_def'][$get];
if (($this->request->is_set($get, \phpbb\request\request_interface::GET) && $def['keep']) || !empty($def['force']))
{
@3D-I
3D-I / restore_ext_ext_groups.sql
Last active December 18, 2016 22:39
phpBB 3.1.10 - restore EXTENSIONS and EXTENSION_GROUPS TABLEs to Vanilla
TRUNCATE TABLE phpbb_extension_groups;
INSERT INTO phpbb_extension_groups (group_id, group_name, cat_id, allow_group, download_mode, upload_icon, max_filesize, allowed_forums, allow_in_pm) VALUES
(1, 'IMAGES', 1, 1, 1, '', 0, '', 0),
(2, 'ARCHIVES', 0, 1, 1, '', 0, '', 0),
(3, 'PLAIN_TEXT', 0, 0, 1, '', 0, '', 0),
(4, 'DOCUMENTS', 0, 0, 1, '', 0, '', 0),
(5, 'REAL_MEDIA', 3, 0, 1, '', 0, '', 0),
(6, 'WINDOWS_MEDIA', 2, 0, 1, '', 0, '', 0),
(7, 'FLASH_FILES', 5, 0, 1, '', 0, '', 0),
(8, 'QUICKTIME_MEDIA', 6, 0, 1, '', 0, '', 0),
@3D-I
3D-I / fix_cookie_notice_320.php
Created January 9, 2017 02:37
phpBB 3.2.0 Gold - Fix the cookie_notice missing DB config, making it enabeable in ACP. - Self destroys once ran.
@3D-I
3D-I / modission_reset_325.php
Last active February 9, 2022 22:25
phpBB 3.2.5 ONLY! - Delete Non-standard Modules and Permissions, and AutoMOD.
<?php
/***
* Usage: Download and unzip the file, upload it to your Board's root (i.e.: www.mydomain.com/phpBB3/)
* Point your browser to i.e.: www.mydomain.com/phpBB3/modission_reset_325.php)
* and follow instructions.
*
* Version 3.0.4 by 3Di in 10-Feb-2019 for phpBB 3.2.5 - (Oyabun1 2015 for 3.1.x)
*
* This script is free software. It comes without any warranty.
* license http://opensource.org/licenses/GPL-2.0 GNU General Public License v2.
@3D-I
3D-I / ipcfcurlfree.php
Created January 18, 2017 02:08
IPCF tests - IP lookup service: freegeoip.net and CURL
<?php
/**
* Usage: Download and unzip the file, upload it to your Board's root (i.e.: www.mydomain.com/phpBB3/)
* Point your browser to i.e.: www.mydomain.com/phpBB3/ipcfcurlfree.php - results will be on your screen
* @package - IPCF tests - IP lookup service: freegeoip.net
* @copyright (c) 2017 3Di (Marco T.) 17-jan-2017
* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
*/
@3D-I
3D-I / db_tools_service_replacement.php
Created February 4, 2017 01:05
phpbb/db/tools service replacement- phpBB 3.1
<?php
/* Your extension namespace here */
namespace my_vendor\my_awesome_extension_name;
/* Your filename (w/extension) for this class here */
class db_tools_service_replacement extends \phpbb\db\tools
{
public function __construct(\phpbb\db\driver\driver_interface $db, $return_statements = false)
{
@3D-I
3D-I / default_bots_32.php
Last active March 6, 2017 04:34
phpBB 3.2.x - Restores default BOTs and deletes any BOT you added to it. (Make a Backup first)
<?php
/***
* Usage:
* Download and unzip the file, upload it to your Board's root (i.e.: www.mydomain.com/phpBB3/)
* Point your browser to (i.e.: www.mydomain.com/phpBB3/default_bots_32.php)
*
* @package default phpBB's BOTS v2.0.0-b1 (06 03 2017)
* @copyright (c) 2016 3Di (Marco T.)
* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
*
@3D-I
3D-I / .htaccess
Created April 12, 2017 23:53
phpBB 3.2.0 .htaccess (original) plus HTTPS redirection
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteCond %{HTTPS} !=on
RewriteRule ^.*$ https://%{SERVER_NAME}%{REQUEST_URI} [R,L]
#
# Uncomment the statement below if URL rewriting doesn't
# work properly. If you installed phpBB in a subdirectory
# of your site, properly set the argument for the statement.
# e.g.: if your domain is test.com and you installed phpBB