Skip to content

Instantly share code, notes, and snippets.

Avatar
💭
:)

Shabbir Bhimani shabbirbhimani

💭
:)
View GitHub Profile
View config.php
<?php
//* Do NOT include the opening php tag above. Copy the code shown below.
$config['debug'] = true;
@shabbirbhimani
shabbirbhimani / config.php
Last active Apr 6, 2017
Enable Debug Mode for Multiple IPs
View config.php
<?php
//* Do NOT include the opening php tag above. Copy the code shown below.
$debug_ips = array(‘202.71.5.115′,’SOME.OTHER.IP’);
View ads-only-on-homepage.html
<xen:if is="{$contentTemplate} == 'forum_list'">
<!-- Ad banner code start -->
<!-- Ad banner code end -->
</xen:if>
View homepage.html
<div id="content" class="forum_list">
View config.php
<?php
//* Do NOT include the opening php tag above. Copy the code shown below.
$config['superAdmins'] = '1,6';
View config.php
<?php
$config['db']['host'] = 'localhost';
$config['db']['port'] = '3306';
$config['db']['username'] = 'root';
$config['db']['password'] = '';
$config['db']['dbname'] = 'xenforo';
$config['superAdmins'] = '1';
@shabbirbhimani
shabbirbhimani / bbcode.php
Created May 4, 2017
Hook bbcode_img_match and add the following code
View bbcode.php
<?php
//* Do NOT include the opening php tag above. Copy the code shown below.
$urlbits = parse_url($link);
$salt = 'XXXX';
if ($urlbits['scheme']!='https')
$link = '/imgproxy.php?u='.urlencode($link).'&h='.md5($salt.$link.$salt);
@shabbirbhimani
shabbirbhimani / imgproxy.php
Last active May 8, 2017
Image Proxy File for vBulletin IMG BBCode - IMTips.co
View imgproxy.php
<?php
$salt = 'XXXX'; //Salt that was used to send hash param
$url = urldecode($_REQUEST['u']); // URL encoded parameter
if (!$url) die('Invalid Request.');
// We check hash to keep hackers out.
$hash = md5($salt.$url.$salt);
if ($_REQUEST['h'] != $hash) die('Invalid Request.');
@shabbirbhimani
shabbirbhimani / config.php
Created Oct 11, 2017
Disable Emails in XenForo
View config.php
<?php
//* Do NOT include the opening php tag above. Copy the code shown below.
$config['enableMail'] = false;
@shabbirbhimani
shabbirbhimani / hooks.html
Created Oct 11, 2017
The syntax for XenForo Hooks
View hooks.html
<xen:hook name="HOOK_NAME">
ANY HTML CODE
</xen:hook>
<xen:hook name="HOOK_NAME" />