The forum of the forums
Welcome to the Official Support Forum of Forumotion!

To take full advantage of everything offered by our forum, please log in if you are already a member, or join our community if you've not yet.



Create a free forum like this one.

thanks message

View previous topic View next topic Go down

Solved thanks message

Post by smurfavr on June 20th 2017, 8:46 am

Banner with the message inscription moved to the left. How do I do it in the middle as it was before? I did not do anything in the admin panel, and the problem came up on my own.



Code:
$(function() {
  var message = function(child, parent) {
        var pseudo = $(child, parent).text(),
            icon = '<img src="http://i86.servimg.com/u/f86/16/34/78/03/fa_sta13.png" alt=""/>';
   
        return '<div id="fa_thanks_message">' + icon + ' Автора на темата благодари за този отговор на ' + pseudo + '  ' + icon + '</div>';
      },
     
      version = $('.bodylinewidth')[0] ? 0 : document.getElementById('wrap') ? 1 : $('.pun')[0] ? 2 : document.getElementById('ipbwrapper') ? 3 : 'badapple', // version check
      node = document.createElement(version ? 'DIV' : 'TR'),
      post = $(version ? 'div.post' : 'tr.post'),
      j = post.length,
      i = 0;
 
  if (version == 'badapple') {
    if (window.console) console.error('This plugin is not optimized for your forum version. Please contact the support for further assistance.');
    return;
  }
 
  node.id = 'fa_thanks'; // id for style modifications
  if (!version) node.innerHTML = '<td colspan="2"></td>'; // phpbb2 must have a cell as the child node
 
  for (; i < j; i++) {
   
    if ((version ? post[i] : post[i].firstChild).style.backgroundColor) { // thanked posts have the backgroundColor style property
     
      post[i].className += ' thanked'; // mark the thanked post with a class
      (version ? node : node.firstChild).innerHTML = message(['.name', 'dl > dt > strong', '.username', '.popmenubutton'][version], post[i]); // thanks message
     
      switch (version) {
       
        case 0 : // phpbb2
          node.firstChild.style.backgroundColor = post[i].firstChild.style.backgroundColor;
          node.firstChild.className = post[i].firstChild.className;
          post[i].parentNode.insertBefore(node, post[i].nextSibling);
          break;
         
        case 1 : // phpbb3
          post[i].firstChild.insertBefore(node, post[i].firstChild.lastChild.previousSibling);
          break;
         
        case 2 : // punbb
          node.className = 'postfoot';
          node.style.margin = '0';
          post[i].appendChild(node);
          break;
         
        case 3 : // invision
          node.className = 'post-footer';
          node.style.backgroundColor = post[i].style.backgroundColor;
          post[i].appendChild(node);
          break;
       
      }
     
      break; // break out of the for loop when the thanked post is found
    }
   
  }
});


Code:
#fa_thanks_message {
  color:#280;
  font-size:13px;
  font-weight:bold;
  text-align:center;
  background-color:#5DF213;
  border:1px solid #2CE823;
  border-radius:6px;
  padding:6px;
  margin:6px 0;
  position:relative;
  left:calc( 45% - 150px );
  width: 540px;
}
fa_thanks_message img { vertical-align:middle }
.marquee a {
  word-break:break-word;
}


Last edited by smurfavr on June 22nd 2017, 6:14 am; edited 1 time in total
avatar
smurfavr
Active Poster

Male Posts : 1546
Reputation : 13
Language : Bulgarian

http://smurfa.bulgarianforum.net/

Back to top Go down

Solved Re: thanks message

Post by Wolfuryo on June 20th 2017, 10:54 am

I took a look at your forum and the signature looks centered to me.
avatar
Wolfuryo
Forumember

Posts : 349
Reputation : 92
Language : Romanian and English

http://board.realmsn.com

Back to top Go down

Solved Re: thanks message

Post by skouliki on June 20th 2017, 10:58 am

it is centered to me also

avatar
skouliki
Graphic Designer
Graphic Designer

Female Posts : 2685
Reputation : 402
Language : English,Greek
Location : Greece

http://iconskouliki.forumgreek.com

Back to top Go down

Solved Re: thanks message

Post by smurfavr on June 20th 2017, 2:12 pm

The problem was in that order. margin:6px 0; <------>margin:6px auto;
avatar
smurfavr
Active Poster

Male Posts : 1546
Reputation : 13
Language : Bulgarian

http://smurfa.bulgarianforum.net/

Back to top Go down

Solved Re: thanks message

Post by brandon_g on June 22nd 2017, 9:02 am

Topic solved & archived ~ brandon_g
Please read our forum rules: ESF General Rules


Remember to mark your topic when a solution is found.
avatar
brandon_g
Support Moderator
Support Moderator

Male Posts : 5792
Reputation : 538
Language : English
Location : USA

http://broadcastingduo.forumotion.com/

Back to top Go down

View previous topic View next topic Back to top


 
Permissions in this forum:
You cannot reply to topics in this forum