Unix Timestamp Help Needed (alt. colour quote boxes) - Printable Version +- MyBB Community Forums (https://community.mybb.com) +-- Forum: Resources (https://community.mybb.com/forum-8.html) +--- Forum: MyCodes (https://community.mybb.com/forum-117.html) +--- Thread: Unix Timestamp Help Needed (alt. colour quote boxes) (/thread-101519.html) |
Unix Timestamp Help Needed (alt. colour quote boxes) - masamunemaniac - 2011-08-12 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"> </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. |