vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3 Articles (https://vborg.vbsupport.ru/forumdisplay.php?f=187)
-   -   How to turn the "Post Thank You" hack into a "Likes" system similar to vBulletin.org (https://vborg.vbsupport.ru/showthread.php?t=266358)

Glynn58 02-03-2013 08:52 AM

Thank you really chuffed with this.....

Raptor 02-23-2013 01:44 AM

Quote:

Originally Posted by viper357 (Post 2237570)
Hi Joe, small problem, everything works 100% but as soon as I do the above edit, I get a blank page on any link except for my vbadvanced home page. If I undo the edit it makes no difference until I re-upload the xml file (which I assume then replaces the small plugin), then the forum works again. Any idea's? I'm desperate to have this display within the posts. ;)

any clues how to get this template edit working with vb 4.2 ?

https://vborg.vbsupport.ru/showpost....postcount=1948

smirkley 03-04-2013 02:43 AM

Quote:

Originally Posted by Foxtrotelite (Post 2394998)
How can I move the like box into the post for 4.2? I have tried a couple code edits, but can't get it to work. I'm not sure if I'm just missing something simple or what.

Seconded !!


Nevermind,... FOUND IT !!
https://vborg.vbsupport.ru/showpost....postcount=1948

--------------- Added [DATE]1362454549[/DATE] at [TIME]1362454549[/TIME] ---------------

OK, have this looking great now inside my post box above the signature area.

Does anybody know of how I can force it down to the bottom to reside just above my siggy area? Just doesnt look right located all the way up under the post text, with a big space below between the siggy.

smirkley 03-05-2013 03:16 AM

OK,..figured out how to force to bottom of post box right above siggy,.. in postbit legacy template

find
Code:

<vb:if condition="$show['postedited'] || $post['signature']">
add above
Code:

<div class="after_content">{vb:raw template_hook.postbit_messagearea_end}</div>
Of course it still shows up just above edit statement if applicable, but I rather have the box on the bottom but above siggy area. This was the easiest way for me.

--------------- Added [DATE]1362527876[/DATE] at [TIME]1362527876[/TIME] ---------------

Quote:

Originally Posted by MrSeth (Post 2380399)
Install went great thanks for everyone's input.

I would like to ask for some help on these two things..

1. removing the white space in the like box.



http://ilovesmallies.com/likehelp.jpg

Me too. I have dug n dug and cant resolve this white space issue either.

Armee25 03-06-2013 05:07 PM

I'd like to get an answer to the white space issue mentioned above please :)

Armee25 03-09-2013 12:50 AM

Please? :) anyone?

Simon Lloyd 03-10-2013 12:43 PM

Have you turned on the template naming in general options in admincp and then looked at the sorce code to see what is being used there?, it could be a <br /> tag or padding...etc in css.

edgeless 03-12-2013 08:16 PM

My version is 4.2.0. The Post Thank You Hack version is 7.8.4. I have not changed "Thanks" to "Like", but I've been trying to get the Thanks box to appear inside of the post bodies. I've however only succeeded in getting it to disappear completely. When I reverse my code changes the box reappears but it's of course not within the post bodies. It's back between the posts, since everything has been reverted.

I'd very much appreciate it if someone could tell me where I'm going wrong. Below are the changes I've been making, after which the box just goes away.

I change the contents of post_thanks_box to:

Code:

<div <vb:if condition="!$post_thanks_box == 1"> style="background-color: #f2f6f8; border: 1px ridge #417394; border-width: 1px 1px 1px 1px; padding: 2px; width:92%; margin:

0px auto 0px auto; -webkit-border-radius: 5px; -moz-border-radius: 5px; border-radius: 5px; margin-top:10px; margin-bottom:0px;display:none" <vb:else />
style="background-color: #f2f6f8; border: 1px ridge #417394; border-width: 1px 1px 1px 1px; padding: 2px; width:92%; margin: 0px auto 0px auto; -webkit-border-radius: 5px; -

moz-border-radius: 5px; border-radius: 5px; margin-top:10px; margin-bottom:0px;"
</vb:if> id="post_thanks_box_{vb:raw post.postid}">
{vb:raw post_thanks_box}
</div>


In postbit_display_complete I change this:

Code:

$template_hook['postbit_end'] .= $templater->render();

to this:

Code:

$template_hook['postbit_messagearea_end'] .= $templater->render();

and in postpit_legacy I change this:

Code:

                <div class="postbody">
                        <div class="postrow<vb:if condition="$show['postedited'] || $post['signature']"> has_after_content</vb:if>">
                                {vb:raw template_hook.postbit_messagearea_start}
                                <vb:if condition="$post['title'] OR $show['messageicon']">
                                <h2 class="title icon">
                                        <vb:if condition="$show['messageicon']"><img src="{vb:raw post.iconpath}" alt="{vb:raw post.icontitle}" /> </vb:if>{vb:raw post.title}
                                </h2>
                                </vb:if>


to this:

Code:

                <div class="postbody">
                        {vb:raw template_hook.postbit_messagearea_start}
                        <div class="postrow<vb:if condition="$show['postedited'] || $post['signature']"> has_after_content</vb:if>">
                                <vb:if condition="$post['title'] OR $show['messageicon']">
                                <h2 class="title icon">
                                        <vb:if condition="$show['messageicon']"><img src="{vb:raw post.iconpath}" alt="{vb:raw post.icontitle}" /> </vb:if>{vb:raw post.title}
                                </h2>
                                </vb:if>


And there's apparently no postbit_display_start in this version so I can't modify that.

But why am I not able to move the box into the post body? What am I missing?

Thanks in advance.

edgeless 03-15-2013 06:42 PM

It would be very nice if someone could provide an adaptation of the modifications herein to function on version 4.2.0, both for the 'thanks' to 'likes' part and for the migration of the thanks/likes box into the message body part. The code within some of the 4.2.0 templates is apparently different from that in previous releases of version 4.

Edit: As far as changing 'Thanks' to 'Likes', it seems that simply doing the phrase search and replace for each of the named phrases in post #1, in addition to changing post_thanks_thanks from 'Thanks' to 'Like' (for the button label), did the trick for me. I only hope I'm not going to experience any complications without having done anything else. One problem I've already noticed is that the 'Thanks' stats field is now labeled 'Like' as opposed to 'Likes'. But if I change the text in the post_thanks_thanks phrase to 'Likes', then the button label also changes to 'Likes' when it should be 'Like'.

Addendum: I've fixed it. I just created a post_thanks_like phrase containing the text 'Like' and then changed the post_thanks_thanks reference (in the post_thanks_button template) to post_thanks_like. Next, I changed the text in post_thanks_thanks back to 'Likes' and everything now displays correctly.

uninvited13th 04-05-2013 09:10 AM

Possible??

Quote:

The following members like this post: member1, member2, member3, member4, member5 and 36 others.
and when the "36 others" is clicked, it will expand with ajax..

Max Taxable 10-19-2013 05:02 PM

After much study and trepidation, I partially installed this. I was afraid to go the full monty and kept the phrases as they were, and also did not do the template modifications to postbit_legacy since mine is highly modified as it is and I didn't want to take a chance on messing it up.

I also kept the same thanks buttons, opting to point to those instead of new images for the "like" button.

Installed this way in three of my most used styles - looks great, works great and really cleans up postbit compared to the standard way this was handled in the original "post thanks" Mod.

Thanks BoP5!

Black Snow 10-30-2013 03:28 PM

I have already done all of this on vB 4.2.0. All "Thanks" phrases changed to "Likes" and the thanks box inside the post at the bottom. It is simple and pretty straight forward.

--------------- Added [DATE]1383147381[/DATE] at [TIME]1383147381[/TIME] ---------------

Quote:

Originally Posted by edgeless (Post 2409577)
In postbit_display_complete I change this:

Code:

$template_hook['postbit_end'] .= $templater->render();

to this:

Code:

$template_hook['postbit_messagearea_end'] .= $templater->render();

and in postpit_legacy I change this:

Code:

                <div class="postbody">
                        <div class="postrow<vb:if condition="$show['postedited'] || $post['signature']"> has_after_content</vb:if>">
                                {vb:raw template_hook.postbit_messagearea_start}
                                <vb:if condition="$post['title'] OR $show['messageicon']">
                                <h2 class="title icon">
                                        <vb:if condition="$show['messageicon']"><img src="{vb:raw post.iconpath}" alt="{vb:raw post.icontitle}" /> </vb:if>{vb:raw post.title}
                                </h2>
                                </vb:if>


to this:

Code:

                <div class="postbody">
                        {vb:raw template_hook.postbit_messagearea_start}
                        <div class="postrow<vb:if condition="$show['postedited'] || $post['signature']"> has_after_content</vb:if>">
                                <vb:if condition="$post['title'] OR $show['messageicon']">
                                <h2 class="title icon">
                                        <vb:if condition="$show['messageicon']"><img src="{vb:raw post.iconpath}" alt="{vb:raw post.icontitle}" /> </vb:if>{vb:raw post.title}
                                </h2>
                                </vb:if>


And there's apparently no postbit_display_start in this version so I can't modify that.

But why am I not able to move the box into the post body? What am I missing?

Thanks in advance.

Lulz, run a quick search in your postbit_legacy for "postbit_messagearea_end". You will see that you have not added this to your postbit_legacy template:
Code:

{vb:raw template_hook.postbit_messagearea_end}
That would be why the box disappears :p

Max Taxable 11-06-2013 02:01 AM

I went the rest of the way - everything except changing the phrases. It's excellent, really classes up the postbit.


https://vborg.vbsupport.ru/external/2013/11/20.jpg

Black Snow 11-08-2013 05:53 PM

Nice Max. Want to share your templates for others? Looks like you done a better job than I did.

Max Taxable 11-08-2013 06:04 PM

Quote:

Originally Posted by Black Snow (Post 2459160)
Nice Max. Want to share your templates for others? Looks like you done a better job than I did.

Thanks but, I just followed Bop5's instructions to the letter, except for changing the phrases.

I was afraid to edit "postbit_legacy" because mine is highly customized, with the collapsible "Additional Info" bar that hides user stats and reputation - stolen from the native vBulletin "forum rules" bit and repurposed... Plus alot of other little tweaks here and there. But saving the entire template in a text file gave me the confidence that I could readily revert any bad changes.

There's a good version of that collapsible feature HERE if you want to look it over and maybe try it. I had repurposed the native bit for my use, before finding this one.

Max Taxable 11-11-2013 11:12 AM

Quote:

Originally Posted by Black Snow (Post 2459160)
Nice Max. Want to share your templates for others? Looks like you done a better job than I did.

Here it is in another highly customized style:

https://vborg.vbsupport.ru/external/2013/11/12.jpg


The "thumbs up" icon is the "Like" button.

Max Taxable 11-13-2013 04:37 PM

Quote:

Originally Posted by BirdOPrey5 (Post 2217355)
However there is one more template edit I did to keep the Like Box inside the post but at the very bottom of it regardless how short the post might be. In this case we must edit the postbit_legacy template.

Find in postbit_legacy:

Code:

<td class="alt2" width="175" style="border: $stylevar[cellspacing]px solid $stylevar[tborder_bgcolor]; border-top: 0px; border-bottom: 0px">
Change it to:

Code:

<td class="alt2" rowspan="2" width="175" style="border: $stylevar[cellspacing]px solid $stylevar[tborder_bgcolor]; border-top: 0px; border-bottom: 0px">
Find:

Code:

$template_hook[postbit_signature_end]
And delete it.

Find:

Code:

                <!-- / edit note -->
                </if>

        </td>
</tr>


Add BELOW it:

Code:

<tr>
<td class="alt1" valign="bottom">
$template_hook[postbit_signature_end]
</td>
</tr>

----

And that should do it.

I have tried and tried, and I cannot make this part of it work with one of my custom styles. Here is the offending postbit_legacy template:

HTML Code:

$template_hook[postbit_start]
<div class="forbg">
      <div class="forlp">
      <div class="forrp">
            <div style="float:right;padding:6px 120px 0 0;" $post[scrolltothis]><if condition="$show['postcount']">#<a href="showpost.php?$session[sessionurl]p=$post[postid]&amp;postcount=$post[postcount]" target="new" rel="nofollow" id="postcount$post[postid]" name="$post[postcount]"><strong>$post[postcount]</strong></a></if>
                        <if condition="$show['inlinemod']">
                                <input type="checkbox" name="plist[$postid]" id="plist_$postid" style="vertical-align:middle; padding:0px; margin:0px 0px 0px 5px" value="$post[checkbox_value]" /></if> </div>

            <div class="fortitels"> <!-- status icon and date -->
                        <img class="inlineimg" src="$stylevar[imgdir_statusicon]/post_$post[statusicon].gif" alt="$post[statustitle]" border="0" />
                        $post[postdate]<if condition="!$show['detailedtime']">, $post[posttime]</if>
                        $post[firstnewinsert]
                        <!-- / status icon and date -->                </div>
      </div>
      </div>
</div>
<div class="c_pborder_left">
      <div class="c_pborder_right">



<table id="post$post[postid]" class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="0" border="0" width="100%" align="center">
<tr valign="top">
        <td class="alt2" width="175" style="background: url('/designs/radio/pbg.gif');">
                        <a name="post$post[postid]"> </a>
                        <div id="postmenu_$post[postid]">
                                <if condition="$show['profile']">
                                <a class="bigusername" href="member.php?$session[sessionurl]u=$post[userid]">$post[musername]</a>
                                <script type="text/javascript"> vbmenu_register("postmenu_$post[postid]", true); </script>
                                <else />
                                $post[musername]
                                </if>
                        </div>
                       
                        <if condition="$post['usertitle']"><div class="smallfont">$post[usertitle]</div></if>
                        <if condition="$post['rank']"><div class="smallfont">$post[rank]</div></if>
                            $template_hook[postbit_userinfo_left]
                        <if condition="$show['avatar'] AND $show['member']">
                                <div class="smallfont">
                                        &nbsp;<br /><a href="member.php?$session[sessionurl]u=$post[userid]"><img src="$post[avatarurl]" $post[avwidth] $post[avheight] alt="<phrase 1="$post[username]">$vbphrase[xs_avatar]</phrase>" border="0" /></a>
                                </div>
                        </if>
                       
                        <div class="smallfont">
                                &nbsp;<br /><table class="tborder" cellspacing="1" border="0" width="100%">
<tbody>
<tr>
                <td class="thead">
                        <a style="float:$stylevar[right]" href="#top" onclick="return toggle_collapseuserinfo('postbit_legacy_userinfo<if condition="THIS_SCRIPT=='showthread' OR THIS_SCRIPT=='showpost'">$post[postcount]<else />99</if>')"><img id="collapseimg_postbit_legacy_userinfo<if condition="THIS_SCRIPT=='showthread' OR THIS_SCRIPT=='showpost'">$post[postcount]<else />99</if>"src="$stylevar[imgdir_button]/collapse_thead$vbcollapse[collapseimg_postbit_legacy_userinfo].gif" alt="" border="0"/></a>$vbphrase[collapse_postbit]
                </td>
        </tr>
</tbody>
<tbody id="collapseobj_postbit_legacy_userinfo<if condition="THIS_SCRIPT=='showthread' OR THIS_SCRIPT=='showpost'">$post[postcount]<else />99</if>" style="$vbcollapse[collapseobj_postbit_legacy_userinfo]"><tr><td class="alt2">
                                <if condition="$post['joindate']"><div>$vbphrase[join_date]: $post[joindate]</div></if>
                                <if condition="$post['field2']"><div>$vbphrase[location_perm]: $post[field2]</div></if>
                                <if condition="$post['age']"><div>$vbphrase[age]: $post[age]</div></if>
                                <div>
                                        $vbphrase[posts]: $post[posts]
                                </div>$template_hook[postbit_userinfo_right_after_posts]
                                <if condition="$show['infraction']"><div>$vbphrase[infractions]: $post[warnings]/$post[infractions] ($post[ipoints])</div></if>
                                <if condition="$show['reputation']"><div><if condition="$show['reppower']">$vbphrase[reppower]: <span id="reppower_$post[postid]_$post[userid]">$post[reppower]</span> </if><span id="repdisplay_$post[postid]_$post[userid]">$post[reputationdisplay]</span></div></if>
$template_hook[postbit_userinfo_right]
                                <div>$post[icqicon] $post[aimicon] $post[msnicon] $post[yahooicon] $post[skypeicon]</div></td></tr></tbody></table>
                        </div>                                       
               
        </td>
        <if condition="$show['moderated']">
        <td class="alt2" id="td_post_$post[postid]">
        <else />
        <td class="alt1" id="td_post_$post[postid]">
        </if>
                $template_hook[postbit_messagearea_start]
                <if condition="$show['messageicon'] OR $post['title']">
                        <!-- icon and title -->
                        <div class="smallfont">
                                <if condition="$show['messageicon']"><img class="inlineimg" src="$post[iconpath]" alt="$post[icontitle]" border="0" /></if>
                                <if condition="$post['title']"><strong>$post[title]</strong></if>
                        </div>
                        <hr size="1" style="color:$stylevar[tborder_bgcolor]" />
                        <!-- / icon and title -->
                </if>
               
                <!-- message -->
                <div id="post_message_$post[postid]">$ad_location[ad_showthread_firstpost_start] $post[message]</div>
                <!-- / message -->
       
                <if condition="$show['attachments']">
                <!-- attachments -->
                        <div style="padding:$stylevar[cellpadding]px">
                       
                        <if condition="$show['thumbnailattachment']">
                                <fieldset class="fieldset">
                                        <legend>$vbphrase[attached_thumbnails]</legend>
                                        <div style="padding:$stylevar[formspacer]px">
                                        $post[thumbnailattachments]
                                        </div>
                                </fieldset>
                        </if>
               
                        <if condition="$show['imageattachment']">
                                <fieldset class="fieldset">
                                        <legend>$vbphrase[attached_images]</legend>
                                        <div style="padding:$stylevar[formspacer]px">
                                        $post[imageattachments]
                                        </div>
                                </fieldset>
                        </if>
                       
                        <if condition="$show['imageattachmentlink']">
                                <fieldset class="fieldset">
                                        <legend>$vbphrase[attached_images]</legend>
                                        <table cellpadding="0" cellspacing="$stylevar[formspacer]" border="0">
                                        $post[imageattachmentlinks]
                                        </table>
                                        </fieldset>
                        </if>
                       
                        <if condition="$show['otherattachment']">
                                <fieldset class="fieldset">
                                        <legend>$vbphrase[attached_files]</legend>
                                        <table cellpadding="0" cellspacing="$stylevar[formspacer]" border="0">
                                        $post[otherattachments]
                                        </table>
                                </fieldset>
                        </if>
                       
                        <if condition="$show['moderatedattachment']">
                                <fieldset class="fieldset">
                                        <legend>$vbphrase[attachments_pending_approval]</legend>
                                        <table cellpadding="0" cellspacing="$stylevar[formspacer]" border="0">
                                        $post[moderatedattachments]
                                        </table>
                                </fieldset>               
                        </if>
                       
                        </div>
                <!-- / attachments -->
                </if>
                       
        $template_hook[postbit_signature_start]
                <if condition="$post['signature'] AND !$vboptions['shownsigs'][$post[userid]] AND $vboptions['shownsigs'][$post[userid]] = true">
                <!-- sig -->
                        <div>
                                __________________<br />
                                $post[signature]
                        </div>
                <!-- / sig -->
                </if>
                       
        $template_hook[postbit_signature_end]
                <if condition="$show['postedited']">
                <!-- edit note -->
                        <div class="smallfont">
                                <hr size="1" style="color:$stylevar[tborder_bgcolor]; background-color:$stylevar[tborder_bgcolor]" />
                                <em>
                                        <if condition="$show['postedithistory']">
                                                <phrase 1="$post[edit_username]" 2="$post[edit_date]" 3="$post[edit_time]" 4="posthistory.php?$session[sessionurl]p=$post[postid]">$vbphrase[last_edited_link_by_x_on_y_at_z_postid]</phrase>
                                        <else />
                                                <phrase 1="$post[edit_username]" 2="$post[edit_date]" 3="$post[edit_time]">$vbphrase[last_edited_by_x_on_y_at_z]</phrase>
                                        </if>
                                        <if condition="$post['edit_reason']">
                                                $vbphrase[reason]: $post[edit_reason]
                                        </if>
                                </em>
                        </div>
                <!-- / edit note -->
                </if>
       
        </td>
</tr>
<tr>
        <td class="alt2" width="175" style="background: url('/designs/radio/pbg.gif');">
                       
                <if condition="$show['infractionlink']"><a href="infraction.php?$session[sessionurl]do=report&amp;p=$post[postid]" rel="nofollow"><img class="inlineimg" src="$stylevar[imgdir_button]/infraction.gif" alt="<phrase 1="$post[username]">$vbphrase[add_infraction_for_x]</phrase>" border="0" /></a></if>
               
        <if condition="$show['moderated']">
        <td class="alt2" align="$stylevar[right]" style="border: $stylevar[cellspacing]px solid $stylevar[tborder_bgcolor]; border-$stylevar[left]: 0px; border-top: 0px">
        <else />
        <td class="alt1" align="$stylevar[right]" >
        </if>
                <!-- controls -->
<if condition="$post['editlink']">
              <img style="display: none" id="progress_$postid" src="$stylevar[imgdir_misc]/progress.gif" alt="$vbphrase[loading_editor_please_wait]" /> </if>

                <if condition="$post['forwardlink']">
                        <a href="$post[forwardlink]"><img src="$stylevar[imgdir_button]/forward.gif" alt="$vbphrase[forward_message]" border="0" /></a>
                </if>



                <if condition="$show['moderated']">
                        <img src="$stylevar[imgdir_misc]/moderated.gif" alt="$vbphrase[moderated_post]" border="0" />
                </if>
            <if condition="$show['spam']">
                <img src="$stylevar[imgdir_misc]/spam_detected.png" alt="$vbphrase[spam_post]" border="0" />
            </if>
            <if condition="$show['deletedpost']">
                <if condition="$show['managepost']">
                    <a href="postings.php?$session[sessionurl]do=managepost&amp;p=$post[postid]"><img src="$stylevar[imgdir_misc]/trashcan.gif" alt="$vbphrase[manage]" border="0" /></a>
                <else />
                    <img src="$stylevar[imgdir_misc]/trashcan.gif" alt="$vbphrase[deleted_post]" border="0" />
                </if>
            </if>

                <if condition="$show['redcard']">
                        <a href="infraction.php?$session[sessionurl]do=view&amp;p=$post[postid]"><img src="$stylevar[imgdir_button]/redcard.gif" alt="$vbphrase[received_infraction]" border="0" /></a>
                <else />
                        <if condition="$show['yellowcard']">
                                <a href="infraction.php?$session[sessionurl]do=view&amp;p=$post[postid]"><img src="$stylevar[imgdir_button]/yellowcard.gif" alt="$vbphrase[received_warning]" border="0" /></a>
                </if>
                        </if>$template_hook[postbit_controls]
                <!-- / controls -->
        </td>
</tr>
</table>$template_hook[postbit_end]

</div></div>
<div class="posb_t_bg">
      <div class="posb_t_right"><a href="$post[replylink]" rel="nofollow" id="qr_$post[postid]" onclick="return false" title="$vbphrase[quick_reply_to_this_message]"><span>$vbphrase[quick_reply_to_this_message]</span></a></div>
      <div class="posb_t_left"></div>
</div>
<div class="posb_b_bg"><div class="posb_b_7"></div><if condition="$show['reportlink']"><div class="posb_b_6"><a href="report.php?$session[sessionurl]p=$post[postid]" rel="nofollow"><img src="$stylevar[imgdir_button]/report.gif" alt="$vbphrase[report_bad_post]" border="0" /></a></div></if><if condition="$show['reputationlink']"><div class="posb_b_5"><span id="reputationmenu_$post[postid]"><a href="reputation.php?$session[sessionurl]p=$post[postid]" rel="nofollow" id="reputation_$post[postid]"><img src="$stylevar[imgdir_button]/reputation.gif" alt="<phrase 1="$post[username]">$vbphrase[add_to_xs_reputation]</phrase>" border="0" /></a></span></div><if condition="$show['popups']"><script type="text/javascript"> vbrep_register("$post[postid]")</script></if></if><if condition="$show['multiquote_post']"><div class="posb_b_5"><a href="$post[replylink]" rel="nofollow" onclick="return false"><img src="$stylevar[imgdir_button]/multiquote_<if condition="$show['multiquote_selected']">on<else />off</if>.gif" alt="$vbphrase[multi_quote_this_message]" border="0" id="mq_$post[postid]" /></a></div></if><div class="posb_b_5"><a href="$post[replylink]" rel="nofollow"><img src="$stylevar[imgdir_button]/<if condition="$post['forwardlink']">quote<else />quote</if>.jpg" alt="$vbphrase[reply_with_quote]" border="0" /></a></div><if condition="$post['editlink']"><div class="posb_b_4"><a href="$post[editlink]" name="vB::QuickEdit::$post[postid]"><img src="$stylevar[imgdir_button]/edit.gif" alt="$vbphrase[edit_delete_message]" border="0" /></a></div></if><div class="posb_b_1"></div><div class="posb_b_11"></div><div class="posb_b_2">$post[onlinestatus]</div><div class="posb_b_3">$post[iplogged]</div></div>
                <if condition="$post['forwardlink']">
                        <a href="$post[forwardlink]"><img src="$stylevar[imgdir_button]/forward.gif" alt="$vbphrase[forward_message]" border="0" /></a>
                </if>
<!-- post $post[postid] popup menu -->
<div class="vbmenu_popup" id="postmenu_$post[postid]_menu" style="display:none">
        <table cellpadding="4" cellspacing="1" border="0">
        <tr>
                <td class="thead">$post[username]</td>
        </tr>
        <if condition="$show['profile']">
                <tr><td class="vbmenu_option"><a href="member.php?$session[sessionurl]u=$post[userid]">$vbphrase[view_public_profile]</a></td></tr>
        </if>
        <if condition="$show['pmlink']">
                <tr><td class="vbmenu_option"><a href="private.php?$session[sessionurl]do=newpm&amp;u=$post[userid]" rel="nofollow"><phrase 1="$post[username]">$vbphrase[send_private_message_to_x]</phrase></a></td></tr>
        </if>
        <if condition="$show['emaillink']">
                <tr><td class="vbmenu_option"><a href="sendmessage.php?$session[sessionurl]do=mailmember&amp;u=$post[userid]" rel="nofollow"><phrase 1="$post[username]">$vbphrase[send_email_to_x]</phrase></a></td></tr>
        </if>
        <if condition="$show['homepage']">
                <tr><td class="vbmenu_option"><a href="$post[homepage]"><phrase 1="$post[username]">$vbphrase[visit_xs_homepage]</phrase></a></td></tr>
        </if>
        <if condition="$show['search']">
                <tr><td class="vbmenu_option"><a href="search.php?$session[sessionurl]do=finduser&amp;u=$post[userid]" rel="nofollow"><phrase 1="$post[username]">$vbphrase[find_more_posts_by_x]</phrase></a></td></tr>
        </if>
        <if condition="$post['userid'] AND $show['member']">
        <tr><td class="vbmenu_option"><a href="profile.php?$session[sessionurl]do=addlist&amp;userlist=buddy&amp;u=$post[userid]"><phrase 1="$post[username]">$vbphrase[add_x_to_contacts]</phrase></a></td></tr>
        </if>    $template_hook[postbit_user_popup]
        </table>
</div>
<!-- / post $post[postid] popup menu -->

--------------- Added [DATE]1384396527[/DATE] at [TIME]1384396527[/TIME] ---------------

Well... With about two hours of help from ozzy47... It's clear this cannot be done with my postbit_legacy template. Thank you ozzy for the great effort though.

Max Taxable 12-03-2013 01:14 AM

Per Ozzy47 however - he solved another issue this has with Firefox browser and styles that use border pinstriping for the posts? The edit to postbit_legacy was breaking the border, as in the image below where you see the cursor and in the post above. This break does not appear however in chrome or even IE.

https://vborg.vbsupport.ru/external/2013/12/45.jpg

To fix this

Find in postbit_legacy:

HTML Code:

<tr>
<td class="alt1" valign="bottom">
$template_hook[postbit_signature_end]
</td>
</tr>

Replace with:

HTML Code:

<tr>
<td class="alt1" valign="bottom" style="border-right: $stylevar[cellspacing]px solid $stylevar[tborder_bgcolor]; border-top: 0px">
$template_hook[postbit_signature_end]
</td>
</tr>

Kudos and much thanks to ozzy47 for fixing this.

Protonus 04-21-2014 09:43 PM

Hi, I have a fairly vanilla (no real hacks/mods installed right now) install of vB 4.2.2 PL1. It uses default / official styles. We have never had a likes / thanks system installed.

I want to end up with a Like system (not thanks), that works with Tapatalk. It looks like this hack in this thread, is the way to go, but I was hoping for a bit more guidance from someone familiar with this variant?

The OP links to the latest version of the "Post Thanks" mod, but it's the one for vB 3.x.

There is a 4.x version, here: https://vborg.vbsupport.ru/showthread.php?t=231666
But in that OP they note it's not current for the latest version of vB 4.x.

So they link to these two posts, which have unofficial versions of the Post Thanks mod:
https://vborg.vbsupport.ru/showpost....postcount=1941
and https://vborg.vbsupport.ru/showthrea...50#post2249550

I want to try and keep this as simple as possible. When we were vB 3.x we were using custom / premium Styles, along with lots of mods and hacks, and our code became very spaghetti and was absolute hell to try and keep up to date when vB updated, and trace problems, etc.

What is the best package to install, for this mod, for Post thanks, for vB 4.2.2? Simplest/easiest? Is there a master list of instructions for current vB version anywhere?

I appreciate any assistance in advance.

blind-eddie 06-06-2014 11:20 AM

Has anyone had success at getting this show on the "postbit" template using FF?
Shows without issue on postbit_legacy using FF.

I have tried a few changes without luck.
Would you mind sharing what you did to get this to show on postbit using FF.

--------------- Added [DATE]1402058347[/DATE] at [TIME]1402058347[/TIME] ---------------

Never mind.... It was an issue with a custom template... fixed

arrarrgee 06-08-2014 03:50 AM

Is there any way I could not show the usernames of all who have thanked..and instead just show the number of people who liked it.....ex: 6 liked this
could someone help me with this pls
Thx in advance
arr

Black Snow 06-11-2014 05:57 PM

1 Attachment(s)
Here is my custom "Like" box.

twista46 08-24-2014 07:33 PM

@Black Snow Please Share your Like Box

yamahapaul 08-25-2014 04:27 AM

Quote:

Originally Posted by twista46 (Post 2512595)
@Black Snow Please Share your Like Box

+1


:D

Black Snow 08-26-2014 07:55 AM

Quote:

Originally Posted by twista46 (Post 2512595)
@Black Snow Please Share your Like Box

Quote:

Originally Posted by yamahapaul (Post 2512616)
+1


:D

I would but it took a while to make and I'm wanting to keep it just on my forum. I could maybe make something similar and share that?....

twista46 08-26-2014 08:28 AM

Okay very nice

Max Taxable 08-26-2014 06:27 PM

Quote:

Originally Posted by Black Snow (Post 2512698)
I would but it took a while to make and I'm wanting to keep it just on my forum. I could maybe make something similar and share that?....

Glad I was able to inspire you.

oldengine 10-24-2014 01:25 AM

How come there are "Likes" on this forum, but I don't see a "like" button?

Duh! Thanks tbworld. I totally overlooked that area.

tbworld 10-24-2014 02:21 AM

On the right of the screen on every post there is a heart in the message header. Click the heart icon. :)

e24h 05-26-2015 06:35 AM

have totally re installed the product but will try again now... let me do this, i'll get back to you... thank you

StoppingTime 07-15-2015 02:00 AM

Has anyone been able to integrate this hack with vB's notification system? So for example, every time a user receives a "thanks" or "thumbs up" they'd receive a notification just like they would if they received, say, a VM? If so, how was this accomplished?

blind-eddie 07-15-2015 02:24 AM

Here ya go....

https://vborg.vbsupport.ru/showthread.php?t=279907

StoppingTime 07-16-2015 12:35 AM

Quote:

Originally Posted by blind-eddie (Post 2550242)

Thank you very much, this was just what I was looking for

sv1cec 09-07-2015 06:30 AM

OK, maybe I am a little late in this, but I've installed it, like it but I can't make the box move inside the post area, no matter what I tried.

I can make it move inside but:

- If I put it below the signature, then all the buttons at the bottom of the post get mangled.
- If I put it above the signature, the signature doesn't show and the buttons get mangled again.
- If I put it above the post, everything disappears, and the buttons get screwed up again.

I am using vB 4.2.2 and the postbit (not postbit_legacy) template.

Ideas?

--------------- Added [DATE]1441621426[/DATE] at [TIME]1441621426[/TIME] ---------------

OK, I've managed to solve the issue I had with this hack, or at least, I've managed to move the statistics box inside the postbit area, below the signature. The offending part, was the post_thanks_box template. As it was, when I installed the hack, it looked like this:

Code:

<li class="postbit<vb:if condition="$vboptions['legacypostbit']">legacy</vb:if> postbitim" id="post_thanks_box_{vb:raw post.postid}"<vb:if condition="!$post_thanks_box == 1"> style="display:none"</vb:if>>
        {vb:raw post_thanks_box}
</li>

I changed the li and /li to div and the problem of screwing up the buttons at the end of the post disappeared. So, here is what you have to do, to move the info box inside postbit.

1. Change your post_thanks_box template, to:

Code:

<div class="postbit<vb:if condition="$vboptions['legacypostbit']">legacy</vb:if> postbitim" id="post_thanks_box_{vb:raw post.postid}"<vb:if condition="!$post_thanks_box == 1"> style="display:none"</vb:if>>
        {vb:raw post_thanks_box}
</div>

2. Change the plugin postbit_display_complete in the Plugins manager to:

Code:

require_once(DIR . '/includes/functions_post_thanks.php');

if (!(defined('LOCATION_BYPASS')) && !(post_thanks_off($this->thread['forumid'], $this->post, $this->thread['firstpostid'], THIS_SCRIPT)))
{
        global $ids;

        $thanks = fetch_thanks($this->post['postid'], $ids);

        if (thanked_already($this->post) && $this->registry->options[post_thanks_delete_own])
        {
                $this->post['show_thanks_remove_option'] = true;
        }

        if ($this->post['post_thanks_amount'] > 0 && $this->thread['isdeleted'] == 0)
        {
                $this->post['post_thanks_bit'] = fetch_thanks_bit($this->thread['forumid'], $thanks);
                $this->post['post_thanks_user'] = $post_thanks_user;
                $this->post['post_thanks_amount_formatted'] = vb_number_format($this->post['post_thanks_amount']);

                $post_thanks_box = fetch_post_thanks_template($this->post);
        }

        $templater = vB_Template::create('post_thanks_box');
        $templater->register('post', $post);
        $templater->register('post_thanks_box', $post_thanks_box);
        $template_hook['postbit_signature_end'] .= $templater->render();
}

if ($this->registry->userinfo['userid'] != 0 && !(defined('LOCATION_BYPASS')) && !(post_thanks_off($thread['forumid'], $post, $thread['firstpostid'], THIS_SCRIPT)))
{
        $display_thanks_image = 'none';

        if (can_thank_this_post($post, $thread['isdeleted']) && !thanked_already($post))
        {
                $display_thanks_image = '';
        }

        $templater = vB_Template::create('post_thanks_button');
        $templater->register('post', $post);
        $templater->register('display_thanks_image', $display_thanks_image);
        $template_hook['postbit_controls'] .= $templater->render();
}

if ($this->registry->options['post_thanks_show_stats_postbit'])
{
        $post['post_thanks_user_amount_formatted'] = vb_number_format($post['post_thanks_user_amount']);
        $post['post_thanks_thanked_times_formatted'] = vb_number_format($post['post_thanks_thanked_times']);
        $post['post_thanks_thanked_posts_formatted'] = vb_number_format($post['post_thanks_thanked_posts']);

        $templater = vB_Template::create('post_thanks_postbit_info');
        $templater->register('post', $post);
        $template_hook['postbit_userinfo_right_after_posts'] .= $templater->render();
}

3. You may try using the post_thanks_postbit, the way I changed it, to better fit the postbit template:

Code:

<div style="background-color: #E1E4F3; border: 2px ridge #7BBA99; ; border-width: 2px 2px 2px 2px; padding: 2px; width:100%; margin: 0px auto 0px auto; margin-top:auto; margin-bottom:0px;">

<table border="0" width="100%">
<tr>
<td width="100">
<strong><b>Likes ($post[post_thanks_amount_formatted]) :</b></strong><br />
                               
</td><td>
<div style="float:left;">$post[post_thanks_bit]</div> <div style="float:right;"><if condition="$bbuserinfo['usergroupid'] == 6"><a href="post_thanks.php?do=post_thanks_remove_all&amp;p=$post[postid]"<if condition="$vboptions[disable_ajax] != 2"> onclick="return post_thanks_remove_all($post[postid], <if condition="$vboptions['post_groan_integrate']">true<else />false</if>);"</if> rel="nofollow">Delete All</a></if><if condition="$bbuserinfo['usergroupid'] == 6 AND $post['show_thanks_remove_option']"> | </if><if condition="$post['show_thanks_remove_option']"><a href="post_thanks.php?do=post_thanks_remove_user&amp;p=$post[postid]"<if condition="$vboptions['disable_ajax'] != 2"> onclick="return post_thanks_remove_user($post[postid], <if condition="$vboptions['post_groan_integrate']">true<else />false</if>);"</if> rel="nofollow">Unlike</a></if></div>
</td></tr></table>

</div>
<br />

I also cleaned up a little the way the "Likes" information is displayed in the user profile. While it is not the perfect way to do it (I should have created more phrases etc), again, as it is, it serves me fine, so I am posting it here.

Code:

<h5 class="subsubsectionhead">{vb:rawphrase post_thanks_total_thanks}</h5>
<dl class="stats">
        <dt>{vb:rawphrase post_thanks_total_thanks} given</dt>
        <dd>{vb:raw userinfo.post_thanks_user_amount_formatted}  -- <a href="post_thanks.php?{vb:raw session.sessionurl}do=findthanks_user_gave&amp;u={vb:raw userinfo.userid}">{vb:rawphrase post_thanks_search_user_gave, {vb:raw userinfo.username}}</a></dd>
</dl>
<dl class="stats">
        <dt>{vb:rawphrase post_thanks_total_thanks} received</dt>
        <dd><vb:if condition="$userinfo[post_thanks_thanked_times] == 1">
                {vb:rawphrase post_thanks_time_post}
        <vb:else />
                <vb:if condition="$userinfo[post_thanks_thanked_posts] == 1">
                        {vb:rawphrase post_thanks_times_post, {vb:raw userinfo.post_thanks_thanked_times_formatted}}
                <vb:else />
                        {vb:rawphrase post_thanks_times_posts, {vb:raw userinfo.post_thanks_thanked_times_formatted}, {vb:raw userinfo.post_thanks_thanked_posts_formatted}}
                </vb:if>
        </vb:if>  --  <a href="post_thanks.php?{vb:raw session.sessionurl}do=findthanks&amp;u={vb:raw userinfo.userid}">{vb:rawphrase post_thanks_search_user, {vb:raw userinfo.username}}</a></dd>
</dl>

My patch is not perfect, as it still screws up the signature, if you attempt to put the box above it, but it works when the box is under the signature and I am happy with it.

I hope this helps some people here.

pjkcards 11-30-2015 11:54 AM

Using the hack from post #35, I'm having a few issues:
1) I click like, then "remove this like", and the page refreshes saying:
"user, you do not have permission to access this page. This could be due to one of several reasons:"
2) Also getting a weird box (I think for the collapse, but that is turned off and it still shows). What's the best way to fix that?
https://www.dropbox.com/s/sk6hcn8789...58.45.png?dl=0
3) When I click "thanks" on a post with other thanks, and then remove my thanks, it collapses the box with other likes so I can't see them until I refresh the page.

Any help resolving this would be appreciated.
Thanks.


All times are GMT. The time now is 07:12 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.05168 seconds
  • Memory Usage 2,056KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (22)bbcode_code_printable
  • (3)bbcode_html_printable
  • (13)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (35)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete