Skip to content

Instantly share code, notes, and snippets.

View Elsensee's full-sized avatar

Oliver S. Elsensee

  • Hamburg, Germany
View GitHub Profile
@Elsensee
Elsensee / update_bbcode.php
Last active August 29, 2015 14:12
Updates the bitfield of posts with a specific bbcode so they can be parsed again. (phpBB 3.1!!!) No idea if it works - did it in 10 minutes xD
<?php
define('OLD_ID', 13);
define('NEW_ID', 14);
define('LIKE_WHAT', '[light');
/**
* @ignore
*/
define('IN_PHPBB', true);
@Elsensee
Elsensee / fix_left_right.php
Last active August 29, 2015 14:08
Fix left and right IDs in Ascraeus (3.1) - Code is from STK for 3.0 but changed to do it's work in 3.1 (and to fit into a single file which can just be called)
<?php
/**
*
* @package Support Toolkit - Fix Left/Right ID's
* @version $Id$
* @copyright (c) 2009 phpBB Group
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
*
*/
@Elsensee
Elsensee / groups.php
Last active August 29, 2015 14:01
groupname class
<?php
/**
*
* @package phpBB3
* @copyright (c) 2014 phpBB Group
* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
*
*/
namespace phpbb;
@Elsensee
Elsensee / functions_content.php
Last active August 29, 2015 13:59
ticket/10423 function
/**
* Cleans a search string by removing single wildcards from it and replacing multiple spaces with a single one.
*
* @param string $search_string The full search string which should be cleaned.
*
* @return string The cleaned search string without any wildcards and multiple spaces.
*/
function phpbb_clean_search_string($search_string)
{
// This regular expressions matches every single wildcard.
@Elsensee
Elsensee / gist:9863516
Created March 29, 2014 21:41
phpbb b2 update error
Fatal error: Uncaught exception 'InvalidArgumentException' with message 'The file "services.yml" does not exist (in: ).' in C:\xampp\htdocs\phpBB3\vendor\symfony\config\Symfony\Component\Config\FileLocator.php:72 Stack trace: #0 C:\xampp\htdocs\phpBB3\vendor\symfony\dependency-injection\Symfony\Component\DependencyInjection\Loader\YamlFileLoader.php(42): Symfony\Component\Config\FileLocator->locate('services.yml') #1 C:\xampp\htdocs\phpBB3\phpbb\di\extension\core.php(49): Symfony\Component\DependencyInjection\Loader\YamlFileLoader->load('services.yml') #2 C:\xampp\htdocs\phpBB3\vendor\symfony\dependency-injection\Symfony\Component\DependencyInjection\Compiler\MergeExtensionConfigurationPass.php(50): phpbb\di\extension\core->load(Array, Object(Symfony\Component\DependencyInjection\ContainerBuilder)) #3 C:\xampp\htdocs\phpBB3\vendor\symfony\dependency-injection\Symfony\Component\DependencyInjection\Compiler\Compiler.php(119): Symfony\Component\DependencyInjection\Compiler\MergeExtensionConfigurationPass->proces
@Elsensee
Elsensee / functions.php.patch
Created March 29, 2014 14:17
ticket/10521 patch
@@ -1986,8 +1986,8 @@ function tracking_unserialize($string, $max_depth = 3)
*/
function append_sid($url, $params = false, $is_amp = true, $session_id = false)
{
- global $_SID, $_EXTRA_URL, $phpbb_hook, $phpbb_path_helper;
- global $phpbb_dispatcher;
+ global $_SID, $_EXTRA_URL, $db, $phpbb_hook, $phpbb_path_helper;
+ global $phpbb_dispatcher, $phpEx, $request, $user;
if ($params === '' || (is_array($params) && empty($params)))
<?php
/**
*
* @package testing
* @copyright (c) 2014 phpBB Group
* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
*
*/
require_once dirname(__FILE__) . '/../../phpBB/includes/functions.php';
@Elsensee
Elsensee / LocalizationManager.cs
Created March 5, 2014 16:36
A localization manager for .NET written in C# without use of satellite assemblys but only txt-files.
/*
* Copyright (c) 2014 Oliver Schramm
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
@Elsensee
Elsensee / ucp.php
Created March 1, 2014 23:09
Proposed patch for ticket 9873
<?php
/**
*
* ucp [English]
*
* @package language
* @version $Id$
* @copyright (c) 2005 phpBB Group
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
*
@Elsensee
Elsensee / functions.php
Created July 28, 2013 13:17
Proposed patch for ticket 9576...
<?php
/**
*
* @package phpBB3
* @version $Id$
* @copyright (c) 2005 phpBB Group
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
*
*/