vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.5 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=113)
-   -   [AJAX] Post Thank You Hack (https://vborg.vbsupport.ru/showthread.php?t=92410)

Abe1 05-05-2006 01:10 PM

Quote:

Originally Posted by Cybernetec

This one would take a while. I need some thinking behind it.

TomasDR 05-05-2006 04:07 PM

Quote:

Originally Posted by Abe1
Did you edit any of the templates? There were some major template edits. Make sure you revert the templates.

I just had installed your hack for the first time a little over a week ago, v4.2. When I came on the other day I noticed your upgrade so I downloaded it. I even checked your template edits against each other, since they were the same I did nothing except upload the product with overwrite on.

The only thing that is slightly different is I also have vBookie installed.
https://vborg.vbsupport.ru/showthread.php?t=94128

And that hack requires the template edit
Code:

  <if condition="$vboptions['vbookiecashon']">
      <br />$vbphrase[vbookie_vcash]: $post[vbookie_cash]
  </if>

In the templates postbit AND postbit_lagacy right where you require the addition of:

Code:

<!-- Start Post Thank You Hack -->
<if condition="$post[userid]">
<br />
$vbphrase[post_thanks_thanks]: $post[post_thanks_user_amount]
<br />
<if condition="$post[post_thanks_thanked_times_on] == 1">
$vbphrase[post_thanks_time_post]
<else />
<if condition="$post[post_thanks_thanked_posts_on] == 1">
<phrase 1="$post[post_thanks_thanked_times]">$vbphrase[post_thanks_times_post]</phrase>
<else />
<phrase 1="$post[post_thanks_thanked_times]" 2="$post[post_thanks_thanked_posts]">$vbphrase[post_thanks_times_posts]</phrase>
</if>
</if>
</if>
<!-- End Post Thank You Hack -->

So mine reads:

Code:

      $vbphrase[posts]: $post[posts]
  <if condition="$vboptions['vbookiecashon']">
      <br />$vbphrase[vbookie_vcash]: $post[vbookie_cash]
  </if>
<!-- Start Post Thank You Hack -->
....

As for access to my ACP that would be ok but I do run a graphic adult site.

Abe1 05-05-2006 04:30 PM

Quote:

Originally Posted by TomasDR
I just had installed your hack for the first time a little over a week ago, v4.2. When I came on the other day I noticed your upgrade so I downloaded it. I even checked your template edits against each other, since they were the same I did nothing except upload the product with overwrite on.

The only thing that is slightly different is I also have vBookie installed.
https://vborg.vbsupport.ru/showthread.php?t=94128

And that hack requires the template edit
Code:

  <if condition="$vboptions['vbookiecashon']">
      <br />$vbphrase[vbookie_vcash]: $post[vbookie_cash]
  </if>

In the templates postbit AND postbit_lagacy right where you require the addition of:

Code:

<!-- Start Post Thank You Hack -->
<if condition="$post[userid]">
<br />
$vbphrase[post_thanks_thanks]: $post[post_thanks_user_amount]
<br />
<if condition="$post[post_thanks_thanked_times_on] == 1">
$vbphrase[post_thanks_time_post]
<else />
<if condition="$post[post_thanks_thanked_posts_on] == 1">
<phrase 1="$post[post_thanks_thanked_times]">$vbphrase[post_thanks_times_post]</phrase>
<else />
<phrase 1="$post[post_thanks_thanked_times]" 2="$post[post_thanks_thanked_posts]">$vbphrase[post_thanks_times_posts]</phrase>
</if>
</if>
</if>
<!-- End Post Thank You Hack -->

So mine reads:

Code:

      $vbphrase[posts]: $post[posts]
  <if condition="$vboptions['vbookiecashon']">
      <br />$vbphrase[vbookie_vcash]: $post[vbookie_cash]
  </if>
<!-- Start Post Thank You Hack -->
....

As for access to my ACP that would be ok but I do run a graphic adult site.

I mean did you edit any of THIS HACK templates? Not the actual edits I say to make.

TomasDR 05-05-2006 04:59 PM

Quote:

Originally Posted by Abe1
I mean did you edit any of THIS HACK templates? Not the actual edits I say to make.

No not at all, actually when you were asking for more information I was going back and forth litterally just uploading the product with overwrite on.

RFViet 05-05-2006 05:37 PM

Quote:

Originally Posted by RS_Jelle
AdminCP => vBulletin Options => vBulletin Options => Post Thank You Hack => Post Count

Set that option to Yes ;)

I know that, but I want to be real post !!! like the way it was in vB3.07

Abe1 05-05-2006 06:00 PM

Quote:

Originally Posted by TomasDR
No not at all, actually when you were asking for more information I was going back and forth litterally just uploading the product with overwrite on.

I would have to look at your APC to figure out the problem.

Abe1 05-05-2006 06:01 PM

Quote:

Originally Posted by RFViet
I know that, but I want to be real post !!! like the way it was in vB3.07

If you want it a real post, then you dont need this hack. Just tell your users to post Thank You.

What do you mean by 'like it was in 3.0.7'? It was the same way as now.

vktechnology 05-06-2006 12:41 AM

I have error when press thank button

PHP Code:

Fatal errorUsing $this when not in object context in /home/palungjit/board/showthread.php(88) : eval()'d code on line 137 

what should i do ?

vktechnology 05-06-2006 12:44 AM

I have same problem.....
" the Thanks part does not appear unless they refresh their browser."

cavyspirit 05-06-2006 01:36 AM

I'd like to add one more (well, two, because I want the same thing for groan, also) queries in the memberlist area.

I'd like a query that shows all thanks (and groans) given by user.

Find all Thanked posts by Username (exists)
Find all Thanks given by Username (would like)

&

Find all Groaned at posts by Username (exists)
Find all Groans made by Username (would like)

That would be just great!! :)

cavyspirit 05-06-2006 03:10 AM

I like having the Memberinfo sorted a bit differently...

cavyspirit 05-06-2006 06:27 AM

Spoke too soon. The 'Remove All' feature on both Thanks and Groans isn't working for me.

meera 05-06-2006 06:46 PM

Quote:

Originally Posted by vktechnology
I have error when press thank button

PHP Code:

Fatal errorUsing $this when not in object context in /home/palungjit/board/showthread.php(88) : eval()'d code on line 137 

what should i do ?

I am also having this same problem.. please help :surprised:

bonjurkes 05-06-2006 07:28 PM

is there a change to integrate this to hide hack? So when a user press thank you they can see hidden post?

Abe1 05-07-2006 03:26 AM

Version 4.4 (5/7/06):
  • [FIXED] Bug with AJAX if you had the date showing.

vktechnology 05-07-2006 07:15 AM

Confirm FIXED..
Thank you Master Coder Abe1

YLP1 05-08-2006 07:25 PM

Hi all, I had disabled the groan modification pending the update. Does this new update automatically make use of the "groan" mod or do I need to reinstall it for it work with the Thank You mod?

Thanks in advance.

Abe1 05-08-2006 09:10 PM

Quote:

Originally Posted by YLP1
Hi all, I had disabled the groan modification pending the update. Does this new update automatically make use of the "groan" mod or do I need to reinstall it for it work with the Thank You mod?

Thanks in advance.

Update the groan hack also.

oricon 05-09-2006 06:27 AM

...done...

Traxdata 05-09-2006 07:59 AM

Great idea, great hack. Thank you!

vktechnology 05-10-2006 05:07 PM

Uses AJAX technology so your users don't have to refresh when they thank.
--------------------
very cool feature

Yorixz 05-10-2006 06:26 PM

Wonderful hack, really something I've been looking for.

I've got a few small problems though, because I'm trying to keep my forum a bit minimalistic (my taste ;)) I've been trying to put the list of users who thanked into a popup menu, similiar to the one you get if you click on a username.

To do this I've added a new button besides the "Reputation" one which needs to be clicked to see this menu.

The code I've used for this:
After "$post[iplogged]"
Code:

<!-- Start Modified Post Thank You Hack -->
$post_thanks
<!-- End Modified Post Thank You Hack -->

And in the template post_thanks_box I replaced the non-<script> content with
Code:

<!-- Start Modified Post Thank You Hack -->
<!-- post $post[postid] info menu -->

<div class="vbmenu_popup" id="infomenu_$post[postid]_menu" style="display:none">
        <table cellpadding="4" cellspacing="1" border="0">
        <tr>
                <td class="userinfo" id="post_thanks_box_$post[postid]">
                $post_thanks_box
                </td>
        </tr>
        </table>
</div>

<span id="infomenu_$post[postid]"><a href=""><img class="inlineimg" src="$stylevar[imgdir_button]/info.gif" alt="Post Info" border="0" /><script type="text/javascript"> vbmenu_register("infomenu_$post[postid]", true); </script></span>
<!-- End Modified Post Thank You Hack -->

In addition I've also removed the $spacer's out of the 'post_thanks_postbit_legacy' template.

It's working fairly well, I've got a few problems that I couldn't find a solution for though:
How can I 'extend' the hack some so I'll able to hide the info.gif image if there are no users who thanked for a post.
And how can I make sure the list will be updated when a user clicks the "Thanks" button? I'm afraid I destroyed the AJAX somewhere but can't figure out where it was.

Thanks a lot for your help, hopefully there are also other users interested in this.

Edit; reduced the template edits by one, still hoping for someone to help me fixing the bugs!

bashy 05-10-2006 06:31 PM

Do you have a demo of your extra bit or a screener please,
Do you think you could do the same for the post groan?

Pehaps you can release yours as an add on for these 2 hacks..

Its just that my post bit is looking a tad full ya see and getting rid of the
thanks and groans amounts would be a godsend :)

Quote:

Originally Posted by Yorixz
Wonderful hack, really something I've been looking for.

I've got a few small problems though, because I'm trying to keep my forum a bit minimalistic (my taste ;)) I've been trying to put the list of users who thanked into a popup menu, similiar to the one you get if you click on a username.

To do this I've added a new button besides the "Reputation" one which needs to be clicked to see this menu.

The code I've used for this:
After "$post[iplogged]"
Code:

<span id="infomenu_$post[postid]"><a href=""><img class="inlineimg" src="$stylevar[imgdir_button]/info.gif" alt="Post Info" border="0" /><script type="text/javascript"> vbmenu_register("infomenu_$post[postid]", true); </script></span>
After "<!-- / post #$post[postid] -->"
Code:

<!-- Start Post Thank You Hack -->
$post_thanks
<!-- End Post Thank You Hack -->

And in the template post_thanks_box I replaced the non-script content with
Code:

<!-- post $post[postid] info menu -->
<div class="vbmenu_popup" id="infomenu_$post[postid]_menu" style="display:none">
        <table cellpadding="4" cellspacing="1" border="0">
        <tr>
                <td class="userinfo" id="post_thanks_box_$post[postid]">
                $post_thanks_box
                </td>
        </tr>
        </table>
</div>
<!-- / post $post[postid] info menu -->

In addition I've also removed the $spacer's out of the 'post_thanks_postbit_legacy' template.

It's working fairly well, I've got a few problems that I couldn't find a solution for though:
How can I 'extend' the hack some so I'll able to hide the info.gif image if there are no users who thanked for a post.
And how can I make sure the list will be updated when a user clicks the "Thanks" button? I'm afraid I destroyed the AJAX somewhere but can't figure out where it was.

Thanks a lot for your help, hopefully there are also other users interested in this.


Yorixz 05-10-2006 06:39 PM

As soon as I've made sure all bugs are gone I'll definitely release it here (if Abe allows me, which shouldn't be too much of a problem as it's only a template edit).

You can find somewhat of a "demo" here: http://otfans.net/showthread.php?p=347708.
Code:

Logon with vBtest / test

bashy 05-10-2006 06:44 PM

wow...that is 100% brill m8...
look forward to the release if its allowed :)

Thanks for the login!

Abe1 05-11-2006 12:06 PM

Quote:

Originally Posted by Yorixz
As soon as I've made sure all bugs are gone I'll definitely release it here (if Abe allows me, which shouldn't be too much of a problem as it's only a template edit).

You can find somewhat of a "demo" here: http://otfans.net/showthread.php?p=347708.
Code:

Logon with vBtest / test

I have no problems with anyone releasing add-ons to my hacks.

Yorixz 05-11-2006 12:21 PM

I'm glad to hear that, could you also help me out some with the two problems I'm experiencing (which I posted a way up), thanks a lot.

bashy 05-13-2006 04:49 PM

Hi Yorixz I am not seeing a post_thanks_box template, i have a post_thanks_groan template though....?

Yorixz 05-13-2006 08:55 PM

I haven't got the Groan Hack installed so I don't know if/what templates it's overwriting. The post_thanks_box template is the one that has all the Javascript of the AJAX in it and at the bottom one line of HTML.

mktrilogy 05-14-2006 01:53 AM

im kinDA congfused, when u say

Do the template edits

in postbit AND postbit_lagacy:

find:
--------------------------------------------------------------------
$vbphrase[posts]: $post[posts]
--------------------------------------------------------------------

AFTER place this:
--------------------------------------------------------------------
<!-- Start Post Thank You Hack -->
<if condition="$post[userid]">
<br />
$vbphrase[post_thanks_thanks]: $post[post_thanks_user_amount]
<br />
<if condition="$post[post_thanks_thanked_times_on] == 1">
$vbphrase[post_thanks_time_post]
<else />
<if condition="$post[post_thanks_thanked_posts_on] == 1">
<phrase 1="$post[post_thanks_thanked_times]">$vbphrase[post_thanks_times_post]</phrase>
<else />
<phrase 1="$post[post_thanks_thanked_times]" 2="$post[post_thanks_thanked_posts]">$vbphrase[post_thanks_times_posts]</phrase>
</if>
</if>
</if>
<!-- End Post Thank You Hack -->
--------------------------------------------------------------------





i am using ------ Find and Replace in Templates (be careful!)-----


shoud i ------ Search for Text then =------- replace with text?

Meaning the value that u given should be replace or just add it to the variable ?

sample

$vbphrase[posts]: $post[posts] replace by <!-- Start Post Thank You Hack -->
<if condition="$post[userid]">
<br />
$vbphrase[post_thanks_thanks]: $post[post_thanks_user_amount]
<br />
<if condition="$post[post_thanks_thanked_times_on] == 1">
$vbphrase[post_thanks_time_post]
<else />
<if condition="$post[post_thanks_thanked_posts_on] == 1">
<phrase 1="$post[post_thanks_thanked_times]">$vbphrase[post_thanks_times_post]</phrase>
<else />
<phrase 1="$post[post_thanks_thanked_times]" 2="$post[post_thanks_thanked_posts]">$vbphrase[post_thanks_times_posts]</phrase>
</if>
</if>
</if>
<!-- End Post Thank You Hack -->



OR


$vbphrase[posts]: $post[posts]

then i just insert below this


<if condition="$post[userid]">
<br />
$vbphrase[post_thanks_thanks]: $post[post_thanks_user_amount]
<br />
<if condition="$post[post_thanks_thanked_times_on] == 1">
$vbphrase[post_thanks_time_post]
<else />
<if condition="$post[post_thanks_thanked_posts_on] == 1">
<phrase 1="$post[post_thanks_thanked_times]">$vbphrase[post_thanks_times_post]</phrase>
<else />
<phrase 1="$post[post_thanks_thanked_times]" 2="$post[post_thanks_thanked_posts]">$vbphrase[post_thanks_times_posts]</phrase>
</if>
</if>
</if>
<!-- End Post Thank You Hack -->


Sorry for the stupid question :)

Yorixz 05-14-2006 11:20 AM

It says "AFTER place this:", so you should place it after what you searched for.

BANDiT600 05-14-2006 03:15 PM

Look at the screenshot, what can be wrong??? BTW, using your hack from the beginning...;)

Abe1 05-14-2006 03:32 PM

Quote:

Originally Posted by BANDiT600
Look at the screenshot, what can be wrong??? BTW, using your hack from the beginning...;)

I'm not sure why you are getting that. I remmber getting that myself by I forgot what I did then.

bashy 05-14-2006 03:47 PM

Perhaps its something as simple as a _ after the button code in the postbit?

Quote:

Originally Posted by BANDiT600
Look at the screenshot, what can be wrong??? BTW, using your hack from the beginning...;)


BANDiT600 05-14-2006 03:49 PM

No, I don't think so, it happens after uploading an xml file.

BANDiT600 05-14-2006 04:05 PM

I always doing carefuly upgrade, here it's something wrong in code, I don't know where because I'm not PHP writer.

Tulsa 05-14-2006 05:23 PM

Bashy you could also move the thanks and groans amounts into the sig file section of the postbit or legacy, whichever you use. It would put them just under the users sig file. If they don't have a sig though, it won't show.

bashy 05-14-2006 05:43 PM

Cheers for the heads up Tulsa,
I have a few that dont have a sig so this wouldnt be much cop..

What i have done for noww to make it a little smaller is removed the
Code:

$vbphrase[post_thanks_thanks]: $post[post_thanks_user_amount]
and i have done the same for the groan hack as well...its only removed to lines from the postbit but its a start, i am a little reluctant to doing the other hack atm that the other member posted although i would like it, but i aint too confident in the instructions and i may mess it up

BANDiT600 05-14-2006 10:48 PM

Quote:

Originally Posted by Abe1
I'm not sure why you are getting that. I remmber getting that myself by I forgot what I did then.

Please, remember what you did... :hurt:

mitachi 05-17-2006 04:50 PM

thanks a lot


All times are GMT. The time now is 11:34 AM.

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

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.03833 seconds
  • Memory Usage 1,861KB
  • 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
  • (14)bbcode_code_printable
  • (2)bbcode_php_printable
  • (14)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (1)pagenav_pagelinkrel
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (40)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