Coding-Spot

You are not connected. Please login or register

 
 

Thanked Message

Message (Page 1 of 1)


 
Advance Member

Posted on Fri Apr 26, 2013 8:22 am

 
Hello ! :)
I want to ask how can i make that when someone press on thanks button a picture or a text that i made will appear in the post i thanked ?
(Not Buttons)
Thanks



View user profile http://www.iron-players.forumhe.com



 
Administrator
Administrator

Posted on Fri Apr 26, 2013 8:25 am

 
What do you mean? I don't get it. Can you explain it more? Sorry. :):



View user profile http://coding-spot.darkbb.com



 
Advance Member

Posted on Fri Apr 26, 2013 8:30 am

 
Like in forumotion u thank someone and a text with 2 stars appears try it ...



View user profile http://www.iron-players.forumhe.com



 
Administrator
Administrator

Posted on Fri Apr 26, 2013 8:49 am

 
Ok, i see. Give this a try: (Add this to your Javascript management, check 'In the topics' only)
Code:
var CopyrightNotice = 'New thank-you system for forumotion PunBB boards. Copyright © 2012 by Dion Designs. All Rights Reserved. Use and/or modification of this script is allowed, provided this entire copyright notice remains in the original or modified script. Distribution is not allowed without written consent from Dion Designs.';
$(function() {
    $('.post[style="background-color:#;"] .post-options').prepend('<div style="height:32px;line-height:36px;color:#740;font-size:16px;font-weight:bold;text-align:center"><img style="vertical-align:top" src="http://cdn.iconfinder.net/data/icons/Basic_set2_Png/32/star1.png" />  The topic starter thanks you, '+$('.post[style="background-color:#;"] .user-ident').text()+'!  <img style="vertical-align:top" src="http://cdn.iconfinder.net/data/icons/Basic_set2_Png/32/star1.png" /></div>');
});



View user profile http://coding-spot.darkbb.com



 
Advance Member

Posted on Fri Apr 26, 2013 9:02 am

 
Nothing happened for me



View user profile http://www.iron-players.forumhe.com



 
Administrator
Administrator

Posted on Fri Apr 26, 2013 9:09 am

 
Oh you're using phpbb2? Try this one:
Code:
$(function () {
      var x = $('.post .row2:nth(1)').get();
      for (i = 0; i < x.length; i++) {
          if (x[i].getAttribute('style') == "background-color:#0095ff;") {
            x[i].style.backgroundColor = '';
            x[i].parentNode.firstChild.style.backgroundColor = '';
            x[i].parentNode.nextSibling.getElementsByTagName('td')[0].style.backgroundColor = '';
            x[i].parentNode.nextSibling.getElementsByTagName('td')[1].style.backgroundColor = '';
            var stars = document.createElement('div');
            stars.setAttribute('style', 'text-align: center;');
            stars.innerHTML = '<hr><div style="padding-top:2px; height:32px;  line-height:36px;  color:#740;  font-size:16px;  font-weight:bold;  text-align:center;"><img style="vertical-align:top" src="http://cdn.iconfinder.net/data/icons/Basic_set2_Png/32/star1.png">  The topic starter thanks you! <img style="vertical-align:top" src="http://cdn.iconfinder.net/data/icons/Basic_set2_Png/32/star1.png"></div>';
            x[i].appendChild(stars);
          }
      }
    });

And can you show a topic that you thanked. Thanks!



View user profile http://coding-spot.darkbb.com



 
Advance Member

Posted on Fri Apr 26, 2013 11:55 am

 
Nothing



View user profile http://www.iron-players.forumhe.com



 
Administrator
Administrator

Posted on Fri Apr 26, 2013 12:16 pm

 
Ok, put this on your JS Management (Topics only):
Code:
var CopyrightNotice = 'New thank-you system for forumotion phpBB3 boards. Copyright © 2012 by Dion Designs. All Rights Reserved. Use and/or modification of this script is allowed, provided this entire copyright notice remains in the original or modified script. Distribution is not allowed without written consent from Dion Designs.';
$(function() {
    $('td.row2[style="background-color:#;"] div.clear').after('<div style="height:32px;line-height:36px;color:#740;font-size:16px;font-weight:bold;text-align:center"><hr /><img style="vertical-align:top" src="http://icons.iconarchive.com/icons/iconshock/christmas/48/star-icon.png" />  The topic starter thanks you!  <img style="vertical-align:top" src="http://icons.iconarchive.com/icons/iconshock/christmas/48/star-icon.png" /></div>');
});

That should work already. :D:
Don't mind the copyrightnotice: phpbb3 boards, i don't want to edit that since it is a credits and notice. :):



View user profile http://coding-spot.darkbb.com



 
Advance Member

Posted on Fri Apr 26, 2013 12:18 pm

 
http://iron-players.forumhe.com/t204-choose-one-nubs
And Nothing



View user profile http://www.iron-players.forumhe.com



 
Administrator
Administrator

Posted on Fri Apr 26, 2013 4:42 pm

 
Try this, should work now:
Code:
var CopyrightNotice = 'New thank-you system for forumotion phpBB3 boards. Copyright © 2012 by Dion Designs. All Rights Reserved. Use and/or modification of this script is allowed, provided this entire copyright notice remains in the original or modified script. Distribution is not allowed without written consent from Dion Designs.';
$(function() {
    $('td.row2 div.postbody div.clear').after('<div style="height:32px;line-height:36px;color:#740;font-size:16px;font-weight:bold;text-align:center"><hr /><img style="vertical-align:top" src="http://icons.iconarchive.com/icons/iconshock/christmas/48/star-icon.png" />  The topic starter thanks you!  <img style="vertical-align:top" src="http://icons.iconarchive.com/icons/iconshock/christmas/48/star-icon.png" /></div>');
});



View user profile http://coding-spot.darkbb.com



 
Advance Member

Posted on Fri Apr 26, 2013 5:00 pm

 
Thanks :):
Solved



View user profile http://www.iron-players.forumhe.com



 
Administrator
Administrator

Posted on Fri Apr 26, 2013 5:19 pm

 
Since the problem is solved, i'll locked this and move to archive section.
~ Locked and Moved



View user profile http://coding-spot.darkbb.com


#13

Sponsored content


 

Posted Today at 11:51 am

 





Message (Page 1 of 1)

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

In total there is 0 user online :: 0 Registered, 0 Hidden and 0 Guests

Users browsing this forum: None