Good art is a taste, good design is an opinion.


Come as guest, stay as family.
Board Index

Come as guest, stay as family.


You are not connected. Please login or register

Foto

[Solved] How to add Best answer ?



View previous topic View next topic Go down Message [Page 1 of 1]

1
Offline

  Ethen

avatar
Punbb Rookie
Punbb Rookie
Details:
How to add best answer ???

Your Forum Address:
http://bitcoding.forumz.ro/

Forum Version:
PunBB

Powered by PunBB
Currently 0 users have thanked Ethen for this post:

2
Offline

  nanako

avatar
Punbb Guru
Punbb Guru
admin panel > modules > Points and reputation > reputation > activate "thanks" button then choose yes, save and done

Powered by PunBB
Currently 0 users have thanked nanako for this post:

3
Offline

  Zyon

avatar
Punbb Guru
Punbb Guru
Hello

Is this solved?

Powered by PunBB
Currently 0 users have thanked Zyon for this post:

4
Offline

  Ethen

avatar
Punbb Rookie
Punbb Rookie
Hey, no is not solved Sad what is HTML code ?

Powered by PunBB
Currently 0 users have thanked Ethen for this post:

5
Offline

  Zyon

avatar
Punbb Guru
Punbb Guru
You think for thank message like on this forum?

Powered by PunBB
Currently 0 users have thanked Zyon for this post:

6
Offline

  Zyon

avatar
Punbb Guru
Punbb Guru
You think for thank message like on this forum?

Powered by PunBB
Currently 0 users have thanked Zyon for this post:

7
Offline

  Ethen

avatar
Punbb Rookie
Punbb Rookie
Yes I would like something like this forum

Powered by PunBB
Currently 0 users have thanked Ethen for this post:

8
Offline

  nanako

avatar
Punbb Guru
Punbb Guru
This only works on punbb.

On [ic]viewtopic_body[/ic], copy it then remove it:
Code:
<div id="p{postrow.displayed.U_POST_ID}" class="posthead"{postrow.displayed.THANK_BGCOLOR}>
<span style="float:right; font-size: 12px;"><a href="{postrow.displayed.POST_URL}">#{postrow.displayed.COUNT_POSTS}</a></span>
<h4 class="username"><span class="creator">{postrow.displayed.POSTER_NAME}</span> <span style="margin-left: 5px; margin-top: -3px;">{postrow.displayed.ONLINE_IMG}</span></h4>
</div>
Place the copied code below this code
Code:
<div class="post post--{postrow.displayed.U_POST_ID}"{postrow.displayed.THANK_BGCOLOR} style="{postrow.displayed.DISPLAYABLE_STATE}">
Again copy this and remove it
Code:
<p style="color: #a4a4a4; font-size: 12px;">Posted <span class="data-post">{postrow.displayed.POST_DATE_NEW}</span></p>
Then place it below this
[ic]<div class="post-entry">[/ic]
Add this to your css
Code:
.icon {
    max-height: 8px;
    vertical-align: baseline;
}
.post_feature_box {
      margin-top: 5px;
      max-width:100%;
      background-color: rgb(234, 248, 226);
      border: 1px dotted rgb(51, 51, 51);
      padding: 6px;
      min-height: 60px;
}
Then add this to your javascript, all pages
Code:
$(function(){
        $('.posthead[style="background-color:#eaf8e2;"]').append('<div id="best-res" class="answerBadgeInPost">✓  Best Answer</div>').attr('style','background-image: -moz-linear-gradient(top, rgba(255,255,255,0.3) 0%, rgba(255,255,255,0) 100%);background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0%,rgba(255,255,255,0.3)), color-stop(100%,rgba(255,255,255,0)));
    background-image: -webkit-linear-gradient(top, rgba(255,255,255,0.3) 0%,rgba(255,255,255,0) 100%);background-image: -o-linear-gradient(top, rgba(255,255,255,0.3) 0%,rgba(255,255,255,0) 100%);background-image: -ms-linear-gradient(top, rgba(255,255,255,0.3) 0%,rgba(255,255,255,0) 100%);background-image: linear-gradient(to bottom, rgba(255,255,255,0.3) 0%,rgba(255,255,255,0) 100%);-webkit-box-shadow: inset rgba(255,255,255,0.35) 0px 1px 0px;-moz-box-shadow: inset rgba(255,255,255,0.35) 0px 1px 0px;box-shadow: inset rgba(255,255,255,0.35) 0px 1px 0px;background: #dfedd1;text-shadow: rgba(255,255,255,0.8) 0px 1px 0px;border: 1px solid #accf8b;');
        var topicauthor = $('.posthead #best-res').parents('.posthead').find('.creator').html();
        var topicavatar = $('.post #best-res').parents('.post').find('.postmain .postbody .user .user-ident .user-basic-info a img').attr('src');
        var urlavt= $('.post best-res').parents('.post').find('.postmain .postbody .user .user-ident .user-basic-info a').attr('href');
        var topicpost = $('.posthead #best-res').parents('.posthead').find('a.post-number').attr('href');
        var topicdata = $('.post #best-res').parents('.post').find('span.data-post').html();
        var bestTopic = $('.post #best-res').parents('.post').find('.entry-content').html();
    if($('#best-res').length){
        $('.main.paged').before('<div class="post_feature_box">
    <span class="ipsUserPhoto"><img src="'+topicavatar+'" /></span>
    <span class="ipsBadgee">Best Answer</span> '+topicauthor+'
 - '+topicdata+'<div style="border: 1px solid #ddd; border-bottom: 1px solid #ececec; margin: 3px;"></div><div style="display: inline-block;">'+bestTopic+'</div>   <a href="'+topicpost+'">
            <span class="ipsBadgee" style="background: #B3B3B3;font-weight: normal !important;">Go to the full post  <img class="icon" src="http://i.imgur.com/omzqZnf.png"></span></a>
    </div>');}
        });
Go to Admin panel > Pictures and Colors > Colors > Background Colors section then set Thanked message background color to this color [ic]#eaf8e2[/ic]

*credits to coding-spot

Powered by PunBB
Currently 0 users have thanked nanako for this post:

9
Offline

  Shadow

avatar
Administrator
Administrator
Solved & Locked.

Powered by PunBB
Currently 0 users have thanked Shadow for this post:

View previous topic View next topic Back to top Message [Page 1 of 1]


Topic URL's

URL
BBcode
HTML

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