View Single Post
  #35  
Old 07-18-2011, 07:10 PM
michal72 michal72 is offline
 
Join Date: Nov 2010
Posts: 213
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by reddyink View Post
Actually, pretty simple to modify this article for 4.x.x as there are just couple of phrase differences and plugin differences.
I have modified a little bit Joe's proposal to work with vb4

Change post_thanks_box template to:

PHP 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 posbit_legacy template find:
PHP Code:
<vb:if condition="$show['postedited'] || $post['signature']"
and add before:

PHP Code:
{vb:raw template_hook.postbit_messagearea_end
In Admin CP -> Plugin Manager, edit the plugin: Post Thank You Hack on hook: postbit_display_complete

Find:
PHP Code:
$template_hook['postbit_end'] .= $templater->render(); 
and replace with:
PHP Code:
    $template_hook['postbit_messagearea_end'] .= $templater->render(); 


You can also modify window's content:

In post_thanks_postbit template replace:

PHP Code:
    <h2 class="<vb:if condition="!$vboptions['legacypostbit']">post</vb:if>title">
        <
vb:if condition="$post['post_thanks_amount'] == 1">
            {
vb:rawphrase post_thanks_user_says, {vb:raw post.username}}
        <
vb:else />
            {
vb:rawphrase post_thanks_users_say, {vb:raw post.post_thanks_amount_formatted}, {vb:raw post.username}}
        </
vb:if>
    </
h2>
    <
div class="content">
        <
div id="post_thanks_bit_{vb:raw post.postid}">
            <
blockquote class="postcontent restore">
                {
vb:raw post.post_thanks_bit}
            </
blockquote>
        </
div>
    </
div
with:
PHP Code:
    <div class="content">
        <
div id="post_thanks_bit_{vb:raw post.postid}">
            <
blockquote class="postcontent restore">
                <
strong><vb:if condition="$post['post_thanks_amount'] == 1">
            {
vb:rawphrase post_thanks_user_says, {vb:raw post.username}}
        <
vb:else />
            {
vb:rawphrase post_thanks_users_say, {vb:raw post.post_thanks_amount_formatted}, {vb:raw post.username}}
        </
vb:if>
 </
strong>{vb:raw post.post_thanks_bit}
            </
blockquote>
        </
div>
    </
div
BR
Reply With Quote
11 благодарности(ей) от:
BirdOPrey5, del Drago, DS MrSinister, FReeSTER, Hippy, JimxJNM, Juggernaut, MagicThemeParks, midnz, NTMID8, reddyink
 
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01300 seconds
  • Memory Usage 1,827KB
  • Queries Executed 11 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD_SHOWPOST
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (7)bbcode_php
  • (1)bbcode_quote
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_box
  • (11)post_thanks_box_bit
  • (1)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (1)post_thanks_postbit
  • (1)post_thanks_postbit_info
  • (1)postbit
  • (1)postbit_onlinestatus
  • (1)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • reputationlevel
  • showthread
Included Files:
  • ./showpost.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showpost_start
  • bbcode_fetch_tags
  • bbcode_create
  • postbit_factory
  • showpost_post
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • fetch_musername
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • post_thanks_function_fetch_thanks_bit_start
  • post_thanks_function_show_thanks_date_start
  • post_thanks_function_show_thanks_date_end
  • post_thanks_function_fetch_thanks_bit_end
  • post_thanks_function_fetch_post_thanks_template_start
  • post_thanks_function_fetch_post_thanks_template_end
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • showpost_complete