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 / listener.php
Created September 28, 2017 01:44
Full file for extimgaslink extension, to be placed in event/listener.php with the applied patch
<?php
/**
*
* @package phpBB.de External Images as link
* @copyright (c) 2015-2016 phpBB.de
* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
*
*/
namespace phpbbde\externalimgaslink\event;
@Elsensee
Elsensee / patch.diff
Created September 28, 2017 01:29
Patch for "External images as link" extension (for phpBB 3.2.0 and 3.2.1)
diff --git a/event/listener.php b/event/listener.php
index 07bc2c4..818596d 100644
--- a/event/listener.php
+++ b/event/listener.php
@@ -67,6 +67,7 @@ class listener implements EventSubscriberInterface
// 3.2 TextFormatter events (will only trigger in >=3.2)
'core.text_formatter_s9e_configure_after' => 'configure_textformatter',
'core.text_formatter_s9e_renderer_setup' => 'setup_textformatter_renderer',
+ 'core.text_formatter_s9e_parse_after' => 'legacy_replace',
);
@Elsensee
Elsensee / foobar.php
Created August 31, 2016 15:52
I AM A MONSTER
$effects = array_filter(array_map(function ($effect) {
return EffectCollection::getEffectById($effect);
}, array_unique(func_get_args(), SORT_NUMERIC)), function ($effect) {
return !is_null($effect);
});
@Elsensee
Elsensee / router.php
Created August 1, 2016 23:41
Rewriting for phpBB as PHP router
<?php
$root = $_SERVER['DOCUMENT_ROOT'];
if (!file_exists($root . parse_url($_SERVER['REQUEST_URI'], PHP_URL_PATH)) && file_exists($root . '/app.php'))
{
include($root . '/app.php');
exit;
}
return false;

Keybase proof

I hereby claim:

  • I am Elsensee on github.
  • I am olifantoliver (https://keybase.io/olifantoliver) on keybase.
  • I have a public key whose fingerprint is 8065 1640 9DFB 19B1 55C9 5325 6493 DFF1 7BDF C945

To claim this, I am signing this object:

@Elsensee
Elsensee / gist:d2379c0a9db122b08bf1
Created January 24, 2016 20:23
Diff for prosilver between 3.1.7-pl1 and 3.2.0-a1
diff --git a/phpBB/styles/prosilver/style.cfg b/phpBB/styles/prosilver/style.cfg
index f1a34bc..33547c3 100644
--- a/phpBB/styles/prosilver/style.cfg
+++ b/phpBB/styles/prosilver/style.cfg
@@ -21,8 +21,8 @@
# General Information about this style
name = prosilver
copyright = © phpBB Limited, 2007
-style_version = 3.1.7
-phpbb_version = 3.1.7
@Elsensee
Elsensee / gist:eff24639f02d6ca597d3
Created January 24, 2016 20:20
Diff summary for styles folder between 3.1.7-pl1 and 3.2.0-a1
phpBB/styles/all/template/feed.xml.twig | 37 +++
phpBB/styles/prosilver/style.cfg | 4 +-
phpBB/styles/prosilver/template/attachment.html | 79 +-----
phpBB/styles/prosilver/template/bbcode.html | 39 ++-
phpBB/styles/prosilver/template/captcha_recaptcha.html | 19 +-
phpBB/styles/prosilver/template/faq_body.html | 4 +-
phpBB/styles/prosilver/template/forum_fn.js | 24 +-
phpBB/styles/prosilver/template/forumlist_body.html | 61 ++--
phpBB/styles/prosilver/template/jumpbox.html | 35 ++-
phpBB/styles/prosilver/template/mcp_forum.html | 41 +--
@Elsensee
Elsensee / 3.1-3.2a1-styles.diff
Created January 24, 2016 20:16
Diff between 3.1.7-pl1 and 3.2.0-a1 for styles
diff --git a/phpBB/styles/all/template/feed.xml.twig b/phpBB/styles/all/template/feed.xml.twig
new file mode 100644
index 0000000..91467c6
--- /dev/null
+++ b/phpBB/styles/all/template/feed.xml.twig
@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="{{ FEED_LANG }}">
+ <link rel="self" type="application/atom+xml" href="{{ SELF_LINK }}" />
+
@Elsensee
Elsensee / reparse_bbcodes.php
Last active April 8, 2017 23:14
Copied from STK for Olympus and customized to work on Ascraeus (phpBB 3.1). For me it works. Tell me if it works for you too. (Please be logged in as administrator if you call it)
<?php
/**
*
* @package Support Toolkit - Reparse BBCode
* @version $Id$
* @copyright (c) 2009 phpBB Group
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
*
*/
@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);