MyBB Community Forums

Full Version: Post decorations with Mycode
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
A pretty decoration for your posts.
For demo see here.
If you want it , you must to build Mycode for it.

first:
Name : Post decoration

Expression:
\[notice\](.*?)\[/notice\]

Replacement:
<fieldset style="background:#efefef url(images/post-deco/notice.png) top left 2% no-repeat;width:90%;color:#465584;background-color:#FCFAA9;border-left:2px solid #FFD42A;border-right:2px solid #FFD42A;border-top:2px solid #FFD42A;border-bottom:2px solid #FFD42A;margin:0 auto 4px;padding:3px 15px 3px 40px;border-radius: 8px;-moz-border-radius:8px;-webkit-border-radius:8px;"><legend style="background:#E1E1E1;padding: 0.2em 0.5em;border:2px solid #999919;color:red;font-size:14px;text-align:right;border-radius: 8px;-moz-border-radius:8px;-webkit-border-radius:8px"><blink><strong>Notice</strong></blink></legend><br/><font color="darkred" size="3"><strong>Text : </strong></font><font color="black"> $1</font><br /><br /></fieldset>

Example:
[notice]Your Text[/notice]

Be sure to upload the folder post-deco to your images folder..

In above codes we have <blink> command that not work in explorer . if you want see blink in explorer , insert below codes in footer template .
<SCRIPT>
<!--
function doBlink() {
    var blink = document.all.tags("BLINK")
    for (var i=0; i<blink.length; i++)
       blink[i].style.visibility = blink[i].style.visibility == "" ? "hidden" : ""
}

function startBlink() {
    if (document.all)
       setInterval("doBlink()",1000)
}
window.onload = startBlink;
// -->
</SCRIPT>

New Blink script for FireFox 23
<script>
function blink() {
  var tags = document.getElementsByTagName('blink');
  for (var i = 0; i < tags.length; i++) {
    var b = tags[i].style;
    b.visibility = b.visibility == 'hidden' ? 'visible' : 'hidden';
  };
}
setInterval(blink, 500);
</script>

Have fun . Big Grin
[attachment=29454]
[attachment=29444]