This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Validation method for variable currency | |
$.validator.addMethod("currency", function (value, element) { | |
return this.optional(element) || /^(?:(\$|€|£))?(\d{1,3}(\,\d{3})*|(\d+))(\.\d{2})?$/.test(value); | |
}, "Please specify a valid amount"); | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.select2-container .select2-choice { | |
height: 34px; | |
-webkit-box-shadow: none; | |
-moz-box-shadow: none; | |
box-shadow: none; | |
background-color: #fff; | |
background-image: none; | |
background: #fff; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$plugins->add_hook('datahandler_pm_insert', 'pm_insert'); | |
$plugins->add_hook('private_do_send_end', 'pm_private_end'); | |
function pm_insert($handler) | |
{ | |
global $cache; | |
static $last_uid; | |
if(!isset($cache->cache['pmcache'])) | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$lateststatus = ''; | |
$query = $db->simple_select('users', 'uid,username,custom_status,custom_status_date,usergroup,displaygroup', 'custom_status != \'\' AND custom_status_date > 0', array('order_by' => 'custom_status_date', 'order_dir' => 'DESC', 'limit' => $mybb->settings['custom_status_latest'])); | |
while ($userstatus = $db->fetch_array($query)) | |
{ | |
$bgcolor = alt_trow(); | |
$userstatus['username'] = format_name($userstatus['username'], $userstatus['usergroup'], $userstatus['displaygroup']); | |
$userstatus['username'] = '<a href="member.php?action=profile&uid='.intval($userstatus['username']).'"> '.$userstatus['username'].'</a>'; | |
$userstatus['date'] = my_date($mybb->settings['dateformat'], $userstatus['custom_status_date'], '', false).", ".my_date($mybb->settings['timeformat'], $userstatus['custom_status_date']); | |
$userstatus['status'] = htmlspecialchars_uni($userstatus['custom_status']); | |
$userstatus['custom_status'] = htmlspecialchars_uni($userstatus['custom_status']); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- Something like this --> | |
<script> | |
Modernizr.load({ | |
test: Modernizr.mq('(min-width:400px)'), | |
yep: '<?php echo $this->baseurl ?>/templates/<?php echo $this->template ?>/js/not-small-screen-stuff.js">', | |
}); | |
</script> | |
<!-- Or --> | |
<script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class @Marquee | |
constructor: (@element, @options={}) -> | |
# Set defaults | |
@options['duration'] or= 30 | |
@options['wrapAround'] = true unless 'wrapAround' of @options | |
@options['direction'] or= 'forward' | |
# If everything fits don't bother with all this mess |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function myxbl_postbit(&$post) { | |
global $mybb, $db, $lang, $pids; | |
$lang->load('myxbl'); | |
static $myxbl; | |
if (!is_array($myxbl) && $mybb->input['method'] != "quickreply") // Check that the $myxbl variable is not an array. Also ensure we are not using the quick reply - without this check quick replies won't bne posted right as the $pids variable cannot be referenced | |
{ |