Skip to content

Instantly share code, notes, and snippets.

View JordanMussi's full-sized avatar

Jordan Mussi JordanMussi

View GitHub Profile

Keeping your MyBB Fork updated

Initial setup

You only need to perform these actions once on your local copy of your fork.

git remote add upstream https://github.com/mybb/mybb.git

Creating a branch to fix an issue

Run these commands to create a branch fix-1234 with a starting point of the last commit from the mybb/mybb repo.

Keybase proof

I hereby claim:

  • I am JordanMussi on github.
  • I am jordanmussi (https://keybase.io/jordanmussi) on keybase.
  • I have a public key whose fingerprint is 61D7 A864 200A 9009 8F61 DEAB 6F6B 458A BB9B 0598

To claim this, I am signing this object:

@JordanMussi
JordanMussi / what_are_my_perms.php
Created August 31, 2014 10:25
Work out what permissions a user has in MyBB.
<?php
define("IN_MYBB", 1);
define('THIS_SCRIPT', 'what_are_my_perms.php');
require_once "./global.php";
if($mybb->user['uid'] == 0)
{
// User is a guest
@JordanMussi
JordanMussi / IcyBot.md
Last active August 29, 2015 13:57
An IRC bot to inform icyboards101 users that support is not provided at irc.icyboards.com#icynetwork

IcyBot

An IRC bot to inform icyboards101 users that support is not provided at irc.icyboards.com#icynetwork

To Install

  • Install Node.js
  • Download the package.json and the icybot.js files.
  • Run npm install
@JordanMussi
JordanMussi / config.exemplar.php
Last active August 29, 2015 13:56
MyBB's config file
<?php
/**
* Database configuration
*
* Please see the MyBB Docs for advanced
* database configuration for larger installations
* http://docs.mybb.com/
*/
$config['database']['type'] = 'mysqli';
@JordanMussi
JordanMussi / Redirect-Scripts.md
Last active December 25, 2015 07:19
WWW <-> NON-WWW Redirect Scripts

WWW. Redirect Scripts

Apache Server (.htaccess)

Redirecting NON-WWW. to WWW.

LoadModule rewrite_module  modules/mod_rewrite.so
RewriteEngine On
RewriteCond %{HTTP_HOST} ^github.com
RewriteRule (.*) http://www.github.com/$1 [R=301,L]
@JordanMussi
JordanMussi / functions.php
Created July 20, 2013 16:13
MyBB check_template function. Checks whether there are any 'security' issues in templates via complex syntax. Location: ./admin/inc/functions.php:640
<?php
/**
* Checks whether there are any 'security' issues in templates via complex syntax
*
* @param string The template to be scanned
* @return boolean A true/false depending on if an issue was detected
*/
function check_template($template)
{
// Check to see if our database password is in the template