MyBB Community Forums

Full Version: Unix Timestamp Help Needed (alt. colour quote boxes)
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Regex Wrote:\[quoter='?(.*?)'?( pid='?(.*?)'?)?( dateline='?(.*?)'?)?\](.*?)\[/(quoter?)\]
Replacement Wrote:<div style="background: #FFD0D0; border: 1px solid #707078; margin: 0; padding: 4px;"><div style="font-weight: bold; border-bottom: 1px solid #ccc; font-style: normal; display: block; margin: 4px 0;"><span style="font-weight:normal;float:right;">(whenever)</span>$1 Wrote: <a href="http://forums.cardmasterconflict.com:8000/showthread.php?pid=$3#pid$3" class="quick_jump">&nbsp;</a></div>$6</div>

Basically, the idea behind this is that by adding an 'r' onto the end of the default [quote] mycode, the quote box is coloured red instead of the default colour. The closing [/quote] can also have the same 'r' for consistency but this isn't required. Together with [quoteg] and [quoteb] for green and blue respectively, people can colour their quotes differently for whatever reason they may want (variety/novelty, or to make nested quotes more legible, etc).



The problem however, is that I can't quite work out how to convert the unix timestamp generated by the forums automatically into a readable date line. Ideally I'd like it to also automatically work out the (Today 01:55 PM) type of date lines that the default quotes display, but I'd settle for just a datey date line.