vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 4.x Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=245)
-   -   Mini Mods - Recent Thanks for [AJAX] Post Thank You Hack (https://vborg.vbsupport.ru/showthread.php?t=280109)

Scandal 03-14-2012 11:00 PM

Recent Thanks for [AJAX] Post Thank You Hack
 
1 Attachment(s)
Info:
  • This mod works with the hack "[AJAX] Post Thank You Hack" as an addon and a) provides a page with the latest X (default: 25) "Thank You" the user has received b) notify the user via vbulletin notification menu (on navbar)
  • Very useful for users who want to keep up with the "Thank You" votes on their posts.
System Requirements:
  • [AJAX] Post Thank You Hack - for vB4
  • vBulletin 4.x
Installation information on hack:
  • Files edited: 0
  • Templates edited: 0
  • Files to upload: 1
  • Time to install: 1 minute max
How to install:
  1. Upload the file "recent_thanks.php" to your forum directory.
  2. Import XML file (as product): AdminCP > Plugin System > Manage Products > [Add/Import Product]
  3. (Optional if you enable the notifications) Add the link "http://www.yourforum.com/recent_thanks.php" where you want (for example to navbar).
Notice (not a bug): The system doesn't decrease the notifications' count for new "Thank you" when the admin push the "Remove all" of a post (rare but ok). So the user will notified but he will not see the removed votes on the page.

How to upgrade:
  1. Upload the new file recent_thanks.php
  2. Import XML file (as product): AdminCP > Plugin System > Manage Products > [Add/Import Product] with set of "Allow Overwrite" to YES


How to upgrade from vB3 version:
This hack developed from zero for vB4, so if you upgrade your forum from vB3 to vB4 with the vB3 version of this hack on it, you must uninstall first this older version and to do a clean install of this hack (product install and new file upload).

Changelog:
  • v2.5 - First release for vB4
  • v2.6 - updated file, linkable usernames, admincp phrase changed, 1 bug fix
  • V2.6.2 - add: who's online location (thanks to Hippy), 1 css fix

Tested on: vBulletin 4.1.11 - Post Thank You Hack 7.83

-> Don't forget to click INSTALL!

sadiq6210 03-15-2012 06:49 PM

Scandal, you are the best ^_^

Thank you very much for your effort to release it
I appreciate you

Installed + Nominated + 5 stars

Hippy 03-15-2012 08:16 PM

I like the idead thanks .. will test it out ..

thanks

djbaxter 03-15-2012 09:41 PM

In 4.1.1, with the settings as follows:

Quote:

Set to YES if you want to enable the page. = No
Enable notification system? = Yes
If enabled, user will recieve a notification (on vbulletin notification menu) each time a post has new "thanks" votes.
Notifications of a new Thanks do not occur. This feature, which was what I primarily wanted, only works if the "thanks page" option is enabled (which is okay but I don't particularly need it).

Scandal 03-16-2012 08:37 AM

Quote:

Originally Posted by djbaxter (Post 2309875)
In 4.1.1, with the settings as follows:
Notifications of a new Thanks do not occur. This feature, which was what I primarily wanted, only works if the "thanks page" option is enabled (which is okay but I don't particularly need it).

It is very necessary to enable the page, because the notifications' counter (Notifications: x) sets to 0 only when the user visit this page! So, if there wasn't this issue, the notifications' counter would be increase without cease. Also, on notifications there is the link to that page when a user has new thanks.
The page is the the main thing of this hack. :up:

Maybe I should set the title of "Set to YES if you want to enable the page" to "Enable the hack?". The page was the first idea of this hack, so after a lot of improvements I don't change the phrase. If I publish any new version, I'll change it, thanks!

sadiq6210 03-16-2012 08:53 AM

I suggest to make the username clickable in (from) column :)

djbaxter 03-16-2012 12:54 PM

Quote:

Originally Posted by Scandal (Post 2309973)
Maybe I should set the title of "Set to YES if you want to enable the page" to "Enable the hack?".

That would be more clear, yes.

Quote:

Originally Posted by Scandal (Post 2309973)
It is very necessary to enable the page, because the notifications' counter (Notifications: x) sets to 0 only when the user visit this page! So, if there wasn't this issue, the notifications' counter would be increase without cease. Also, on notifications there is the link to that page when a user has new thanks.

So if the member clicks the "new thanks" link on his own notifications, it takes him, to the page listing the last 25 or whatever thanks for the whole forum?

Scandal 03-16-2012 01:20 PM

Quote:

Originally Posted by djbaxter (Post 2310021)
So if the member clicks the "new thanks" link on his own notifications, it takes him, to the page listing the last 25 or whatever thanks for the whole forum?

No no, the page doesn't listing the recent thanks for the whole forum. Watch the screenshot: "Latest 25 "Thank you" on your posts"
Every user watch the latest Thanks on him posts. ;)

djbaxter 03-16-2012 01:53 PM

Ah... thank you! :)

Scandal 03-16-2012 02:00 PM

Quote:

Originally Posted by djbaxter (Post 2310050)
Ah... thank you! :)

v2.6 available! (I change the admincp phrase + 1 bug fix, see below)

Quote:

Originally Posted by Scandal
Notice (bug): Also, if you have enable the "Allow poster to thank themself", the user will receive notification for him votes.

fixed!! ;)

AURFSCAN 03-16-2012 02:05 PM

tagged but cant seem to download file.. 'Invalid Attachment specified'

anyone else? or just me?

AURFSCAN 03-16-2012 02:08 PM

works ok now.. must have tryed when you were updating file

I'll check it out.. cheers

Gemma 03-16-2012 04:52 PM

Nice idea. Thanks :)

temsamane 03-16-2012 10:50 PM

i need a mod to show the top of most thanked posts

Hippy 03-16-2012 11:33 PM

great addon..
suggestion.. when you pick the number of post thanks to show .. there should be a option to go to the next page on the recent_thanks.php page..

would be great

thanks again..
Regards
Hippy

AURFSCAN 03-17-2012 04:37 PM

another suggestion if you want take a look..

Usergroup permissions to receive notification

:)

Scandal 03-19-2012 07:59 AM

Quote:

Originally Posted by AURFSCAN (Post 2310421)
another suggestion if you want take a look..

Usergroup permissions to receive notification

:)

Quote:

Originally Posted by Hippy (Post 2310267)
great addon..
suggestion.. when you pick the number of post thanks to show .. there should be a option to go to the next page on the recent_thanks.php page..

would be great

thanks again..
Regards
Hippy

These functions are not on my priorities, but I'll have them in mind. :up:

Emeralda 03-19-2012 01:48 PM

It's a nice addition, but to be honest I was kinda hoping this would show all recently given thanks to everyone, not only you.

Furcal15 03-20-2012 05:51 PM

I did some modification to this....If anyone is interested....In the user info panel, it shows "Thanked XX times in XXX post", well that phrase is now a link and it takes you to http://yoursite.com/recent_thanks.php

See demo here: http://baseballnation.net/showthread...ll=1#post57431

Edit Templates > Post_Thanks_Postbit_Info and replace EVERYTHING will the following code:

Code:

<vb:if condition="$post['userid']">
    <dt>{vb:rawphrase post_thanks_thanks}</dt> <dd>{vb:raw post.post_thanks_user_amount_formatted}</dd>
    <vb:if condition="$post['post_thanks_thanked_times'] == 1">
        <dd style="white-space:nowrap; display:inline; float: {vb:stylevar left};"><a href="/recent_thanks.php">{vb:rawphrase post_thanks_time_post}</a></dd>
    <vb:elseif condition="$post['post_thanks_thanked_posts'] == 1" />
        <dd style="white-space:nowrap; display:inline; float: {vb:stylevar left};"><a href="recent_thanks.php">{vb:rawphrase post_thanks_times_post, {vb:raw post.post_thanks_thanked_times_formatted}}</a></dd>
    <vb:else />
        <dd style="white-space:nowrap; display:inline; float: {vb:stylevar left};"><a href="recent_thanks.php">{vb:rawphrase post_thanks_times_posts, {vb:raw post.post_thanks_thanked_times_formatted}, {vb:raw post.post_thanks_thanked_posts_formatted}}</a></dd>
    </vb:if>
</vb:if>


clutchthese 03-21-2012 02:10 AM

After installing this, the /recent_thanks.php doesn't display my header!!!

Here is a screenshot of what it looks like.

https://vborg.vbsupport.ru/external/2012/03/18.png

Hippy 03-21-2012 03:18 AM

only shows under notifications when your thanked like a pm ..

Hippy 03-21-2012 04:53 AM

1 Attachment(s)
Here's a little something for you perfectionists :D

I can't stand to see unknown location in the who's online...

how about you ??

here is a little plugin I tossed together for you guys

Scandal feel free to add it to your next release..
Also your efforts are very much appreciated .. First for not letting Abe1's mod fiddle away...:up: And this Release of a Great Addon For Abe1's Post Thanks Mod

ok
go to your admincp then Plugins & Products - Download / upload plugins > go all the way to the bottom you'll see "Import Plugin Definitions XML File" click browse file find the product.xml on your pc and then click import.. DONE!

here is a screen shot of what it looks like... feel free to change the wording around
enjoy
Hippy

Scandal 03-21-2012 12:57 PM

Quote:

Originally Posted by clutchthese (Post 2311603)
After installing this, the /recent_thanks.php doesn't display my header!!!

Here is a screenshot of what it looks like.

https://vborg.vbsupport.ru/external/2012/03/18.png

I talk with clutchthese via PM and the problem solved. The solution:
Quote:

Open the template recent_thanks and find find the line:
Code:

{vb:raw headinclude}
add below:
Code:

{vb:raw headinclude_bottom}

:up:

Scandal 03-21-2012 08:19 PM

Beta period has been passed. Enjoy! :D
  • v2.6.2 - add: who's online location (thanks to Hippy), 1 css fix

Hippy 03-21-2012 09:34 PM

your Da Man Scandal
welcome

Scandal 03-28-2012 10:52 AM

vB3.8.x version of this hack, here. :)

fai99al99 03-31-2012 12:54 AM

great add thank you and for Furcal15

Hippy 03-31-2012 02:07 AM

Quote:

Originally Posted by Furcal15 (Post 2311450)
I did some modification to this....If anyone is interested....In the user info panel, it shows "Thanked XX times in XXX post", well that phrase is now a link and it takes you to http://yoursite.com/recent_thanks.php

See demo here: http://baseballnation.net/showthread...ll=1#post57431

Edit Templates > Post_Thanks_Postbit_Info and replace EVERYTHING will the following code:

Code:

<vb:if condition="$post['userid']">
    <dt>{vb:rawphrase post_thanks_thanks}</dt> <dd>{vb:raw post.post_thanks_user_amount_formatted}</dd>
    <vb:if condition="$post['post_thanks_thanked_times'] == 1">
        <dd style="white-space:nowrap; display:inline; float: {vb:stylevar left};"><a href="/recent_thanks.php">{vb:rawphrase post_thanks_time_post}</a></dd>
    <vb:elseif condition="$post['post_thanks_thanked_posts'] == 1" />
        <dd style="white-space:nowrap; display:inline; float: {vb:stylevar left};"><a href="recent_thanks.php">{vb:rawphrase post_thanks_times_post, {vb:raw post.post_thanks_thanked_times_formatted}}</a></dd>
    <vb:else />
        <dd style="white-space:nowrap; display:inline; float: {vb:stylevar left};"><a href="recent_thanks.php">{vb:rawphrase post_thanks_times_posts, {vb:raw post.post_thanks_thanked_times_formatted}, {vb:raw post.post_thanks_thanked_posts_formatted}}</a></dd>
    </vb:if>
</vb:if>


revised it a little . added alt= for mouse over
Code:

<vb:if condition="$post['userid']">
    <dt>{vb:rawphrase post_thanks_thanks}</dt> <dd>{vb:raw post.post_thanks_user_amount_formatted}</dd>
    <vb:if condition="$post['post_thanks_thanked_times'] == 1">
        <dd style="white-space:nowrap; display:inline; float: {vb:stylevar left};"><a href="/recent_thanks.php" alt="" title="View Your Recent Thanks">{vb:rawphrase post_thanks_time_post}</a></dd>
    <vb:elseif condition="$post['post_thanks_thanked_posts'] == 1" />
        <dd style="white-space:nowrap; display:inline; float: {vb:stylevar left};"><a href="recent_thanks.php" alt="" title="View Your Recent Thanks">{vb:rawphrase post_thanks_times_post, {vb:raw post.post_thanks_thanked_times_formatted}}</a></dd>
    <vb:else />
        <dd style="white-space:nowrap; display:inline; float: {vb:stylevar left};"><a href="recent_thanks.php" alt="" title="View Your Recent Thanks">{vb:rawphrase post_thanks_times_posts, {vb:raw post.post_thanks_thanked_times_formatted}, {vb:raw post.post_thanks_thanked_posts_formatted}}</a></dd>
    </vb:if>
</vb:if>


Adam H 04-01-2012 09:42 AM

Like it and good to see the better Post thanks hack being worked on still, However i wish coders would take a little more time and put classes on their tables and divs so that everyone can style the mod how they like with out having to edit the mod templates them selves and everything can be done with CSS.

Hippy 04-01-2012 10:48 AM

Quote:

Originally Posted by Adam H (Post 2315662)
Like it and good to see the better Post thanks hack being worked on still, However i wish coders would take a little more time and put classes on their tables and divs so that everyone can style the mod how they like with out having to edit the mod templates them selves and everything can be done with CSS.

there is enough work just feeking it working like it should
please if you made improvements
pot them so we can add them..
poke the link in my sig to see what was done to date

Adam H 04-01-2012 11:51 AM

Quote:

Originally Posted by Hippy (Post 2315679)
there is enough work just feeking it working like it should
please if you made improvements
pot them so we can add them..
poke the link in my sig to see what was done to date

Its not a matter of making improvements its a matter of creating something that is good enough for people to customise , currently the design aspects are less than standard VB layout. Its not eye catching , if there was just a simple blank unique class added which you could then style from it would make it much better. 90% of modifications are not built with design in mind, more of functionality.

For example if there was a unique div class wrapping the blockbody it would then allow the entire page to be styled in a much nicer for each forum owner to style if they need too.

Its easy enough to edit the plugins template our selves and do it but it could potentially mean redoing it if there is template edit in future versions where as if there was an existing class the only thing we would need to edit is the additional.css which is what its designed for.

Just a thought

Great mod though.

Scandal 04-03-2012 12:06 PM

Recent Thanks for [AJAX] Post Thank You Hack is now on the poll for MOTM April 2012. Thanks to all for their choice! ;)

Hippy 04-03-2012 03:25 PM

Quote:

Originally Posted by Scandal (Post 2316341)
Recent Thanks for [AJAX] Post Thank You Hack is now on the poll for MOTM April 2012. Thanks to all for their choice! ;)

back @ you..

thanks for the great mod for abe1's mod .. helps keep it alive:up:

SeeLand 04-04-2012 07:23 PM

Great addon, works fine in vbulletin 4.1.11

sadiq6210 04-05-2012 05:09 AM

Voted. :up:

sivaganeshk 04-07-2012 01:51 PM

Can I change the phrase to LIKE ?

Scandal 04-07-2012 02:12 PM

Quote:

Originally Posted by sivaganeshk (Post 2317752)
Can I change the phrase to LIKE ?

Of course, this product uses the vbulletin phrases system, so you can change the relative phrase to "Likes". ;)

cashcash 04-08-2012 04:06 PM

1 Attachment(s)
this hack cause me a problem with the general setting in the usercp see pic attach
i also see a warning before:

Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in [path]/profile.php(2087) : eval()'d code on line 3

i use vb4.1.10

Emeralda 04-08-2012 06:34 PM

Quote:

Originally Posted by Scandal (Post 2317758)
Of course, this product uses the vbulletin phrases system, so you can change the relative phrase to "Likes". ;)

I was looking before in phrases for this: http://prntscr.com/7wavx but I couldn't find it >.<

Scandal 04-10-2012 01:01 PM

Quote:

Originally Posted by cashcash (Post 2318045)
this hack cause me a problem with the general setting in the usercp see pic attach
i also see a warning before:

Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in [path]/profile.php(2087) : eval()'d code on line 3

i use vb4.1.10

Go to admincp > Plugins & Products > Plugin Manager, open the plugin "Recent Thanks - UserCP Field Part2" and replace its contents with:
PHP Code:

if ($vbulletin->options['recent_thanks_notif'] AND $vbulletin->options['recent_thanks_on_off']){
    
$quer "SELECT recent_thankact FROM " TABLE_PREFIX "user WHERE userid = ".$vbulletin->userinfo['userid']." AND recent_thankact=1";
    
$temp $db->query_read($quer) or die("Error: "mysql_error(). " with query "$quer);
    
$isthere mysql_num_rows($temp);
    if(
$isthere){
    
$recent_thankact_checked 'checked="checked"';
    }
    else {
$recent_thankact_checked='';
    }

       
$templater vB_Template::create('recent_thanks_ufield');    
   
$templater->register('recent_thankact_checked'$recent_thankact_checked);
$templater->register_page_templates();  
   
$template_hook[usercp_options_messaging] .= $templater->render();



.. and post here the message you receive now on the usercp.

Quote:

Originally Posted by Emeralda (Post 2318097)
I was looking before in phrases for this: http://prntscr.com/7wavx but I couldn't find it >.<

wow you are right, this phrase in inside the file recent_thanks.php.
Open it and change the phrase Recent Thanks on the line:
PHP Code:

$navbits construct_navbits(array('' => 'Recent Thanks')); 

with that you want.


All times are GMT. The time now is 10:37 PM.

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.01902 seconds
  • Memory Usage 1,864KB
  • 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
  • (5)bbcode_code_printable
  • (2)bbcode_php_printable
  • (19)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
  • (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